monitoring

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: 14 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 {
	// AggregateResources will gather all the resource to be used for aws cis 4.1 ... 4.15 rules
	AggregateResources(ctx context.Context) (*Resource, error)
}

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

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) 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

type MockClient_AggregateResources_Call struct {
	*mock.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 (*MockClient_AggregateResources_Call) Run

func (*MockClient_AggregateResources_Call) RunAndReturn

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(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

func (*Provider) AggregateResources

func (p *Provider) AggregateResources(ctx context.Context) (*Resource, error)

AggregateResources will gather all the resource to be used for aws cis 4.1 ... 4.15 rules

type Resource

type Resource struct {
	Items []MonitoringItem
}

Jump to

Keyboard shortcuts

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