role

package
v0.0.38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Role

type Role struct {
	Name    string   `json:"name"`
	Label   string   `json:"label"`
	Implies Roles    `json:"-"`
	Over    []string `json:"over"`
}

func (*Role) Can

func (this *Role) Can(role string) bool

func (*Role) Implications

func (this *Role) Implications(validRoles Roles)

type Roles

type Roles []Role

func (*Roles) AssignEntities added in v0.0.11

func (roles *Roles) AssignEntities(name string, entityIDs []string)

func (Roles) ByName added in v0.0.4

func (roles Roles) ByName(name string) Role

func (Roles) Can

func (roles Roles) Can(name string) bool

func (Roles) CanOnly added in v0.0.12

func (roles Roles) CanOnly(name string) bool

func (Roles) CanOver added in v0.0.11

func (roles Roles) CanOver(name string, entityID string) bool

func (*Roles) Implications added in v0.0.11

func (this *Roles) Implications(validRoles Roles)

func (Roles) NamedMap added in v0.0.11

func (roles Roles) NamedMap() map[string]Role

func (*Roles) Scan

func (roles *Roles) Scan(value interface{}) error

func (Roles) Value

func (roles Roles) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL