statement

package
v0.0.5-0...-3bd4ab3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Statement

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

Statement stores necessary objects for filtering *PolicyStatement objects

func New

func New(doc *policy.Document) *Statement

New returns a new *Statement

func (*Statement) Action

func (s *Statement) Action(action ...string) *Statement

Action adds the Action filter to the filter list the Action filter: filters *Statement objects by 'Action' where 'arn' provided is the expected Action value

func (*Statement) Assert

func (s *Statement) Assert(t *testing.T) *Statement

Assert executes the filter list against all *policy.Statement objects inside the doc provided to New(), next it will reset the filter list, fail the test if there is not exactly one match and store the match

func (*Statement) Condition

func (s *Statement) Condition(operator string, property string, value ...string) *Statement

Condition adds the Condition filter to the filter list the Condition filter: filters *Statement objects by 'Condition' where 'operator, property, and value' provided are the expected Condition property values

func (*Statement) Effect

func (s *Statement) Effect(effect string) *Statement

Effect adds the Effect filter to the filter list the Effect filter: filters *Statement objects by 'Effect' where 'effect' provided is the expected Effect value

func (*Statement) Filter

func (s *Statement) Filter(filter shared.Filter) *Statement

Filter adds the 'filter' provided to the filter list

func (*Statement) First

func (s *Statement) First(t *testing.T) *Statement

First executes the filter list against all *policy.Statement objects inside the doc provided to New(), it will reset the filter list, fail the test if there no match, and store the first match

func (*Statement) Principal

func (s *Statement) Principal(typ string, values ...string) *Statement

Principal adds the Principal filter to the filter list the Principal filter: filters *Statement objects by 'Principal' where 'typ, and values' provided are the expected Principal property values

func (*Statement) Resource

func (s *Statement) Resource(resource ...string) *Statement

Resource adds the Resource filter to the filter list the Resource filter: filters *Statement objects by 'Resource' where 'resource' provided is the expected Resource value

func (*Statement) Selected

func (s *Statement) Selected() *policy.Statement

Selected returns the currently selected *policy.Statement

func (*Statement) Sid

func (s *Statement) Sid(sid string) *Statement

Sid adds the Sid filter to the filter list the Sid filter: filters *Statement objects by 'Sid' where 'sid' provided is the expected Sid value

Jump to

Keyboard shortcuts

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