attached

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attached

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

Attached contains the necessary properties for testing *iam.AttachedPolicy objects

func New

func New(client client.ConfigProvider, roleName string) *Attached

New returns a new *Attached

func (*Attached) Arn

func (a *Attached) Arn(arn string) *Attached

Arn adds the Arn filter to the filter list the Arn filter: filters policies by Arn where 'arn' provided is the expected Arn value

func (*Attached) Assert

func (a *Attached) Assert(t *testing.T, policies ...*iam.AttachedPolicy) *Attached

Assert applies all filters that have been called, resets the list of filters, fails the test if there is not exactly one match, and stores the matched policy if policies is not provided, *iam.AttachedPolicy objects will be retreived from AWS

func (*Attached) Document

func (a *Attached) Document(t *testing.T, versionID string) *policy.Document

Document returns the unmarshaled policy document if versionID is empty, will return the default version

func (*Attached) Filter

func (a *Attached) Filter(filter shared.Filter) *Attached

Filter adds the 'filter' provided to the filter list

func (*Attached) First

func (a *Attached) First(t *testing.T, policies ...*iam.AttachedPolicy) *Attached

First applies all filters that have been called, resets the list of filters, fails the test if there are no matches, and stores the first match if policies is not provided, *iam.AttachedPolicy objects will be retreived from AWS

func (*Attached) Name

func (a *Attached) Name(name string) *Attached

Name adds the Name filter to the filter list the Name filter: filters policies by Name where 'name' provided is the expected PolicyName value

func (*Attached) Selected

func (a *Attached) Selected() *iam.AttachedPolicy

Selected returns the currently selected *iam.AttachedPolicy

func (*Attached) Statement

func (a *Attached) Statement(t *testing.T, doc *policy.Document) *statement.Statement

Statement returns a newly instantiated *statement.Statement object this is used for filtering by statements inside a policy. If doc is nil the default policy document will be retrieved from AWS

Jump to

Keyboard shortcuts

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