storetest

package
v1.66.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 6 Imported by: 0

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(ctx context.Context, currentInstance *models.Instance, event *models.Event, eTagSelector string) (string, error)

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

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

	// CheckEditionExistsFunc mocks the CheckEditionExists method.
	CheckEditionExistsFunc func(ctx context.Context, 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(ctx context.Context, ID string) error

	// DeleteEditionFunc mocks the DeleteEdition method.
	DeleteEditionFunc func(ctx context.Context, ID string) error

	// GetDatasetFunc mocks the GetDataset method.
	GetDatasetFunc func(ctx context.Context, 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)

	// GetDatasetsByBasedOnFunc mocks the GetDatasetsByBasedOn method.
	GetDatasetsByBasedOnFunc func(ctx context.Context, ID string, 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(ctx context.Context, version *models.Version, dimension string, ids []string) ([]*models.PublicDimensionOption, int, error)

	// GetDimensionsFunc mocks the GetDimensions method.
	GetDimensionsFunc func(ctx context.Context, versionID string) ([]primitive.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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, datasetID string, editionID string) (int, error)

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

	// GetVersionFunc mocks the GetVersion method.
	GetVersionFunc func(ctx context.Context, 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(ctx context.Context, id string) error

	// UnlockInstanceFunc mocks the UnlockInstance method.
	UnlockInstanceFunc func(ctx context.Context, lockID string)

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

	// UpdateBuildSearchTaskStateFunc mocks the UpdateBuildSearchTaskState method.
	UpdateBuildSearchTaskStateFunc func(ctx context.Context, 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(ctx context.Context, ID string, state string, version *models.Version) error

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

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

	// UpdateImportObservationsTaskStateFunc mocks the UpdateImportObservationsTaskState method.
	UpdateImportObservationsTaskStateFunc func(ctx context.Context, 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)

	// UpdateMetadataFunc mocks the UpdateMetadata method.
	UpdateMetadataFunc func(ctx context.Context, datasetId string, versionId string, versionEtag string, updatedDataset *models.Dataset, updatedVersion *models.Version) error

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

	// UpdateVersionFunc mocks the UpdateVersion method.
	UpdateVersionFunc func(ctx context.Context, currentVersion *models.Version, version *models.Version, eTagSelector string) (string, error)

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

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

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

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

	// UpsertVersionFunc mocks the UpsertVersion method.
	UpsertVersionFunc func(ctx context.Context, 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(ctx context.Context, currentInstance *models.Instance, event *models.Event, eTagSelector string) (string, error) {
			panic("mock out the AddEventToInstance method")
		},
		AddInstanceFunc: func(ctx context.Context, instance *models.Instance) (*models.Instance, error) {
			panic("mock out the AddInstance method")
		},
		CheckDatasetExistsFunc: func(ctx context.Context, ID string, state string) error {
			panic("mock out the CheckDatasetExists method")
		},
		CheckEditionExistsFunc: func(ctx context.Context, 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(ctx context.Context, ID string) error {
			panic("mock out the DeleteDataset method")
		},
		DeleteEditionFunc: func(ctx context.Context, ID string) error {
			panic("mock out the DeleteEdition method")
		},
		GetDatasetFunc: func(ctx context.Context, 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")
		},
		GetDatasetsByBasedOnFunc: func(ctx context.Context, ID string, offset int, limit int, authorised bool) ([]*models.DatasetUpdate, int, error) {
			panic("mock out the GetDatasetsByBasedOn 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(ctx context.Context, version *models.Version, dimension string, ids []string) ([]*models.PublicDimensionOption, int, error) {
			panic("mock out the GetDimensionOptionsFromIDs method")
		},
		GetDimensionsFunc: func(ctx context.Context, versionID string) ([]primitive.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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, datasetID string, editionID string) (int, error) {
			panic("mock out the GetNextVersion method")
		},
		GetUniqueDimensionAndOptionsFunc: func(ctx context.Context, ID string, dimension string) ([]*string, int, error) {
			panic("mock out the GetUniqueDimensionAndOptions method")
		},
		GetVersionFunc: func(ctx context.Context, 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(ctx context.Context, id string) error {
			panic("mock out the RemoveDatasetVersionAndEditionLinks method")
		},
		UnlockInstanceFunc: func(ctx context.Context, lockID string)  {
			panic("mock out the UnlockInstance method")
		},
		UpdateBuildHierarchyTaskStateFunc: func(ctx context.Context, currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error) {
			panic("mock out the UpdateBuildHierarchyTaskState method")
		},
		UpdateBuildSearchTaskStateFunc: func(ctx context.Context, 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(ctx context.Context, ID string, state string, version *models.Version) error {
			panic("mock out the UpdateDatasetWithAssociation method")
		},
		UpdateDimensionsNodeIDAndOrderFunc: func(ctx context.Context, updates []*models.DimensionOption) error {
			panic("mock out the UpdateDimensionsNodeIDAndOrder method")
		},
		UpdateETagForOptionsFunc: func(ctx context.Context, currentInstance *models.Instance, upserts []*models.CachedDimensionOption, updates []*models.DimensionOption, eTagSelector string) (string, error) {
			panic("mock out the UpdateETagForOptions method")
		},
		UpdateImportObservationsTaskStateFunc: func(ctx context.Context, 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")
		},
		UpdateMetadataFunc: func(ctx context.Context, datasetId string, versionId string, versionEtag string, updatedDataset *models.Dataset, updatedVersion *models.Version) error {
			panic("mock out the UpdateMetadata method")
		},
		UpdateObservationInsertedFunc: func(ctx context.Context, currentInstance *models.Instance, observationInserted int64, eTagSelector string) (string, error) {
			panic("mock out the UpdateObservationInserted method")
		},
		UpdateVersionFunc: func(ctx context.Context, currentVersion *models.Version, version *models.Version, eTagSelector string) (string, error) {
			panic("mock out the UpdateVersion method")
		},
		UpsertContactFunc: func(ctx context.Context, ID string, update interface{}) error {
			panic("mock out the UpsertContact method")
		},
		UpsertDatasetFunc: func(ctx context.Context, ID string, datasetDoc *models.DatasetUpdate) error {
			panic("mock out the UpsertDataset method")
		},
		UpsertDimensionsToInstanceFunc: func(ctx context.Context, dimensions []*models.CachedDimensionOption) error {
			panic("mock out the UpsertDimensionsToInstance method")
		},
		UpsertEditionFunc: func(ctx context.Context, datasetID string, edition string, editionDoc *models.EditionUpdate) error {
			panic("mock out the UpsertEdition method")
		},
		UpsertVersionFunc: func(ctx context.Context, 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(ctx context.Context, 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 {
	Ctx             context.Context
	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(ctx context.Context, instance *models.Instance) (*models.Instance, error)

AddInstance calls AddInstanceFunc.

func (*MongoDBMock) AddInstanceCalls added in v1.22.0

func (mock *MongoDBMock) AddInstanceCalls() []struct {
	Ctx      context.Context
	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(ctx context.Context, ID string, state string) error

CheckDatasetExists calls CheckDatasetExistsFunc.

func (*MongoDBMock) CheckDatasetExistsCalls added in v1.22.0

func (mock *MongoDBMock) CheckDatasetExistsCalls() []struct {
	Ctx   context.Context
	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(ctx context.Context, ID string, editionID string, state string) error

CheckEditionExists calls CheckEditionExistsFunc.

func (*MongoDBMock) CheckEditionExistsCalls added in v1.22.0

func (mock *MongoDBMock) CheckEditionExistsCalls() []struct {
	Ctx       context.Context
	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(ctx context.Context, ID string) error

DeleteDataset calls DeleteDatasetFunc.

func (*MongoDBMock) DeleteDatasetCalls added in v1.22.0

func (mock *MongoDBMock) DeleteDatasetCalls() []struct {
	Ctx context.Context
	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(ctx context.Context, ID string) error

DeleteEdition calls DeleteEditionFunc.

func (*MongoDBMock) DeleteEditionCalls added in v1.22.0

func (mock *MongoDBMock) DeleteEditionCalls() []struct {
	Ctx context.Context
	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(ctx context.Context, ID string) (*models.DatasetUpdate, error)

GetDataset calls GetDatasetFunc.

func (*MongoDBMock) GetDatasetCalls added in v1.22.0

func (mock *MongoDBMock) GetDatasetCalls() []struct {
	Ctx context.Context
	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) GetDatasetsByBasedOn added in v1.44.0

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

GetDatasetsByBasedOn calls GetDatasetsByBasedOnFunc.

func (*MongoDBMock) GetDatasetsByBasedOnCalls added in v1.44.0

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

GetDatasetsByBasedOnCalls gets all the calls that were made to GetDatasetsByBasedOn. Check the length with:

len(mockedMongoDB.GetDatasetsByBasedOnCalls())

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(ctx context.Context, 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 {
	Ctx       context.Context
	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(ctx context.Context, versionID string) ([]primitive.M, error)

GetDimensions calls GetDimensionsFunc.

func (*MongoDBMock) GetDimensionsCalls added in v1.22.0

func (mock *MongoDBMock) GetDimensionsCalls() []struct {
	Ctx       context.Context
	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(ctx context.Context, 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 {
	Ctx       context.Context
	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(ctx context.Context, ID string, eTagSelector string) (*models.Instance, error)

GetInstance calls GetInstanceFunc.

func (*MongoDBMock) GetInstanceCalls added in v1.22.0

func (mock *MongoDBMock) GetInstanceCalls() []struct {
	Ctx          context.Context
	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(ctx context.Context, datasetID string, editionID string) (int, error)

GetNextVersion calls GetNextVersionFunc.

func (*MongoDBMock) GetNextVersionCalls added in v1.22.0

func (mock *MongoDBMock) GetNextVersionCalls() []struct {
	Ctx       context.Context
	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(ctx context.Context, ID string, dimension string) ([]*string, int, error)

GetUniqueDimensionAndOptions calls GetUniqueDimensionAndOptionsFunc.

func (*MongoDBMock) GetUniqueDimensionAndOptionsCalls added in v1.22.0

func (mock *MongoDBMock) GetUniqueDimensionAndOptionsCalls() []struct {
	Ctx       context.Context
	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(ctx context.Context, 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 {
	Ctx       context.Context
	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(ctx context.Context, id string) error

RemoveDatasetVersionAndEditionLinks calls RemoveDatasetVersionAndEditionLinksFunc.

func (*MongoDBMock) RemoveDatasetVersionAndEditionLinksCalls added in v1.38.0

func (mock *MongoDBMock) RemoveDatasetVersionAndEditionLinksCalls() []struct {
	Ctx context.Context
	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(ctx context.Context, lockID string)

UnlockInstance calls UnlockInstanceFunc.

func (*MongoDBMock) UnlockInstanceCalls added in v1.34.0

func (mock *MongoDBMock) UnlockInstanceCalls() []struct {
	Ctx    context.Context
	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(ctx context.Context, 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 {
	Ctx             context.Context
	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(ctx context.Context, 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 {
	Ctx             context.Context
	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(ctx context.Context, ID string, state string, version *models.Version) error

UpdateDatasetWithAssociation calls UpdateDatasetWithAssociationFunc.

func (*MongoDBMock) UpdateDatasetWithAssociationCalls added in v1.22.0

func (mock *MongoDBMock) UpdateDatasetWithAssociationCalls() []struct {
	Ctx     context.Context
	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(ctx context.Context, updates []*models.DimensionOption) error

UpdateDimensionsNodeIDAndOrder calls UpdateDimensionsNodeIDAndOrderFunc.

func (*MongoDBMock) UpdateDimensionsNodeIDAndOrderCalls added in v1.37.0

func (mock *MongoDBMock) UpdateDimensionsNodeIDAndOrderCalls() []struct {
	Ctx     context.Context
	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(ctx context.Context, 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 {
	Ctx             context.Context
	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(ctx context.Context, 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 {
	Ctx             context.Context
	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) UpdateMetadata added in v1.56.0

func (mock *MongoDBMock) UpdateMetadata(ctx context.Context, datasetId string, versionId string, versionEtag string, updatedDataset *models.Dataset, updatedVersion *models.Version) error

UpdateMetadata calls UpdateMetadataFunc.

func (*MongoDBMock) UpdateMetadataCalls added in v1.56.0

func (mock *MongoDBMock) UpdateMetadataCalls() []struct {
	Ctx            context.Context
	DatasetId      string
	VersionId      string
	VersionEtag    string
	UpdatedDataset *models.Dataset
	UpdatedVersion *models.Version
}

UpdateMetadataCalls gets all the calls that were made to UpdateMetadata. Check the length with:

len(mockedMongoDB.UpdateMetadataCalls())

func (*MongoDBMock) UpdateObservationInserted added in v1.22.0

func (mock *MongoDBMock) UpdateObservationInserted(ctx context.Context, 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 {
	Ctx                 context.Context
	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(ctx context.Context, currentVersion *models.Version, version *models.Version, eTagSelector string) (string, error)

UpdateVersion calls UpdateVersionFunc.

func (*MongoDBMock) UpdateVersionCalls added in v1.22.0

func (mock *MongoDBMock) UpdateVersionCalls() []struct {
	Ctx            context.Context
	CurrentVersion *models.Version
	Version        *models.Version
	ETagSelector   string
}

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(ctx context.Context, ID string, update interface{}) error

UpsertContact calls UpsertContactFunc.

func (*MongoDBMock) UpsertContactCalls added in v1.22.0

func (mock *MongoDBMock) UpsertContactCalls() []struct {
	Ctx    context.Context
	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(ctx context.Context, ID string, datasetDoc *models.DatasetUpdate) error

UpsertDataset calls UpsertDatasetFunc.

func (*MongoDBMock) UpsertDatasetCalls added in v1.22.0

func (mock *MongoDBMock) UpsertDatasetCalls() []struct {
	Ctx        context.Context
	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(ctx context.Context, dimensions []*models.CachedDimensionOption) error

UpsertDimensionsToInstance calls UpsertDimensionsToInstanceFunc.

func (*MongoDBMock) UpsertDimensionsToInstanceCalls added in v1.36.0

func (mock *MongoDBMock) UpsertDimensionsToInstanceCalls() []struct {
	Ctx        context.Context
	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(ctx context.Context, datasetID string, edition string, editionDoc *models.EditionUpdate) error

UpsertEdition calls UpsertEditionFunc.

func (*MongoDBMock) UpsertEditionCalls added in v1.22.0

func (mock *MongoDBMock) UpsertEditionCalls() []struct {
	Ctx        context.Context
	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(ctx context.Context, ID string, versionDoc *models.Version) error

UpsertVersion calls UpsertVersionFunc.

func (*MongoDBMock) UpsertVersionCalls added in v1.22.0

func (mock *MongoDBMock) UpsertVersionCalls() []struct {
	Ctx        context.Context
	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(ctx context.Context, currentInstance *models.Instance, event *models.Event, eTagSelector string) (string, error)

	// AddInstanceFunc mocks the AddInstance method.
	AddInstanceFunc func(ctx context.Context, 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(ctx context.Context, ID string, state string) error

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

	// DeleteDatasetFunc mocks the DeleteDataset method.
	DeleteDatasetFunc func(ctx context.Context, ID string) error

	// DeleteEditionFunc mocks the DeleteEdition method.
	DeleteEditionFunc func(ctx context.Context, ID string) error

	// GetDatasetFunc mocks the GetDataset method.
	GetDatasetFunc func(ctx context.Context, 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)

	// GetDatasetsByBasedOnFunc mocks the GetDatasetsByBasedOn method.
	GetDatasetsByBasedOnFunc func(ctx context.Context, ID string, 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(ctx context.Context, version *models.Version, dimension string, ids []string) ([]*models.PublicDimensionOption, int, error)

	// GetDimensionsFunc mocks the GetDimensions method.
	GetDimensionsFunc func(ctx context.Context, versionID string) ([]primitive.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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, datasetID string, editionID string) (int, error)

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

	// GetVersionFunc mocks the GetVersion method.
	GetVersionFunc func(ctx context.Context, 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(ctx context.Context, id string) error

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

	// UnlockInstanceFunc mocks the UnlockInstance method.
	UnlockInstanceFunc func(ctx context.Context, lockID string)

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

	// UpdateBuildSearchTaskStateFunc mocks the UpdateBuildSearchTaskState method.
	UpdateBuildSearchTaskStateFunc func(ctx context.Context, 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(ctx context.Context, ID string, state string, version *models.Version) error

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

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

	// UpdateImportObservationsTaskStateFunc mocks the UpdateImportObservationsTaskState method.
	UpdateImportObservationsTaskStateFunc func(ctx context.Context, 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)

	// UpdateMetadataFunc mocks the UpdateMetadata method.
	UpdateMetadataFunc func(ctx context.Context, datasetId string, versionId string, versionEtag string, updatedDataset *models.Dataset, updatedVersion *models.Version) error

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

	// UpdateVersionFunc mocks the UpdateVersion method.
	UpdateVersionFunc func(ctx context.Context, currentVersion *models.Version, version *models.Version, eTagSelector string) (string, error)

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

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

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

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

	// UpsertVersionFunc mocks the UpsertVersion method.
	UpsertVersionFunc func(ctx context.Context, 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(ctx context.Context, currentInstance *models.Instance, event *models.Event, eTagSelector string) (string, error) {
			panic("mock out the AddEventToInstance method")
		},
		AddInstanceFunc: func(ctx context.Context, 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(ctx context.Context, ID string, state string) error {
			panic("mock out the CheckDatasetExists method")
		},
		CheckEditionExistsFunc: func(ctx context.Context, ID string, editionID string, state string) error {
			panic("mock out the CheckEditionExists method")
		},
		DeleteDatasetFunc: func(ctx context.Context, ID string) error {
			panic("mock out the DeleteDataset method")
		},
		DeleteEditionFunc: func(ctx context.Context, ID string) error {
			panic("mock out the DeleteEdition method")
		},
		GetDatasetFunc: func(ctx context.Context, 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")
		},
		GetDatasetsByBasedOnFunc: func(ctx context.Context, ID string, offset int, limit int, authorised bool) ([]*models.DatasetUpdate, int, error) {
			panic("mock out the GetDatasetsByBasedOn 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(ctx context.Context, version *models.Version, dimension string, ids []string) ([]*models.PublicDimensionOption, int, error) {
			panic("mock out the GetDimensionOptionsFromIDs method")
		},
		GetDimensionsFunc: func(ctx context.Context, versionID string) ([]primitive.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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, datasetID string, editionID string) (int, error) {
			panic("mock out the GetNextVersion method")
		},
		GetUniqueDimensionAndOptionsFunc: func(ctx context.Context, ID string, dimension string) ([]*string, int, error) {
			panic("mock out the GetUniqueDimensionAndOptions method")
		},
		GetVersionFunc: func(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, lockID string)  {
			panic("mock out the UnlockInstance method")
		},
		UpdateBuildHierarchyTaskStateFunc: func(ctx context.Context, currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error) {
			panic("mock out the UpdateBuildHierarchyTaskState method")
		},
		UpdateBuildSearchTaskStateFunc: func(ctx context.Context, 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(ctx context.Context, ID string, state string, version *models.Version) error {
			panic("mock out the UpdateDatasetWithAssociation method")
		},
		UpdateDimensionsNodeIDAndOrderFunc: func(ctx context.Context, updates []*models.DimensionOption) error {
			panic("mock out the UpdateDimensionsNodeIDAndOrder method")
		},
		UpdateETagForOptionsFunc: func(ctx context.Context, currentInstance *models.Instance, upserts []*models.CachedDimensionOption, updates []*models.DimensionOption, eTagSelector string) (string, error) {
			panic("mock out the UpdateETagForOptions method")
		},
		UpdateImportObservationsTaskStateFunc: func(ctx context.Context, 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")
		},
		UpdateMetadataFunc: func(ctx context.Context, datasetId string, versionId string, versionEtag string, updatedDataset *models.Dataset, updatedVersion *models.Version) error {
			panic("mock out the UpdateMetadata method")
		},
		UpdateObservationInsertedFunc: func(ctx context.Context, currentInstance *models.Instance, observationInserted int64, eTagSelector string) (string, error) {
			panic("mock out the UpdateObservationInserted method")
		},
		UpdateVersionFunc: func(ctx context.Context, currentVersion *models.Version, version *models.Version, eTagSelector string) (string, error) {
			panic("mock out the UpdateVersion method")
		},
		UpsertContactFunc: func(ctx context.Context, ID string, update interface{}) error {
			panic("mock out the UpsertContact method")
		},
		UpsertDatasetFunc: func(ctx context.Context, ID string, datasetDoc *models.DatasetUpdate) error {
			panic("mock out the UpsertDataset method")
		},
		UpsertDimensionsToInstanceFunc: func(ctx context.Context, dimensions []*models.CachedDimensionOption) error {
			panic("mock out the UpsertDimensionsToInstance method")
		},
		UpsertEditionFunc: func(ctx context.Context, datasetID string, edition string, editionDoc *models.EditionUpdate) error {
			panic("mock out the UpsertEdition method")
		},
		UpsertVersionFunc: func(ctx context.Context, 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(ctx context.Context, currentInstance *models.Instance, event *models.Event, eTagSelector string) (string, error)

AddEventToInstance calls AddEventToInstanceFunc.

func (*StorerMock) AddEventToInstanceCalls

func (mock *StorerMock) AddEventToInstanceCalls() []struct {
	Ctx             context.Context
	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(ctx context.Context, instance *models.Instance) (*models.Instance, error)

AddInstance calls AddInstanceFunc.

func (*StorerMock) AddInstanceCalls

func (mock *StorerMock) AddInstanceCalls() []struct {
	Ctx      context.Context
	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(ctx context.Context, ID string, state string) error

CheckDatasetExists calls CheckDatasetExistsFunc.

func (*StorerMock) CheckDatasetExistsCalls

func (mock *StorerMock) CheckDatasetExistsCalls() []struct {
	Ctx   context.Context
	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(ctx context.Context, ID string, editionID string, state string) error

CheckEditionExists calls CheckEditionExistsFunc.

func (*StorerMock) CheckEditionExistsCalls

func (mock *StorerMock) CheckEditionExistsCalls() []struct {
	Ctx       context.Context
	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(ctx context.Context, ID string) error

DeleteDataset calls DeleteDatasetFunc.

func (*StorerMock) DeleteDatasetCalls

func (mock *StorerMock) DeleteDatasetCalls() []struct {
	Ctx context.Context
	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(ctx context.Context, ID string) error

DeleteEdition calls DeleteEditionFunc.

func (*StorerMock) DeleteEditionCalls

func (mock *StorerMock) DeleteEditionCalls() []struct {
	Ctx context.Context
	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(ctx context.Context, ID string) (*models.DatasetUpdate, error)

GetDataset calls GetDatasetFunc.

func (*StorerMock) GetDatasetCalls

func (mock *StorerMock) GetDatasetCalls() []struct {
	Ctx context.Context
	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) GetDatasetsByBasedOn added in v1.44.0

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

GetDatasetsByBasedOn calls GetDatasetsByBasedOnFunc.

func (*StorerMock) GetDatasetsByBasedOnCalls added in v1.44.0

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

GetDatasetsByBasedOnCalls gets all the calls that were made to GetDatasetsByBasedOn. Check the length with:

len(mockedStorer.GetDatasetsByBasedOnCalls())

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(ctx context.Context, 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 {
	Ctx       context.Context
	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(ctx context.Context, versionID string) ([]primitive.M, error)

GetDimensions calls GetDimensionsFunc.

func (*StorerMock) GetDimensionsCalls

func (mock *StorerMock) GetDimensionsCalls() []struct {
	Ctx       context.Context
	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(ctx context.Context, ID string, editionID string, state string) (*models.EditionUpdate, error)

GetEdition calls GetEditionFunc.

func (*StorerMock) GetEditionCalls

func (mock *StorerMock) GetEditionCalls() []struct {
	Ctx       context.Context
	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(ctx context.Context, ID string, eTagSelector string) (*models.Instance, error)

GetInstance calls GetInstanceFunc.

func (*StorerMock) GetInstanceCalls

func (mock *StorerMock) GetInstanceCalls() []struct {
	Ctx          context.Context
	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(ctx context.Context, datasetID string, editionID string) (int, error)

GetNextVersion calls GetNextVersionFunc.

func (*StorerMock) GetNextVersionCalls

func (mock *StorerMock) GetNextVersionCalls() []struct {
	Ctx       context.Context
	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(ctx context.Context, ID string, dimension string) ([]*string, int, error)

GetUniqueDimensionAndOptions calls GetUniqueDimensionAndOptionsFunc.

func (*StorerMock) GetUniqueDimensionAndOptionsCalls

func (mock *StorerMock) GetUniqueDimensionAndOptionsCalls() []struct {
	Ctx       context.Context
	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(ctx context.Context, datasetID string, editionID string, version int, state string) (*models.Version, error)

GetVersion calls GetVersionFunc.

func (*StorerMock) GetVersionCalls

func (mock *StorerMock) GetVersionCalls() []struct {
	Ctx       context.Context
	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(ctx context.Context, id string) error

RemoveDatasetVersionAndEditionLinks calls RemoveDatasetVersionAndEditionLinksFunc.

func (*StorerMock) RemoveDatasetVersionAndEditionLinksCalls added in v1.38.0

func (mock *StorerMock) RemoveDatasetVersionAndEditionLinksCalls() []struct {
	Ctx context.Context
	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(ctx context.Context, lockID string)

UnlockInstance calls UnlockInstanceFunc.

func (*StorerMock) UnlockInstanceCalls added in v1.34.0

func (mock *StorerMock) UnlockInstanceCalls() []struct {
	Ctx    context.Context
	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(ctx context.Context, currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error)

UpdateBuildHierarchyTaskState calls UpdateBuildHierarchyTaskStateFunc.

func (*StorerMock) UpdateBuildHierarchyTaskStateCalls

func (mock *StorerMock) UpdateBuildHierarchyTaskStateCalls() []struct {
	Ctx             context.Context
	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(ctx context.Context, currentInstance *models.Instance, dimension string, state string, eTagSelector string) (string, error)

UpdateBuildSearchTaskState calls UpdateBuildSearchTaskStateFunc.

func (*StorerMock) UpdateBuildSearchTaskStateCalls

func (mock *StorerMock) UpdateBuildSearchTaskStateCalls() []struct {
	Ctx             context.Context
	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(ctx context.Context, ID string, state string, version *models.Version) error

UpdateDatasetWithAssociation calls UpdateDatasetWithAssociationFunc.

func (*StorerMock) UpdateDatasetWithAssociationCalls

func (mock *StorerMock) UpdateDatasetWithAssociationCalls() []struct {
	Ctx     context.Context
	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(ctx context.Context, updates []*models.DimensionOption) error

UpdateDimensionsNodeIDAndOrder calls UpdateDimensionsNodeIDAndOrderFunc.

func (*StorerMock) UpdateDimensionsNodeIDAndOrderCalls added in v1.37.0

func (mock *StorerMock) UpdateDimensionsNodeIDAndOrderCalls() []struct {
	Ctx     context.Context
	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(ctx context.Context, 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 {
	Ctx             context.Context
	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(ctx context.Context, currentInstance *models.Instance, state string, eTagSelector string) (string, error)

UpdateImportObservationsTaskState calls UpdateImportObservationsTaskStateFunc.

func (*StorerMock) UpdateImportObservationsTaskStateCalls

func (mock *StorerMock) UpdateImportObservationsTaskStateCalls() []struct {
	Ctx             context.Context
	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) UpdateMetadata added in v1.56.0

func (mock *StorerMock) UpdateMetadata(ctx context.Context, datasetId string, versionId string, versionEtag string, updatedDataset *models.Dataset, updatedVersion *models.Version) error

UpdateMetadata calls UpdateMetadataFunc.

func (*StorerMock) UpdateMetadataCalls added in v1.56.0

func (mock *StorerMock) UpdateMetadataCalls() []struct {
	Ctx            context.Context
	DatasetId      string
	VersionId      string
	VersionEtag    string
	UpdatedDataset *models.Dataset
	UpdatedVersion *models.Version
}

UpdateMetadataCalls gets all the calls that were made to UpdateMetadata. Check the length with:

len(mockedStorer.UpdateMetadataCalls())

func (*StorerMock) UpdateObservationInserted

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

UpdateObservationInserted calls UpdateObservationInsertedFunc.

func (*StorerMock) UpdateObservationInsertedCalls

func (mock *StorerMock) UpdateObservationInsertedCalls() []struct {
	Ctx                 context.Context
	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(ctx context.Context, currentVersion *models.Version, version *models.Version, eTagSelector string) (string, error)

UpdateVersion calls UpdateVersionFunc.

func (*StorerMock) UpdateVersionCalls

func (mock *StorerMock) UpdateVersionCalls() []struct {
	Ctx            context.Context
	CurrentVersion *models.Version
	Version        *models.Version
	ETagSelector   string
}

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

len(mockedStorer.UpdateVersionCalls())

func (*StorerMock) UpsertContact

func (mock *StorerMock) UpsertContact(ctx context.Context, ID string, update interface{}) error

UpsertContact calls UpsertContactFunc.

func (*StorerMock) UpsertContactCalls

func (mock *StorerMock) UpsertContactCalls() []struct {
	Ctx    context.Context
	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(ctx context.Context, ID string, datasetDoc *models.DatasetUpdate) error

UpsertDataset calls UpsertDatasetFunc.

func (*StorerMock) UpsertDatasetCalls

func (mock *StorerMock) UpsertDatasetCalls() []struct {
	Ctx        context.Context
	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(ctx context.Context, dimensions []*models.CachedDimensionOption) error

UpsertDimensionsToInstance calls UpsertDimensionsToInstanceFunc.

func (*StorerMock) UpsertDimensionsToInstanceCalls added in v1.36.0

func (mock *StorerMock) UpsertDimensionsToInstanceCalls() []struct {
	Ctx        context.Context
	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(ctx context.Context, datasetID string, edition string, editionDoc *models.EditionUpdate) error

UpsertEdition calls UpsertEditionFunc.

func (*StorerMock) UpsertEditionCalls

func (mock *StorerMock) UpsertEditionCalls() []struct {
	Ctx        context.Context
	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(ctx context.Context, ID string, versionDoc *models.Version) error

UpsertVersion calls UpsertVersionFunc.

func (*StorerMock) UpsertVersionCalls

func (mock *StorerMock) UpsertVersionCalls() []struct {
	Ctx        context.Context
	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