mocks

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockEnergyDeriver

type MockEnergyDeriver struct {
	mock.Mock
}

MockEnergyDeriver is an autogenerated mock type for the EnergyDeriver type

func NewMockEnergyDeriver

func NewMockEnergyDeriver(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockEnergyDeriver

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

func (*MockEnergyDeriver) Energy

func (_mock *MockEnergyDeriver) Energy(ctx context.Context, names []string, level derive.Level, from time.Time, to time.Time) ([]derive.Result, error)

Energy provides a mock function for the type MockEnergyDeriver

func (*MockEnergyDeriver) Names

func (_mock *MockEnergyDeriver) Names() []string

Names provides a mock function for the type MockEnergyDeriver

type MockEnergyDeriver_Energy_Call

type MockEnergyDeriver_Energy_Call struct {
	*mock.Call
}

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

func (*MockEnergyDeriver_Energy_Call) Return

func (*MockEnergyDeriver_Energy_Call) Run

func (*MockEnergyDeriver_Energy_Call) RunAndReturn

func (_c *MockEnergyDeriver_Energy_Call) RunAndReturn(run func(ctx context.Context, names []string, level derive.Level, from time.Time, to time.Time) ([]derive.Result, error)) *MockEnergyDeriver_Energy_Call

type MockEnergyDeriver_Expecter

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

func (*MockEnergyDeriver_Expecter) Energy

func (_e *MockEnergyDeriver_Expecter) Energy(ctx any, names any, level any, from any, to any) *MockEnergyDeriver_Energy_Call

Energy is a helper method to define mock.On call

  • ctx context.Context
  • names []string
  • level derive.Level
  • from time.Time
  • to time.Time

func (*MockEnergyDeriver_Expecter) Names

Names is a helper method to define mock.On call

type MockEnergyDeriver_Names_Call

type MockEnergyDeriver_Names_Call struct {
	*mock.Call
}

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

func (*MockEnergyDeriver_Names_Call) Return

func (*MockEnergyDeriver_Names_Call) Run

func (*MockEnergyDeriver_Names_Call) RunAndReturn

func (_c *MockEnergyDeriver_Names_Call) RunAndReturn(run func() []string) *MockEnergyDeriver_Names_Call

type MockFirstSlotSource

type MockFirstSlotSource struct {
	mock.Mock
}

MockFirstSlotSource is an autogenerated mock type for the FirstSlotSource type

func NewMockFirstSlotSource

func NewMockFirstSlotSource(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockFirstSlotSource

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

func (*MockFirstSlotSource) FirstSlot

func (_mock *MockFirstSlotSource) FirstSlot(ctx context.Context) (int64, bool, error)

FirstSlot provides a mock function for the type MockFirstSlotSource

type MockFirstSlotSource_Expecter

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

func (*MockFirstSlotSource_Expecter) FirstSlot

FirstSlot is a helper method to define mock.On call

  • ctx context.Context

type MockFirstSlotSource_FirstSlot_Call

type MockFirstSlotSource_FirstSlot_Call struct {
	*mock.Call
}

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

func (*MockFirstSlotSource_FirstSlot_Call) Return

func (*MockFirstSlotSource_FirstSlot_Call) Run

func (*MockFirstSlotSource_FirstSlot_Call) RunAndReturn

type MockGaugeDeriver

type MockGaugeDeriver struct {
	mock.Mock
}

MockGaugeDeriver is an autogenerated mock type for the GaugeDeriver type

func NewMockGaugeDeriver

func NewMockGaugeDeriver(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockGaugeDeriver

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

func (*MockGaugeDeriver) Gauge

func (_mock *MockGaugeDeriver) Gauge(ctx context.Context, names []string, from time.Time, to time.Time) ([]derive.GaugeResult, error)

Gauge provides a mock function for the type MockGaugeDeriver

type MockGaugeDeriver_Expecter

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

func (*MockGaugeDeriver_Expecter) Gauge

func (_e *MockGaugeDeriver_Expecter) Gauge(ctx any, names any, from any, to any) *MockGaugeDeriver_Gauge_Call

Gauge is a helper method to define mock.On call

  • ctx context.Context
  • names []string
  • from time.Time
  • to time.Time

type MockGaugeDeriver_Gauge_Call

type MockGaugeDeriver_Gauge_Call struct {
	*mock.Call
}

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

func (*MockGaugeDeriver_Gauge_Call) Return

func (*MockGaugeDeriver_Gauge_Call) Run

func (_c *MockGaugeDeriver_Gauge_Call) Run(run func(ctx context.Context, names []string, from time.Time, to time.Time)) *MockGaugeDeriver_Gauge_Call

func (*MockGaugeDeriver_Gauge_Call) RunAndReturn

func (_c *MockGaugeDeriver_Gauge_Call) RunAndReturn(run func(ctx context.Context, names []string, from time.Time, to time.Time) ([]derive.GaugeResult, error)) *MockGaugeDeriver_Gauge_Call

type MockProfileSource

type MockProfileSource struct {
	mock.Mock
}

MockProfileSource is an autogenerated mock type for the ProfileSource type

func NewMockProfileSource

func NewMockProfileSource(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockProfileSource

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

func (*MockProfileSource) IDs

func (_mock *MockProfileSource) IDs() []string

IDs provides a mock function for the type MockProfileSource

func (*MockProfileSource) Load

func (_mock *MockProfileSource) Load(ref string, baseDir string) (*profile.Loaded, error)

Load provides a mock function for the type MockProfileSource

type MockProfileSource_Expecter

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

func (*MockProfileSource_Expecter) IDs

IDs is a helper method to define mock.On call

func (*MockProfileSource_Expecter) Load

Load is a helper method to define mock.On call

  • ref string
  • baseDir string

type MockProfileSource_IDs_Call

type MockProfileSource_IDs_Call struct {
	*mock.Call
}

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

func (*MockProfileSource_IDs_Call) Return

func (*MockProfileSource_IDs_Call) Run

func (*MockProfileSource_IDs_Call) RunAndReturn

func (_c *MockProfileSource_IDs_Call) RunAndReturn(run func() []string) *MockProfileSource_IDs_Call

type MockProfileSource_Load_Call

type MockProfileSource_Load_Call struct {
	*mock.Call
}

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

func (*MockProfileSource_Load_Call) Return

func (*MockProfileSource_Load_Call) Run

func (_c *MockProfileSource_Load_Call) Run(run func(ref string, baseDir string)) *MockProfileSource_Load_Call

func (*MockProfileSource_Load_Call) RunAndReturn

func (_c *MockProfileSource_Load_Call) RunAndReturn(run func(ref string, baseDir string) (*profile.Loaded, error)) *MockProfileSource_Load_Call

type MockSnapshotSource

type MockSnapshotSource struct {
	mock.Mock
}

MockSnapshotSource is an autogenerated mock type for the SnapshotSource type

func NewMockSnapshotSource

func NewMockSnapshotSource(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSnapshotSource

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

func (*MockSnapshotSource) Snapshot

func (_mock *MockSnapshotSource) Snapshot() health.Snapshot

Snapshot provides a mock function for the type MockSnapshotSource

type MockSnapshotSource_Expecter

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

func (*MockSnapshotSource_Expecter) Snapshot

Snapshot is a helper method to define mock.On call

type MockSnapshotSource_Snapshot_Call

type MockSnapshotSource_Snapshot_Call struct {
	*mock.Call
}

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

func (*MockSnapshotSource_Snapshot_Call) Return

func (*MockSnapshotSource_Snapshot_Call) Run

func (*MockSnapshotSource_Snapshot_Call) RunAndReturn

type MockStatusReader

type MockStatusReader struct {
	mock.Mock
}

MockStatusReader is an autogenerated mock type for the StatusReader type

func NewMockStatusReader

func NewMockStatusReader(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockStatusReader

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

func (*MockStatusReader) StatusEvents

func (_mock *MockStatusReader) StatusEvents(ctx context.Context, device string, from int64, to int64, limit int) ([]storage.StatusEvent, error)

StatusEvents provides a mock function for the type MockStatusReader

type MockStatusReader_Expecter

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

func (*MockStatusReader_Expecter) StatusEvents

func (_e *MockStatusReader_Expecter) StatusEvents(ctx any, device any, from any, to any, limit any) *MockStatusReader_StatusEvents_Call

StatusEvents is a helper method to define mock.On call

  • ctx context.Context
  • device string
  • from int64
  • to int64
  • limit int

type MockStatusReader_StatusEvents_Call

type MockStatusReader_StatusEvents_Call struct {
	*mock.Call
}

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

func (*MockStatusReader_StatusEvents_Call) Return

func (*MockStatusReader_StatusEvents_Call) Run

func (*MockStatusReader_StatusEvents_Call) RunAndReturn

Jump to

Keyboard shortcuts

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