policy

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Allow = "Allow"
	Deny  = "Deny"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action interface {
	// contains filtered or unexported methods
}

type Actions

type Actions struct {
	// contains filtered or unexported fields
}

func AllActions

func AllActions() *Actions

func SomeActions

func SomeActions(action string, actionMore ...string) *Actions

func (*Actions) Action

func (as *Actions) Action() Action

Action return one of SingleAction, MultiAction or nil

func (*Actions) MarshalJSON

func (as *Actions) MarshalJSON() ([]byte, error)

func (*Actions) UnmarshalJSON

func (as *Actions) UnmarshalJSON(data []byte) error

type AllPrincipal

type AllPrincipal struct{}

type Condition

type Condition map[string][]string

type Conditions

type Conditions map[string]Condition

type MultiAction

type MultiAction []string

type MultiPrincipal

type MultiPrincipal map[string][]string

type MultiResource

type MultiResource []string

type Principal

type Principal interface {
	// contains filtered or unexported methods
}

type Principals

type Principals struct {
	// contains filtered or unexported fields
}

func AllPrincipals

func AllPrincipals() *Principals

func SomePrincipals

func SomePrincipals(principal string, principalMore ...string) *Principals

func (*Principals) MarshalJSON

func (p *Principals) MarshalJSON() ([]byte, error)

func (*Principals) Principal

func (p *Principals) Principal() Principal

Principal return one of AllPrincipal, MultiPrincipal or nil

func (*Principals) UnmarshalJSON

func (p *Principals) UnmarshalJSON(data []byte) error

type Resource

type Resource interface {
	// contains filtered or unexported methods
}

type Resources

type Resources struct {
	// contains filtered or unexported fields
}

func SomeResource

func SomeResource(resource string, resourceMore ...string) *Resources

func (*Resources) MarshalJSON

func (as *Resources) MarshalJSON() ([]byte, error)

func (*Resources) Resource

func (as *Resources) Resource() Resource

func (*Resources) UnmarshalJSON

func (as *Resources) UnmarshalJSON(data []byte) error

type Rules

type Rules struct {
	Version    string      `json:"Version,omitempty"`
	ID         string      `json:"Id,omitempty"`
	Statements []Statement `json:"Statement,omitempty"`
}

type SingleAction

type SingleAction string

type SingleResource

type SingleResource string

type Statement

type Statement struct {
	Sid        string      `json:"Sid,omitempty"`
	Effect     string      `json:"Effect,omitempty"`
	Principals *Principals `json:"Principal,omitempty"`
	Actions    *Actions    `json:"Action,omitempty"`
	Resources  *Resources  `json:"Resource,omitempty"`
	Conditions Conditions  `json:"Condition,omitempty"`
}

Jump to

Keyboard shortcuts

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