You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/ipn/localapi
Nick Khyl 4e7f4086b2 ipn: generate LoginProfileView and use it instead of *LoginProfile where appropriate
Conventionally, we use views (e.g., ipn.PrefsView, tailcfg.NodeView, etc.) when
dealing with structs that shouldn't be mutated. However, ipn.LoginProfile has been
an exception so far, with a mix of passing and returning LoginProfile by reference
(allowing accidental mutations) and by value (which is wasteful, given its
current size of 192 bytes).

In this PR, we generate an ipn.LoginProfileView and use it instead of passing/returning
LoginProfiles by mutable reference or copying them when passing/returning by value.
Now, LoginProfiles can only be mutated by (*profileManager).setProfilePrefs.

Updates #14823

Signed-off-by: Nick Khyl <nickk@tailscale.com>
10 months ago
..
cert.go cmd/tailscale: add --min-validity flag to the cert command (#12822) 1 year ago
debugderp.go util/uniq,types/lazy,*: delete code that's now in Go std 11 months ago
disabled_stubs.go all: update copyright and license headers 3 years ago
localapi.go ipn: generate LoginProfileView and use it instead of *LoginProfile where appropriate 10 months ago
localapi_test.go all: illumos/solaris userspace only support 11 months ago
pprof.go all: update copyright and license headers 3 years ago