document

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Name        string
	Description string
	Package     string
	Roles       []RoleDefinition
	SilentRoles []RoleDefinition
	DefaultRole string
	Policies    []PolicyDefinition
}

type PolicyDefinition

type PolicyDefinition struct {
	// Name must begin with either "Allow" or "Deny" prefix. The prefix determines if the returned value when a policy matches will be either Allow or Deny.
	Name string
	// Description expresses the comment that will be added above the generated policy function.
	Description              string
	MatchResourcePathExactly string
	MatchResourcePathByMask  string
	MatchAnyAction           []string
	MatchEachPredicate       []PredicateDefinition
	MatchAnyPredicate        []PredicateDefinition
}

func (*PolicyDefinition) Validate

func (p *PolicyDefinition) Validate() (err error)

type PredicateDefinition

type PredicateDefinition struct {
	Property      string
	DesiredValues []string
}

type RoleDefinition

type RoleDefinition struct {
	Name        string
	Description string
	Policies    []string
}

func (*RoleDefinition) Render

func (r *RoleDefinition) Render(w io.Writer) error

func (*RoleDefinition) Validate

func (r *RoleDefinition) Validate() error

type TestCaseDefinition

type TestCaseDefinition struct {
	Action         string
	ResourcePath   []string
	MockPredicates map[string]bool
	ExpectAllow    bool
	ExpectDeny     bool
	ExpectOmit     bool
}

Jump to

Keyboard shortcuts

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