Documentation ¶
Index ¶
- Variables
- type Role
- type User
- func (u *User) AddRole(id string, name string, permissions []string, isDefault bool)
- func (u *User) Email() string
- func (u *User) HasPermission(permission string) bool
- func (u *User) HashedPassword() string
- func (u *User) Id() string
- func (u *User) ImpersonatorId() *string
- func (u *User) Name() string
- func (u *User) Phone() string
- func (u *User) Picture() string
- func (u *User) PreferredUsername() string
- func (u *User) Roles() []Role
- func (u *User) SetEmail(email string)
- func (u *User) SetHashedPassword(hashedPassword string)
- func (u *User) SetImpersonatorId(impersonatorId *string)
- func (u *User) SetName(name string)
- func (u *User) SetPhone(phone string)
- func (u *User) SetPicture(picture string)
- func (u *User) SetPreferredUsername(preferredUsername string)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUserDoesNotHaveRole = errors.New("user_does_not_have_role")
)
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) HasPermission ¶
func (*User) HashedPassword ¶
func (*User) ImpersonatorId ¶ added in v1.4.0
func (*User) PreferredUsername ¶
func (*User) SetHashedPassword ¶
func (*User) SetImpersonatorId ¶ added in v1.4.0
func (*User) SetPicture ¶
func (*User) SetPreferredUsername ¶
Click to show internal directories.
Click to hide internal directories.