rule

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

Documentation

Overview

Package rule provides the ability to filter *configservice.ConfigRule objects

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rule

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

Rule contains the necessary properties for testing *configservice.ConfigRule objects

func New

func New(client client.ConfigProvider) *Rule

New returns a new *Rule

func (*Rule) Arn

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

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

func (*Rule) Assert

func (r *Rule) Assert(t *testing.T, rules ...*configservice.ConfigRule) *Rule

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 rule if rules is not provided, *configservice.ConfigRule objects will be retreived from AWS

func (*Rule) CreatedBy

func (r *Rule) CreatedBy(service string) *Rule

CreatedBy adds the CreatedBy filter to the filter list the CreatedBy filter: filters rules by CreatedBy where 'service' provided is the expected CreatedBy value

func (*Rule) Description

func (r *Rule) Description(desc string) *Rule

Description adds the Description filter to the filter list the Description filter: filters rules by Description where 'desc' provided is the expected Description value

func (*Rule) Filter

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

Filter adds the 'filter' provided to the filter list

func (*Rule) First

func (r *Rule) First(t *testing.T, rules ...*configservice.ConfigRule) *Rule

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 rules is not provided, *configservice.ConfigRule objects will be retreived from AWS

func (*Rule) Frequency

func (r *Rule) Frequency(freq string) *Rule

Frequency adds the Frequency filter to the filter list the Frequency filter: filters rules by Frequency where 'freq' provided is the expected MaximumExecutionFrequency value

func (*Rule) ID

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

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

func (*Rule) Name

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

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

func (*Rule) ScopeID

func (r *Rule) ScopeID(id string) *Rule

ScopeID adds the ScopeID filter to the filter list the ScopeID filter: filters rules by ScopeID where 'id' provided is the expected ComplianceResourceId value

func (*Rule) ScopeTagKey

func (r *Rule) ScopeTagKey(key string) *Rule

ScopeTagKey adds the ScopeTagKey filter to the filter list the ScopeTagKey filter: filters rules by ScopeTagKey where 'key' provided is the expected TagKey value

func (*Rule) ScopeTagValue

func (r *Rule) ScopeTagValue(value string) *Rule

ScopeTagValue adds the ScopeTagValue filter to the filter list the ScopeTagValue filter: filters rules by ScopeTagValue where 'value' provided is the expected TagValue value

func (*Rule) ScopeTypes

func (r *Rule) ScopeTypes(types ...string) *Rule

ScopeTypes adds the ScopeTypes filter to the filter list the ScopeTypes filter: filters rules by ScopeTypes where 'types' provided is the expected ComplianceResourceTypes value

func (*Rule) Selected

func (r *Rule) Selected() *configservice.ConfigRule

Selected returns the currently selected *configservice.ConfigRule

func (*Rule) SourceDetailEventSource

func (r *Rule) SourceDetailEventSource(source string) *Rule

SourceDetailEventSource adds the SourceDetailEventSource filter to the filter list the SourceDetailEventSource filter: filters rules by SourceDetailEventSource where 'source' provided is the expected EventSource value

func (*Rule) SourceDetailFrequency

func (r *Rule) SourceDetailFrequency(freq string) *Rule

SourceDetailFrequency adds the SourceDetailFrequency filter to the filter list the SourceDetailFrequency filter: filters rules by SourceDetailFrequency where 'freq' provided is the expected MaximumExecutionFrequency value

func (*Rule) SourceDetailMessageType

func (r *Rule) SourceDetailMessageType(typ string) *Rule

SourceDetailMessageType adds the SourceDetailMessageType filter to the filter list the SourceDetailMessageType filter: filters rules by SourceDetailMessageType where 'typ' provided is the expected MessageType value

func (*Rule) SourceID

func (r *Rule) SourceID(id string) *Rule

SourceID adds the SourceID filter to the filter list the SourceID filter: filters rules by SourceID where 'id' provided is the expected SourceIdentifier value

func (*Rule) SourceOwner

func (r *Rule) SourceOwner(owner string) *Rule

SourceOwner adds the SourceOwner filter to the filter list the SourceOwner filter: filters rules by SourceOwner where 'owner' provided is the expected Owner value

func (*Rule) State

func (r *Rule) State(state string) *Rule

State adds the State filter to the filter list the State filter: filters rules by State where 'state' provided is the expected ConfigRuleState value

Jump to

Keyboard shortcuts

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