//go:generate go run tailscale.com/cmd/viewer --type=User,Node,Hostinfo,NetInfo,Login,DNSConfig,RegisterResponse,DERPRegion,DERPMap,DERPNode --clonefunc
//go:generate go run tailscale.com/cmd/viewer --type=User,Node,Hostinfo,NetInfo,Login,DNSConfig,RegisterResponse,DERPRegion,DERPMap,DERPNode,SSHRule,SSHPrincipal --clonefunc
//go:generate go run tailscale.com/cmd/cloner -clonefunc=true -type=User,Node,Hostinfo,NetInfo,Login,DNSConfig,RegisterResponse,DERPRegion,DERPMap,DERPNode
//go:generate go run tailscale.com/cmd/cloner -clonefunc=true -type=User,Node,Hostinfo,NetInfo,Login,DNSConfig,RegisterResponse,DERPRegion,DERPMap,DERPNode,SSHRule,SSHPrincipal
// View returns a readonly view of User.
func(p*User)View()UserView{
@ -763,3 +763,137 @@ var _DERPNodeViewNeedsRegeneration = DERPNode(struct {
InsecureForTestsbool
STUNTestIPstring
}{})
// View returns a readonly view of SSHRule.
func(p*SSHRule)View()SSHRuleView{
returnSSHRuleView{ж:p}
}
// SSHRuleView provides a read-only view over SSHRule.
//
// Its methods should only be called if `Valid()` returns true.
typeSSHRuleViewstruct{
// ж is the underlying mutable value, named with a hard-to-type
// character that looks pointy like a pointer.
// It is named distinctively to make you think of how dangerous it is to escape
// to callers. You must not let callers be able to mutate it.
ж*SSHRule
}
// Valid reports whether underlying value is non-nil.
func(vSSHRuleView)Valid()bool{returnv.ж!=nil}
// AsStruct returns a clone of the underlying value which aliases no memory with