storetest

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: MIT Imports: 6 Imported by: ? 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 GraphDBMock added in v1.22.0

type GraphDBMock struct {
	// AddVersionDetailsToInstanceFunc mocks the AddVersionDetailsToInstance method.
	AddVersionDetailsToInstanceFunc func(ctx context.Context, instanceID string, datasetID string, edition string, version int) error

	// CheckerFunc mocks the Checker method.
	CheckerFunc func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error

	// CloseFunc mocks the Close method.
	CloseFunc func(ctx context.Context) error

	// SetInstanceIsPublishedFunc mocks the SetInstanceIsPublished method.
	SetInstanceIsPublishedFunc func(ctx context.Context, instanceID string) error
	// contains filtered or unexported fields
}

GraphDBMock is a mock implementation of store.GraphDB.

func TestSomethingThatUsesGraphDB(t *testing.T) {

	// make and configure a mocked store.GraphDB
	mockedGraphDB := &GraphDBMock{
		AddVersionDetailsToInstanceFunc: func(ctx context.Context, instanceID string, datasetID string, edition string, version int) error {
			panic("mock out the AddVersionDetailsToInstance method")
		},
		CheckerFunc: func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error {
			panic("mock out the Checker method")
		},
		CloseFunc: func(ctx context.Context) error {
			panic("mock out the Close method")
		},
		SetInstanceIsPublishedFunc: func(ctx context.Context, instanceID string) error {
			panic("mock out the SetInstanceIsPublished method")
		},
	}

	// use mockedGraphDB in code that requires store.GraphDB
	// and then make assertions.

}

func (*GraphDBMock) AddVersionDetailsToInstance added in v1.22.0

func (mock *GraphDBMock) AddVersionDetailsToInstance(ctx context.Context, instanceID string, datasetID string, edition string, version int) error

AddVersionDetailsToInstance calls AddVersionDetailsToInstanceFunc.

func (*GraphDBMock) AddVersionDetailsToInstanceCalls added in v1.22.0

func (mock *GraphDBMock) AddVersionDetailsToInstanceCalls() []struct {
	Ctx        context.Context
	InstanceID string
	DatasetID  string
	Edition    string
	Version    int
}

AddVersionDetailsToInstanceCalls gets all the calls that were made to AddVersionDetailsToInstance. Check the length with:

len(mockedGraphDB.AddVersionDetailsToInstanceCalls())

func (*GraphDBMock) Checker added in v1.22.0

func (mock *GraphDBMock) Checker(contextMoqParam context.Context, checkState *healthcheck.CheckState) error

Checker calls CheckerFunc.

func (*GraphDBMock) CheckerCalls added in v1.22.0

func (mock *GraphDBMock) CheckerCalls() []struct {
	ContextMoqParam context.Context
	CheckState      *healthcheck.CheckState
}

CheckerCalls gets all the calls that were made to Checker. Check the length with:

len(mockedGraphDB.CheckerCalls())

func (*GraphDBMock) Close added in v1.22.0

func (mock *GraphDBMock) Close(ctx context.Context) error

Close calls CloseFunc.

func (*GraphDBMock) CloseCalls added in v1.22.0

func (mock *GraphDBMock) CloseCalls() []struct {
	Ctx context.Context
}

CloseCalls gets all the calls that were made to Close. Check the length with:

len(mockedGraphDB.CloseCalls())

func (*GraphDBMock) SetInstanceIsPublished added in v1.22.0

func (mock *GraphDBMock) SetInstanceIsPublished(ctx context.Context, instanceID string) error

SetInstanceIsPublished calls SetInstanceIsPublishedFunc.

func (*GraphDBMock) SetInstanceIsPublishedCalls added in v1.22.0

func (mock *GraphDBMock) SetInstanceIsPublishedCalls() []struct {
	Ctx        context.Context
	InstanceID string
}

SetInstanceIsPublishedCalls gets all the calls that were made to SetInstanceIsPublished. Check the length with:

len(mockedGraphDB.SetInstanceIsPublishedCalls())

type MongoDBMock added in v1.22.0

type MongoDBMock struct {
	// AcquireInstanceLockFunc mocks the AcquireInstanceLock method.
	AcquireInstanceLockFunc func(ctx context.Context, instanceID string) (string, error)

	// AddEventToInstanceFunc mocks the AddEventToInstance method.
	AddEventToInstanceFunc func(currentInstance *models.Instance, event *models.Event, eTagSelector string) (string, error)

	// AddInstanceFunc mocks the AddInstance method.
	AddInstanceFunc func(instance *models.Instance) (*models.Instance, error)

	// CheckDatasetExistsFunc mocks the CheckDatasetExists method.
	CheckDatasetExistsFunc func(ID string, state string) error

	// CheckEditionExistsFunc mocks the CheckEditionExists method.
	CheckEditionExistsFunc func(ID string, editionID string, state string) error

	// CheckerFunc mocks the Checker method.
	CheckerFunc func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error

	// CloseFunc mocks the Close method.
	CloseFunc func(contextMoqParam context.Context) error

	// DeleteDatasetFunc mocks the DeleteDataset method.
	DeleteDatasetFunc func(ID string) error

	// DeleteEditionFunc mocks the DeleteEdition method.
	DeleteEditionFunc func(ID string) error

	// GetDatasetFunc mocks the GetDataset method.
	GetDatasetFunc func(ID string) (*models.DatasetUpdate, error)

	// GetDatasetsFunc mocks the GetDatasets method.
	GetDatasetsFunc func(ctx context.Context, offset int, limit int, authorised bool) ([]*models.DatasetUpdate, int, error)

	// GetDimensionOptionsFunc mocks the GetDimensionOptions method.
	GetDimensionOptionsFunc func(ctx context.Context, version *models.Version, dimension string, offset int, limit int) ([]*models.PublicDimensionOption, int, error)

	// GetDimensionOptionsFromIDsFunc mocks the GetDimensionOptionsFromIDs method.
	GetDimensionOptionsFromIDsFunc func(version *models.Version, dimension string, ids []string) ([]*models.PublicDimensionOption, int, error)

	// GetDimensionsFunc mocks the GetDimensions method.
	GetDimensionsFunc func(versionID string) ([]bson.M, error)

	// GetDimensionsFromInstanceFunc mocks the GetDimensionsFromInstance method.
	GetDimensionsFromInstanceFunc func(ctx context.Context, ID string, offset int, limit int) ([]*models.DimensionOption, int, error)

	// GetEditionFunc mocks the GetEdition method.
	GetEditionFunc func(ID string, editionID string, state string) (*models.EditionUpdate, error)

	// GetEditionsFunc mocks the GetEditions method.
	GetEditionsFunc func(ctx context.Context, ID string, state string, offset int, limit int, authorised bool) ([]*models.EditionUpdate, int, error)

	// GetInstanceFunc mocks the GetInstance method.
	GetInstanceFunc func(ID string, eTagSelector string) (*models.Instance, error)

	// GetInstancesFunc mocks the GetInstances method.
	GetInstancesFunc func(ctx context.Context, states []string, datasets []string, offset int, limit int) ([]*models.Instance, int, error)

	// GetNextVersionFunc mocks the GetNextVersion method.
	GetNextVersionFunc func(datasetID string, editionID string) (int, error)

	// GetUniqueDimensionAndOptionsFunc mocks the GetUniqueDimensionAndOptions method.
	GetUniqueDimensionAndOptionsFunc func(ID string, dimension string) ([]*string, int, error)

	// GetVersionFunc mocks the GetVersion method.
	GetVersionFunc func(datasetID string, editionID string, version int, state string) (*models.Version, error)

	// GetVersionsFunc mocks the GetVersions method.
	GetVersionsFunc func(ctx context.Context, datasetID string, editionID string, state string, offset int, limit int) ([]models.Version, int, error)

	// RemoveDatasetVersionAndEditionLinksFunc mocks the RemoveDatasetVersionAndEditionLinks method.
	RemoveDatasetVersionAndEditionLinksFunc func(id string) error

	// UnlockInstanceFunc mocks the UnlockInstance method.
	UnlockInstanceFunc func(lockID string)

	// UpdateBuildHierarchyTaskStateFunc mocks the UpdateBuildHierarchyTaskState method.
	UpdateBuildHierarchyTaskStateFunc func(currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error)

	// UpdateBuildSearchTaskStateFunc mocks the UpdateBuildSearchTaskState method.
	UpdateBuildSearchTaskStateFunc func(currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error)

	// UpdateDatasetFunc mocks the UpdateDataset method.
	UpdateDatasetFunc func(ctx context.Context, ID string, dataset *models.Dataset, currentState string) error

	// UpdateDatasetWithAssociationFunc mocks the UpdateDatasetWithAssociation method.
	UpdateDatasetWithAssociationFunc func(ID string, state string, version *models.Version) error

	// UpdateDimensionsNodeIDAndOrderFunc mocks the UpdateDimensionsNodeIDAndOrder method.
	UpdateDimensionsNodeIDAndOrderFunc func(updates []*models.DimensionOption) error

	// UpdateETagForOptionsFunc mocks the UpdateETagForOptions method.
	UpdateETagForOptionsFunc func(currentInstance *models.Instance, upserts []*models.CachedDimensionOption, updates []*models.DimensionOption, eTagSelector string) (string, error)

	// UpdateImportObservationsTaskStateFunc mocks the UpdateImportObservationsTaskState method.
	UpdateImportObservationsTaskStateFunc func(currentInstance *models.Instance, state string, eTagSelector string) (string, error)

	// UpdateInstanceFunc mocks the UpdateInstance method.
	UpdateInstanceFunc func(ctx context.Context, currentInstance *models.Instance, updatedInstance *models.Instance, eTagSelector string) (string, error)

	// UpdateObservationInsertedFunc mocks the UpdateObservationInserted method.
	UpdateObservationInsertedFunc func(currentInstance *models.Instance, observationInserted int64, eTagSelector string) (string, error)

	// UpdateVersionFunc mocks the UpdateVersion method.
	UpdateVersionFunc func(ID string, version *models.Version) error

	// UpsertContactFunc mocks the UpsertContact method.
	UpsertContactFunc func(ID string, update interface{}) error

	// UpsertDatasetFunc mocks the UpsertDataset method.
	UpsertDatasetFunc func(ID string, datasetDoc *models.DatasetUpdate) error

	// UpsertDimensionsToInstanceFunc mocks the UpsertDimensionsToInstance method.
	UpsertDimensionsToInstanceFunc func(dimensions []*models.CachedDimensionOption) error

	// UpsertEditionFunc mocks the UpsertEdition method.
	UpsertEditionFunc func(datasetID string, edition string, editionDoc *models.EditionUpdate) error

	// UpsertVersionFunc mocks the UpsertVersion method.
	UpsertVersionFunc func(ID string, versionDoc *models.Version) error
	// contains filtered or unexported fields
}

MongoDBMock is a mock implementation of store.MongoDB.

func TestSomethingThatUsesMongoDB(t *testing.T) {

	// make and configure a mocked store.MongoDB
	mockedMongoDB := &MongoDBMock{
		AcquireInstanceLockFunc: func(ctx context.Context, instanceID string) (string, error) {
			panic("mock out the AcquireInstanceLock method")
		},
		AddEventToInstanceFunc: func(currentInstance *models.Instance, event *models.Event, eTagSelector string) (string, error) {
			panic("mock out the AddEventToInstance method")
		},
		AddInstanceFunc: func(instance *models.Instance) (*models.Instance, error) {
			panic("mock out the AddInstance method")
		},
		CheckDatasetExistsFunc: func(ID string, state string) error {
			panic("mock out the CheckDatasetExists method")
		},
		CheckEditionExistsFunc: func(ID string, editionID string, state string) error {
			panic("mock out the CheckEditionExists method")
		},
		CheckerFunc: func(contextMoqParam context.Context, checkState *healthcheck.CheckState) error {
			panic("mock out the Checker method")
		},
		CloseFunc: func(contextMoqParam context.Context) error {
			panic("mock out the Close method")
		},
		DeleteDatasetFunc: func(ID string) error {
			panic("mock out the DeleteDataset method")
		},
		DeleteEditionFunc: func(ID string) error {
			panic("mock out the DeleteEdition method")
		},
		GetDatasetFunc: func(ID string) (*models.DatasetUpdate, error) {
			panic("mock out the GetDataset method")
		},
		GetDatasetsFunc: func(ctx context.Context, offset int, limit int, authorised bool) ([]*models.DatasetUpdate, int, error) {
			panic("mock out the GetDatasets method")
		},
		GetDimensionOptionsFunc: func(ctx context.Context, version *models.Version, dimension string, offset int, limit int) ([]*models.PublicDimensionOption, int, error) {
			panic("mock out the GetDimensionOptions method")
		},
		GetDimensionOptionsFromIDsFunc: func(version *models.Version, dimension string, ids []string) ([]*models.PublicDimensionOption, int, error) {
			panic("mock out the GetDimensionOptionsFromIDs method")
		},
		GetDimensionsFunc: func(versionID string) ([]bson.M, error) {
			panic("mock out the GetDimensions method")
		},
		GetDimensionsFromInstanceFunc: func(ctx context.Context, ID string, offset int, limit int) ([]*models.DimensionOption, int, error) {
			panic("mock out the GetDimensionsFromInstance method")
		},
		GetEditionFunc: func(ID string, editionID string, state string) (*models.EditionUpdate, error) {
			panic("mock out the GetEdition method")
		},
		GetEditionsFunc: func(ctx context.Context, ID string, state string, offset int, limit int, authorised bool) ([]*models.EditionUpdate, int, error) {
			panic("mock out the GetEditions method")
		},
		GetInstanceFunc: func(ID string, eTagSelector string) (*models.Instance, error) {
			panic("mock out the GetInstance method")
		},
		GetInstancesFunc: func(ctx context.Context, states []string, datasets []string, offset int, limit int) ([]*models.Instance, int, error) {
			panic("mock out the GetInstances method")
		},
		GetNextVersionFunc: func(datasetID string, editionID string) (int, error) {
			panic("mock out the GetNextVersion method")
		},
		GetUniqueDimensionAndOptionsFunc: func(ID string, dimension string) ([]*string, int, error) {
			panic("mock out the GetUniqueDimensionAndOptions method")
		},
		GetVersionFunc: func(datasetID string, editionID string, version int, state string) (*models.Version, error) {
			panic("mock out the GetVersion method")
		},
		GetVersionsFunc: func(ctx context.Context, datasetID string, editionID string, state string, offset int, limit int) ([]models.Version, int, error) {
			panic("mock out the GetVersions method")
		},
		RemoveDatasetVersionAndEditionLinksFunc: func(id string) error {
			panic("mock out the RemoveDatasetVersionAndEditionLinks method")
		},
		UnlockInstanceFunc: func(lockID string)  {
			panic("mock out the UnlockInstance method")
		},
		UpdateBuildHierarchyTaskStateFunc: func(currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error) {
			panic("mock out the UpdateBuildHierarchyTaskState method")
		},
		UpdateBuildSearchTaskStateFunc: func(currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error) {
			panic("mock out the UpdateBuildSearchTaskState method")
		},
		UpdateDatasetFunc: func(ctx context.Context, ID string, dataset *models.Dataset, currentState string) error {
			panic("mock out the UpdateDataset method")
		},
		UpdateDatasetWithAssociationFunc: func(ID string, state string, version *models.Version) error {
			panic("mock out the UpdateDatasetWithAssociation method")
		},
		UpdateDimensionsNodeIDAndOrderFunc: func(updates []*models.DimensionOption) error {
			panic("mock out the UpdateDimensionsNodeIDAndOrder method")
		},
		UpdateETagForOptionsFunc: func(currentInstance *models.Instance, upserts []*models.CachedDimensionOption, updates []*models.DimensionOption, eTagSelector string) (string, error) {
			panic("mock out the UpdateETagForOptions method")
		},
		UpdateImportObservationsTaskStateFunc: func(currentInstance *models.Instance, state string, eTagSelector string) (string, error) {
			panic("mock out the UpdateImportObservationsTaskState method")
		},
		UpdateInstanceFunc: func(ctx context.Context, currentInstance *models.Instance, updatedInstance *models.Instance, eTagSelector string) (string, error) {
			panic("mock out the UpdateInstance method")
		},
		UpdateObservationInsertedFunc: func(currentInstance *models.Instance, observationInserted int64, eTagSelector string) (string, error) {
			panic("mock out the UpdateObservationInserted method")
		},
		UpdateVersionFunc: func(ID string, version *models.Version) error {
			panic("mock out the UpdateVersion method")
		},
		UpsertContactFunc: func(ID string, update interface{}) error {
			panic("mock out the UpsertContact method")
		},
		UpsertDatasetFunc: func(ID string, datasetDoc *models.DatasetUpdate) error {
			panic("mock out the UpsertDataset method")
		},
		UpsertDimensionsToInstanceFunc: func(dimensions []*models.CachedDimensionOption) error {
			panic("mock out the UpsertDimensionsToInstance method")
		},
		UpsertEditionFunc: func(datasetID string, edition string, editionDoc *models.EditionUpdate) error {
			panic("mock out the UpsertEdition method")
		},
		UpsertVersionFunc: func(ID string, versionDoc *models.Version) error {
			panic("mock out the UpsertVersion method")
		},
	}

	// use mockedMongoDB in code that requires store.MongoDB
	// and then make assertions.

}

func (*MongoDBMock) AcquireInstanceLock added in v1.34.0

func (mock *MongoDBMock) AcquireInstanceLock(ctx context.Context, instanceID string) (string, error)

AcquireInstanceLock calls AcquireInstanceLockFunc.

func (*MongoDBMock) AcquireInstanceLockCalls added in v1.34.0

func (mock *MongoDBMock) AcquireInstanceLockCalls() []struct {
	Ctx        context.Context
	InstanceID string
}

AcquireInstanceLockCalls gets all the calls that were made to AcquireInstanceLock. Check the length with:

len(mockedMongoDB.AcquireInstanceLockCalls())

func (*MongoDBMock) AddEventToInstance added in v1.22.0

func (mock *MongoDBMock) AddEventToInstance(currentInstance *models.Instance, event *models.Event, eTagSelector string) (string, error)

AddEventToInstance calls AddEventToInstanceFunc.

func (*MongoDBMock) AddEventToInstanceCalls added in v1.22.0

func (mock *MongoDBMock) AddEventToInstanceCalls() []struct {
	CurrentInstance *models.Instance
	Event           *models.Event
	ETagSelector    string
}

AddEventToInstanceCalls gets all the calls that were made to AddEventToInstance. Check the length with:

len(mockedMongoDB.AddEventToInstanceCalls())

func (*MongoDBMock) AddInstance added in v1.22.0

func (mock *MongoDBMock) AddInstance(instance *models.Instance) (*models.Instance, error)

AddInstance calls AddInstanceFunc.

func (*MongoDBMock) AddInstanceCalls added in v1.22.0

func (mock *MongoDBMock) AddInstanceCalls() []struct {
	Instance *models.Instance
}

AddInstanceCalls gets all the calls that were made to AddInstance. Check the length with:

len(mockedMongoDB.AddInstanceCalls())

func (*MongoDBMock) CheckDatasetExists added in v1.22.0

func (mock *MongoDBMock) CheckDatasetExists(ID string, state string) error

CheckDatasetExists calls CheckDatasetExistsFunc.

func (*MongoDBMock) CheckDatasetExistsCalls added in v1.22.0

func (mock *MongoDBMock) CheckDatasetExistsCalls() []struct {
	ID    string
	State string
}

CheckDatasetExistsCalls gets all the calls that were made to CheckDatasetExists. Check the length with:

len(mockedMongoDB.CheckDatasetExistsCalls())

func (*MongoDBMock) CheckEditionExists added in v1.22.0

func (mock *MongoDBMock) CheckEditionExists(ID string, editionID string, state string) error

CheckEditionExists calls CheckEditionExistsFunc.

func (*MongoDBMock) CheckEditionExistsCalls added in v1.22.0

func (mock *MongoDBMock) CheckEditionExistsCalls() []struct {
	ID        string
	EditionID string
	State     string
}

CheckEditionExistsCalls gets all the calls that were made to CheckEditionExists. Check the length with:

len(mockedMongoDB.CheckEditionExistsCalls())

func (*MongoDBMock) Checker added in v1.22.0

func (mock *MongoDBMock) Checker(contextMoqParam context.Context, checkState *healthcheck.CheckState) error

Checker calls CheckerFunc.

func (*MongoDBMock) CheckerCalls added in v1.22.0

func (mock *MongoDBMock) CheckerCalls() []struct {
	ContextMoqParam context.Context
	CheckState      *healthcheck.CheckState
}

CheckerCalls gets all the calls that were made to Checker. Check the length with:

len(mockedMongoDB.CheckerCalls())

func (*MongoDBMock) Close added in v1.22.0

func (mock *MongoDBMock) Close(contextMoqParam context.Context) error

Close calls CloseFunc.

func (*MongoDBMock) CloseCalls added in v1.22.0

func (mock *MongoDBMock) CloseCalls() []struct {
	ContextMoqParam context.Context
}

CloseCalls gets all the calls that were made to Close. Check the length with:

len(mockedMongoDB.CloseCalls())

func (*MongoDBMock) DeleteDataset added in v1.22.0

func (mock *MongoDBMock) DeleteDataset(ID string) error

DeleteDataset calls DeleteDatasetFunc.

func (*MongoDBMock) DeleteDatasetCalls added in v1.22.0

func (mock *MongoDBMock) DeleteDatasetCalls() []struct {
	ID string
}

DeleteDatasetCalls gets all the calls that were made to DeleteDataset. Check the length with:

len(mockedMongoDB.DeleteDatasetCalls())

func (*MongoDBMock) DeleteEdition added in v1.22.0

func (mock *MongoDBMock) DeleteEdition(ID string) error

DeleteEdition calls DeleteEditionFunc.

func (*MongoDBMock) DeleteEditionCalls added in v1.22.0

func (mock *MongoDBMock) DeleteEditionCalls() []struct {
	ID string
}

DeleteEditionCalls gets all the calls that were made to DeleteEdition. Check the length with:

len(mockedMongoDB.DeleteEditionCalls())

func (*MongoDBMock) GetDataset added in v1.22.0

func (mock *MongoDBMock) GetDataset(ID string) (*models.DatasetUpdate, error)

GetDataset calls GetDatasetFunc.

func (*MongoDBMock) GetDatasetCalls added in v1.22.0

func (mock *MongoDBMock) GetDatasetCalls() []struct {
	ID string
}

GetDatasetCalls gets all the calls that were made to GetDataset. Check the length with:

len(mockedMongoDB.GetDatasetCalls())

func (*MongoDBMock) GetDatasets added in v1.22.0

func (mock *MongoDBMock) GetDatasets(ctx context.Context, offset int, limit int, authorised bool) ([]*models.DatasetUpdate, int, error)

GetDatasets calls GetDatasetsFunc.

func (*MongoDBMock) GetDatasetsCalls added in v1.22.0

func (mock *MongoDBMock) GetDatasetsCalls() []struct {
	Ctx        context.Context
	Offset     int
	Limit      int
	Authorised bool
}

GetDatasetsCalls gets all the calls that were made to GetDatasets. Check the length with:

len(mockedMongoDB.GetDatasetsCalls())

func (*MongoDBMock) GetDimensionOptions added in v1.22.0

func (mock *MongoDBMock) GetDimensionOptions(ctx context.Context, version *models.Version, dimension string, offset int, limit int) ([]*models.PublicDimensionOption, int, error)

GetDimensionOptions calls GetDimensionOptionsFunc.

func (*MongoDBMock) GetDimensionOptionsCalls added in v1.22.0

func (mock *MongoDBMock) GetDimensionOptionsCalls() []struct {
	Ctx       context.Context
	Version   *models.Version
	Dimension string
	Offset    int
	Limit     int
}

GetDimensionOptionsCalls gets all the calls that were made to GetDimensionOptions. Check the length with:

len(mockedMongoDB.GetDimensionOptionsCalls())

func (*MongoDBMock) GetDimensionOptionsFromIDs added in v1.25.0

func (mock *MongoDBMock) GetDimensionOptionsFromIDs(version *models.Version, dimension string, ids []string) ([]*models.PublicDimensionOption, int, error)

GetDimensionOptionsFromIDs calls GetDimensionOptionsFromIDsFunc.

func (*MongoDBMock) GetDimensionOptionsFromIDsCalls added in v1.25.0

func (mock *MongoDBMock) GetDimensionOptionsFromIDsCalls() []struct {
	Version   *models.Version
	Dimension string
	Ids       []string
}

GetDimensionOptionsFromIDsCalls gets all the calls that were made to GetDimensionOptionsFromIDs. Check the length with:

len(mockedMongoDB.GetDimensionOptionsFromIDsCalls())

func (*MongoDBMock) GetDimensions added in v1.22.0

func (mock *MongoDBMock) GetDimensions(versionID string) ([]bson.M, error)

GetDimensions calls GetDimensionsFunc.

func (*MongoDBMock) GetDimensionsCalls added in v1.22.0

func (mock *MongoDBMock) GetDimensionsCalls() []struct {
	VersionID string
}

GetDimensionsCalls gets all the calls that were made to GetDimensions. Check the length with:

len(mockedMongoDB.GetDimensionsCalls())

func (*MongoDBMock) GetDimensionsFromInstance added in v1.22.0

func (mock *MongoDBMock) GetDimensionsFromInstance(ctx context.Context, ID string, offset int, limit int) ([]*models.DimensionOption, int, error)

GetDimensionsFromInstance calls GetDimensionsFromInstanceFunc.

func (*MongoDBMock) GetDimensionsFromInstanceCalls added in v1.22.0

func (mock *MongoDBMock) GetDimensionsFromInstanceCalls() []struct {
	Ctx    context.Context
	ID     string
	Offset int
	Limit  int
}

GetDimensionsFromInstanceCalls gets all the calls that were made to GetDimensionsFromInstance. Check the length with:

len(mockedMongoDB.GetDimensionsFromInstanceCalls())

func (*MongoDBMock) GetEdition added in v1.22.0

func (mock *MongoDBMock) GetEdition(ID string, editionID string, state string) (*models.EditionUpdate, error)

GetEdition calls GetEditionFunc.

func (*MongoDBMock) GetEditionCalls added in v1.22.0

func (mock *MongoDBMock) GetEditionCalls() []struct {
	ID        string
	EditionID string
	State     string
}

GetEditionCalls gets all the calls that were made to GetEdition. Check the length with:

len(mockedMongoDB.GetEditionCalls())

func (*MongoDBMock) GetEditions added in v1.22.0

func (mock *MongoDBMock) GetEditions(ctx context.Context, ID string, state string, offset int, limit int, authorised bool) ([]*models.EditionUpdate, int, error)

GetEditions calls GetEditionsFunc.

func (*MongoDBMock) GetEditionsCalls added in v1.22.0

func (mock *MongoDBMock) GetEditionsCalls() []struct {
	Ctx        context.Context
	ID         string
	State      string
	Offset     int
	Limit      int
	Authorised bool
}

GetEditionsCalls gets all the calls that were made to GetEditions. Check the length with:

len(mockedMongoDB.GetEditionsCalls())

func (*MongoDBMock) GetInstance added in v1.22.0

func (mock *MongoDBMock) GetInstance(ID string, eTagSelector string) (*models.Instance, error)

GetInstance calls GetInstanceFunc.

func (*MongoDBMock) GetInstanceCalls added in v1.22.0

func (mock *MongoDBMock) GetInstanceCalls() []struct {
	ID           string
	ETagSelector string
}

GetInstanceCalls gets all the calls that were made to GetInstance. Check the length with:

len(mockedMongoDB.GetInstanceCalls())

func (*MongoDBMock) GetInstances added in v1.22.0

func (mock *MongoDBMock) GetInstances(ctx context.Context, states []string, datasets []string, offset int, limit int) ([]*models.Instance, int, error)

GetInstances calls GetInstancesFunc.

func (*MongoDBMock) GetInstancesCalls added in v1.22.0

func (mock *MongoDBMock) GetInstancesCalls() []struct {
	Ctx      context.Context
	States   []string
	Datasets []string
	Offset   int
	Limit    int
}

GetInstancesCalls gets all the calls that were made to GetInstances. Check the length with:

len(mockedMongoDB.GetInstancesCalls())

func (*MongoDBMock) GetNextVersion added in v1.22.0

func (mock *MongoDBMock) GetNextVersion(datasetID string, editionID string) (int, error)

GetNextVersion calls GetNextVersionFunc.

func (*MongoDBMock) GetNextVersionCalls added in v1.22.0

func (mock *MongoDBMock) GetNextVersionCalls() []struct {
	DatasetID string
	EditionID string
}

GetNextVersionCalls gets all the calls that were made to GetNextVersion. Check the length with:

len(mockedMongoDB.GetNextVersionCalls())

func (*MongoDBMock) GetUniqueDimensionAndOptions added in v1.22.0

func (mock *MongoDBMock) GetUniqueDimensionAndOptions(ID string, dimension string) ([]*string, int, error)

GetUniqueDimensionAndOptions calls GetUniqueDimensionAndOptionsFunc.

func (*MongoDBMock) GetUniqueDimensionAndOptionsCalls added in v1.22.0

func (mock *MongoDBMock) GetUniqueDimensionAndOptionsCalls() []struct {
	ID        string
	Dimension string
}

GetUniqueDimensionAndOptionsCalls gets all the calls that were made to GetUniqueDimensionAndOptions. Check the length with:

len(mockedMongoDB.GetUniqueDimensionAndOptionsCalls())

func (*MongoDBMock) GetVersion added in v1.22.0

func (mock *MongoDBMock) GetVersion(datasetID string, editionID string, version int, state string) (*models.Version, error)

GetVersion calls GetVersionFunc.

func (*MongoDBMock) GetVersionCalls added in v1.22.0

func (mock *MongoDBMock) GetVersionCalls() []struct {
	DatasetID string
	EditionID string
	Version   int
	State     string
}

GetVersionCalls gets all the calls that were made to GetVersion. Check the length with:

len(mockedMongoDB.GetVersionCalls())

func (*MongoDBMock) GetVersions added in v1.22.0

func (mock *MongoDBMock) GetVersions(ctx context.Context, datasetID string, editionID string, state string, offset int, limit int) ([]models.Version, int, error)

GetVersions calls GetVersionsFunc.

func (*MongoDBMock) GetVersionsCalls added in v1.22.0

func (mock *MongoDBMock) GetVersionsCalls() []struct {
	Ctx       context.Context
	DatasetID string
	EditionID string
	State     string
	Offset    int
	Limit     int
}

GetVersionsCalls gets all the calls that were made to GetVersions. Check the length with:

len(mockedMongoDB.GetVersionsCalls())
func (mock *MongoDBMock) RemoveDatasetVersionAndEditionLinks(id string) error

RemoveDatasetVersionAndEditionLinks calls RemoveDatasetVersionAndEditionLinksFunc.

func (*MongoDBMock) RemoveDatasetVersionAndEditionLinksCalls added in v1.38.0

func (mock *MongoDBMock) RemoveDatasetVersionAndEditionLinksCalls() []struct {
	ID string
}

RemoveDatasetVersionAndEditionLinksCalls gets all the calls that were made to RemoveDatasetVersionAndEditionLinks. Check the length with:

len(mockedMongoDB.RemoveDatasetVersionAndEditionLinksCalls())

func (*MongoDBMock) UnlockInstance added in v1.34.0

func (mock *MongoDBMock) UnlockInstance(lockID string)

UnlockInstance calls UnlockInstanceFunc.

func (*MongoDBMock) UnlockInstanceCalls added in v1.34.0

func (mock *MongoDBMock) UnlockInstanceCalls() []struct {
	LockID string
}

UnlockInstanceCalls gets all the calls that were made to UnlockInstance. Check the length with:

len(mockedMongoDB.UnlockInstanceCalls())

func (*MongoDBMock) UpdateBuildHierarchyTaskState added in v1.22.0

func (mock *MongoDBMock) UpdateBuildHierarchyTaskState(currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error)

UpdateBuildHierarchyTaskState calls UpdateBuildHierarchyTaskStateFunc.

func (*MongoDBMock) UpdateBuildHierarchyTaskStateCalls added in v1.22.0

func (mock *MongoDBMock) UpdateBuildHierarchyTaskStateCalls() []struct {
	CurrentInstance *models.Instance
	Dimension       string
	State           string
	ETagSelector    string
}

UpdateBuildHierarchyTaskStateCalls gets all the calls that were made to UpdateBuildHierarchyTaskState. Check the length with:

len(mockedMongoDB.UpdateBuildHierarchyTaskStateCalls())

func (*MongoDBMock) UpdateBuildSearchTaskState added in v1.22.0

func (mock *MongoDBMock) UpdateBuildSearchTaskState(currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error)

UpdateBuildSearchTaskState calls UpdateBuildSearchTaskStateFunc.

func (*MongoDBMock) UpdateBuildSearchTaskStateCalls added in v1.22.0

func (mock *MongoDBMock) UpdateBuildSearchTaskStateCalls() []struct {
	CurrentInstance *models.Instance
	Dimension       string
	State           string
	ETagSelector    string
}

UpdateBuildSearchTaskStateCalls gets all the calls that were made to UpdateBuildSearchTaskState. Check the length with:

len(mockedMongoDB.UpdateBuildSearchTaskStateCalls())

func (*MongoDBMock) UpdateDataset added in v1.22.0

func (mock *MongoDBMock) UpdateDataset(ctx context.Context, ID string, dataset *models.Dataset, currentState string) error

UpdateDataset calls UpdateDatasetFunc.

func (*MongoDBMock) UpdateDatasetCalls added in v1.22.0

func (mock *MongoDBMock) UpdateDatasetCalls() []struct {
	Ctx          context.Context
	ID           string
	Dataset      *models.Dataset
	CurrentState string
}

UpdateDatasetCalls gets all the calls that were made to UpdateDataset. Check the length with:

len(mockedMongoDB.UpdateDatasetCalls())

func (*MongoDBMock) UpdateDatasetWithAssociation added in v1.22.0

func (mock *MongoDBMock) UpdateDatasetWithAssociation(ID string, state string, version *models.Version) error

UpdateDatasetWithAssociation calls UpdateDatasetWithAssociationFunc.

func (*MongoDBMock) UpdateDatasetWithAssociationCalls added in v1.22.0

func (mock *MongoDBMock) UpdateDatasetWithAssociationCalls() []struct {
	ID      string
	State   string
	Version *models.Version
}

UpdateDatasetWithAssociationCalls gets all the calls that were made to UpdateDatasetWithAssociation. Check the length with:

len(mockedMongoDB.UpdateDatasetWithAssociationCalls())

func (*MongoDBMock) UpdateDimensionsNodeIDAndOrder added in v1.37.0

func (mock *MongoDBMock) UpdateDimensionsNodeIDAndOrder(updates []*models.DimensionOption) error

UpdateDimensionsNodeIDAndOrder calls UpdateDimensionsNodeIDAndOrderFunc.

func (*MongoDBMock) UpdateDimensionsNodeIDAndOrderCalls added in v1.37.0

func (mock *MongoDBMock) UpdateDimensionsNodeIDAndOrderCalls() []struct {
	Updates []*models.DimensionOption
}

UpdateDimensionsNodeIDAndOrderCalls gets all the calls that were made to UpdateDimensionsNodeIDAndOrder. Check the length with:

len(mockedMongoDB.UpdateDimensionsNodeIDAndOrderCalls())

func (*MongoDBMock) UpdateETagForOptions added in v1.34.0

func (mock *MongoDBMock) UpdateETagForOptions(currentInstance *models.Instance, upserts []*models.CachedDimensionOption, updates []*models.DimensionOption, eTagSelector string) (string, error)

UpdateETagForOptions calls UpdateETagForOptionsFunc.

func (*MongoDBMock) UpdateETagForOptionsCalls added in v1.34.0

func (mock *MongoDBMock) UpdateETagForOptionsCalls() []struct {
	CurrentInstance *models.Instance
	Upserts         []*models.CachedDimensionOption
	Updates         []*models.DimensionOption
	ETagSelector    string
}

UpdateETagForOptionsCalls gets all the calls that were made to UpdateETagForOptions. Check the length with:

len(mockedMongoDB.UpdateETagForOptionsCalls())

func (*MongoDBMock) UpdateImportObservationsTaskState added in v1.22.0

func (mock *MongoDBMock) UpdateImportObservationsTaskState(currentInstance *models.Instance, state string, eTagSelector string) (string, error)

UpdateImportObservationsTaskState calls UpdateImportObservationsTaskStateFunc.

func (*MongoDBMock) UpdateImportObservationsTaskStateCalls added in v1.22.0

func (mock *MongoDBMock) UpdateImportObservationsTaskStateCalls() []struct {
	CurrentInstance *models.Instance
	State           string
	ETagSelector    string
}

UpdateImportObservationsTaskStateCalls gets all the calls that were made to UpdateImportObservationsTaskState. Check the length with:

len(mockedMongoDB.UpdateImportObservationsTaskStateCalls())

func (*MongoDBMock) UpdateInstance added in v1.22.0

func (mock *MongoDBMock) UpdateInstance(ctx context.Context, currentInstance *models.Instance, updatedInstance *models.Instance, eTagSelector string) (string, error)

UpdateInstance calls UpdateInstanceFunc.

func (*MongoDBMock) UpdateInstanceCalls added in v1.22.0

func (mock *MongoDBMock) UpdateInstanceCalls() []struct {
	Ctx             context.Context
	CurrentInstance *models.Instance
	UpdatedInstance *models.Instance
	ETagSelector    string
}

UpdateInstanceCalls gets all the calls that were made to UpdateInstance. Check the length with:

len(mockedMongoDB.UpdateInstanceCalls())

func (*MongoDBMock) UpdateObservationInserted added in v1.22.0

func (mock *MongoDBMock) UpdateObservationInserted(currentInstance *models.Instance, observationInserted int64, eTagSelector string) (string, error)

UpdateObservationInserted calls UpdateObservationInsertedFunc.

func (*MongoDBMock) UpdateObservationInsertedCalls added in v1.22.0

func (mock *MongoDBMock) UpdateObservationInsertedCalls() []struct {
	CurrentInstance     *models.Instance
	ObservationInserted int64
	ETagSelector        string
}

UpdateObservationInsertedCalls gets all the calls that were made to UpdateObservationInserted. Check the length with:

len(mockedMongoDB.UpdateObservationInsertedCalls())

func (*MongoDBMock) UpdateVersion added in v1.22.0

func (mock *MongoDBMock) UpdateVersion(ID string, version *models.Version) error

UpdateVersion calls UpdateVersionFunc.

func (*MongoDBMock) UpdateVersionCalls added in v1.22.0

func (mock *MongoDBMock) UpdateVersionCalls() []struct {
	ID      string
	Version *models.Version
}

UpdateVersionCalls gets all the calls that were made to UpdateVersion. Check the length with:

len(mockedMongoDB.UpdateVersionCalls())

func (*MongoDBMock) UpsertContact added in v1.22.0

func (mock *MongoDBMock) UpsertContact(ID string, update interface{}) error

UpsertContact calls UpsertContactFunc.

func (*MongoDBMock) UpsertContactCalls added in v1.22.0

func (mock *MongoDBMock) UpsertContactCalls() []struct {
	ID     string
	Update interface{}
}

UpsertContactCalls gets all the calls that were made to UpsertContact. Check the length with:

len(mockedMongoDB.UpsertContactCalls())

func (*MongoDBMock) UpsertDataset added in v1.22.0

func (mock *MongoDBMock) UpsertDataset(ID string, datasetDoc *models.DatasetUpdate) error

UpsertDataset calls UpsertDatasetFunc.

func (*MongoDBMock) UpsertDatasetCalls added in v1.22.0

func (mock *MongoDBMock) UpsertDatasetCalls() []struct {
	ID         string
	DatasetDoc *models.DatasetUpdate
}

UpsertDatasetCalls gets all the calls that were made to UpsertDataset. Check the length with:

len(mockedMongoDB.UpsertDatasetCalls())

func (*MongoDBMock) UpsertDimensionsToInstance added in v1.36.0

func (mock *MongoDBMock) UpsertDimensionsToInstance(dimensions []*models.CachedDimensionOption) error

UpsertDimensionsToInstance calls UpsertDimensionsToInstanceFunc.

func (*MongoDBMock) UpsertDimensionsToInstanceCalls added in v1.36.0

func (mock *MongoDBMock) UpsertDimensionsToInstanceCalls() []struct {
	Dimensions []*models.CachedDimensionOption
}

UpsertDimensionsToInstanceCalls gets all the calls that were made to UpsertDimensionsToInstance. Check the length with:

len(mockedMongoDB.UpsertDimensionsToInstanceCalls())

func (*MongoDBMock) UpsertEdition added in v1.22.0

func (mock *MongoDBMock) UpsertEdition(datasetID string, edition string, editionDoc *models.EditionUpdate) error

UpsertEdition calls UpsertEditionFunc.

func (*MongoDBMock) UpsertEditionCalls added in v1.22.0

func (mock *MongoDBMock) UpsertEditionCalls() []struct {
	DatasetID  string
	Edition    string
	EditionDoc *models.EditionUpdate
}

UpsertEditionCalls gets all the calls that were made to UpsertEdition. Check the length with:

len(mockedMongoDB.UpsertEditionCalls())

func (*MongoDBMock) UpsertVersion added in v1.22.0

func (mock *MongoDBMock) UpsertVersion(ID string, versionDoc *models.Version) error

UpsertVersion calls UpsertVersionFunc.

func (*MongoDBMock) UpsertVersionCalls added in v1.22.0

func (mock *MongoDBMock) UpsertVersionCalls() []struct {
	ID         string
	VersionDoc *models.Version
}

UpsertVersionCalls gets all the calls that were made to UpsertVersion. Check the length with:

len(mockedMongoDB.UpsertVersionCalls())

type StorerMock

type StorerMock struct {
	// AcquireInstanceLockFunc mocks the AcquireInstanceLock method.
	AcquireInstanceLockFunc func(ctx context.Context, instanceID string) (string, error)

	// AddEventToInstanceFunc mocks the AddEventToInstance method.
	AddEventToInstanceFunc func(currentInstance *models.Instance, event *models.Event, eTagSelector string) (string, error)

	// AddInstanceFunc mocks the AddInstance method.
	AddInstanceFunc func(instance *models.Instance) (*models.Instance, error)

	// AddVersionDetailsToInstanceFunc mocks the AddVersionDetailsToInstance method.
	AddVersionDetailsToInstanceFunc func(ctx context.Context, instanceID string, datasetID string, edition string, version int) error

	// CheckDatasetExistsFunc mocks the CheckDatasetExists method.
	CheckDatasetExistsFunc func(ID string, state string) error

	// CheckEditionExistsFunc mocks the CheckEditionExists method.
	CheckEditionExistsFunc func(ID string, editionID string, state string) error

	// DeleteDatasetFunc mocks the DeleteDataset method.
	DeleteDatasetFunc func(ID string) error

	// DeleteEditionFunc mocks the DeleteEdition method.
	DeleteEditionFunc func(ID string) error

	// GetDatasetFunc mocks the GetDataset method.
	GetDatasetFunc func(ID string) (*models.DatasetUpdate, error)

	// GetDatasetsFunc mocks the GetDatasets method.
	GetDatasetsFunc func(ctx context.Context, offset int, limit int, authorised bool) ([]*models.DatasetUpdate, int, error)

	// GetDimensionOptionsFunc mocks the GetDimensionOptions method.
	GetDimensionOptionsFunc func(ctx context.Context, version *models.Version, dimension string, offset int, limit int) ([]*models.PublicDimensionOption, int, error)

	// GetDimensionOptionsFromIDsFunc mocks the GetDimensionOptionsFromIDs method.
	GetDimensionOptionsFromIDsFunc func(version *models.Version, dimension string, ids []string) ([]*models.PublicDimensionOption, int, error)

	// GetDimensionsFunc mocks the GetDimensions method.
	GetDimensionsFunc func(versionID string) ([]bson.M, error)

	// GetDimensionsFromInstanceFunc mocks the GetDimensionsFromInstance method.
	GetDimensionsFromInstanceFunc func(ctx context.Context, ID string, offset int, limit int) ([]*models.DimensionOption, int, error)

	// GetEditionFunc mocks the GetEdition method.
	GetEditionFunc func(ID string, editionID string, state string) (*models.EditionUpdate, error)

	// GetEditionsFunc mocks the GetEditions method.
	GetEditionsFunc func(ctx context.Context, ID string, state string, offset int, limit int, authorised bool) ([]*models.EditionUpdate, int, error)

	// GetInstanceFunc mocks the GetInstance method.
	GetInstanceFunc func(ID string, eTagSelector string) (*models.Instance, error)

	// GetInstancesFunc mocks the GetInstances method.
	GetInstancesFunc func(ctx context.Context, states []string, datasets []string, offset int, limit int) ([]*models.Instance, int, error)

	// GetNextVersionFunc mocks the GetNextVersion method.
	GetNextVersionFunc func(datasetID string, editionID string) (int, error)

	// GetUniqueDimensionAndOptionsFunc mocks the GetUniqueDimensionAndOptions method.
	GetUniqueDimensionAndOptionsFunc func(ID string, dimension string) ([]*string, int, error)

	// GetVersionFunc mocks the GetVersion method.
	GetVersionFunc func(datasetID string, editionID string, version int, state string) (*models.Version, error)

	// GetVersionsFunc mocks the GetVersions method.
	GetVersionsFunc func(ctx context.Context, datasetID string, editionID string, state string, offset int, limit int) ([]models.Version, int, error)

	// RemoveDatasetVersionAndEditionLinksFunc mocks the RemoveDatasetVersionAndEditionLinks method.
	RemoveDatasetVersionAndEditionLinksFunc func(id string) error

	// SetInstanceIsPublishedFunc mocks the SetInstanceIsPublished method.
	SetInstanceIsPublishedFunc func(ctx context.Context, instanceID string) error

	// UnlockInstanceFunc mocks the UnlockInstance method.
	UnlockInstanceFunc func(lockID string)

	// UpdateBuildHierarchyTaskStateFunc mocks the UpdateBuildHierarchyTaskState method.
	UpdateBuildHierarchyTaskStateFunc func(currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error)

	// UpdateBuildSearchTaskStateFunc mocks the UpdateBuildSearchTaskState method.
	UpdateBuildSearchTaskStateFunc func(currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error)

	// UpdateDatasetFunc mocks the UpdateDataset method.
	UpdateDatasetFunc func(ctx context.Context, ID string, dataset *models.Dataset, currentState string) error

	// UpdateDatasetWithAssociationFunc mocks the UpdateDatasetWithAssociation method.
	UpdateDatasetWithAssociationFunc func(ID string, state string, version *models.Version) error

	// UpdateDimensionsNodeIDAndOrderFunc mocks the UpdateDimensionsNodeIDAndOrder method.
	UpdateDimensionsNodeIDAndOrderFunc func(updates []*models.DimensionOption) error

	// UpdateETagForOptionsFunc mocks the UpdateETagForOptions method.
	UpdateETagForOptionsFunc func(currentInstance *models.Instance, upserts []*models.CachedDimensionOption, updates []*models.DimensionOption, eTagSelector string) (string, error)

	// UpdateImportObservationsTaskStateFunc mocks the UpdateImportObservationsTaskState method.
	UpdateImportObservationsTaskStateFunc func(currentInstance *models.Instance, state string, eTagSelector string) (string, error)

	// UpdateInstanceFunc mocks the UpdateInstance method.
	UpdateInstanceFunc func(ctx context.Context, currentInstance *models.Instance, updatedInstance *models.Instance, eTagSelector string) (string, error)

	// UpdateObservationInsertedFunc mocks the UpdateObservationInserted method.
	UpdateObservationInsertedFunc func(currentInstance *models.Instance, observationInserted int64, eTagSelector string) (string, error)

	// UpdateVersionFunc mocks the UpdateVersion method.
	UpdateVersionFunc func(ID string, version *models.Version) error

	// UpsertContactFunc mocks the UpsertContact method.
	UpsertContactFunc func(ID string, update interface{}) error

	// UpsertDatasetFunc mocks the UpsertDataset method.
	UpsertDatasetFunc func(ID string, datasetDoc *models.DatasetUpdate) error

	// UpsertDimensionsToInstanceFunc mocks the UpsertDimensionsToInstance method.
	UpsertDimensionsToInstanceFunc func(dimensions []*models.CachedDimensionOption) error

	// UpsertEditionFunc mocks the UpsertEdition method.
	UpsertEditionFunc func(datasetID string, edition string, editionDoc *models.EditionUpdate) error

	// UpsertVersionFunc mocks the UpsertVersion method.
	UpsertVersionFunc func(ID string, versionDoc *models.Version) error
	// contains filtered or unexported fields
}

StorerMock is a mock implementation of store.Storer.

func TestSomethingThatUsesStorer(t *testing.T) {

	// make and configure a mocked store.Storer
	mockedStorer := &StorerMock{
		AcquireInstanceLockFunc: func(ctx context.Context, instanceID string) (string, error) {
			panic("mock out the AcquireInstanceLock method")
		},
		AddEventToInstanceFunc: func(currentInstance *models.Instance, event *models.Event, eTagSelector string) (string, error) {
			panic("mock out the AddEventToInstance method")
		},
		AddInstanceFunc: func(instance *models.Instance) (*models.Instance, error) {
			panic("mock out the AddInstance method")
		},
		AddVersionDetailsToInstanceFunc: func(ctx context.Context, instanceID string, datasetID string, edition string, version int) error {
			panic("mock out the AddVersionDetailsToInstance method")
		},
		CheckDatasetExistsFunc: func(ID string, state string) error {
			panic("mock out the CheckDatasetExists method")
		},
		CheckEditionExistsFunc: func(ID string, editionID string, state string) error {
			panic("mock out the CheckEditionExists method")
		},
		DeleteDatasetFunc: func(ID string) error {
			panic("mock out the DeleteDataset method")
		},
		DeleteEditionFunc: func(ID string) error {
			panic("mock out the DeleteEdition method")
		},
		GetDatasetFunc: func(ID string) (*models.DatasetUpdate, error) {
			panic("mock out the GetDataset method")
		},
		GetDatasetsFunc: func(ctx context.Context, offset int, limit int, authorised bool) ([]*models.DatasetUpdate, int, error) {
			panic("mock out the GetDatasets method")
		},
		GetDimensionOptionsFunc: func(ctx context.Context, version *models.Version, dimension string, offset int, limit int) ([]*models.PublicDimensionOption, int, error) {
			panic("mock out the GetDimensionOptions method")
		},
		GetDimensionOptionsFromIDsFunc: func(version *models.Version, dimension string, ids []string) ([]*models.PublicDimensionOption, int, error) {
			panic("mock out the GetDimensionOptionsFromIDs method")
		},
		GetDimensionsFunc: func(versionID string) ([]bson.M, error) {
			panic("mock out the GetDimensions method")
		},
		GetDimensionsFromInstanceFunc: func(ctx context.Context, ID string, offset int, limit int) ([]*models.DimensionOption, int, error) {
			panic("mock out the GetDimensionsFromInstance method")
		},
		GetEditionFunc: func(ID string, editionID string, state string) (*models.EditionUpdate, error) {
			panic("mock out the GetEdition method")
		},
		GetEditionsFunc: func(ctx context.Context, ID string, state string, offset int, limit int, authorised bool) ([]*models.EditionUpdate, int, error) {
			panic("mock out the GetEditions method")
		},
		GetInstanceFunc: func(ID string, eTagSelector string) (*models.Instance, error) {
			panic("mock out the GetInstance method")
		},
		GetInstancesFunc: func(ctx context.Context, states []string, datasets []string, offset int, limit int) ([]*models.Instance, int, error) {
			panic("mock out the GetInstances method")
		},
		GetNextVersionFunc: func(datasetID string, editionID string) (int, error) {
			panic("mock out the GetNextVersion method")
		},
		GetUniqueDimensionAndOptionsFunc: func(ID string, dimension string) ([]*string, int, error) {
			panic("mock out the GetUniqueDimensionAndOptions method")
		},
		GetVersionFunc: func(datasetID string, editionID string, version int, state string) (*models.Version, error) {
			panic("mock out the GetVersion method")
		},
		GetVersionsFunc: func(ctx context.Context, datasetID string, editionID string, state string, offset int, limit int) ([]models.Version, int, error) {
			panic("mock out the GetVersions method")
		},
		RemoveDatasetVersionAndEditionLinksFunc: func(id string) error {
			panic("mock out the RemoveDatasetVersionAndEditionLinks method")
		},
		SetInstanceIsPublishedFunc: func(ctx context.Context, instanceID string) error {
			panic("mock out the SetInstanceIsPublished method")
		},
		UnlockInstanceFunc: func(lockID string)  {
			panic("mock out the UnlockInstance method")
		},
		UpdateBuildHierarchyTaskStateFunc: func(currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error) {
			panic("mock out the UpdateBuildHierarchyTaskState method")
		},
		UpdateBuildSearchTaskStateFunc: func(currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error) {
			panic("mock out the UpdateBuildSearchTaskState method")
		},
		UpdateDatasetFunc: func(ctx context.Context, ID string, dataset *models.Dataset, currentState string) error {
			panic("mock out the UpdateDataset method")
		},
		UpdateDatasetWithAssociationFunc: func(ID string, state string, version *models.Version) error {
			panic("mock out the UpdateDatasetWithAssociation method")
		},
		UpdateDimensionsNodeIDAndOrderFunc: func(updates []*models.DimensionOption) error {
			panic("mock out the UpdateDimensionsNodeIDAndOrder method")
		},
		UpdateETagForOptionsFunc: func(currentInstance *models.Instance, upserts []*models.CachedDimensionOption, updates []*models.DimensionOption, eTagSelector string) (string, error) {
			panic("mock out the UpdateETagForOptions method")
		},
		UpdateImportObservationsTaskStateFunc: func(currentInstance *models.Instance, state string, eTagSelector string) (string, error) {
			panic("mock out the UpdateImportObservationsTaskState method")
		},
		UpdateInstanceFunc: func(ctx context.Context, currentInstance *models.Instance, updatedInstance *models.Instance, eTagSelector string) (string, error) {
			panic("mock out the UpdateInstance method")
		},
		UpdateObservationInsertedFunc: func(currentInstance *models.Instance, observationInserted int64, eTagSelector string) (string, error) {
			panic("mock out the UpdateObservationInserted method")
		},
		UpdateVersionFunc: func(ID string, version *models.Version) error {
			panic("mock out the UpdateVersion method")
		},
		UpsertContactFunc: func(ID string, update interface{}) error {
			panic("mock out the UpsertContact method")
		},
		UpsertDatasetFunc: func(ID string, datasetDoc *models.DatasetUpdate) error {
			panic("mock out the UpsertDataset method")
		},
		UpsertDimensionsToInstanceFunc: func(dimensions []*models.CachedDimensionOption) error {
			panic("mock out the UpsertDimensionsToInstance method")
		},
		UpsertEditionFunc: func(datasetID string, edition string, editionDoc *models.EditionUpdate) error {
			panic("mock out the UpsertEdition method")
		},
		UpsertVersionFunc: func(ID string, versionDoc *models.Version) error {
			panic("mock out the UpsertVersion method")
		},
	}

	// use mockedStorer in code that requires store.Storer
	// and then make assertions.

}

func (*StorerMock) AcquireInstanceLock added in v1.34.0

func (mock *StorerMock) AcquireInstanceLock(ctx context.Context, instanceID string) (string, error)

AcquireInstanceLock calls AcquireInstanceLockFunc.

func (*StorerMock) AcquireInstanceLockCalls added in v1.34.0

func (mock *StorerMock) AcquireInstanceLockCalls() []struct {
	Ctx        context.Context
	InstanceID string
}

AcquireInstanceLockCalls gets all the calls that were made to AcquireInstanceLock. Check the length with:

len(mockedStorer.AcquireInstanceLockCalls())

func (*StorerMock) AddEventToInstance

func (mock *StorerMock) AddEventToInstance(currentInstance *models.Instance, event *models.Event, eTagSelector string) (string, error)

AddEventToInstance calls AddEventToInstanceFunc.

func (*StorerMock) AddEventToInstanceCalls

func (mock *StorerMock) AddEventToInstanceCalls() []struct {
	CurrentInstance *models.Instance
	Event           *models.Event
	ETagSelector    string
}

AddEventToInstanceCalls gets all the calls that were made to AddEventToInstance. Check the length with:

len(mockedStorer.AddEventToInstanceCalls())

func (*StorerMock) AddInstance

func (mock *StorerMock) AddInstance(instance *models.Instance) (*models.Instance, error)

AddInstance calls AddInstanceFunc.

func (*StorerMock) AddInstanceCalls

func (mock *StorerMock) AddInstanceCalls() []struct {
	Instance *models.Instance
}

AddInstanceCalls gets all the calls that were made to AddInstance. Check the length with:

len(mockedStorer.AddInstanceCalls())

func (*StorerMock) AddVersionDetailsToInstance

func (mock *StorerMock) AddVersionDetailsToInstance(ctx context.Context, instanceID string, datasetID string, edition string, version int) error

AddVersionDetailsToInstance calls AddVersionDetailsToInstanceFunc.

func (*StorerMock) AddVersionDetailsToInstanceCalls

func (mock *StorerMock) AddVersionDetailsToInstanceCalls() []struct {
	Ctx        context.Context
	InstanceID string
	DatasetID  string
	Edition    string
	Version    int
}

AddVersionDetailsToInstanceCalls gets all the calls that were made to AddVersionDetailsToInstance. Check the length with:

len(mockedStorer.AddVersionDetailsToInstanceCalls())

func (*StorerMock) CheckDatasetExists

func (mock *StorerMock) CheckDatasetExists(ID string, state string) error

CheckDatasetExists calls CheckDatasetExistsFunc.

func (*StorerMock) CheckDatasetExistsCalls

func (mock *StorerMock) CheckDatasetExistsCalls() []struct {
	ID    string
	State string
}

CheckDatasetExistsCalls gets all the calls that were made to CheckDatasetExists. Check the length with:

len(mockedStorer.CheckDatasetExistsCalls())

func (*StorerMock) CheckEditionExists

func (mock *StorerMock) CheckEditionExists(ID string, editionID string, state string) error

CheckEditionExists calls CheckEditionExistsFunc.

func (*StorerMock) CheckEditionExistsCalls

func (mock *StorerMock) CheckEditionExistsCalls() []struct {
	ID        string
	EditionID string
	State     string
}

CheckEditionExistsCalls gets all the calls that were made to CheckEditionExists. Check the length with:

len(mockedStorer.CheckEditionExistsCalls())

func (*StorerMock) DeleteDataset

func (mock *StorerMock) DeleteDataset(ID string) error

DeleteDataset calls DeleteDatasetFunc.

func (*StorerMock) DeleteDatasetCalls

func (mock *StorerMock) DeleteDatasetCalls() []struct {
	ID string
}

DeleteDatasetCalls gets all the calls that were made to DeleteDataset. Check the length with:

len(mockedStorer.DeleteDatasetCalls())

func (*StorerMock) DeleteEdition

func (mock *StorerMock) DeleteEdition(ID string) error

DeleteEdition calls DeleteEditionFunc.

func (*StorerMock) DeleteEditionCalls

func (mock *StorerMock) DeleteEditionCalls() []struct {
	ID string
}

DeleteEditionCalls gets all the calls that were made to DeleteEdition. Check the length with:

len(mockedStorer.DeleteEditionCalls())

func (*StorerMock) GetDataset

func (mock *StorerMock) GetDataset(ID string) (*models.DatasetUpdate, error)

GetDataset calls GetDatasetFunc.

func (*StorerMock) GetDatasetCalls

func (mock *StorerMock) GetDatasetCalls() []struct {
	ID string
}

GetDatasetCalls gets all the calls that were made to GetDataset. Check the length with:

len(mockedStorer.GetDatasetCalls())

func (*StorerMock) GetDatasets

func (mock *StorerMock) GetDatasets(ctx context.Context, offset int, limit int, authorised bool) ([]*models.DatasetUpdate, int, error)

GetDatasets calls GetDatasetsFunc.

func (*StorerMock) GetDatasetsCalls

func (mock *StorerMock) GetDatasetsCalls() []struct {
	Ctx        context.Context
	Offset     int
	Limit      int
	Authorised bool
}

GetDatasetsCalls gets all the calls that were made to GetDatasets. Check the length with:

len(mockedStorer.GetDatasetsCalls())

func (*StorerMock) GetDimensionOptions

func (mock *StorerMock) GetDimensionOptions(ctx context.Context, version *models.Version, dimension string, offset int, limit int) ([]*models.PublicDimensionOption, int, error)

GetDimensionOptions calls GetDimensionOptionsFunc.

func (*StorerMock) GetDimensionOptionsCalls

func (mock *StorerMock) GetDimensionOptionsCalls() []struct {
	Ctx       context.Context
	Version   *models.Version
	Dimension string
	Offset    int
	Limit     int
}

GetDimensionOptionsCalls gets all the calls that were made to GetDimensionOptions. Check the length with:

len(mockedStorer.GetDimensionOptionsCalls())

func (*StorerMock) GetDimensionOptionsFromIDs added in v1.25.0

func (mock *StorerMock) GetDimensionOptionsFromIDs(version *models.Version, dimension string, ids []string) ([]*models.PublicDimensionOption, int, error)

GetDimensionOptionsFromIDs calls GetDimensionOptionsFromIDsFunc.

func (*StorerMock) GetDimensionOptionsFromIDsCalls added in v1.25.0

func (mock *StorerMock) GetDimensionOptionsFromIDsCalls() []struct {
	Version   *models.Version
	Dimension string
	Ids       []string
}

GetDimensionOptionsFromIDsCalls gets all the calls that were made to GetDimensionOptionsFromIDs. Check the length with:

len(mockedStorer.GetDimensionOptionsFromIDsCalls())

func (*StorerMock) GetDimensions

func (mock *StorerMock) GetDimensions(versionID string) ([]bson.M, error)

GetDimensions calls GetDimensionsFunc.

func (*StorerMock) GetDimensionsCalls

func (mock *StorerMock) GetDimensionsCalls() []struct {
	VersionID string
}

GetDimensionsCalls gets all the calls that were made to GetDimensions. Check the length with:

len(mockedStorer.GetDimensionsCalls())

func (*StorerMock) GetDimensionsFromInstance

func (mock *StorerMock) GetDimensionsFromInstance(ctx context.Context, ID string, offset int, limit int) ([]*models.DimensionOption, int, error)

GetDimensionsFromInstance calls GetDimensionsFromInstanceFunc.

func (*StorerMock) GetDimensionsFromInstanceCalls

func (mock *StorerMock) GetDimensionsFromInstanceCalls() []struct {
	Ctx    context.Context
	ID     string
	Offset int
	Limit  int
}

GetDimensionsFromInstanceCalls gets all the calls that were made to GetDimensionsFromInstance. Check the length with:

len(mockedStorer.GetDimensionsFromInstanceCalls())

func (*StorerMock) GetEdition

func (mock *StorerMock) GetEdition(ID string, editionID string, state string) (*models.EditionUpdate, error)

GetEdition calls GetEditionFunc.

func (*StorerMock) GetEditionCalls

func (mock *StorerMock) GetEditionCalls() []struct {
	ID        string
	EditionID string
	State     string
}

GetEditionCalls gets all the calls that were made to GetEdition. Check the length with:

len(mockedStorer.GetEditionCalls())

func (*StorerMock) GetEditions

func (mock *StorerMock) GetEditions(ctx context.Context, ID string, state string, offset int, limit int, authorised bool) ([]*models.EditionUpdate, int, error)

GetEditions calls GetEditionsFunc.

func (*StorerMock) GetEditionsCalls

func (mock *StorerMock) GetEditionsCalls() []struct {
	Ctx        context.Context
	ID         string
	State      string
	Offset     int
	Limit      int
	Authorised bool
}

GetEditionsCalls gets all the calls that were made to GetEditions. Check the length with:

len(mockedStorer.GetEditionsCalls())

func (*StorerMock) GetInstance

func (mock *StorerMock) GetInstance(ID string, eTagSelector string) (*models.Instance, error)

GetInstance calls GetInstanceFunc.

func (*StorerMock) GetInstanceCalls

func (mock *StorerMock) GetInstanceCalls() []struct {
	ID           string
	ETagSelector string
}

GetInstanceCalls gets all the calls that were made to GetInstance. Check the length with:

len(mockedStorer.GetInstanceCalls())

func (*StorerMock) GetInstances

func (mock *StorerMock) GetInstances(ctx context.Context, states []string, datasets []string, offset int, limit int) ([]*models.Instance, int, error)

GetInstances calls GetInstancesFunc.

func (*StorerMock) GetInstancesCalls

func (mock *StorerMock) GetInstancesCalls() []struct {
	Ctx      context.Context
	States   []string
	Datasets []string
	Offset   int
	Limit    int
}

GetInstancesCalls gets all the calls that were made to GetInstances. Check the length with:

len(mockedStorer.GetInstancesCalls())

func (*StorerMock) GetNextVersion

func (mock *StorerMock) GetNextVersion(datasetID string, editionID string) (int, error)

GetNextVersion calls GetNextVersionFunc.

func (*StorerMock) GetNextVersionCalls

func (mock *StorerMock) GetNextVersionCalls() []struct {
	DatasetID string
	EditionID string
}

GetNextVersionCalls gets all the calls that were made to GetNextVersion. Check the length with:

len(mockedStorer.GetNextVersionCalls())

func (*StorerMock) GetUniqueDimensionAndOptions

func (mock *StorerMock) GetUniqueDimensionAndOptions(ID string, dimension string) ([]*string, int, error)

GetUniqueDimensionAndOptions calls GetUniqueDimensionAndOptionsFunc.

func (*StorerMock) GetUniqueDimensionAndOptionsCalls

func (mock *StorerMock) GetUniqueDimensionAndOptionsCalls() []struct {
	ID        string
	Dimension string
}

GetUniqueDimensionAndOptionsCalls gets all the calls that were made to GetUniqueDimensionAndOptions. Check the length with:

len(mockedStorer.GetUniqueDimensionAndOptionsCalls())

func (*StorerMock) GetVersion

func (mock *StorerMock) GetVersion(datasetID string, editionID string, version int, state string) (*models.Version, error)

GetVersion calls GetVersionFunc.

func (*StorerMock) GetVersionCalls

func (mock *StorerMock) GetVersionCalls() []struct {
	DatasetID string
	EditionID string
	Version   int
	State     string
}

GetVersionCalls gets all the calls that were made to GetVersion. Check the length with:

len(mockedStorer.GetVersionCalls())

func (*StorerMock) GetVersions

func (mock *StorerMock) GetVersions(ctx context.Context, datasetID string, editionID string, state string, offset int, limit int) ([]models.Version, int, error)

GetVersions calls GetVersionsFunc.

func (*StorerMock) GetVersionsCalls

func (mock *StorerMock) GetVersionsCalls() []struct {
	Ctx       context.Context
	DatasetID string
	EditionID string
	State     string
	Offset    int
	Limit     int
}

GetVersionsCalls gets all the calls that were made to GetVersions. Check the length with:

len(mockedStorer.GetVersionsCalls())
func (mock *StorerMock) RemoveDatasetVersionAndEditionLinks(id string) error

RemoveDatasetVersionAndEditionLinks calls RemoveDatasetVersionAndEditionLinksFunc.

func (*StorerMock) RemoveDatasetVersionAndEditionLinksCalls added in v1.38.0

func (mock *StorerMock) RemoveDatasetVersionAndEditionLinksCalls() []struct {
	ID string
}

RemoveDatasetVersionAndEditionLinksCalls gets all the calls that were made to RemoveDatasetVersionAndEditionLinks. Check the length with:

len(mockedStorer.RemoveDatasetVersionAndEditionLinksCalls())

func (*StorerMock) SetInstanceIsPublished

func (mock *StorerMock) SetInstanceIsPublished(ctx context.Context, instanceID string) error

SetInstanceIsPublished calls SetInstanceIsPublishedFunc.

func (*StorerMock) SetInstanceIsPublishedCalls

func (mock *StorerMock) SetInstanceIsPublishedCalls() []struct {
	Ctx        context.Context
	InstanceID string
}

SetInstanceIsPublishedCalls gets all the calls that were made to SetInstanceIsPublished. Check the length with:

len(mockedStorer.SetInstanceIsPublishedCalls())

func (*StorerMock) UnlockInstance added in v1.34.0

func (mock *StorerMock) UnlockInstance(lockID string)

UnlockInstance calls UnlockInstanceFunc.

func (*StorerMock) UnlockInstanceCalls added in v1.34.0

func (mock *StorerMock) UnlockInstanceCalls() []struct {
	LockID string
}

UnlockInstanceCalls gets all the calls that were made to UnlockInstance. Check the length with:

len(mockedStorer.UnlockInstanceCalls())

func (*StorerMock) UpdateBuildHierarchyTaskState

func (mock *StorerMock) UpdateBuildHierarchyTaskState(currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error)

UpdateBuildHierarchyTaskState calls UpdateBuildHierarchyTaskStateFunc.

func (*StorerMock) UpdateBuildHierarchyTaskStateCalls

func (mock *StorerMock) UpdateBuildHierarchyTaskStateCalls() []struct {
	CurrentInstance *models.Instance
	Dimension       string
	State           string
	ETagSelector    string
}

UpdateBuildHierarchyTaskStateCalls gets all the calls that were made to UpdateBuildHierarchyTaskState. Check the length with:

len(mockedStorer.UpdateBuildHierarchyTaskStateCalls())

func (*StorerMock) UpdateBuildSearchTaskState

func (mock *StorerMock) UpdateBuildSearchTaskState(currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error)

UpdateBuildSearchTaskState calls UpdateBuildSearchTaskStateFunc.

func (*StorerMock) UpdateBuildSearchTaskStateCalls

func (mock *StorerMock) UpdateBuildSearchTaskStateCalls() []struct {
	CurrentInstance *models.Instance
	Dimension       string
	State           string
	ETagSelector    string
}

UpdateBuildSearchTaskStateCalls gets all the calls that were made to UpdateBuildSearchTaskState. Check the length with:

len(mockedStorer.UpdateBuildSearchTaskStateCalls())

func (*StorerMock) UpdateDataset

func (mock *StorerMock) UpdateDataset(ctx context.Context, ID string, dataset *models.Dataset, currentState string) error

UpdateDataset calls UpdateDatasetFunc.

func (*StorerMock) UpdateDatasetCalls

func (mock *StorerMock) UpdateDatasetCalls() []struct {
	Ctx          context.Context
	ID           string
	Dataset      *models.Dataset
	CurrentState string
}

UpdateDatasetCalls gets all the calls that were made to UpdateDataset. Check the length with:

len(mockedStorer.UpdateDatasetCalls())

func (*StorerMock) UpdateDatasetWithAssociation

func (mock *StorerMock) UpdateDatasetWithAssociation(ID string, state string, version *models.Version) error

UpdateDatasetWithAssociation calls UpdateDatasetWithAssociationFunc.

func (*StorerMock) UpdateDatasetWithAssociationCalls

func (mock *StorerMock) UpdateDatasetWithAssociationCalls() []struct {
	ID      string
	State   string
	Version *models.Version
}

UpdateDatasetWithAssociationCalls gets all the calls that were made to UpdateDatasetWithAssociation. Check the length with:

len(mockedStorer.UpdateDatasetWithAssociationCalls())

func (*StorerMock) UpdateDimensionsNodeIDAndOrder added in v1.37.0

func (mock *StorerMock) UpdateDimensionsNodeIDAndOrder(updates []*models.DimensionOption) error

UpdateDimensionsNodeIDAndOrder calls UpdateDimensionsNodeIDAndOrderFunc.

func (*StorerMock) UpdateDimensionsNodeIDAndOrderCalls added in v1.37.0

func (mock *StorerMock) UpdateDimensionsNodeIDAndOrderCalls() []struct {
	Updates []*models.DimensionOption
}

UpdateDimensionsNodeIDAndOrderCalls gets all the calls that were made to UpdateDimensionsNodeIDAndOrder. Check the length with:

len(mockedStorer.UpdateDimensionsNodeIDAndOrderCalls())

func (*StorerMock) UpdateETagForOptions added in v1.34.0

func (mock *StorerMock) UpdateETagForOptions(currentInstance *models.Instance, upserts []*models.CachedDimensionOption, updates []*models.DimensionOption, eTagSelector string) (string, error)

UpdateETagForOptions calls UpdateETagForOptionsFunc.

func (*StorerMock) UpdateETagForOptionsCalls added in v1.34.0

func (mock *StorerMock) UpdateETagForOptionsCalls() []struct {
	CurrentInstance *models.Instance
	Upserts         []*models.CachedDimensionOption
	Updates         []*models.DimensionOption
	ETagSelector    string
}

UpdateETagForOptionsCalls gets all the calls that were made to UpdateETagForOptions. Check the length with:

len(mockedStorer.UpdateETagForOptionsCalls())

func (*StorerMock) UpdateImportObservationsTaskState

func (mock *StorerMock) UpdateImportObservationsTaskState(currentInstance *models.Instance, state string, eTagSelector string) (string, error)

UpdateImportObservationsTaskState calls UpdateImportObservationsTaskStateFunc.

func (*StorerMock) UpdateImportObservationsTaskStateCalls

func (mock *StorerMock) UpdateImportObservationsTaskStateCalls() []struct {
	CurrentInstance *models.Instance
	State           string
	ETagSelector    string
}

UpdateImportObservationsTaskStateCalls gets all the calls that were made to UpdateImportObservationsTaskState. Check the length with:

len(mockedStorer.UpdateImportObservationsTaskStateCalls())

func (*StorerMock) UpdateInstance

func (mock *StorerMock) UpdateInstance(ctx context.Context, currentInstance *models.Instance, updatedInstance *models.Instance, eTagSelector string) (string, error)

UpdateInstance calls UpdateInstanceFunc.

func (*StorerMock) UpdateInstanceCalls

func (mock *StorerMock) UpdateInstanceCalls() []struct {
	Ctx             context.Context
	CurrentInstance *models.Instance
	UpdatedInstance *models.Instance
	ETagSelector    string
}

UpdateInstanceCalls gets all the calls that were made to UpdateInstance. Check the length with:

len(mockedStorer.UpdateInstanceCalls())

func (*StorerMock) UpdateObservationInserted

func (mock *StorerMock) UpdateObservationInserted(currentInstance *models.Instance, observationInserted int64, eTagSelector string) (string, error)

UpdateObservationInserted calls UpdateObservationInsertedFunc.

func (*StorerMock) UpdateObservationInsertedCalls

func (mock *StorerMock) UpdateObservationInsertedCalls() []struct {
	CurrentInstance     *models.Instance
	ObservationInserted int64
	ETagSelector        string
}

UpdateObservationInsertedCalls gets all the calls that were made to UpdateObservationInserted. Check the length with:

len(mockedStorer.UpdateObservationInsertedCalls())

func (*StorerMock) UpdateVersion

func (mock *StorerMock) UpdateVersion(ID string, version *models.Version) error

UpdateVersion calls UpdateVersionFunc.

func (*StorerMock) UpdateVersionCalls

func (mock *StorerMock) UpdateVersionCalls() []struct {
	ID      string
	Version *models.Version
}

UpdateVersionCalls gets all the calls that were made to UpdateVersion. Check the length with:

len(mockedStorer.UpdateVersionCalls())

func (*StorerMock) UpsertContact

func (mock *StorerMock) UpsertContact(ID string, update interface{}) error

UpsertContact calls UpsertContactFunc.

func (*StorerMock) UpsertContactCalls

func (mock *StorerMock) UpsertContactCalls() []struct {
	ID     string
	Update interface{}
}

UpsertContactCalls gets all the calls that were made to UpsertContact. Check the length with:

len(mockedStorer.UpsertContactCalls())

func (*StorerMock) UpsertDataset

func (mock *StorerMock) UpsertDataset(ID string, datasetDoc *models.DatasetUpdate) error

UpsertDataset calls UpsertDatasetFunc.

func (*StorerMock) UpsertDatasetCalls

func (mock *StorerMock) UpsertDatasetCalls() []struct {
	ID         string
	DatasetDoc *models.DatasetUpdate
}

UpsertDatasetCalls gets all the calls that were made to UpsertDataset. Check the length with:

len(mockedStorer.UpsertDatasetCalls())

func (*StorerMock) UpsertDimensionsToInstance added in v1.36.0

func (mock *StorerMock) UpsertDimensionsToInstance(dimensions []*models.CachedDimensionOption) error

UpsertDimensionsToInstance calls UpsertDimensionsToInstanceFunc.

func (*StorerMock) UpsertDimensionsToInstanceCalls added in v1.36.0

func (mock *StorerMock) UpsertDimensionsToInstanceCalls() []struct {
	Dimensions []*models.CachedDimensionOption
}

UpsertDimensionsToInstanceCalls gets all the calls that were made to UpsertDimensionsToInstance. Check the length with:

len(mockedStorer.UpsertDimensionsToInstanceCalls())

func (*StorerMock) UpsertEdition

func (mock *StorerMock) UpsertEdition(datasetID string, edition string, editionDoc *models.EditionUpdate) error

UpsertEdition calls UpsertEditionFunc.

func (*StorerMock) UpsertEditionCalls

func (mock *StorerMock) UpsertEditionCalls() []struct {
	DatasetID  string
	Edition    string
	EditionDoc *models.EditionUpdate
}

UpsertEditionCalls gets all the calls that were made to UpsertEdition. Check the length with:

len(mockedStorer.UpsertEditionCalls())

func (*StorerMock) UpsertVersion

func (mock *StorerMock) UpsertVersion(ID string, versionDoc *models.Version) error

UpsertVersion calls UpsertVersionFunc.

func (*StorerMock) UpsertVersionCalls

func (mock *StorerMock) UpsertVersionCalls() []struct {
	ID         string
	VersionDoc *models.Version
}

UpsertVersionCalls gets all the calls that were made to UpsertVersion. Check the length with:

len(mockedStorer.UpsertVersionCalls())

Jump to

Keyboard shortcuts

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