monitor

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogEntry

type LogEntry struct {
	TimeGenerated      string
	OperationName      string
	ObjectKey          string
	RequesterObjectId  string
	AuthenticationType string
	CorrelationId      string
}

func (LogEntry) FromRow

func (l LogEntry) FromRow(row azquery.Row, columns []*azquery.Column) LogEntry

type MockMonitorService

type MockMonitorService struct {
	mock.Mock
}

MockMonitorService is an autogenerated mock type for the MonitorService type

func NewMockMonitorService

func NewMockMonitorService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMonitorService

NewMockMonitorService creates a new instance of MockMonitorService. 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 (*MockMonitorService) EXPECT

func (*MockMonitorService) GetLogs

func (_m *MockMonitorService) GetLogs(ctx context.Context, configMap *config.ConfigMap, query string, startDate time.Time, resourceGroup string, nameSpace string, resourceType string, resourceName string) ([]LogEntry, error)

GetLogs provides a mock function with given fields: ctx, configMap, query, startDate, resourceGroup, nameSpace, resourceType, resourceName

func (*MockMonitorService) GetResourceDiagnosticSetting

func (_m *MockMonitorService) GetResourceDiagnosticSetting(ctx context.Context, configMap *config.ConfigMap, resourceGroup string, nameSpace string, resourceType string, resourceName string) (*ResourceDiagnosticSetting, error)

GetResourceDiagnosticSetting provides a mock function with given fields: ctx, configMap, resourceGroup, nameSpace, resourceType, resourceName

func (*MockMonitorService) HasLogsEnabled

func (_m *MockMonitorService) HasLogsEnabled(ctx context.Context, configMap *config.ConfigMap, resourceGroup string, nameSpace string, resourceType string, resourceName string) (bool, error)

HasLogsEnabled provides a mock function with given fields: ctx, configMap, resourceGroup, nameSpace, resourceType, resourceName

type MockMonitorService_Expecter

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

func (*MockMonitorService_Expecter) GetLogs

func (_e *MockMonitorService_Expecter) GetLogs(ctx interface{}, configMap interface{}, query interface{}, startDate interface{}, resourceGroup interface{}, nameSpace interface{}, resourceType interface{}, resourceName interface{}) *MockMonitorService_GetLogs_Call

GetLogs is a helper method to define mock.On call

  • ctx context.Context
  • configMap *config.ConfigMap
  • query string
  • startDate time.Time
  • resourceGroup string
  • nameSpace string
  • resourceType string
  • resourceName string

func (*MockMonitorService_Expecter) GetResourceDiagnosticSetting

func (_e *MockMonitorService_Expecter) GetResourceDiagnosticSetting(ctx interface{}, configMap interface{}, resourceGroup interface{}, nameSpace interface{}, resourceType interface{}, resourceName interface{}) *MockMonitorService_GetResourceDiagnosticSetting_Call

GetResourceDiagnosticSetting is a helper method to define mock.On call

  • ctx context.Context
  • configMap *config.ConfigMap
  • resourceGroup string
  • nameSpace string
  • resourceType string
  • resourceName string

func (*MockMonitorService_Expecter) HasLogsEnabled

func (_e *MockMonitorService_Expecter) HasLogsEnabled(ctx interface{}, configMap interface{}, resourceGroup interface{}, nameSpace interface{}, resourceType interface{}, resourceName interface{}) *MockMonitorService_HasLogsEnabled_Call

HasLogsEnabled is a helper method to define mock.On call

  • ctx context.Context
  • configMap *config.ConfigMap
  • resourceGroup string
  • nameSpace string
  • resourceType string
  • resourceName string

type MockMonitorService_GetLogs_Call

type MockMonitorService_GetLogs_Call struct {
	*mock.Call
}

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

func (*MockMonitorService_GetLogs_Call) Return

func (*MockMonitorService_GetLogs_Call) Run

func (_c *MockMonitorService_GetLogs_Call) Run(run func(ctx context.Context, configMap *config.ConfigMap, query string, startDate time.Time, resourceGroup string, nameSpace string, resourceType string, resourceName string)) *MockMonitorService_GetLogs_Call

func (*MockMonitorService_GetLogs_Call) RunAndReturn

type MockMonitorService_GetResourceDiagnosticSetting_Call

type MockMonitorService_GetResourceDiagnosticSetting_Call struct {
	*mock.Call
}

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

func (*MockMonitorService_GetResourceDiagnosticSetting_Call) Return

func (*MockMonitorService_GetResourceDiagnosticSetting_Call) Run

func (_c *MockMonitorService_GetResourceDiagnosticSetting_Call) Run(run func(ctx context.Context, configMap *config.ConfigMap, resourceGroup string, nameSpace string, resourceType string, resourceName string)) *MockMonitorService_GetResourceDiagnosticSetting_Call

type MockMonitorService_HasLogsEnabled_Call

type MockMonitorService_HasLogsEnabled_Call struct {
	*mock.Call
}

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

func (*MockMonitorService_HasLogsEnabled_Call) Return

func (*MockMonitorService_HasLogsEnabled_Call) Run

func (_c *MockMonitorService_HasLogsEnabled_Call) Run(run func(ctx context.Context, configMap *config.ConfigMap, resourceGroup string, nameSpace string, resourceType string, resourceName string)) *MockMonitorService_HasLogsEnabled_Call

func (*MockMonitorService_HasLogsEnabled_Call) RunAndReturn

type MonitorService

type MonitorService interface {
	HasLogsEnabled(ctx context.Context, configMap *config.ConfigMap, resourceGroup, nameSpace, resourceType, resourceName string) (bool, error)
	GetResourceDiagnosticSetting(ctx context.Context, configMap *config.ConfigMap, resourceGroup, nameSpace, resourceType, resourceName string) (*ResourceDiagnosticSetting, error)
	GetLogs(ctx context.Context, configMap *config.ConfigMap, query string, startDate time.Time, resourceGroup, nameSpace, resourceType, resourceName string) ([]LogEntry, error)
}

func NewMonitorService

func NewMonitorService() MonitorService

type ResourceDiagnosticSetting

type ResourceDiagnosticSetting struct {
	Resource        string `json:"resource"`
	WorkspaceID     string `json:"workspace_id"`
	ReadLogsEnabled bool   `json:"read_logs_enabled"`
}

Jump to

Keyboard shortcuts

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