action

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ActionSet added in v0.1.5

type ActionSet []Type

ActionSet stores a slice of action types

func (ActionSet) HasAction added in v0.2.1

func (a ActionSet) HasAction(act Type) bool

HasAction returns whether the action set contains the given action.

func (ActionSet) OnlySelf added in v0.2.1

func (a ActionSet) OnlySelf() bool

OnlySelf returns true if all actions in the action set are self types. An empty set returns false. This may not be what you want so the caller should validate length and act appropriately as well.

func (ActionSet) Strings added in v0.1.5

func (a ActionSet) Strings() []string

Strings converts Actions into a slice of the actions' string equivalents

type Type

type Type uint

Type defines a type for the Actions of Resources actions are also stored as a lookup db table named iam_action

const (
	Unknown                   Type = 0
	List                      Type = 1
	Create                    Type = 2
	Update                    Type = 3
	Read                      Type = 4
	Delete                    Type = 5
	Authenticate              Type = 6
	All                       Type = 7
	AuthorizeSession          Type = 8
	AddGrants                 Type = 9
	RemoveGrants              Type = 10
	SetGrants                 Type = 11
	AddPrincipals             Type = 12
	SetPrincipals             Type = 13
	RemovePrincipals          Type = 14
	Deauthenticate            Type = 15
	AddMembers                Type = 16
	SetMembers                Type = 17
	RemoveMembers             Type = 18
	SetPassword               Type = 19
	ChangePassword            Type = 20
	AddHosts                  Type = 21
	SetHosts                  Type = 22
	RemoveHosts               Type = 23
	AddHostSets               Type = 24
	SetHostSets               Type = 25
	RemoveHostSets            Type = 26
	Cancel                    Type = 27
	AddAccounts               Type = 28
	SetAccounts               Type = 29
	RemoveAccounts            Type = 30
	ReadSelf                  Type = 31
	CancelSelf                Type = 32
	ChangeState               Type = 33
	DeleteSelf                Type = 34
	NoOp                      Type = 35
	AddCredentialLibraries    Type = 36
	SetCredentialLibraries    Type = 37
	RemoveCredentialLibraries Type = 38
)

not using iota intentionally, since the values are stored in the db as well.

func (Type) String

func (a Type) String() string

Jump to

Keyboard shortcuts

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