dataprovider

package
v0.0.0-...-4a1a3ae Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonDataProvider

type CommonDataProvider interface {
	EnrichEvent(event *beat.Event, resource fetching.ResourceMetadata) error
}

type ElasticCommonDataProvider

type ElasticCommonDataProvider interface {
	GetElasticCommonData() (map[string]any, error)
}

type Enricher

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

func NewEnricher

func NewEnricher(dataprovider ElasticCommonDataProvider) *Enricher

func (*Enricher) EnrichEvent

func (e *Enricher) EnrichEvent(event *beat.Event) error

type IdProvider

type IdProvider interface {
	GetId(resourceType string, resourceId string) string
}

type MockCommonDataProvider

type MockCommonDataProvider struct {
	mock.Mock
}

MockCommonDataProvider is an autogenerated mock type for the CommonDataProvider type

func NewMockCommonDataProvider

func NewMockCommonDataProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCommonDataProvider

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

func (*MockCommonDataProvider) EnrichEvent

func (_m *MockCommonDataProvider) EnrichEvent(event *beat.Event, resource fetching.ResourceMetadata) error

EnrichEvent provides a mock function with given fields: event, resource

type MockCommonDataProvider_EnrichEvent_Call

type MockCommonDataProvider_EnrichEvent_Call struct {
	*mock.Call
}

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

func (*MockCommonDataProvider_EnrichEvent_Call) Return

func (*MockCommonDataProvider_EnrichEvent_Call) Run

func (*MockCommonDataProvider_EnrichEvent_Call) RunAndReturn

type MockCommonDataProvider_Expecter

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

func (*MockCommonDataProvider_Expecter) EnrichEvent

func (_e *MockCommonDataProvider_Expecter) EnrichEvent(event interface{}, resource interface{}) *MockCommonDataProvider_EnrichEvent_Call

EnrichEvent is a helper method to define mock.On call

  • event *beat.Event
  • resource fetching.ResourceMetadata

type MockElasticCommonDataProvider

type MockElasticCommonDataProvider struct {
	mock.Mock
}

MockElasticCommonDataProvider is an autogenerated mock type for the ElasticCommonDataProvider type

func NewMockElasticCommonDataProvider

func NewMockElasticCommonDataProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockElasticCommonDataProvider

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

func (*MockElasticCommonDataProvider) GetElasticCommonData

func (_m *MockElasticCommonDataProvider) GetElasticCommonData() (map[string]interface{}, error)

GetElasticCommonData provides a mock function with given fields:

type MockElasticCommonDataProvider_Expecter

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

func (*MockElasticCommonDataProvider_Expecter) GetElasticCommonData

GetElasticCommonData is a helper method to define mock.On call

type MockElasticCommonDataProvider_GetElasticCommonData_Call

type MockElasticCommonDataProvider_GetElasticCommonData_Call struct {
	*mock.Call
}

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

func (*MockElasticCommonDataProvider_GetElasticCommonData_Call) Return

func (*MockElasticCommonDataProvider_GetElasticCommonData_Call) Run

func (*MockElasticCommonDataProvider_GetElasticCommonData_Call) RunAndReturn

type MockIdProvider

type MockIdProvider struct {
	mock.Mock
}

MockIdProvider is an autogenerated mock type for the IdProvider type

func NewMockIdProvider

func NewMockIdProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockIdProvider

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

func (*MockIdProvider) GetId

func (_m *MockIdProvider) GetId(resourceType string, resourceId string) string

GetId provides a mock function with given fields: resourceType, resourceId

type MockIdProvider_Expecter

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

func (*MockIdProvider_Expecter) GetId

func (_e *MockIdProvider_Expecter) GetId(resourceType interface{}, resourceId interface{}) *MockIdProvider_GetId_Call

GetId is a helper method to define mock.On call

  • resourceType string
  • resourceId string

type MockIdProvider_GetId_Call

type MockIdProvider_GetId_Call struct {
	*mock.Call
}

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

func (*MockIdProvider_GetId_Call) Return

func (*MockIdProvider_GetId_Call) Run

func (_c *MockIdProvider_GetId_Call) Run(run func(resourceType string, resourceId string)) *MockIdProvider_GetId_Call

func (*MockIdProvider_GetId_Call) RunAndReturn

Directories

Path Synopsis
providers
k8s

Jump to

Keyboard shortcuts

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