trail

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

Documentation

Overview

Package trail provides functions and filters to test AWS CloudTrail Trails

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trail

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

Trail contains the necessary properties for testing *cloudtrail.Trail objects

func New

func New(client client.ConfigProvider) *Trail

New returns a new *Trail

func (*Trail) ARN

func (r *Trail) ARN(arn string) *Trail

ARN adds the ARN filter as an alias to the TrailARN filter

func (*Trail) Assert

func (r *Trail) Assert(t *testing.T, trails ...*cloudtrail.Trail) *Trail

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 trail if trails is not provided, *cloudtrail.Trail objects will be retreived from AWS

func (*Trail) CloudWatchLogsLogGroupArn

func (r *Trail) CloudWatchLogsLogGroupArn(arn string) *Trail

CloudWatchLogsLogGroupArn adds the CloudWatchLogsLogGroupArn filter to the filter list the CloudWatchLogsLogGroupArn filter: filters trails by CloudWatchLogsLogGroupArn where 'arn' provided is the expected CloudWatchLogsLogGroupArn value

func (*Trail) CloudWatchLogsRoleArn

func (r *Trail) CloudWatchLogsRoleArn(arn string) *Trail

CloudWatchLogsRoleArn adds the CloudWatchLogsRoleArn filter to the filter list the CloudWatchLogsRoleArn filter: filters trails by CloudWatchLogsRoleArn where 'arn' provided is the expected CloudWatchLogsRoleArn value

func (*Trail) Filter

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

Filter adds the 'filter' provided to the filter list

func (*Trail) First

func (r *Trail) First(t *testing.T, trails ...*cloudtrail.Trail) *Trail

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 trails is not provided, *cloudtrail.Trail objects will be retreived from AWS

func (*Trail) HasCustomEventSelectors

func (r *Trail) HasCustomEventSelectors(b bool) *Trail

HasCustomEventSelectors adds the HasCustomEventSelectors filter to the filter list the HasCustomEventSelectors filter: filters trails by HasCustomEventSelectors where 'b' provided is the expected HasCustomEventSelectors value

func (*Trail) HasInsightSelectors

func (r *Trail) HasInsightSelectors(b bool) *Trail

HasInsightSelectors adds the HasInsightSelectors filter to the filter list the HasInsightSelectors filter: filters trails by HasInsightSelectors where 'b' provided is the expected HasInsightSelectors value

func (*Trail) HomeRegion

func (r *Trail) HomeRegion(str string) *Trail

HomeRegion adds the HomeRegion filter to the filter list the HomeRegion filter: filters trails by HomeRegion where 'str' provided is the expected HomeRegion value

func (*Trail) IncludeGlobalServiceEvents

func (r *Trail) IncludeGlobalServiceEvents(b bool) *Trail

IncludeGlobalServiceEvents adds the IncludeGlobalServiceEvents filter to the filter list the IncludeGlobalServiceEvents filter: filters trails by IncludeGlobalServiceEvents where 'b' provided is the expected IncludeGlobalServiceEvents value

func (*Trail) IsMultiRegionTrail

func (r *Trail) IsMultiRegionTrail(b bool) *Trail

IsMultiRegionTrail adds the IsMultiRegionTrail filter to the filter list the IsMultiRegionTrail filter: filters trails by IsMultiRegionTrail where 'b' provided is the expected IsMultiRegionTrail value

func (*Trail) IsOrganizationTrail

func (r *Trail) IsOrganizationTrail(b bool) *Trail

IsOrganizationTrail adds the IsOrganizationTrail filter to the filter list the IsOrganizationTrail filter: filters trails by IsOrganizationTrail where 'b' provided is the expected IsOrganizationTrail value

func (*Trail) KmsKeyID

func (r *Trail) KmsKeyID(id string) *Trail

KmsKeyID adds the KmsKeyID filter to the filter list the KmsKeyID filter: filters trails by KmsKeyId where 'id' provided is the expected KmsKeyId value

func (*Trail) LogFileValidationEnabled

func (r *Trail) LogFileValidationEnabled(b bool) *Trail

LogFileValidationEnabled adds the LogFileValidationEnabled filter to the filter list the LogFileValidationEnabled filter: filters trails by LogFileValidationEnabled where 'b' provided is the expected LogFileValidationEnabled value

func (*Trail) Name

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

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

func (*Trail) S3BucketName

func (r *Trail) S3BucketName(name string) *Trail

S3BucketName adds the S3BucketName filter to the filter list the S3BucketName filter: filters trails by S3BucketName where 'name' provided is the expected S3BucketName value

func (*Trail) S3KeyPrefix

func (r *Trail) S3KeyPrefix(str string) *Trail

S3KeyPrefix adds the S3KeyPrefix filter to the filter list the S3KeyPrefix filter: filters trails by S3KeyPrefix where 'str' provided is the expected S3KeyPrefix value

func (*Trail) Selected

func (r *Trail) Selected() *cloudtrail.Trail

Selected returns the currently selected *cloudtrail.Trail

func (*Trail) SnsTopicARN

func (r *Trail) SnsTopicARN(arn string) *Trail

SnsTopicARN adds the SnsTopicARN filter to the filter list the SnsTopicARN filter: filters trails by SnsTopicARN where 'arn' provided is the expected SnsTopicARN value

func (*Trail) TrailARN

func (r *Trail) TrailARN(arn string) *Trail

TrailARN adds the TrailARN filter to the filter list the TrailARN filter: filters trails by TrailARN where 'arn' provided is the expected TrailARN value

Jump to

Keyboard shortcuts

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