Documentation ¶
Index ¶
- Variables
- type Role
- type UnitOrganization
- 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) HasUnitOrganizationPermission(unitOrgId, 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) RoleUnitOrganizations(roleId string) []UnitOrganization
- 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)
- func (u *User) SetRoles(roles []Role)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUserDoesNotHaveRole = errors.New("user_does_not_have_role")
)
Functions ¶
This section is empty.
Types ¶
type Role ¶
type Role struct { Id string `json:"id"` Name string `json:"name"` Permissions []string `json:"permissions"` UnitOrganizations []UnitOrganization `json:"unit_organizations"` IsDefault bool `json:"is_default"` }
type UnitOrganization ¶ added in v1.6.0
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) HasPermission ¶
func (*User) HasUnitOrganizationPermission ¶ added in v1.6.0
func (*User) HashedPassword ¶
func (*User) ImpersonatorId ¶ added in v1.4.0
func (*User) PreferredUsername ¶
func (*User) RoleUnitOrganizations ¶ added in v1.6.0
func (u *User) RoleUnitOrganizations(roleId string) []UnitOrganization
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.