Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllCapabilities = Capabilities{ CapabilityAT, CapabilityCreateST, CapabilitySettings, CapabilityTokeninfoHistory, CapabilityTokeninfoTree, CapabilityListST, }
AllCapabilities holds all defined capabilities
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities []Capability
Capabilities is a slice of Capability
func NewCapabilities ¶
func NewCapabilities(caps []string) (c Capabilities)
NewCapabilities casts a []string into Capabilities
func Tighten ¶
func Tighten(a, b Capabilities) (res Capabilities)
Tighten tightens two set of Capabilities into one new
func (Capabilities) Has ¶
func (c Capabilities) Has(a Capability) bool
Has checks if Capabilities slice contains the passed Capability
func (*Capabilities) Scan ¶
func (c *Capabilities) Scan(src interface{}) error
Scan implements the sql.Scanner interface.
func (Capabilities) Strings ¶
func (c Capabilities) Strings() (s []string)
Strings returns a slice of strings for these capabilities
type Capability ¶
type Capability string
Capability is a capability string
const ( CapabilityAT Capability = "AT" CapabilityCreateST Capability = "create_super_token" CapabilitySettings Capability = "settings" CapabilityTokeninfoHistory Capability = "tokeninfo_history" CapabilityTokeninfoTree Capability = "tokeninfo_tree" CapabilityListST Capability = "list_super_tokens" )
Constants for capabilities
Click to show internal directories.
Click to hide internal directories.