storetest

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT Imports: 7 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(in1 context.Context, in2 *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

	// StreamCSVRowsFunc mocks the StreamCSVRows method.
	StreamCSVRowsFunc func(ctx context.Context, instanceID string, filterID string, filters *observation.DimensionFilters, limit *int) (observation.StreamRowReader, 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(in1 context.Context, in2 *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")
            },
            StreamCSVRowsFunc: func(ctx context.Context, instanceID string, filterID string, filters *observation.DimensionFilters, limit *int) (observation.StreamRowReader, error) {
	               panic("mock out the StreamCSVRows 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(in1 context.Context, in2 *healthcheck.CheckState) error

Checker calls CheckerFunc.

func (*GraphDBMock) CheckerCalls added in v1.22.0

func (mock *GraphDBMock) CheckerCalls() []struct {
	In1 context.Context
	In2 *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())

func (*GraphDBMock) StreamCSVRows added in v1.22.0

func (mock *GraphDBMock) StreamCSVRows(ctx context.Context, instanceID string, filterID string, filters *observation.DimensionFilters, limit *int) (observation.StreamRowReader, error)

StreamCSVRows calls StreamCSVRowsFunc.

func (*GraphDBMock) StreamCSVRowsCalls added in v1.22.0

func (mock *GraphDBMock) StreamCSVRowsCalls() []struct {
	Ctx        context.Context
	InstanceID string
	FilterID   string
	Filters    *observation.DimensionFilters
	Limit      *int
}

StreamCSVRowsCalls gets all the calls that were made to StreamCSVRows. Check the length with:

len(mockedGraphDB.StreamCSVRowsCalls())

type MongoDBMock added in v1.22.0

type MongoDBMock struct {
	// AddDimensionToInstanceFunc mocks the AddDimensionToInstance method.
	AddDimensionToInstanceFunc func(dimension *models.CachedDimensionOption) error

	// AddEventToInstanceFunc mocks the AddEventToInstance method.
	AddEventToInstanceFunc func(instanceID string, event *models.Event) 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(in1 context.Context, in2 *healthcheck.CheckState) error

	// CloseFunc mocks the Close method.
	CloseFunc func(in1 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) ([]models.DatasetUpdate, error)

	// GetDimensionOptionsFunc mocks the GetDimensionOptions method.
	GetDimensionOptionsFunc func(version *models.Version, dimension string) (*models.DimensionOptionResults, error)

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

	// GetDimensionsFromInstanceFunc mocks the GetDimensionsFromInstance method.
	GetDimensionsFromInstanceFunc func(ID string) (*models.DimensionNodeResults, 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) (*models.EditionUpdateResults, error)

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

	// GetInstancesFunc mocks the GetInstances method.
	GetInstancesFunc func(ctx context.Context, states []string, datasets []string) (*models.InstanceResults, 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) (*models.DimensionValues, error)

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

	// GetVersionsFunc mocks the GetVersions method.
	GetVersionsFunc func(ctx context.Context, datasetID string, editionID string, state string) (*models.VersionResults, error)

	// UpdateBuildHierarchyTaskStateFunc mocks the UpdateBuildHierarchyTaskState method.
	UpdateBuildHierarchyTaskStateFunc func(id string, dimension string, state string) error

	// UpdateBuildSearchTaskStateFunc mocks the UpdateBuildSearchTaskState method.
	UpdateBuildSearchTaskStateFunc func(id string, dimension string, state 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

	// UpdateDimensionNodeIDFunc mocks the UpdateDimensionNodeID method.
	UpdateDimensionNodeIDFunc func(dimension *models.DimensionOption) error

	// UpdateImportObservationsTaskStateFunc mocks the UpdateImportObservationsTaskState method.
	UpdateImportObservationsTaskStateFunc func(id string, state string) error

	// UpdateInstanceFunc mocks the UpdateInstance method.
	UpdateInstanceFunc func(ctx context.Context, ID string, instance *models.Instance) error

	// UpdateObservationInsertedFunc mocks the UpdateObservationInserted method.
	UpdateObservationInsertedFunc func(ID string, observationInserted int64) 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

	// 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{
            AddDimensionToInstanceFunc: func(dimension *models.CachedDimensionOption) error {
	               panic("mock out the AddDimensionToInstance method")
            },
            AddEventToInstanceFunc: func(instanceID string, event *models.Event) 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(in1 context.Context, in2 *healthcheck.CheckState) error {
	               panic("mock out the Checker method")
            },
            CloseFunc: func(in1 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) ([]models.DatasetUpdate, error) {
	               panic("mock out the GetDatasets method")
            },
            GetDimensionOptionsFunc: func(version *models.Version, dimension string) (*models.DimensionOptionResults, error) {
	               panic("mock out the GetDimensionOptions method")
            },
            GetDimensionsFunc: func(datasetID string, versionID string) ([]bson.M, error) {
	               panic("mock out the GetDimensions method")
            },
            GetDimensionsFromInstanceFunc: func(ID string) (*models.DimensionNodeResults, 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) (*models.EditionUpdateResults, error) {
	               panic("mock out the GetEditions method")
            },
            GetInstanceFunc: func(ID string) (*models.Instance, error) {
	               panic("mock out the GetInstance method")
            },
            GetInstancesFunc: func(ctx context.Context, states []string, datasets []string) (*models.InstanceResults, 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) (*models.DimensionValues, error) {
	               panic("mock out the GetUniqueDimensionAndOptions method")
            },
            GetVersionFunc: func(datasetID string, editionID string, version string, state string) (*models.Version, error) {
	               panic("mock out the GetVersion method")
            },
            GetVersionsFunc: func(ctx context.Context, datasetID string, editionID string, state string) (*models.VersionResults, error) {
	               panic("mock out the GetVersions method")
            },
            UpdateBuildHierarchyTaskStateFunc: func(id string, dimension string, state string) error {
	               panic("mock out the UpdateBuildHierarchyTaskState method")
            },
            UpdateBuildSearchTaskStateFunc: func(id string, dimension string, state 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")
            },
            UpdateDimensionNodeIDFunc: func(dimension *models.DimensionOption) error {
	               panic("mock out the UpdateDimensionNodeID method")
            },
            UpdateImportObservationsTaskStateFunc: func(id string, state string) error {
	               panic("mock out the UpdateImportObservationsTaskState method")
            },
            UpdateInstanceFunc: func(ctx context.Context, ID string, instance *models.Instance) error {
	               panic("mock out the UpdateInstance method")
            },
            UpdateObservationInsertedFunc: func(ID string, observationInserted int64) 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")
            },
            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) AddDimensionToInstance added in v1.22.0

func (mock *MongoDBMock) AddDimensionToInstance(dimension *models.CachedDimensionOption) error

AddDimensionToInstance calls AddDimensionToInstanceFunc.

func (*MongoDBMock) AddDimensionToInstanceCalls added in v1.22.0

func (mock *MongoDBMock) AddDimensionToInstanceCalls() []struct {
	Dimension *models.CachedDimensionOption
}

AddDimensionToInstanceCalls gets all the calls that were made to AddDimensionToInstance. Check the length with:

len(mockedMongoDB.AddDimensionToInstanceCalls())

func (*MongoDBMock) AddEventToInstance added in v1.22.0

func (mock *MongoDBMock) AddEventToInstance(instanceID string, event *models.Event) error

AddEventToInstance calls AddEventToInstanceFunc.

func (*MongoDBMock) AddEventToInstanceCalls added in v1.22.0

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

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(in1 context.Context, in2 *healthcheck.CheckState) error

Checker calls CheckerFunc.

func (*MongoDBMock) CheckerCalls added in v1.22.0

func (mock *MongoDBMock) CheckerCalls() []struct {
	In1 context.Context
	In2 *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(in1 context.Context) error

Close calls CloseFunc.

func (*MongoDBMock) CloseCalls added in v1.22.0

func (mock *MongoDBMock) CloseCalls() []struct {
	In1 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) ([]models.DatasetUpdate, error)

GetDatasets calls GetDatasetsFunc.

func (*MongoDBMock) GetDatasetsCalls added in v1.22.0

func (mock *MongoDBMock) GetDatasetsCalls() []struct {
	Ctx context.Context
}

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(version *models.Version, dimension string) (*models.DimensionOptionResults, error)

GetDimensionOptions calls GetDimensionOptionsFunc.

func (*MongoDBMock) GetDimensionOptionsCalls added in v1.22.0

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

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

len(mockedMongoDB.GetDimensionOptionsCalls())

func (*MongoDBMock) GetDimensions added in v1.22.0

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

GetDimensions calls GetDimensionsFunc.

func (*MongoDBMock) GetDimensionsCalls added in v1.22.0

func (mock *MongoDBMock) GetDimensionsCalls() []struct {
	DatasetID string
	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(ID string) (*models.DimensionNodeResults, error)

GetDimensionsFromInstance calls GetDimensionsFromInstanceFunc.

func (*MongoDBMock) GetDimensionsFromInstanceCalls added in v1.22.0

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

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) (*models.EditionUpdateResults, error)

GetEditions calls GetEditionsFunc.

func (*MongoDBMock) GetEditionsCalls added in v1.22.0

func (mock *MongoDBMock) GetEditionsCalls() []struct {
	Ctx   context.Context
	ID    string
	State string
}

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) (*models.Instance, error)

GetInstance calls GetInstanceFunc.

func (*MongoDBMock) GetInstanceCalls added in v1.22.0

func (mock *MongoDBMock) GetInstanceCalls() []struct {
	ID 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) (*models.InstanceResults, error)

GetInstances calls GetInstancesFunc.

func (*MongoDBMock) GetInstancesCalls added in v1.22.0

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

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) (*models.DimensionValues, 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 string, 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   string
	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) (*models.VersionResults, 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
}

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

len(mockedMongoDB.GetVersionsCalls())

func (*MongoDBMock) UpdateBuildHierarchyTaskState added in v1.22.0

func (mock *MongoDBMock) UpdateBuildHierarchyTaskState(id string, dimension string, state string) error

UpdateBuildHierarchyTaskState calls UpdateBuildHierarchyTaskStateFunc.

func (*MongoDBMock) UpdateBuildHierarchyTaskStateCalls added in v1.22.0

func (mock *MongoDBMock) UpdateBuildHierarchyTaskStateCalls() []struct {
	ID        string
	Dimension string
	State     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(id string, dimension string, state string) error

UpdateBuildSearchTaskState calls UpdateBuildSearchTaskStateFunc.

func (*MongoDBMock) UpdateBuildSearchTaskStateCalls added in v1.22.0

func (mock *MongoDBMock) UpdateBuildSearchTaskStateCalls() []struct {
	ID        string
	Dimension string
	State     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) UpdateDimensionNodeID added in v1.22.0

func (mock *MongoDBMock) UpdateDimensionNodeID(dimension *models.DimensionOption) error

UpdateDimensionNodeID calls UpdateDimensionNodeIDFunc.

func (*MongoDBMock) UpdateDimensionNodeIDCalls added in v1.22.0

func (mock *MongoDBMock) UpdateDimensionNodeIDCalls() []struct {
	Dimension *models.DimensionOption
}

UpdateDimensionNodeIDCalls gets all the calls that were made to UpdateDimensionNodeID. Check the length with:

len(mockedMongoDB.UpdateDimensionNodeIDCalls())

func (*MongoDBMock) UpdateImportObservationsTaskState added in v1.22.0

func (mock *MongoDBMock) UpdateImportObservationsTaskState(id string, state string) error

UpdateImportObservationsTaskState calls UpdateImportObservationsTaskStateFunc.

func (*MongoDBMock) UpdateImportObservationsTaskStateCalls added in v1.22.0

func (mock *MongoDBMock) UpdateImportObservationsTaskStateCalls() []struct {
	ID    string
	State 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, ID string, instance *models.Instance) error

UpdateInstance calls UpdateInstanceFunc.

func (*MongoDBMock) UpdateInstanceCalls added in v1.22.0

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

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(ID string, observationInserted int64) error

UpdateObservationInserted calls UpdateObservationInsertedFunc.

func (*MongoDBMock) UpdateObservationInsertedCalls added in v1.22.0

func (mock *MongoDBMock) UpdateObservationInsertedCalls() []struct {
	ID                  string
	ObservationInserted int64
}

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) 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 {
	// AddDimensionToInstanceFunc mocks the AddDimensionToInstance method.
	AddDimensionToInstanceFunc func(dimension *models.CachedDimensionOption) error

	// AddEventToInstanceFunc mocks the AddEventToInstance method.
	AddEventToInstanceFunc func(instanceID string, event *models.Event) 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) ([]models.DatasetUpdate, error)

	// GetDimensionOptionsFunc mocks the GetDimensionOptions method.
	GetDimensionOptionsFunc func(version *models.Version, dimension string) (*models.DimensionOptionResults, error)

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

	// GetDimensionsFromInstanceFunc mocks the GetDimensionsFromInstance method.
	GetDimensionsFromInstanceFunc func(ID string) (*models.DimensionNodeResults, 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) (*models.EditionUpdateResults, error)

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

	// GetInstancesFunc mocks the GetInstances method.
	GetInstancesFunc func(ctx context.Context, states []string, datasets []string) (*models.InstanceResults, 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) (*models.DimensionValues, error)

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

	// GetVersionsFunc mocks the GetVersions method.
	GetVersionsFunc func(ctx context.Context, datasetID string, editionID string, state string) (*models.VersionResults, error)

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

	// StreamCSVRowsFunc mocks the StreamCSVRows method.
	StreamCSVRowsFunc func(ctx context.Context, instanceID string, filterID string, filters *observation.DimensionFilters, limit *int) (observation.StreamRowReader, error)

	// UpdateBuildHierarchyTaskStateFunc mocks the UpdateBuildHierarchyTaskState method.
	UpdateBuildHierarchyTaskStateFunc func(id string, dimension string, state string) error

	// UpdateBuildSearchTaskStateFunc mocks the UpdateBuildSearchTaskState method.
	UpdateBuildSearchTaskStateFunc func(id string, dimension string, state 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

	// UpdateDimensionNodeIDFunc mocks the UpdateDimensionNodeID method.
	UpdateDimensionNodeIDFunc func(dimension *models.DimensionOption) error

	// UpdateImportObservationsTaskStateFunc mocks the UpdateImportObservationsTaskState method.
	UpdateImportObservationsTaskStateFunc func(id string, state string) error

	// UpdateInstanceFunc mocks the UpdateInstance method.
	UpdateInstanceFunc func(ctx context.Context, ID string, instance *models.Instance) error

	// UpdateObservationInsertedFunc mocks the UpdateObservationInserted method.
	UpdateObservationInsertedFunc func(ID string, observationInserted int64) 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

	// 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{
            AddDimensionToInstanceFunc: func(dimension *models.CachedDimensionOption) error {
	               panic("mock out the AddDimensionToInstance method")
            },
            AddEventToInstanceFunc: func(instanceID string, event *models.Event) 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) ([]models.DatasetUpdate, error) {
	               panic("mock out the GetDatasets method")
            },
            GetDimensionOptionsFunc: func(version *models.Version, dimension string) (*models.DimensionOptionResults, error) {
	               panic("mock out the GetDimensionOptions method")
            },
            GetDimensionsFunc: func(datasetID string, versionID string) ([]bson.M, error) {
	               panic("mock out the GetDimensions method")
            },
            GetDimensionsFromInstanceFunc: func(ID string) (*models.DimensionNodeResults, 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) (*models.EditionUpdateResults, error) {
	               panic("mock out the GetEditions method")
            },
            GetInstanceFunc: func(ID string) (*models.Instance, error) {
	               panic("mock out the GetInstance method")
            },
            GetInstancesFunc: func(ctx context.Context, states []string, datasets []string) (*models.InstanceResults, 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) (*models.DimensionValues, error) {
	               panic("mock out the GetUniqueDimensionAndOptions method")
            },
            GetVersionFunc: func(datasetID string, editionID string, version string, state string) (*models.Version, error) {
	               panic("mock out the GetVersion method")
            },
            GetVersionsFunc: func(ctx context.Context, datasetID string, editionID string, state string) (*models.VersionResults, error) {
	               panic("mock out the GetVersions method")
            },
            SetInstanceIsPublishedFunc: func(ctx context.Context, instanceID string) error {
	               panic("mock out the SetInstanceIsPublished method")
            },
            StreamCSVRowsFunc: func(ctx context.Context, instanceID string, filterID string, filters *observation.DimensionFilters, limit *int) (observation.StreamRowReader, error) {
	               panic("mock out the StreamCSVRows method")
            },
            UpdateBuildHierarchyTaskStateFunc: func(id string, dimension string, state string) error {
	               panic("mock out the UpdateBuildHierarchyTaskState method")
            },
            UpdateBuildSearchTaskStateFunc: func(id string, dimension string, state 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")
            },
            UpdateDimensionNodeIDFunc: func(dimension *models.DimensionOption) error {
	               panic("mock out the UpdateDimensionNodeID method")
            },
            UpdateImportObservationsTaskStateFunc: func(id string, state string) error {
	               panic("mock out the UpdateImportObservationsTaskState method")
            },
            UpdateInstanceFunc: func(ctx context.Context, ID string, instance *models.Instance) error {
	               panic("mock out the UpdateInstance method")
            },
            UpdateObservationInsertedFunc: func(ID string, observationInserted int64) 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")
            },
            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) AddDimensionToInstance

func (mock *StorerMock) AddDimensionToInstance(dimension *models.CachedDimensionOption) error

AddDimensionToInstance calls AddDimensionToInstanceFunc.

func (*StorerMock) AddDimensionToInstanceCalls

func (mock *StorerMock) AddDimensionToInstanceCalls() []struct {
	Dimension *models.CachedDimensionOption
}

AddDimensionToInstanceCalls gets all the calls that were made to AddDimensionToInstance. Check the length with:

len(mockedStorer.AddDimensionToInstanceCalls())

func (*StorerMock) AddEventToInstance

func (mock *StorerMock) AddEventToInstance(instanceID string, event *models.Event) error

AddEventToInstance calls AddEventToInstanceFunc.

func (*StorerMock) AddEventToInstanceCalls

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

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) ([]models.DatasetUpdate, error)

GetDatasets calls GetDatasetsFunc.

func (*StorerMock) GetDatasetsCalls

func (mock *StorerMock) GetDatasetsCalls() []struct {
	Ctx context.Context
}

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

len(mockedStorer.GetDatasetsCalls())

func (*StorerMock) GetDimensionOptions

func (mock *StorerMock) GetDimensionOptions(version *models.Version, dimension string) (*models.DimensionOptionResults, error)

GetDimensionOptions calls GetDimensionOptionsFunc.

func (*StorerMock) GetDimensionOptionsCalls

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

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

len(mockedStorer.GetDimensionOptionsCalls())

func (*StorerMock) GetDimensions

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

GetDimensions calls GetDimensionsFunc.

func (*StorerMock) GetDimensionsCalls

func (mock *StorerMock) GetDimensionsCalls() []struct {
	DatasetID string
	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(ID string) (*models.DimensionNodeResults, error)

GetDimensionsFromInstance calls GetDimensionsFromInstanceFunc.

func (*StorerMock) GetDimensionsFromInstanceCalls

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

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) (*models.EditionUpdateResults, error)

GetEditions calls GetEditionsFunc.

func (*StorerMock) GetEditionsCalls

func (mock *StorerMock) GetEditionsCalls() []struct {
	Ctx   context.Context
	ID    string
	State string
}

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) (*models.Instance, error)

GetInstance calls GetInstanceFunc.

func (*StorerMock) GetInstanceCalls

func (mock *StorerMock) GetInstanceCalls() []struct {
	ID 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) (*models.InstanceResults, error)

GetInstances calls GetInstancesFunc.

func (*StorerMock) GetInstancesCalls

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

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) (*models.DimensionValues, 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 string, state string) (*models.Version, error)

GetVersion calls GetVersionFunc.

func (*StorerMock) GetVersionCalls

func (mock *StorerMock) GetVersionCalls() []struct {
	DatasetID string
	EditionID string
	Version   string
	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) (*models.VersionResults, error)

GetVersions calls GetVersionsFunc.

func (*StorerMock) GetVersionsCalls

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

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

len(mockedStorer.GetVersionsCalls())

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) StreamCSVRows

func (mock *StorerMock) StreamCSVRows(ctx context.Context, instanceID string, filterID string, filters *observation.DimensionFilters, limit *int) (observation.StreamRowReader, error)

StreamCSVRows calls StreamCSVRowsFunc.

func (*StorerMock) StreamCSVRowsCalls

func (mock *StorerMock) StreamCSVRowsCalls() []struct {
	Ctx        context.Context
	InstanceID string
	FilterID   string
	Filters    *observation.DimensionFilters
	Limit      *int
}

StreamCSVRowsCalls gets all the calls that were made to StreamCSVRows. Check the length with:

len(mockedStorer.StreamCSVRowsCalls())

func (*StorerMock) UpdateBuildHierarchyTaskState

func (mock *StorerMock) UpdateBuildHierarchyTaskState(id string, dimension string, state string) error

UpdateBuildHierarchyTaskState calls UpdateBuildHierarchyTaskStateFunc.

func (*StorerMock) UpdateBuildHierarchyTaskStateCalls

func (mock *StorerMock) UpdateBuildHierarchyTaskStateCalls() []struct {
	ID        string
	Dimension string
	State     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(id string, dimension string, state string) error

UpdateBuildSearchTaskState calls UpdateBuildSearchTaskStateFunc.

func (*StorerMock) UpdateBuildSearchTaskStateCalls

func (mock *StorerMock) UpdateBuildSearchTaskStateCalls() []struct {
	ID        string
	Dimension string
	State     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) UpdateDimensionNodeID

func (mock *StorerMock) UpdateDimensionNodeID(dimension *models.DimensionOption) error

UpdateDimensionNodeID calls UpdateDimensionNodeIDFunc.

func (*StorerMock) UpdateDimensionNodeIDCalls

func (mock *StorerMock) UpdateDimensionNodeIDCalls() []struct {
	Dimension *models.DimensionOption
}

UpdateDimensionNodeIDCalls gets all the calls that were made to UpdateDimensionNodeID. Check the length with:

len(mockedStorer.UpdateDimensionNodeIDCalls())

func (*StorerMock) UpdateImportObservationsTaskState

func (mock *StorerMock) UpdateImportObservationsTaskState(id string, state string) error

UpdateImportObservationsTaskState calls UpdateImportObservationsTaskStateFunc.

func (*StorerMock) UpdateImportObservationsTaskStateCalls

func (mock *StorerMock) UpdateImportObservationsTaskStateCalls() []struct {
	ID    string
	State 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, ID string, instance *models.Instance) error

UpdateInstance calls UpdateInstanceFunc.

func (*StorerMock) UpdateInstanceCalls

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

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

len(mockedStorer.UpdateInstanceCalls())

func (*StorerMock) UpdateObservationInserted

func (mock *StorerMock) UpdateObservationInserted(ID string, observationInserted int64) error

UpdateObservationInserted calls UpdateObservationInsertedFunc.

func (*StorerMock) UpdateObservationInsertedCalls

func (mock *StorerMock) UpdateObservationInsertedCalls() []struct {
	ID                  string
	ObservationInserted int64
}

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) 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