capabilities

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

func (Capabilities) Value

func (c Capabilities) Value() (driver.Value, error)

Value implements the driver.Valuer interface

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

Jump to

Keyboard shortcuts

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