Documentation ¶
Index ¶
- Variables
- func RegisterPermissions(name ...Permission)
- type Module
- type Permission
- type Permissions
- func (t *Permissions) Can(per Permission) bool
- func (t *Permissions) CanAll(list ...Permission) bool
- func (t *Permissions) CanAny(list ...Permission) bool
- func (t *Permissions) Grant(list ...Permission)
- func (t *Permissions) GrantAll()
- func (t *Permissions) Revoke(per ...Permission)
- func (t *Permissions) RevokeAll()
- type Service
- type ServiceModel
Constants ¶
This section is empty.
Variables ¶
View Source
var AllPermissions = NewPermissions()
List of all registered permissions from all the modules
Functions ¶
func RegisterPermissions ¶
func RegisterPermissions(name ...Permission)
Types ¶
type Permission ¶
type Permission string
type Permissions ¶
type Permissions []Permission
func NewPermissions ¶
func NewPermissions() *Permissions
func (*Permissions) Can ¶
func (t *Permissions) Can(per Permission) bool
func (*Permissions) CanAll ¶
func (t *Permissions) CanAll(list ...Permission) bool
func (*Permissions) CanAny ¶
func (t *Permissions) CanAny(list ...Permission) bool
func (*Permissions) Grant ¶
func (t *Permissions) Grant(list ...Permission)
func (*Permissions) GrantAll ¶
func (t *Permissions) GrantAll()
func (*Permissions) Revoke ¶
func (t *Permissions) Revoke(per ...Permission)
func (*Permissions) RevokeAll ¶
func (t *Permissions) RevokeAll()
type ServiceModel ¶
Click to show internal directories.
Click to hide internal directories.