Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Permissions ¶
type Permissions map[Permission]bool
Permissions contains permissions that have been granted.
func (Permissions) Has ¶
func (p Permissions) Has(permission Permission) bool
Has returns whether permission has been granted.
func (Permissions) HasOne ¶
func (p Permissions) HasOne(permissions ...Permission) bool
HasOne returns whether one of the provided permissions has been granted.
func (Permissions) MarshalJSON ¶
func (p Permissions) MarshalJSON() ([]byte, error)
MarshalJSON JSON encodes the map.
func (Permissions) Remove ¶
func (p Permissions) Remove(permissions ...Permission)
Remove removes permissions.
Click to show internal directories.
Click to hide internal directories.