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: 3 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 MockCache

type MockCache struct {
	mock.Mock
}

MockCache is an autogenerated mock type for the Cache type

func NewMockCache

func NewMockCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCache

NewMockCache creates a new instance of MockCache. 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 (*MockCache) CacheGen

func (_mock *MockCache) CacheGen() int64

CacheGen provides a mock function for the type MockCache

func (*MockCache) CacheGet

func (_mock *MockCache) CacheGet(ctx context.Context, keys []string, configRev int64) (map[string]string, error)

CacheGet provides a mock function for the type MockCache

func (*MockCache) CachePut

func (_mock *MockCache) CachePut(ctx context.Context, configRev int64, gen int64, entries map[string]string) error

CachePut provides a mock function for the type MockCache

func (*MockCache) EXPECT

func (_m *MockCache) EXPECT() *MockCache_Expecter

type MockCache_CacheGen_Call

type MockCache_CacheGen_Call struct {
	*mock.Call
}

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

func (*MockCache_CacheGen_Call) Return

func (*MockCache_CacheGen_Call) Run

func (_c *MockCache_CacheGen_Call) Run(run func()) *MockCache_CacheGen_Call

func (*MockCache_CacheGen_Call) RunAndReturn

func (_c *MockCache_CacheGen_Call) RunAndReturn(run func() int64) *MockCache_CacheGen_Call

type MockCache_CacheGet_Call

type MockCache_CacheGet_Call struct {
	*mock.Call
}

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

func (*MockCache_CacheGet_Call) Return

func (_c *MockCache_CacheGet_Call) Return(stringToString map[string]string, err error) *MockCache_CacheGet_Call

func (*MockCache_CacheGet_Call) Run

func (_c *MockCache_CacheGet_Call) Run(run func(ctx context.Context, keys []string, configRev int64)) *MockCache_CacheGet_Call

func (*MockCache_CacheGet_Call) RunAndReturn

func (_c *MockCache_CacheGet_Call) RunAndReturn(run func(ctx context.Context, keys []string, configRev int64) (map[string]string, error)) *MockCache_CacheGet_Call

type MockCache_CachePut_Call

type MockCache_CachePut_Call struct {
	*mock.Call
}

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

func (*MockCache_CachePut_Call) Return

func (*MockCache_CachePut_Call) Run

func (_c *MockCache_CachePut_Call) Run(run func(ctx context.Context, configRev int64, gen int64, entries map[string]string)) *MockCache_CachePut_Call

func (*MockCache_CachePut_Call) RunAndReturn

func (_c *MockCache_CachePut_Call) RunAndReturn(run func(ctx context.Context, configRev int64, gen int64, entries map[string]string) error) *MockCache_CachePut_Call

type MockCache_Expecter

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

func (*MockCache_Expecter) CacheGen

CacheGen is a helper method to define mock.On call

func (*MockCache_Expecter) CacheGet

func (_e *MockCache_Expecter) CacheGet(ctx any, keys any, configRev any) *MockCache_CacheGet_Call

CacheGet is a helper method to define mock.On call

  • ctx context.Context
  • keys []string
  • configRev int64

func (*MockCache_Expecter) CachePut

func (_e *MockCache_Expecter) CachePut(ctx any, configRev any, gen any, entries any) *MockCache_CachePut_Call

CachePut is a helper method to define mock.On call

  • ctx context.Context
  • configRev int64
  • gen int64
  • entries map[string]string

type MockReader

type MockReader struct {
	mock.Mock
}

MockReader is an autogenerated mock type for the Reader type

func NewMockReader

func NewMockReader(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockReader

NewMockReader creates a new instance of MockReader. 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 (*MockReader) Carry

func (_mock *MockReader) Carry(ctx context.Context, ids []int64) (map[int64]float64, error)

Carry provides a mock function for the type MockReader

func (*MockReader) EXPECT

func (_m *MockReader) EXPECT() *MockReader_Expecter

func (*MockReader) EnergyBuckets

func (_mock *MockReader) EnergyBuckets(ctx context.Context, seriesID int64, from int64, to int64) ([]storage.EnergyBucket, error)

EnergyBuckets provides a mock function for the type MockReader

func (*MockReader) FirstSlot

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

FirstSlot provides a mock function for the type MockReader

func (*MockReader) GaugeBuckets

func (_mock *MockReader) GaugeBuckets(ctx context.Context, seriesID int64, from int64, to int64) ([]storage.GaugeBucket, error)

GaugeBuckets provides a mock function for the type MockReader

func (*MockReader) SeriesID

func (_mock *MockReader) SeriesID(ctx context.Context, key storage.SeriesKey) (int64, error)

SeriesID provides a mock function for the type MockReader

func (*MockReader) SumEnergyMany

func (_mock *MockReader) SumEnergyMany(ctx context.Context, ids []int64, from int64, to int64, closedBefore int64) (map[int64]storage.EnergySum, error)

SumEnergyMany provides a mock function for the type MockReader

type MockReader_Carry_Call

type MockReader_Carry_Call struct {
	*mock.Call
}

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

func (*MockReader_Carry_Call) Return

func (_c *MockReader_Carry_Call) Return(int64ToFloat64 map[int64]float64, err error) *MockReader_Carry_Call

func (*MockReader_Carry_Call) Run

func (_c *MockReader_Carry_Call) Run(run func(ctx context.Context, ids []int64)) *MockReader_Carry_Call

func (*MockReader_Carry_Call) RunAndReturn

func (_c *MockReader_Carry_Call) RunAndReturn(run func(ctx context.Context, ids []int64) (map[int64]float64, error)) *MockReader_Carry_Call

type MockReader_EnergyBuckets_Call

type MockReader_EnergyBuckets_Call struct {
	*mock.Call
}

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

func (*MockReader_EnergyBuckets_Call) Return

func (*MockReader_EnergyBuckets_Call) Run

func (_c *MockReader_EnergyBuckets_Call) Run(run func(ctx context.Context, seriesID int64, from int64, to int64)) *MockReader_EnergyBuckets_Call

func (*MockReader_EnergyBuckets_Call) RunAndReturn

func (_c *MockReader_EnergyBuckets_Call) RunAndReturn(run func(ctx context.Context, seriesID int64, from int64, to int64) ([]storage.EnergyBucket, error)) *MockReader_EnergyBuckets_Call

type MockReader_Expecter

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

func (*MockReader_Expecter) Carry

func (_e *MockReader_Expecter) Carry(ctx any, ids any) *MockReader_Carry_Call

Carry is a helper method to define mock.On call

  • ctx context.Context
  • ids []int64

func (*MockReader_Expecter) EnergyBuckets

func (_e *MockReader_Expecter) EnergyBuckets(ctx any, seriesID any, from any, to any) *MockReader_EnergyBuckets_Call

EnergyBuckets is a helper method to define mock.On call

  • ctx context.Context
  • seriesID int64
  • from int64
  • to int64

func (*MockReader_Expecter) FirstSlot

FirstSlot is a helper method to define mock.On call

  • ctx context.Context

func (*MockReader_Expecter) GaugeBuckets

func (_e *MockReader_Expecter) GaugeBuckets(ctx any, seriesID any, from any, to any) *MockReader_GaugeBuckets_Call

GaugeBuckets is a helper method to define mock.On call

  • ctx context.Context
  • seriesID int64
  • from int64
  • to int64

func (*MockReader_Expecter) SeriesID

func (_e *MockReader_Expecter) SeriesID(ctx any, key any) *MockReader_SeriesID_Call

SeriesID is a helper method to define mock.On call

  • ctx context.Context
  • key storage.SeriesKey

func (*MockReader_Expecter) SumEnergyMany

func (_e *MockReader_Expecter) SumEnergyMany(ctx any, ids any, from any, to any, closedBefore any) *MockReader_SumEnergyMany_Call

SumEnergyMany is a helper method to define mock.On call

  • ctx context.Context
  • ids []int64
  • from int64
  • to int64
  • closedBefore int64

type MockReader_FirstSlot_Call

type MockReader_FirstSlot_Call struct {
	*mock.Call
}

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

func (*MockReader_FirstSlot_Call) Return

func (*MockReader_FirstSlot_Call) Run

func (*MockReader_FirstSlot_Call) RunAndReturn

func (_c *MockReader_FirstSlot_Call) RunAndReturn(run func(ctx context.Context) (int64, bool, error)) *MockReader_FirstSlot_Call

type MockReader_GaugeBuckets_Call

type MockReader_GaugeBuckets_Call struct {
	*mock.Call
}

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

func (*MockReader_GaugeBuckets_Call) Return

func (*MockReader_GaugeBuckets_Call) Run

func (_c *MockReader_GaugeBuckets_Call) Run(run func(ctx context.Context, seriesID int64, from int64, to int64)) *MockReader_GaugeBuckets_Call

func (*MockReader_GaugeBuckets_Call) RunAndReturn

func (_c *MockReader_GaugeBuckets_Call) RunAndReturn(run func(ctx context.Context, seriesID int64, from int64, to int64) ([]storage.GaugeBucket, error)) *MockReader_GaugeBuckets_Call

type MockReader_SeriesID_Call

type MockReader_SeriesID_Call struct {
	*mock.Call
}

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

func (*MockReader_SeriesID_Call) Return

func (*MockReader_SeriesID_Call) Run

func (*MockReader_SeriesID_Call) RunAndReturn

type MockReader_SumEnergyMany_Call

type MockReader_SumEnergyMany_Call struct {
	*mock.Call
}

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

func (*MockReader_SumEnergyMany_Call) Return

func (*MockReader_SumEnergyMany_Call) Run

func (_c *MockReader_SumEnergyMany_Call) Run(run func(ctx context.Context, ids []int64, from int64, to int64, closedBefore int64)) *MockReader_SumEnergyMany_Call

func (*MockReader_SumEnergyMany_Call) RunAndReturn

func (_c *MockReader_SumEnergyMany_Call) RunAndReturn(run func(ctx context.Context, ids []int64, from int64, to int64, closedBefore int64) (map[int64]storage.EnergySum, error)) *MockReader_SumEnergyMany_Call

Jump to

Keyboard shortcuts

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