Documentation ¶
Index ¶
- type Role
- type Store
- func (s *Store) AddRole(ctx context.Context, r Role) (Role, error)
- func (s *Store) DeleteRole(ctx context.Context, r Role) error
- func (s *Store) EditRole(ctx context.Context, r Role) (Role, error)
- func (s *Store) GetRole(ctx context.Context, r Role) (Role, error)
- func (s *Store) GetRoles(ctx context.Context) ([]Role, error)
- func (s *Store) RemoveRoleForPermissions(ctx context.Context, r Role) error
- func (s *Store) RemoveRoleForUsers(ctx context.Context, r Role) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Role ¶
type Role struct { RoleID int `db:"role_id" json:"id"` Name string `db:"name" json:"name" schema:"name"` Description string `db:"description" json:"description" schema:"description"` Users int `db:"users" json:"users"` Permissions int `db:"permissions" json:"permissions"` }
Role represents relevant user fields
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store stores the dependencies
func (*Store) DeleteRole ¶
DeleteRole deletes a role
func (*Store) RemoveRoleForPermissions ¶ added in v1.0.0
RemoveRoleForPermissions deletes a rolePermission
Click to show internal directories.
Click to hide internal directories.