role

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Role

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

Role contains the necessary properties for testing *iam.Role objects

func New

func New(client client.ConfigProvider) *Role

New returns a new *Role

func (*Role) Arn

func (r *Role) Arn(arn string) *Role

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

func (*Role) Assert

func (r *Role) Assert(t *testing.T, roles ...*iam.Role) *Role

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 role if roles is not provided, *iam.Role objects will be retreived from AWS

func (*Role) Attached

func (r *Role) Attached() *attached.Attached

Attached returns a newly instantiated *attached.Attached object used for finding *iam.AttachedPolicy objects

func (*Role) Document

func (r *Role) Document(t *testing.T) *policy.Document

func (*Role) Filter

func (r *Role) Filter(filter shared.Filter) *Role

Filter adds the 'filter' provided to the filter list

func (*Role) First

func (r *Role) First(t *testing.T, roles ...*iam.Role) *Role

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 roles is not provided, *iam.Role objects will be retreived from AWS

func (*Role) ID

func (r *Role) ID(id string) *Role

ID adds the ID filter to the filter list the ID filter: filters roles by ID where 'id' provided is the expected RoleId value

func (*Role) Inlined

func (r *Role) Inlined(t *testing.T, doc *policy.Document) *statement.Statement

Inlined returns a newly instantiated *statement.Statement object used for filtering inlined Role Policies

func (*Role) Name

func (r *Role) Name(name string) *Role

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

func (*Role) Selected

func (r *Role) Selected() *iam.Role

Selected returns the currently selected *iam.Role

func (*Role) Statement

func (r *Role) Statement(t *testing.T) *statement.Statement

Statement returns a newly instantiated *statement.Statement object this is used for filtering by statements inside the AssumeRolePolicyDocument

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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