Documentation ¶
Index ¶
- type Client
- type MetricFilter
- type MetricFilterPattern
- type MockClient
- type MockClient_AggregateResources_Call
- func (_c *MockClient_AggregateResources_Call) Return(_a0 *Resource, _a1 error) *MockClient_AggregateResources_Call
- func (_c *MockClient_AggregateResources_Call) Run(run func(ctx context.Context)) *MockClient_AggregateResources_Call
- func (_c *MockClient_AggregateResources_Call) RunAndReturn(run func(context.Context) (*Resource, error)) *MockClient_AggregateResources_Call
- type MockClient_Expecter
- type MonitoringItem
- type Provider
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricFilter ¶
type MetricFilter struct { cloudwatchlogs_types.MetricFilter ParsedFilterPattern MetricFilterPattern }
type MetricFilterPattern ¶
type MetricFilterPattern struct {
// contains filtered or unexported fields
}
MetricFilterPattern is a union between simpleExpression and complexExpression because a metric filter pattern it can be either one or the other. The fields are never used in go layer, only in OPA layer, therefore the nolint comment
type MockClient ¶
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) AggregateResources ¶
func (_m *MockClient) AggregateResources(ctx context.Context) (*Resource, error)
AggregateResources provides a mock function with given fields: ctx
func (*MockClient) EXPECT ¶
func (_m *MockClient) EXPECT() *MockClient_Expecter
type MockClient_AggregateResources_Call ¶
MockClient_AggregateResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AggregateResources'
func (*MockClient_AggregateResources_Call) Return ¶
func (_c *MockClient_AggregateResources_Call) Return(_a0 *Resource, _a1 error) *MockClient_AggregateResources_Call
func (*MockClient_AggregateResources_Call) Run ¶
func (_c *MockClient_AggregateResources_Call) Run(run func(ctx context.Context)) *MockClient_AggregateResources_Call
func (*MockClient_AggregateResources_Call) RunAndReturn ¶
func (_c *MockClient_AggregateResources_Call) RunAndReturn(run func(context.Context) (*Resource, error)) *MockClient_AggregateResources_Call
type MockClient_Expecter ¶
type MockClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockClient_Expecter) AggregateResources ¶
func (_e *MockClient_Expecter) AggregateResources(ctx interface{}) *MockClient_AggregateResources_Call
AggregateResources is a helper method to define mock.On call
- ctx context.Context
type MonitoringItem ¶
type MonitoringItem struct { TrailInfo cloudtrail.TrailInfo MetricFilters []MetricFilter MetricTopicBinding map[string][]string }
type Provider ¶
type Provider struct { Cloudtrail cloudtrail.TrailService Cloudwatch cloudwatch.Cloudwatch Cloudwatchlogs logs.CloudwatchLogs Sns sns.SNS Log *logp.Logger }
func NewProvider ¶
func NewProvider(ctx context.Context, log *logp.Logger, awsConfig aws.Config, trailCrossRegionFactory awslib.CrossRegionFactory[cloudtrail.Client], cloudwatchCrossResignFactory awslib.CrossRegionFactory[cloudwatch.Client], cloudwatchlogsCrossRegionFactory awslib.CrossRegionFactory[logs.Client], snsCrossRegionFactory awslib.CrossRegionFactory[sns.Client]) *Provider
type Resource ¶
type Resource struct {
Items []MonitoringItem
}