Documentation ¶
Index ¶
- type Policy
- func (p *Policy) Arn(arn string) *Policy
- func (p *Policy) Assert(t *testing.T, policies ...*iam.Policy) *Policy
- func (p *Policy) Document(t *testing.T, versionID string) *policy.Document
- func (p *Policy) Filter(filter shared.Filter) *Policy
- func (p *Policy) First(t *testing.T, policies ...*iam.Policy) *Policy
- func (p *Policy) ID(id string) *Policy
- func (p *Policy) Name(name string) *Policy
- func (p *Policy) Selected() *iam.Policy
- func (p *Policy) Statement(t *testing.T, doc *policy.Document) *statement.Statement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy struct {
// contains filtered or unexported fields
}
Policy contains the necessary properties for testing *iam.Policy objects
func (*Policy) Arn ¶
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 (*Policy) Assert ¶
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.Policy objects will be retreived from AWS
func (*Policy) Document ¶
Document returns the unmarshaled policy document if versionID is empty, will return the default version
func (*Policy) First ¶
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.Policy objects will be retreived from AWS
func (*Policy) ID ¶
ID adds the ID filter to the filter list the ID filter: filters policies by ID where 'id' provided is the expected PolicyId value
func (*Policy) Name ¶
Name adds the Name filter to the filter list the Name filter: filters policies by Name where 'name' provided is the expected PolicyName value