Documentation ¶
Overview ¶
Package trail provides functions and filters to test AWS CloudTrail Trails
Index ¶
- type Trail
- func (r *Trail) ARN(arn string) *Trail
- func (r *Trail) Assert(t *testing.T, trails ...*cloudtrail.Trail) *Trail
- func (r *Trail) CloudWatchLogsLogGroupArn(arn string) *Trail
- func (r *Trail) CloudWatchLogsRoleArn(arn string) *Trail
- func (r *Trail) Filter(filter shared.Filter) *Trail
- func (r *Trail) First(t *testing.T, trails ...*cloudtrail.Trail) *Trail
- func (r *Trail) HasCustomEventSelectors(b bool) *Trail
- func (r *Trail) HasInsightSelectors(b bool) *Trail
- func (r *Trail) HomeRegion(str string) *Trail
- func (r *Trail) IncludeGlobalServiceEvents(b bool) *Trail
- func (r *Trail) IsMultiRegionTrail(b bool) *Trail
- func (r *Trail) IsOrganizationTrail(b bool) *Trail
- func (r *Trail) KmsKeyID(id string) *Trail
- func (r *Trail) LogFileValidationEnabled(b bool) *Trail
- func (r *Trail) Name(name string) *Trail
- func (r *Trail) S3BucketName(name string) *Trail
- func (r *Trail) S3KeyPrefix(str string) *Trail
- func (r *Trail) Selected() *cloudtrail.Trail
- func (r *Trail) SnsTopicARN(arn string) *Trail
- func (r *Trail) TrailARN(arn string) *Trail
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 (*Trail) 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 trail if trails is not provided, *cloudtrail.Trail objects will be retreived from AWS
func (*Trail) CloudWatchLogsLogGroupArn ¶
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 ¶
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) 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 trails is not provided, *cloudtrail.Trail objects will be retreived from AWS
func (*Trail) HasCustomEventSelectors ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
SnsTopicARN adds the SnsTopicARN filter to the filter list the SnsTopicARN filter: filters trails by SnsTopicARN where 'arn' provided is the expected SnsTopicARN value