Documentation
¶
Index ¶
- type MockCache
- func (_mock *MockCache) CacheGen() int64
- func (_mock *MockCache) CacheGet(ctx context.Context, keys []string, configRev int64) (map[string]string, error)
- func (_mock *MockCache) CachePut(ctx context.Context, configRev int64, gen int64, entries map[string]string) error
- func (_m *MockCache) EXPECT() *MockCache_Expecter
- type MockCache_CacheGen_Call
- type MockCache_CacheGet_Call
- func (_c *MockCache_CacheGet_Call) Return(stringToString map[string]string, err error) *MockCache_CacheGet_Call
- func (_c *MockCache_CacheGet_Call) Run(run func(ctx context.Context, keys []string, configRev int64)) *MockCache_CacheGet_Call
- func (_c *MockCache_CacheGet_Call) RunAndReturn(...) *MockCache_CacheGet_Call
- type MockCache_CachePut_Call
- type MockCache_Expecter
- type MockReader
- func (_mock *MockReader) Carry(ctx context.Context, ids []int64) (map[int64]float64, error)
- func (_m *MockReader) EXPECT() *MockReader_Expecter
- func (_mock *MockReader) EnergyBuckets(ctx context.Context, seriesID int64, from int64, to int64) ([]storage.EnergyBucket, error)
- func (_mock *MockReader) FirstSlot(ctx context.Context) (int64, bool, error)
- func (_mock *MockReader) GaugeBuckets(ctx context.Context, seriesID int64, from int64, to int64) ([]storage.GaugeBucket, error)
- func (_mock *MockReader) SeriesID(ctx context.Context, key storage.SeriesKey) (int64, error)
- func (_mock *MockReader) SumEnergyMany(ctx context.Context, ids []int64, from int64, to int64, closedBefore int64) (map[int64]storage.EnergySum, error)
- type MockReader_Carry_Call
- func (_c *MockReader_Carry_Call) Return(int64ToFloat64 map[int64]float64, err error) *MockReader_Carry_Call
- func (_c *MockReader_Carry_Call) Run(run func(ctx context.Context, ids []int64)) *MockReader_Carry_Call
- func (_c *MockReader_Carry_Call) RunAndReturn(run func(ctx context.Context, ids []int64) (map[int64]float64, error)) *MockReader_Carry_Call
- type MockReader_EnergyBuckets_Call
- func (_c *MockReader_EnergyBuckets_Call) Return(energyBuckets []storage.EnergyBucket, err error) *MockReader_EnergyBuckets_Call
- func (_c *MockReader_EnergyBuckets_Call) Run(run func(ctx context.Context, seriesID int64, from int64, to int64)) *MockReader_EnergyBuckets_Call
- func (_c *MockReader_EnergyBuckets_Call) RunAndReturn(...) *MockReader_EnergyBuckets_Call
- type MockReader_Expecter
- func (_e *MockReader_Expecter) Carry(ctx any, ids any) *MockReader_Carry_Call
- func (_e *MockReader_Expecter) EnergyBuckets(ctx any, seriesID any, from any, to any) *MockReader_EnergyBuckets_Call
- func (_e *MockReader_Expecter) FirstSlot(ctx any) *MockReader_FirstSlot_Call
- func (_e *MockReader_Expecter) GaugeBuckets(ctx any, seriesID any, from any, to any) *MockReader_GaugeBuckets_Call
- func (_e *MockReader_Expecter) SeriesID(ctx any, key any) *MockReader_SeriesID_Call
- func (_e *MockReader_Expecter) SumEnergyMany(ctx any, ids any, from any, to any, closedBefore any) *MockReader_SumEnergyMany_Call
- type MockReader_FirstSlot_Call
- func (_c *MockReader_FirstSlot_Call) Return(n int64, b bool, err error) *MockReader_FirstSlot_Call
- func (_c *MockReader_FirstSlot_Call) Run(run func(ctx context.Context)) *MockReader_FirstSlot_Call
- func (_c *MockReader_FirstSlot_Call) RunAndReturn(run func(ctx context.Context) (int64, bool, error)) *MockReader_FirstSlot_Call
- type MockReader_GaugeBuckets_Call
- func (_c *MockReader_GaugeBuckets_Call) Return(gaugeBuckets []storage.GaugeBucket, err error) *MockReader_GaugeBuckets_Call
- func (_c *MockReader_GaugeBuckets_Call) Run(run func(ctx context.Context, seriesID int64, from int64, to int64)) *MockReader_GaugeBuckets_Call
- func (_c *MockReader_GaugeBuckets_Call) RunAndReturn(...) *MockReader_GaugeBuckets_Call
- type MockReader_SeriesID_Call
- func (_c *MockReader_SeriesID_Call) Return(n int64, err error) *MockReader_SeriesID_Call
- func (_c *MockReader_SeriesID_Call) Run(run func(ctx context.Context, key storage.SeriesKey)) *MockReader_SeriesID_Call
- func (_c *MockReader_SeriesID_Call) RunAndReturn(run func(ctx context.Context, key storage.SeriesKey) (int64, error)) *MockReader_SeriesID_Call
- type MockReader_SumEnergyMany_Call
- func (_c *MockReader_SumEnergyMany_Call) Return(int64ToEnergySum map[int64]storage.EnergySum, err error) *MockReader_SumEnergyMany_Call
- func (_c *MockReader_SumEnergyMany_Call) Run(...) *MockReader_SumEnergyMany_Call
- func (_c *MockReader_SumEnergyMany_Call) RunAndReturn(...) *MockReader_SumEnergyMany_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockCache ¶
MockCache is an autogenerated mock type for the Cache type
func NewMockCache ¶
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) 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 ¶
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 (_c *MockCache_CacheGen_Call) Return(n int64) *MockCache_CacheGen_Call
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 ¶
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 ¶
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 (_c *MockCache_CachePut_Call) Return(err error) *MockCache_CachePut_Call
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 ¶
func (_e *MockCache_Expecter) CacheGen() *MockCache_CacheGen_Call
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 ¶
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) 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) 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
type MockReader_Carry_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 ¶
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 (_c *MockReader_EnergyBuckets_Call) Return(energyBuckets []storage.EnergyBucket, err error) *MockReader_EnergyBuckets_Call
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 ¶
func (_e *MockReader_Expecter) FirstSlot(ctx any) *MockReader_FirstSlot_Call
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 ¶
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 (_c *MockReader_FirstSlot_Call) Return(n int64, b bool, err error) *MockReader_FirstSlot_Call
func (*MockReader_FirstSlot_Call) Run ¶
func (_c *MockReader_FirstSlot_Call) Run(run func(ctx context.Context)) *MockReader_FirstSlot_Call
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 ¶
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 (_c *MockReader_GaugeBuckets_Call) Return(gaugeBuckets []storage.GaugeBucket, err error) *MockReader_GaugeBuckets_Call
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 ¶
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 (_c *MockReader_SeriesID_Call) Return(n int64, err error) *MockReader_SeriesID_Call
func (*MockReader_SeriesID_Call) Run ¶
func (_c *MockReader_SeriesID_Call) Run(run func(ctx context.Context, key storage.SeriesKey)) *MockReader_SeriesID_Call
func (*MockReader_SeriesID_Call) RunAndReturn ¶
func (_c *MockReader_SeriesID_Call) RunAndReturn(run func(ctx context.Context, key storage.SeriesKey) (int64, error)) *MockReader_SeriesID_Call
type MockReader_SumEnergyMany_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 (_c *MockReader_SumEnergyMany_Call) Return(int64ToEnergySum map[int64]storage.EnergySum, err error) *MockReader_SumEnergyMany_Call
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