tailcfg: remove unused User fields

Fixes #14542

Change-Id: Ifeb0f90c570c1b555af761161f79df75f18ae3f9
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2025-01-06 09:54:11 -08:00
committed by Brad Fitzpatrick
parent 5da772c670
commit b90707665e
5 changed files with 20 additions and 33 deletions
+5 -9
View File
@@ -66,12 +66,10 @@ func (v *UserView) UnmarshalJSON(b []byte) error {
return nil
}
func (v UserView) ID() UserID { return v.ж.ID }
func (v UserView) DisplayName() string { return v.ж.DisplayName }
func (v UserView) ProfilePicURL() string { return v.ж.ProfilePicURL }
func (v UserView) Created() time.Time { return v.ж.Created }
func (v UserView) LoginName() string { return v.ж.LoginName }
func (v UserView) Logins() views.Slice[LoginID] { return views.SliceOf(v.ж.Logins) }
func (v UserView) ID() UserID { return v.ж.ID }
func (v UserView) DisplayName() string { return v.ж.DisplayName }
func (v UserView) ProfilePicURL() string { return v.ж.ProfilePicURL }
func (v UserView) Created() time.Time { return v.ж.Created }
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
var _UserViewNeedsRegeneration = User(struct {
@@ -79,8 +77,6 @@ var _UserViewNeedsRegeneration = User(struct {
DisplayName string
ProfilePicURL string
Created time.Time
LoginName string
Logins []LoginID
}{})
// View returns a readonly view of Node.
@@ -637,7 +633,7 @@ func (v *RegisterResponseView) UnmarshalJSON(b []byte) error {
return nil
}
func (v RegisterResponseView) User() UserView { return v.ж.User.View() }
func (v RegisterResponseView) User() User { return v.ж.User }
func (v RegisterResponseView) Login() Login { return v.ж.Login }
func (v RegisterResponseView) NodeKeyExpired() bool { return v.ж.NodeKeyExpired }
func (v RegisterResponseView) MachineAuthorized() bool { return v.ж.MachineAuthorized }