mocks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 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 MockAuthStore

type MockAuthStore struct {
	mock.Mock
}

MockAuthStore is an autogenerated mock type for the AuthStore type

func NewMockAuthStore

func NewMockAuthStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAuthStore

NewMockAuthStore creates a new instance of MockAuthStore. 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 (*MockAuthStore) AddAudit

func (_mock *MockAuthStore) AddAudit(ctx context.Context, a storage.AuditEntry) error

AddAudit provides a mock function for the type MockAuthStore

func (*MockAuthStore) AuditLog

func (_mock *MockAuthStore) AuditLog(ctx context.Context, from int64, to int64, limit int) ([]storage.AuditEntry, error)

AuditLog provides a mock function for the type MockAuthStore

func (*MockAuthStore) CountUsers

func (_mock *MockAuthStore) CountUsers(ctx context.Context) (int, error)

CountUsers provides a mock function for the type MockAuthStore

func (*MockAuthStore) CreateToken

func (_mock *MockAuthStore) CreateToken(ctx context.Context, t storage.APIToken, a storage.AuditEntry) error

CreateToken provides a mock function for the type MockAuthStore

func (*MockAuthStore) CreateUser

func (_mock *MockAuthStore) CreateUser(ctx context.Context, u storage.User, onlyFirst bool, a storage.AuditEntry) (int64, error)

CreateUser provides a mock function for the type MockAuthStore

func (*MockAuthStore) DeleteSession

func (_mock *MockAuthStore) DeleteSession(ctx context.Context, tokenHash []byte, a storage.AuditEntry) error

DeleteSession provides a mock function for the type MockAuthStore

func (*MockAuthStore) DeleteToken

func (_mock *MockAuthStore) DeleteToken(ctx context.Context, id string, a storage.AuditEntry) error

DeleteToken provides a mock function for the type MockAuthStore

func (*MockAuthStore) DeleteUser

func (_mock *MockAuthStore) DeleteUser(ctx context.Context, id int64, a storage.AuditEntry) error

DeleteUser provides a mock function for the type MockAuthStore

func (*MockAuthStore) EXPECT

func (_m *MockAuthStore) EXPECT() *MockAuthStore_Expecter

func (*MockAuthStore) PurgeSessions

func (_mock *MockAuthStore) PurgeSessions(ctx context.Context, idleBefore int64, createdBefore int64) error

PurgeSessions provides a mock function for the type MockAuthStore

func (*MockAuthStore) RecordLogin

func (_mock *MockAuthStore) RecordLogin(ctx context.Context, r storage.LoginRecord) error

RecordLogin provides a mock function for the type MockAuthStore

func (*MockAuthStore) Session

func (_mock *MockAuthStore) Session(ctx context.Context, tokenHash []byte) (storage.Session, error)

Session provides a mock function for the type MockAuthStore

func (*MockAuthStore) SetPassword

func (_mock *MockAuthStore) SetPassword(ctx context.Context, id int64, hash string, a storage.AuditEntry) error

SetPassword provides a mock function for the type MockAuthStore

func (*MockAuthStore) Token

func (_mock *MockAuthStore) Token(ctx context.Context, id string) (storage.APIToken, error)

Token provides a mock function for the type MockAuthStore

func (*MockAuthStore) Tokens

func (_mock *MockAuthStore) Tokens(ctx context.Context) ([]storage.APIToken, error)

Tokens provides a mock function for the type MockAuthStore

func (*MockAuthStore) TouchSession

func (_mock *MockAuthStore) TouchSession(ctx context.Context, tokenHash []byte, at int64) error

TouchSession provides a mock function for the type MockAuthStore

func (*MockAuthStore) TouchToken

func (_mock *MockAuthStore) TouchToken(ctx context.Context, id string, at int64) error

TouchToken provides a mock function for the type MockAuthStore

func (*MockAuthStore) UserByID

func (_mock *MockAuthStore) UserByID(ctx context.Context, id int64) (storage.User, error)

UserByID provides a mock function for the type MockAuthStore

func (*MockAuthStore) UserByName

func (_mock *MockAuthStore) UserByName(ctx context.Context, name string) (storage.User, error)

UserByName provides a mock function for the type MockAuthStore

func (*MockAuthStore) Users

func (_mock *MockAuthStore) Users(ctx context.Context) ([]storage.User, error)

Users provides a mock function for the type MockAuthStore

type MockAuthStore_AddAudit_Call

type MockAuthStore_AddAudit_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_AddAudit_Call) Return

func (*MockAuthStore_AddAudit_Call) Run

func (*MockAuthStore_AddAudit_Call) RunAndReturn

type MockAuthStore_AuditLog_Call

type MockAuthStore_AuditLog_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_AuditLog_Call) Return

func (*MockAuthStore_AuditLog_Call) Run

func (_c *MockAuthStore_AuditLog_Call) Run(run func(ctx context.Context, from int64, to int64, limit int)) *MockAuthStore_AuditLog_Call

func (*MockAuthStore_AuditLog_Call) RunAndReturn

func (_c *MockAuthStore_AuditLog_Call) RunAndReturn(run func(ctx context.Context, from int64, to int64, limit int) ([]storage.AuditEntry, error)) *MockAuthStore_AuditLog_Call

type MockAuthStore_CountUsers_Call

type MockAuthStore_CountUsers_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_CountUsers_Call) Return

func (*MockAuthStore_CountUsers_Call) Run

func (*MockAuthStore_CountUsers_Call) RunAndReturn

type MockAuthStore_CreateToken_Call

type MockAuthStore_CreateToken_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_CreateToken_Call) Return

func (*MockAuthStore_CreateToken_Call) Run

func (*MockAuthStore_CreateToken_Call) RunAndReturn

type MockAuthStore_CreateUser_Call

type MockAuthStore_CreateUser_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_CreateUser_Call) Return

func (*MockAuthStore_CreateUser_Call) Run

func (*MockAuthStore_CreateUser_Call) RunAndReturn

type MockAuthStore_DeleteSession_Call

type MockAuthStore_DeleteSession_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_DeleteSession_Call) Return

func (*MockAuthStore_DeleteSession_Call) Run

func (*MockAuthStore_DeleteSession_Call) RunAndReturn

type MockAuthStore_DeleteToken_Call

type MockAuthStore_DeleteToken_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_DeleteToken_Call) Return

func (*MockAuthStore_DeleteToken_Call) Run

func (*MockAuthStore_DeleteToken_Call) RunAndReturn

type MockAuthStore_DeleteUser_Call

type MockAuthStore_DeleteUser_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_DeleteUser_Call) Return

func (*MockAuthStore_DeleteUser_Call) Run

func (*MockAuthStore_DeleteUser_Call) RunAndReturn

type MockAuthStore_Expecter

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

func (*MockAuthStore_Expecter) AddAudit

AddAudit is a helper method to define mock.On call

  • ctx context.Context
  • a storage.AuditEntry

func (*MockAuthStore_Expecter) AuditLog

func (_e *MockAuthStore_Expecter) AuditLog(ctx any, from any, to any, limit any) *MockAuthStore_AuditLog_Call

AuditLog is a helper method to define mock.On call

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

func (*MockAuthStore_Expecter) CountUsers

CountUsers is a helper method to define mock.On call

  • ctx context.Context

func (*MockAuthStore_Expecter) CreateToken

func (_e *MockAuthStore_Expecter) CreateToken(ctx any, t any, a any) *MockAuthStore_CreateToken_Call

CreateToken is a helper method to define mock.On call

  • ctx context.Context
  • t storage.APIToken
  • a storage.AuditEntry

func (*MockAuthStore_Expecter) CreateUser

func (_e *MockAuthStore_Expecter) CreateUser(ctx any, u any, onlyFirst any, a any) *MockAuthStore_CreateUser_Call

CreateUser is a helper method to define mock.On call

  • ctx context.Context
  • u storage.User
  • onlyFirst bool
  • a storage.AuditEntry

func (*MockAuthStore_Expecter) DeleteSession

func (_e *MockAuthStore_Expecter) DeleteSession(ctx any, tokenHash any, a any) *MockAuthStore_DeleteSession_Call

DeleteSession is a helper method to define mock.On call

  • ctx context.Context
  • tokenHash []byte
  • a storage.AuditEntry

func (*MockAuthStore_Expecter) DeleteToken

func (_e *MockAuthStore_Expecter) DeleteToken(ctx any, id any, a any) *MockAuthStore_DeleteToken_Call

DeleteToken is a helper method to define mock.On call

  • ctx context.Context
  • id string
  • a storage.AuditEntry

func (*MockAuthStore_Expecter) DeleteUser

func (_e *MockAuthStore_Expecter) DeleteUser(ctx any, id any, a any) *MockAuthStore_DeleteUser_Call

DeleteUser is a helper method to define mock.On call

  • ctx context.Context
  • id int64
  • a storage.AuditEntry

func (*MockAuthStore_Expecter) PurgeSessions

func (_e *MockAuthStore_Expecter) PurgeSessions(ctx any, idleBefore any, createdBefore any) *MockAuthStore_PurgeSessions_Call

PurgeSessions is a helper method to define mock.On call

  • ctx context.Context
  • idleBefore int64
  • createdBefore int64

func (*MockAuthStore_Expecter) RecordLogin

RecordLogin is a helper method to define mock.On call

  • ctx context.Context
  • r storage.LoginRecord

func (*MockAuthStore_Expecter) Session

func (_e *MockAuthStore_Expecter) Session(ctx any, tokenHash any) *MockAuthStore_Session_Call

Session is a helper method to define mock.On call

  • ctx context.Context
  • tokenHash []byte

func (*MockAuthStore_Expecter) SetPassword

func (_e *MockAuthStore_Expecter) SetPassword(ctx any, id any, hash any, a any) *MockAuthStore_SetPassword_Call

SetPassword is a helper method to define mock.On call

  • ctx context.Context
  • id int64
  • hash string
  • a storage.AuditEntry

func (*MockAuthStore_Expecter) Token

Token is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*MockAuthStore_Expecter) Tokens

Tokens is a helper method to define mock.On call

  • ctx context.Context

func (*MockAuthStore_Expecter) TouchSession

func (_e *MockAuthStore_Expecter) TouchSession(ctx any, tokenHash any, at any) *MockAuthStore_TouchSession_Call

TouchSession is a helper method to define mock.On call

  • ctx context.Context
  • tokenHash []byte
  • at int64

func (*MockAuthStore_Expecter) TouchToken

func (_e *MockAuthStore_Expecter) TouchToken(ctx any, id any, at any) *MockAuthStore_TouchToken_Call

TouchToken is a helper method to define mock.On call

  • ctx context.Context
  • id string
  • at int64

func (*MockAuthStore_Expecter) UserByID

UserByID is a helper method to define mock.On call

  • ctx context.Context
  • id int64

func (*MockAuthStore_Expecter) UserByName

func (_e *MockAuthStore_Expecter) UserByName(ctx any, name any) *MockAuthStore_UserByName_Call

UserByName is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*MockAuthStore_Expecter) Users

Users is a helper method to define mock.On call

  • ctx context.Context

type MockAuthStore_PurgeSessions_Call

type MockAuthStore_PurgeSessions_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_PurgeSessions_Call) Return

func (*MockAuthStore_PurgeSessions_Call) Run

func (_c *MockAuthStore_PurgeSessions_Call) Run(run func(ctx context.Context, idleBefore int64, createdBefore int64)) *MockAuthStore_PurgeSessions_Call

func (*MockAuthStore_PurgeSessions_Call) RunAndReturn

func (_c *MockAuthStore_PurgeSessions_Call) RunAndReturn(run func(ctx context.Context, idleBefore int64, createdBefore int64) error) *MockAuthStore_PurgeSessions_Call

type MockAuthStore_RecordLogin_Call

type MockAuthStore_RecordLogin_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_RecordLogin_Call) Return

func (*MockAuthStore_RecordLogin_Call) Run

func (*MockAuthStore_RecordLogin_Call) RunAndReturn

type MockAuthStore_Session_Call

type MockAuthStore_Session_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_Session_Call) Return

func (*MockAuthStore_Session_Call) Run

func (_c *MockAuthStore_Session_Call) Run(run func(ctx context.Context, tokenHash []byte)) *MockAuthStore_Session_Call

func (*MockAuthStore_Session_Call) RunAndReturn

func (_c *MockAuthStore_Session_Call) RunAndReturn(run func(ctx context.Context, tokenHash []byte) (storage.Session, error)) *MockAuthStore_Session_Call

type MockAuthStore_SetPassword_Call

type MockAuthStore_SetPassword_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_SetPassword_Call) Return

func (*MockAuthStore_SetPassword_Call) Run

func (*MockAuthStore_SetPassword_Call) RunAndReturn

type MockAuthStore_Token_Call

type MockAuthStore_Token_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_Token_Call) Return

func (*MockAuthStore_Token_Call) Run

func (*MockAuthStore_Token_Call) RunAndReturn

type MockAuthStore_Tokens_Call

type MockAuthStore_Tokens_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_Tokens_Call) Return

func (*MockAuthStore_Tokens_Call) Run

func (*MockAuthStore_Tokens_Call) RunAndReturn

type MockAuthStore_TouchSession_Call

type MockAuthStore_TouchSession_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_TouchSession_Call) Return

func (*MockAuthStore_TouchSession_Call) Run

func (*MockAuthStore_TouchSession_Call) RunAndReturn

func (_c *MockAuthStore_TouchSession_Call) RunAndReturn(run func(ctx context.Context, tokenHash []byte, at int64) error) *MockAuthStore_TouchSession_Call

type MockAuthStore_TouchToken_Call

type MockAuthStore_TouchToken_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_TouchToken_Call) Return

func (*MockAuthStore_TouchToken_Call) Run

func (*MockAuthStore_TouchToken_Call) RunAndReturn

type MockAuthStore_UserByID_Call

type MockAuthStore_UserByID_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_UserByID_Call) Return

func (*MockAuthStore_UserByID_Call) Run

func (*MockAuthStore_UserByID_Call) RunAndReturn

type MockAuthStore_UserByName_Call

type MockAuthStore_UserByName_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_UserByName_Call) Return

func (*MockAuthStore_UserByName_Call) Run

func (*MockAuthStore_UserByName_Call) RunAndReturn

type MockAuthStore_Users_Call

type MockAuthStore_Users_Call struct {
	*mock.Call
}

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

func (*MockAuthStore_Users_Call) Return

func (*MockAuthStore_Users_Call) Run

func (*MockAuthStore_Users_Call) RunAndReturn

func (_c *MockAuthStore_Users_Call) RunAndReturn(run func(ctx context.Context) ([]storage.User, error)) *MockAuthStore_Users_Call

type MockCollectorStore

type MockCollectorStore struct {
	mock.Mock
}

MockCollectorStore is an autogenerated mock type for the CollectorStore type

func NewMockCollectorStore

func NewMockCollectorStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCollectorStore

NewMockCollectorStore creates a new instance of MockCollectorStore. 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 (*MockCollectorStore) AddStatus

func (_mock *MockCollectorStore) AddStatus(ctx context.Context, events []storage.StatusEvent) error

AddStatus provides a mock function for the type MockCollectorStore

func (*MockCollectorStore) CounterStates

func (_mock *MockCollectorStore) CounterStates(ctx context.Context, ids []int64) (map[int64]storage.CounterState, error)

CounterStates provides a mock function for the type MockCollectorStore

func (*MockCollectorStore) EXPECT

func (*MockCollectorStore) EnsureSeries

func (_mock *MockCollectorStore) EnsureSeries(ctx context.Context, slot int64, defs []storage.SeriesDef) (map[storage.SeriesKey]int64, error)

EnsureSeries provides a mock function for the type MockCollectorStore

func (*MockCollectorStore) Flush

func (_mock *MockCollectorStore) Flush(ctx context.Context, b storage.Batch) error

Flush provides a mock function for the type MockCollectorStore

func (*MockCollectorStore) LastStatus

func (_mock *MockCollectorStore) LastStatus(ctx context.Context, device string) (map[string]storage.StatusEvent, error)

LastStatus provides a mock function for the type MockCollectorStore

type MockCollectorStore_AddStatus_Call

type MockCollectorStore_AddStatus_Call struct {
	*mock.Call
}

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

func (*MockCollectorStore_AddStatus_Call) Return

func (*MockCollectorStore_AddStatus_Call) Run

func (*MockCollectorStore_AddStatus_Call) RunAndReturn

type MockCollectorStore_CounterStates_Call

type MockCollectorStore_CounterStates_Call struct {
	*mock.Call
}

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

func (*MockCollectorStore_CounterStates_Call) Return

func (*MockCollectorStore_CounterStates_Call) Run

func (*MockCollectorStore_CounterStates_Call) RunAndReturn

type MockCollectorStore_EnsureSeries_Call

type MockCollectorStore_EnsureSeries_Call struct {
	*mock.Call
}

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

func (*MockCollectorStore_EnsureSeries_Call) Return

func (*MockCollectorStore_EnsureSeries_Call) Run

func (*MockCollectorStore_EnsureSeries_Call) RunAndReturn

type MockCollectorStore_Expecter

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

func (*MockCollectorStore_Expecter) AddStatus

AddStatus is a helper method to define mock.On call

  • ctx context.Context
  • events []storage.StatusEvent

func (*MockCollectorStore_Expecter) CounterStates

CounterStates is a helper method to define mock.On call

  • ctx context.Context
  • ids []int64

func (*MockCollectorStore_Expecter) EnsureSeries

func (_e *MockCollectorStore_Expecter) EnsureSeries(ctx any, slot any, defs any) *MockCollectorStore_EnsureSeries_Call

EnsureSeries is a helper method to define mock.On call

  • ctx context.Context
  • slot int64
  • defs []storage.SeriesDef

func (*MockCollectorStore_Expecter) Flush

Flush is a helper method to define mock.On call

  • ctx context.Context
  • b storage.Batch

func (*MockCollectorStore_Expecter) LastStatus

LastStatus is a helper method to define mock.On call

  • ctx context.Context
  • device string

type MockCollectorStore_Flush_Call

type MockCollectorStore_Flush_Call struct {
	*mock.Call
}

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

func (*MockCollectorStore_Flush_Call) Return

func (*MockCollectorStore_Flush_Call) Run

func (*MockCollectorStore_Flush_Call) RunAndReturn

type MockCollectorStore_LastStatus_Call

type MockCollectorStore_LastStatus_Call struct {
	*mock.Call
}

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

func (*MockCollectorStore_LastStatus_Call) Return

func (*MockCollectorStore_LastStatus_Call) Run

func (*MockCollectorStore_LastStatus_Call) RunAndReturn

type MockConfigStore

type MockConfigStore struct {
	mock.Mock
}

MockConfigStore is an autogenerated mock type for the ConfigStore type

func NewMockConfigStore

func NewMockConfigStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockConfigStore

NewMockConfigStore creates a new instance of MockConfigStore. 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 (*MockConfigStore) ApplyConfig

func (_mock *MockConfigStore) ApplyConfig(ctx context.Context, c storage.ConfigChange) (int64, error)

ApplyConfig provides a mock function for the type MockConfigStore

func (*MockConfigStore) ConfigState

func (_mock *MockConfigStore) ConfigState(ctx context.Context) (storage.ConfigState, error)

ConfigState provides a mock function for the type MockConfigStore

func (*MockConfigStore) EXPECT

type MockConfigStore_ApplyConfig_Call

type MockConfigStore_ApplyConfig_Call struct {
	*mock.Call
}

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

func (*MockConfigStore_ApplyConfig_Call) Return

func (*MockConfigStore_ApplyConfig_Call) Run

func (*MockConfigStore_ApplyConfig_Call) RunAndReturn

type MockConfigStore_ConfigState_Call

type MockConfigStore_ConfigState_Call struct {
	*mock.Call
}

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

func (*MockConfigStore_ConfigState_Call) Return

func (*MockConfigStore_ConfigState_Call) Run

func (*MockConfigStore_ConfigState_Call) RunAndReturn

type MockConfigStore_Expecter

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

func (*MockConfigStore_Expecter) ApplyConfig

ApplyConfig is a helper method to define mock.On call

  • ctx context.Context
  • c storage.ConfigChange

func (*MockConfigStore_Expecter) ConfigState

ConfigState is a helper method to define mock.On call

  • ctx context.Context

type MockDeriveStore

type MockDeriveStore struct {
	mock.Mock
}

MockDeriveStore is an autogenerated mock type for the DeriveStore type

func NewMockDeriveStore

func NewMockDeriveStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDeriveStore

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

func (_mock *MockDeriveStore) CacheGen() int64

CacheGen provides a mock function for the type MockDeriveStore

func (*MockDeriveStore) CacheGet

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

CacheGet provides a mock function for the type MockDeriveStore

func (*MockDeriveStore) CachePut

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

CachePut provides a mock function for the type MockDeriveStore

func (*MockDeriveStore) EXPECT

type MockDeriveStore_CacheGen_Call

type MockDeriveStore_CacheGen_Call struct {
	*mock.Call
}

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

func (*MockDeriveStore_CacheGen_Call) Return

func (*MockDeriveStore_CacheGen_Call) Run

func (*MockDeriveStore_CacheGen_Call) RunAndReturn

type MockDeriveStore_CacheGet_Call

type MockDeriveStore_CacheGet_Call struct {
	*mock.Call
}

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

func (*MockDeriveStore_CacheGet_Call) Return

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

func (*MockDeriveStore_CacheGet_Call) Run

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

func (*MockDeriveStore_CacheGet_Call) RunAndReturn

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

type MockDeriveStore_CachePut_Call

type MockDeriveStore_CachePut_Call struct {
	*mock.Call
}

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

func (*MockDeriveStore_CachePut_Call) Return

func (*MockDeriveStore_CachePut_Call) Run

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

func (*MockDeriveStore_CachePut_Call) RunAndReturn

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

type MockDeriveStore_Expecter

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

func (*MockDeriveStore_Expecter) CacheGen

CacheGen is a helper method to define mock.On call

func (*MockDeriveStore_Expecter) CacheGet

func (_e *MockDeriveStore_Expecter) CacheGet(ctx any, keys any, configRev any) *MockDeriveStore_CacheGet_Call

CacheGet is a helper method to define mock.On call

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

func (*MockDeriveStore_Expecter) CachePut

func (_e *MockDeriveStore_Expecter) CachePut(ctx any, configRev any, gen any, entries any) *MockDeriveStore_CachePut_Call

CachePut is a helper method to define mock.On call

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

type MockImportStore

type MockImportStore struct {
	mock.Mock
}

MockImportStore is an autogenerated mock type for the ImportStore type

func NewMockImportStore

func NewMockImportStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockImportStore

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

func (*MockImportStore) FirstSlot

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

FirstSlot provides a mock function for the type MockImportStore

func (*MockImportStore) Import

func (_mock *MockImportStore) Import(ctx context.Context, b storage.ImportBatch) error

Import provides a mock function for the type MockImportStore

func (*MockImportStore) ImportSource

func (_mock *MockImportStore) ImportSource(ctx context.Context) (string, error)

ImportSource provides a mock function for the type MockImportStore

type MockImportStore_Expecter

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

func (*MockImportStore_Expecter) FirstSlot

FirstSlot is a helper method to define mock.On call

  • ctx context.Context

func (*MockImportStore_Expecter) Import

Import is a helper method to define mock.On call

  • ctx context.Context
  • b storage.ImportBatch

func (*MockImportStore_Expecter) ImportSource

ImportSource is a helper method to define mock.On call

  • ctx context.Context

type MockImportStore_FirstSlot_Call

type MockImportStore_FirstSlot_Call struct {
	*mock.Call
}

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

func (*MockImportStore_FirstSlot_Call) Return

func (*MockImportStore_FirstSlot_Call) Run

func (*MockImportStore_FirstSlot_Call) RunAndReturn

type MockImportStore_ImportSource_Call

type MockImportStore_ImportSource_Call struct {
	*mock.Call
}

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

func (*MockImportStore_ImportSource_Call) Return

func (*MockImportStore_ImportSource_Call) Run

func (*MockImportStore_ImportSource_Call) RunAndReturn

type MockImportStore_Import_Call

type MockImportStore_Import_Call struct {
	*mock.Call
}

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

func (*MockImportStore_Import_Call) Return

func (*MockImportStore_Import_Call) Run

func (*MockImportStore_Import_Call) RunAndReturn

type MockReadStore

type MockReadStore struct {
	mock.Mock
}

MockReadStore is an autogenerated mock type for the ReadStore type

func NewMockReadStore

func NewMockReadStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockReadStore

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

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

Carry provides a mock function for the type MockReadStore

func (*MockReadStore) EXPECT

func (_m *MockReadStore) EXPECT() *MockReadStore_Expecter

func (*MockReadStore) EnergyBuckets

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

EnergyBuckets provides a mock function for the type MockReadStore

func (*MockReadStore) FirstSlot

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

FirstSlot provides a mock function for the type MockReadStore

func (*MockReadStore) GaugeBuckets

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

GaugeBuckets provides a mock function for the type MockReadStore

func (*MockReadStore) SeriesID

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

SeriesID provides a mock function for the type MockReadStore

func (*MockReadStore) StatusEvents

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

StatusEvents provides a mock function for the type MockReadStore

func (*MockReadStore) SumEnergy

func (_mock *MockReadStore) SumEnergy(ctx context.Context, seriesID int64, from int64, to int64) (storage.EnergyTotal, error)

SumEnergy provides a mock function for the type MockReadStore

func (*MockReadStore) SumEnergyMany

func (_mock *MockReadStore) 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 MockReadStore

type MockReadStore_Carry_Call

type MockReadStore_Carry_Call struct {
	*mock.Call
}

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

func (*MockReadStore_Carry_Call) Return

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

func (*MockReadStore_Carry_Call) Run

func (*MockReadStore_Carry_Call) RunAndReturn

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

type MockReadStore_EnergyBuckets_Call

type MockReadStore_EnergyBuckets_Call struct {
	*mock.Call
}

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

func (*MockReadStore_EnergyBuckets_Call) Return

func (*MockReadStore_EnergyBuckets_Call) Run

func (*MockReadStore_EnergyBuckets_Call) RunAndReturn

type MockReadStore_Expecter

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

func (*MockReadStore_Expecter) Carry

Carry is a helper method to define mock.On call

  • ctx context.Context
  • ids []int64

func (*MockReadStore_Expecter) EnergyBuckets

func (_e *MockReadStore_Expecter) EnergyBuckets(ctx any, seriesID any, from any, to any) *MockReadStore_EnergyBuckets_Call

EnergyBuckets is a helper method to define mock.On call

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

func (*MockReadStore_Expecter) FirstSlot

FirstSlot is a helper method to define mock.On call

  • ctx context.Context

func (*MockReadStore_Expecter) GaugeBuckets

func (_e *MockReadStore_Expecter) GaugeBuckets(ctx any, seriesID any, from any, to any) *MockReadStore_GaugeBuckets_Call

GaugeBuckets is a helper method to define mock.On call

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

func (*MockReadStore_Expecter) SeriesID

SeriesID is a helper method to define mock.On call

  • ctx context.Context
  • key storage.SeriesKey

func (*MockReadStore_Expecter) StatusEvents

func (_e *MockReadStore_Expecter) StatusEvents(ctx any, device any, from any, to any, limit any) *MockReadStore_StatusEvents_Call

StatusEvents is a helper method to define mock.On call

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

func (*MockReadStore_Expecter) SumEnergy

func (_e *MockReadStore_Expecter) SumEnergy(ctx any, seriesID any, from any, to any) *MockReadStore_SumEnergy_Call

SumEnergy is a helper method to define mock.On call

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

func (*MockReadStore_Expecter) SumEnergyMany

func (_e *MockReadStore_Expecter) SumEnergyMany(ctx any, ids any, from any, to any, closedBefore any) *MockReadStore_SumEnergyMany_Call

SumEnergyMany is a helper method to define mock.On call

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

type MockReadStore_FirstSlot_Call

type MockReadStore_FirstSlot_Call struct {
	*mock.Call
}

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

func (*MockReadStore_FirstSlot_Call) Return

func (*MockReadStore_FirstSlot_Call) Run

func (*MockReadStore_FirstSlot_Call) RunAndReturn

type MockReadStore_GaugeBuckets_Call

type MockReadStore_GaugeBuckets_Call struct {
	*mock.Call
}

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

func (*MockReadStore_GaugeBuckets_Call) Return

func (*MockReadStore_GaugeBuckets_Call) Run

func (*MockReadStore_GaugeBuckets_Call) RunAndReturn

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

type MockReadStore_SeriesID_Call

type MockReadStore_SeriesID_Call struct {
	*mock.Call
}

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

func (*MockReadStore_SeriesID_Call) Return

func (*MockReadStore_SeriesID_Call) Run

func (*MockReadStore_SeriesID_Call) RunAndReturn

type MockReadStore_StatusEvents_Call

type MockReadStore_StatusEvents_Call struct {
	*mock.Call
}

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

func (*MockReadStore_StatusEvents_Call) Return

func (*MockReadStore_StatusEvents_Call) Run

func (_c *MockReadStore_StatusEvents_Call) Run(run func(ctx context.Context, device string, from int64, to int64, limit int)) *MockReadStore_StatusEvents_Call

func (*MockReadStore_StatusEvents_Call) RunAndReturn

func (_c *MockReadStore_StatusEvents_Call) RunAndReturn(run func(ctx context.Context, device string, from int64, to int64, limit int) ([]storage.StatusEvent, error)) *MockReadStore_StatusEvents_Call

type MockReadStore_SumEnergyMany_Call

type MockReadStore_SumEnergyMany_Call struct {
	*mock.Call
}

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

func (*MockReadStore_SumEnergyMany_Call) Return

func (*MockReadStore_SumEnergyMany_Call) Run

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

func (*MockReadStore_SumEnergyMany_Call) RunAndReturn

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

type MockReadStore_SumEnergy_Call

type MockReadStore_SumEnergy_Call struct {
	*mock.Call
}

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

func (*MockReadStore_SumEnergy_Call) Return

func (*MockReadStore_SumEnergy_Call) Run

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

func (*MockReadStore_SumEnergy_Call) RunAndReturn

func (_c *MockReadStore_SumEnergy_Call) RunAndReturn(run func(ctx context.Context, seriesID int64, from int64, to int64) (storage.EnergyTotal, error)) *MockReadStore_SumEnergy_Call

Jump to

Keyboard shortcuts

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