Documentation ¶
Index ¶
- func ToRoleNameIdentifier(name string, t string) *pb.RoleIdentifier
- func ToRoleUuidIdentifier(roleId string) *pb.RoleIdentifier
- type Role
- type RolePermissionBinding
- type User
- func (u *User) AddPermissions(perms []string)
- func (u *User) AddRoles(roles []string)
- func (u *User) RemovePermissions(perms []string)
- func (u *User) RemoveRoles(roles []string)
- func (u *User) SetPermissions(perms []*UserPermissionBinding)
- func (u *User) SetRoles(bindings []*UserRoleBinding)
- func (u *User) ToProtoUser() *pb.User
- type UserPermissionBinding
- type UserRoleBinding
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToRoleNameIdentifier ¶
func ToRoleNameIdentifier(name string, t string) *pb.RoleIdentifier
func ToRoleUuidIdentifier ¶
func ToRoleUuidIdentifier(roleId string) *pb.RoleIdentifier
Types ¶
type Role ¶
type Role struct { Id string `db:"id"` Name string `db:"name"` Type string `db:"type"` Priority int32 `db:"priority"` Transient bool `db:"transient"` Color string `db:"color"` Permissions []string }
func FromProtoRole ¶
func (*Role) AddPermissions ¶
func (*Role) RemovePermissions ¶
func (*Role) SetPermissions ¶
func (r *Role) SetPermissions(perms []*RolePermissionBinding)
func (*Role) ToProtoRole ¶
type RolePermissionBinding ¶
type User ¶
func (*User) AddPermissions ¶
func (*User) RemovePermissions ¶
func (*User) RemoveRoles ¶
func (*User) SetPermissions ¶
func (u *User) SetPermissions(perms []*UserPermissionBinding)
func (*User) SetRoles ¶
func (u *User) SetRoles(bindings []*UserRoleBinding)
func (*User) ToProtoUser ¶
type UserPermissionBinding ¶
type UserRoleBinding ¶
Click to show internal directories.
Click to hide internal directories.