logging

package
v0.0.0-...-19bd712 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	DescribeTrails(ctx context.Context) ([]awslib.AwsResource, error)
}

type EnrichedTrail

type EnrichedTrail struct {
	cloudtrail.TrailInfo
	BucketInfo TrailBucket `json:"bucket_info"`
}

func (EnrichedTrail) GetRegion

func (e EnrichedTrail) GetRegion() string

func (EnrichedTrail) GetResourceArn

func (e EnrichedTrail) GetResourceArn() string

func (EnrichedTrail) GetResourceName

func (e EnrichedTrail) GetResourceName() string

func (EnrichedTrail) GetResourceType

func (e EnrichedTrail) GetResourceType() string

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockClient) DescribeTrails

func (_m *MockClient) DescribeTrails(ctx context.Context) ([]awslib.AwsResource, error)

DescribeTrails provides a mock function with given fields: ctx

func (*MockClient) EXPECT

func (_m *MockClient) EXPECT() *MockClient_Expecter

type MockClient_DescribeTrails_Call

type MockClient_DescribeTrails_Call struct {
	*mock.Call
}

MockClient_DescribeTrails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeTrails'

func (*MockClient_DescribeTrails_Call) Return

func (*MockClient_DescribeTrails_Call) Run

func (*MockClient_DescribeTrails_Call) RunAndReturn

type MockClient_Expecter

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

func (*MockClient_Expecter) DescribeTrails

func (_e *MockClient_Expecter) DescribeTrails(ctx interface{}) *MockClient_DescribeTrails_Call

DescribeTrails is a helper method to define mock.On call

  • ctx context.Context

type Provider

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

func NewProvider

func NewProvider(
	log *logp.Logger,
	cfg aws.Config,
	multiRegionTrailFactory awslib.CrossRegionFactory[cloudtrail.Client],
	multiRegionS3Factory awslib.CrossRegionFactory[s3.Client],
	accountId string,
) *Provider

func (*Provider) DescribeTrails

func (p *Provider) DescribeTrails(ctx context.Context) ([]awslib.AwsResource, error)

type TrailBucket

type TrailBucket struct {
	Policy  s3.BucketPolicy              `json:"policy,omitempty"`
	Logging s3.Logging                   `json:"logging,omitempty"`
	ACL     *s3Client.GetBucketAclOutput `json:"acl,omitempty"`
}

Jump to

Keyboard shortcuts

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