data

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	// modules
	ListModuleIDs() ([]int64, error)
	ListModulesByIDs(ids []int64) ([]coordinates.SerialModule, error)
	ListModulesBySource(source string) ([]coordinates.SerialModule, error)
	ListModules() ([]coordinates.SerialModule, error)
	InsertModules([]coordinates.Module) (int, error)
	DeleteModuleByID(id int) error

	// startup configs and payloads
	SetStartConfig(payloads.Configuration) error
	ListStartConfigs() ([]payloads.Configuration, error)
	SetHeartbeat(payloads.Heartbeat) error
	ListHeartbeats() ([]payloads.Heartbeat, error)
	PurgeProxy(instance netservice.Instance) error
}

func Connect

func Connect(kind string, dsn setup.DSN, emitter stats.Sender) (Store, error)

func New

func New(kind string, db *sql.DB, emitter stats.Sender) (Store, error)

type StoreMock

type StoreMock struct {
	DeleteModuleByIDMock mStoreMockDeleteModuleByID

	InsertModulesMock mStoreMockInsertModules

	ListHeartbeatsMock mStoreMockListHeartbeats

	ListModuleIDsMock mStoreMockListModuleIDs

	ListModulesMock mStoreMockListModules

	ListModulesByIDsMock mStoreMockListModulesByIDs

	ListModulesBySourceMock mStoreMockListModulesBySource

	ListStartConfigsMock mStoreMockListStartConfigs

	PurgeProxyMock mStoreMockPurgeProxy

	SetHeartbeatMock mStoreMockSetHeartbeat

	SetStartConfigMock mStoreMockSetStartConfig
	// contains filtered or unexported fields
}

StoreMock implements Store

func NewStoreMock

func NewStoreMock(t minimock.Tester) *StoreMock

NewStoreMock returns a mock for Store

func (*StoreMock) DeleteModuleByID

func (mmDeleteModuleByID *StoreMock) DeleteModuleByID(id int) (err error)

DeleteModuleByID implements Store

func (*StoreMock) DeleteModuleByIDAfterCounter

func (mmDeleteModuleByID *StoreMock) DeleteModuleByIDAfterCounter() uint64

DeleteModuleByIDAfterCounter returns a count of finished StoreMock.DeleteModuleByID invocations

func (*StoreMock) DeleteModuleByIDBeforeCounter

func (mmDeleteModuleByID *StoreMock) DeleteModuleByIDBeforeCounter() uint64

DeleteModuleByIDBeforeCounter returns a count of StoreMock.DeleteModuleByID invocations

func (*StoreMock) InsertModules

func (mmInsertModules *StoreMock) InsertModules(ma1 []coordinates.Module) (i1 int, err error)

InsertModules implements Store

func (*StoreMock) InsertModulesAfterCounter

func (mmInsertModules *StoreMock) InsertModulesAfterCounter() uint64

InsertModulesAfterCounter returns a count of finished StoreMock.InsertModules invocations

func (*StoreMock) InsertModulesBeforeCounter

func (mmInsertModules *StoreMock) InsertModulesBeforeCounter() uint64

InsertModulesBeforeCounter returns a count of StoreMock.InsertModules invocations

func (*StoreMock) ListHeartbeats

func (mmListHeartbeats *StoreMock) ListHeartbeats() (ha1 []payloads.Heartbeat, err error)

ListHeartbeats implements Store

func (*StoreMock) ListHeartbeatsAfterCounter

func (mmListHeartbeats *StoreMock) ListHeartbeatsAfterCounter() uint64

ListHeartbeatsAfterCounter returns a count of finished StoreMock.ListHeartbeats invocations

func (*StoreMock) ListHeartbeatsBeforeCounter

func (mmListHeartbeats *StoreMock) ListHeartbeatsBeforeCounter() uint64

ListHeartbeatsBeforeCounter returns a count of StoreMock.ListHeartbeats invocations

func (*StoreMock) ListModuleIDs

func (mmListModuleIDs *StoreMock) ListModuleIDs() (ia1 []int64, err error)

ListModuleIDs implements Store

func (*StoreMock) ListModuleIDsAfterCounter

func (mmListModuleIDs *StoreMock) ListModuleIDsAfterCounter() uint64

ListModuleIDsAfterCounter returns a count of finished StoreMock.ListModuleIDs invocations

func (*StoreMock) ListModuleIDsBeforeCounter

func (mmListModuleIDs *StoreMock) ListModuleIDsBeforeCounter() uint64

ListModuleIDsBeforeCounter returns a count of StoreMock.ListModuleIDs invocations

func (*StoreMock) ListModules

func (mmListModules *StoreMock) ListModules() (sa1 []coordinates.SerialModule, err error)

ListModules implements Store

func (*StoreMock) ListModulesAfterCounter

func (mmListModules *StoreMock) ListModulesAfterCounter() uint64

ListModulesAfterCounter returns a count of finished StoreMock.ListModules invocations

func (*StoreMock) ListModulesBeforeCounter

func (mmListModules *StoreMock) ListModulesBeforeCounter() uint64

ListModulesBeforeCounter returns a count of StoreMock.ListModules invocations

func (*StoreMock) ListModulesByIDs

func (mmListModulesByIDs *StoreMock) ListModulesByIDs(ids []int64) (sa1 []coordinates.SerialModule, err error)

ListModulesByIDs implements Store

func (*StoreMock) ListModulesByIDsAfterCounter

func (mmListModulesByIDs *StoreMock) ListModulesByIDsAfterCounter() uint64

ListModulesByIDsAfterCounter returns a count of finished StoreMock.ListModulesByIDs invocations

func (*StoreMock) ListModulesByIDsBeforeCounter

func (mmListModulesByIDs *StoreMock) ListModulesByIDsBeforeCounter() uint64

ListModulesByIDsBeforeCounter returns a count of StoreMock.ListModulesByIDs invocations

func (*StoreMock) ListModulesBySource

func (mmListModulesBySource *StoreMock) ListModulesBySource(source string) (sa1 []coordinates.SerialModule, err error)

ListModulesBySource implements Store

func (*StoreMock) ListModulesBySourceAfterCounter

func (mmListModulesBySource *StoreMock) ListModulesBySourceAfterCounter() uint64

ListModulesBySourceAfterCounter returns a count of finished StoreMock.ListModulesBySource invocations

func (*StoreMock) ListModulesBySourceBeforeCounter

func (mmListModulesBySource *StoreMock) ListModulesBySourceBeforeCounter() uint64

ListModulesBySourceBeforeCounter returns a count of StoreMock.ListModulesBySource invocations

func (*StoreMock) ListStartConfigs

func (mmListStartConfigs *StoreMock) ListStartConfigs() (ca1 []payloads.Configuration, err error)

ListStartConfigs implements Store

func (*StoreMock) ListStartConfigsAfterCounter

func (mmListStartConfigs *StoreMock) ListStartConfigsAfterCounter() uint64

ListStartConfigsAfterCounter returns a count of finished StoreMock.ListStartConfigs invocations

func (*StoreMock) ListStartConfigsBeforeCounter

func (mmListStartConfigs *StoreMock) ListStartConfigsBeforeCounter() uint64

ListStartConfigsBeforeCounter returns a count of StoreMock.ListStartConfigs invocations

func (*StoreMock) MinimockDeleteModuleByIDDone

func (m *StoreMock) MinimockDeleteModuleByIDDone() bool

MinimockDeleteModuleByIDDone returns true if the count of the DeleteModuleByID invocations corresponds the number of defined expectations

func (*StoreMock) MinimockDeleteModuleByIDInspect

func (m *StoreMock) MinimockDeleteModuleByIDInspect()

MinimockDeleteModuleByIDInspect logs each unmet expectation

func (*StoreMock) MinimockFinish

func (m *StoreMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*StoreMock) MinimockInsertModulesDone

func (m *StoreMock) MinimockInsertModulesDone() bool

MinimockInsertModulesDone returns true if the count of the InsertModules invocations corresponds the number of defined expectations

func (*StoreMock) MinimockInsertModulesInspect

func (m *StoreMock) MinimockInsertModulesInspect()

MinimockInsertModulesInspect logs each unmet expectation

func (*StoreMock) MinimockListHeartbeatsDone

func (m *StoreMock) MinimockListHeartbeatsDone() bool

MinimockListHeartbeatsDone returns true if the count of the ListHeartbeats invocations corresponds the number of defined expectations

func (*StoreMock) MinimockListHeartbeatsInspect

func (m *StoreMock) MinimockListHeartbeatsInspect()

MinimockListHeartbeatsInspect logs each unmet expectation

func (*StoreMock) MinimockListModuleIDsDone

func (m *StoreMock) MinimockListModuleIDsDone() bool

MinimockListModuleIDsDone returns true if the count of the ListModuleIDs invocations corresponds the number of defined expectations

func (*StoreMock) MinimockListModuleIDsInspect

func (m *StoreMock) MinimockListModuleIDsInspect()

MinimockListModuleIDsInspect logs each unmet expectation

func (*StoreMock) MinimockListModulesByIDsDone

func (m *StoreMock) MinimockListModulesByIDsDone() bool

MinimockListModulesByIDsDone returns true if the count of the ListModulesByIDs invocations corresponds the number of defined expectations

func (*StoreMock) MinimockListModulesByIDsInspect

func (m *StoreMock) MinimockListModulesByIDsInspect()

MinimockListModulesByIDsInspect logs each unmet expectation

func (*StoreMock) MinimockListModulesBySourceDone

func (m *StoreMock) MinimockListModulesBySourceDone() bool

MinimockListModulesBySourceDone returns true if the count of the ListModulesBySource invocations corresponds the number of defined expectations

func (*StoreMock) MinimockListModulesBySourceInspect

func (m *StoreMock) MinimockListModulesBySourceInspect()

MinimockListModulesBySourceInspect logs each unmet expectation

func (*StoreMock) MinimockListModulesDone

func (m *StoreMock) MinimockListModulesDone() bool

MinimockListModulesDone returns true if the count of the ListModules invocations corresponds the number of defined expectations

func (*StoreMock) MinimockListModulesInspect

func (m *StoreMock) MinimockListModulesInspect()

MinimockListModulesInspect logs each unmet expectation

func (*StoreMock) MinimockListStartConfigsDone

func (m *StoreMock) MinimockListStartConfigsDone() bool

MinimockListStartConfigsDone returns true if the count of the ListStartConfigs invocations corresponds the number of defined expectations

func (*StoreMock) MinimockListStartConfigsInspect

func (m *StoreMock) MinimockListStartConfigsInspect()

MinimockListStartConfigsInspect logs each unmet expectation

func (*StoreMock) MinimockPurgeProxyDone

func (m *StoreMock) MinimockPurgeProxyDone() bool

MinimockPurgeProxyDone returns true if the count of the PurgeProxy invocations corresponds the number of defined expectations

func (*StoreMock) MinimockPurgeProxyInspect

func (m *StoreMock) MinimockPurgeProxyInspect()

MinimockPurgeProxyInspect logs each unmet expectation

func (*StoreMock) MinimockSetHeartbeatDone

func (m *StoreMock) MinimockSetHeartbeatDone() bool

MinimockSetHeartbeatDone returns true if the count of the SetHeartbeat invocations corresponds the number of defined expectations

func (*StoreMock) MinimockSetHeartbeatInspect

func (m *StoreMock) MinimockSetHeartbeatInspect()

MinimockSetHeartbeatInspect logs each unmet expectation

func (*StoreMock) MinimockSetStartConfigDone

func (m *StoreMock) MinimockSetStartConfigDone() bool

MinimockSetStartConfigDone returns true if the count of the SetStartConfig invocations corresponds the number of defined expectations

func (*StoreMock) MinimockSetStartConfigInspect

func (m *StoreMock) MinimockSetStartConfigInspect()

MinimockSetStartConfigInspect logs each unmet expectation

func (*StoreMock) MinimockWait

func (m *StoreMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*StoreMock) PurgeProxy

func (mmPurgeProxy *StoreMock) PurgeProxy(instance netservice.Instance) (err error)

PurgeProxy implements Store

func (*StoreMock) PurgeProxyAfterCounter

func (mmPurgeProxy *StoreMock) PurgeProxyAfterCounter() uint64

PurgeProxyAfterCounter returns a count of finished StoreMock.PurgeProxy invocations

func (*StoreMock) PurgeProxyBeforeCounter

func (mmPurgeProxy *StoreMock) PurgeProxyBeforeCounter() uint64

PurgeProxyBeforeCounter returns a count of StoreMock.PurgeProxy invocations

func (*StoreMock) SetHeartbeat

func (mmSetHeartbeat *StoreMock) SetHeartbeat(h1 payloads.Heartbeat) (err error)

SetHeartbeat implements Store

func (*StoreMock) SetHeartbeatAfterCounter

func (mmSetHeartbeat *StoreMock) SetHeartbeatAfterCounter() uint64

SetHeartbeatAfterCounter returns a count of finished StoreMock.SetHeartbeat invocations

func (*StoreMock) SetHeartbeatBeforeCounter

func (mmSetHeartbeat *StoreMock) SetHeartbeatBeforeCounter() uint64

SetHeartbeatBeforeCounter returns a count of StoreMock.SetHeartbeat invocations

func (*StoreMock) SetStartConfig

func (mmSetStartConfig *StoreMock) SetStartConfig(c1 payloads.Configuration) (err error)

SetStartConfig implements Store

func (*StoreMock) SetStartConfigAfterCounter

func (mmSetStartConfig *StoreMock) SetStartConfigAfterCounter() uint64

SetStartConfigAfterCounter returns a count of finished StoreMock.SetStartConfig invocations

func (*StoreMock) SetStartConfigBeforeCounter

func (mmSetStartConfig *StoreMock) SetStartConfigBeforeCounter() uint64

SetStartConfigBeforeCounter returns a count of StoreMock.SetStartConfig invocations

type StoreMockDeleteModuleByIDExpectation

type StoreMockDeleteModuleByIDExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StoreMockDeleteModuleByIDExpectation specifies expectation struct of the Store.DeleteModuleByID

func (*StoreMockDeleteModuleByIDExpectation) Then

Then sets up Store.DeleteModuleByID return parameters for the expectation previously defined by the When method

type StoreMockDeleteModuleByIDParams

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

StoreMockDeleteModuleByIDParams contains parameters of the Store.DeleteModuleByID

type StoreMockDeleteModuleByIDResults

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

StoreMockDeleteModuleByIDResults contains results of the Store.DeleteModuleByID

type StoreMockInsertModulesExpectation

type StoreMockInsertModulesExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StoreMockInsertModulesExpectation specifies expectation struct of the Store.InsertModules

func (*StoreMockInsertModulesExpectation) Then

Then sets up Store.InsertModules return parameters for the expectation previously defined by the When method

type StoreMockInsertModulesParams

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

StoreMockInsertModulesParams contains parameters of the Store.InsertModules

type StoreMockInsertModulesResults

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

StoreMockInsertModulesResults contains results of the Store.InsertModules

type StoreMockListHeartbeatsExpectation

type StoreMockListHeartbeatsExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StoreMockListHeartbeatsExpectation specifies expectation struct of the Store.ListHeartbeats

type StoreMockListHeartbeatsResults

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

StoreMockListHeartbeatsResults contains results of the Store.ListHeartbeats

type StoreMockListModuleIDsExpectation

type StoreMockListModuleIDsExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StoreMockListModuleIDsExpectation specifies expectation struct of the Store.ListModuleIDs

type StoreMockListModuleIDsResults

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

StoreMockListModuleIDsResults contains results of the Store.ListModuleIDs

type StoreMockListModulesByIDsExpectation

type StoreMockListModulesByIDsExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StoreMockListModulesByIDsExpectation specifies expectation struct of the Store.ListModulesByIDs

func (*StoreMockListModulesByIDsExpectation) Then

Then sets up Store.ListModulesByIDs return parameters for the expectation previously defined by the When method

type StoreMockListModulesByIDsParams

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

StoreMockListModulesByIDsParams contains parameters of the Store.ListModulesByIDs

type StoreMockListModulesByIDsResults

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

StoreMockListModulesByIDsResults contains results of the Store.ListModulesByIDs

type StoreMockListModulesBySourceExpectation

type StoreMockListModulesBySourceExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StoreMockListModulesBySourceExpectation specifies expectation struct of the Store.ListModulesBySource

func (*StoreMockListModulesBySourceExpectation) Then

Then sets up Store.ListModulesBySource return parameters for the expectation previously defined by the When method

type StoreMockListModulesBySourceParams

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

StoreMockListModulesBySourceParams contains parameters of the Store.ListModulesBySource

type StoreMockListModulesBySourceResults

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

StoreMockListModulesBySourceResults contains results of the Store.ListModulesBySource

type StoreMockListModulesExpectation

type StoreMockListModulesExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StoreMockListModulesExpectation specifies expectation struct of the Store.ListModules

type StoreMockListModulesResults

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

StoreMockListModulesResults contains results of the Store.ListModules

type StoreMockListStartConfigsExpectation

type StoreMockListStartConfigsExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StoreMockListStartConfigsExpectation specifies expectation struct of the Store.ListStartConfigs

type StoreMockListStartConfigsResults

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

StoreMockListStartConfigsResults contains results of the Store.ListStartConfigs

type StoreMockPurgeProxyExpectation

type StoreMockPurgeProxyExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StoreMockPurgeProxyExpectation specifies expectation struct of the Store.PurgeProxy

func (*StoreMockPurgeProxyExpectation) Then

Then sets up Store.PurgeProxy return parameters for the expectation previously defined by the When method

type StoreMockPurgeProxyParams

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

StoreMockPurgeProxyParams contains parameters of the Store.PurgeProxy

type StoreMockPurgeProxyResults

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

StoreMockPurgeProxyResults contains results of the Store.PurgeProxy

type StoreMockSetHeartbeatExpectation

type StoreMockSetHeartbeatExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StoreMockSetHeartbeatExpectation specifies expectation struct of the Store.SetHeartbeat

func (*StoreMockSetHeartbeatExpectation) Then

Then sets up Store.SetHeartbeat return parameters for the expectation previously defined by the When method

type StoreMockSetHeartbeatParams

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

StoreMockSetHeartbeatParams contains parameters of the Store.SetHeartbeat

type StoreMockSetHeartbeatResults

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

StoreMockSetHeartbeatResults contains results of the Store.SetHeartbeat

type StoreMockSetStartConfigExpectation

type StoreMockSetStartConfigExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StoreMockSetStartConfigExpectation specifies expectation struct of the Store.SetStartConfig

func (*StoreMockSetStartConfigExpectation) Then

Then sets up Store.SetStartConfig return parameters for the expectation previously defined by the When method

type StoreMockSetStartConfigParams

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

StoreMockSetStartConfigParams contains parameters of the Store.SetStartConfig

type StoreMockSetStartConfigResults

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

StoreMockSetStartConfigResults contains results of the Store.SetStartConfig

Jump to

Keyboard shortcuts

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