mock

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

type Mock struct {
	IsBackendReachable bool
	IsQueryValid       bool
	IsContentFound     bool
}

func (*Mock) AddDimensions

func (m *Mock) AddDimensions(ctx context.Context, i *model.Instance) error

func (*Mock) AddVersionDetailsToInstance

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

func (*Mock) Checker

func (m *Mock) Checker(ctx context.Context, check *health.CheckState) error

func (*Mock) CloneNodes

func (m *Mock) CloneNodes(ctx context.Context, attempt int, instanceID, codeListID, dimensionName string) error

func (*Mock) CloneRelationships

func (m *Mock) CloneRelationships(ctx context.Context, attempt int, instanceID, codeListID, dimensionName string) error

func (*Mock) Close

func (m *Mock) Close(ctx context.Context) error

func (*Mock) CountInsertedObservations

func (m *Mock) CountInsertedObservations(ctx context.Context, instanceID string) (count int64, err error)

func (*Mock) CountNodes

func (m *Mock) CountNodes(ctx context.Context, instanceID, dimensionName string) (count int64, err error)

func (*Mock) CreateCodeRelationship

func (m *Mock) CreateCodeRelationship(ctx context.Context, i *model.Instance, codeListID, code string) error

func (*Mock) CreateInstance

func (m *Mock) CreateInstance(ctx context.Context, i *model.Instance) error

func (*Mock) CreateInstanceConstraint

func (m *Mock) CreateInstanceConstraint(ctx context.Context, i *model.Instance) error

func (*Mock) CreateInstanceHierarchyConstraints

func (m *Mock) CreateInstanceHierarchyConstraints(ctx context.Context, attempt int, instanceID, dimensionName string) error

func (*Mock) GetCode

func (m *Mock) GetCode(ctx context.Context, codeListID, edition string, code string) (*models.Code, error)

func (*Mock) GetCodeDatasets

func (m *Mock) GetCodeDatasets(ctx context.Context, codeListID, edition string, code string) (*models.Datasets, error)

func (*Mock) GetCodeList

func (m *Mock) GetCodeList(ctx context.Context, codeListID string) (*models.CodeList, error)

func (*Mock) GetCodeLists

func (m *Mock) GetCodeLists(ctx context.Context, filterBy string) (*models.CodeListResults, error)

func (*Mock) GetCodes

func (m *Mock) GetCodes(ctx context.Context, codeListID, edition string) (*models.CodeResults, error)

func (*Mock) GetEdition

func (m *Mock) GetEdition(ctx context.Context, codeListID, edition string) (*models.Edition, error)

func (*Mock) GetEditions

func (m *Mock) GetEditions(ctx context.Context, codeListID string) (*models.Editions, error)

func (*Mock) GetHierarchyCodelist

func (m *Mock) GetHierarchyCodelist(ctx context.Context, instanceID, dimension string) (string, error)

func (*Mock) GetHierarchyElement

func (m *Mock) GetHierarchyElement(ctx context.Context, instanceID, dimension, code string) (*models.Response, error)

func (*Mock) GetHierarchyRoot

func (m *Mock) GetHierarchyRoot(ctx context.Context, instanceID, dimension string) (*models.Response, error)

func (*Mock) Healthcheck

func (m *Mock) Healthcheck() (string, error)

func (*Mock) InsertDimension

func (m *Mock) InsertDimension(ctx context.Context, cache map[string]string, i *model.Instance, d *model.Dimension) (*model.Dimension, error)

func (*Mock) InsertObservationBatch

func (m *Mock) InsertObservationBatch(ctx context.Context, attempt int, instanceID string, observations []*models.Observation, dimensionIDs map[string]string) error

func (*Mock) InstanceExists

func (m *Mock) InstanceExists(ctx context.Context, i *model.Instance) (bool, error)

func (*Mock) MarkNodesToRemain

func (m *Mock) MarkNodesToRemain(ctx context.Context, attempt int, instanceID, dimensionName string) error

func (*Mock) RemoveNodesNotMarkedToRemain

func (m *Mock) RemoveNodesNotMarkedToRemain(ctx context.Context, attempt int, instanceID, dimensionName string) error

func (*Mock) RemoveRemainMarker

func (m *Mock) RemoveRemainMarker(ctx context.Context, attempt int, instanceID, dimensionName string) error

func (*Mock) SetHasData

func (m *Mock) SetHasData(ctx context.Context, attempt int, instanceID, dimensionName string) error

func (*Mock) SetInstanceIsPublished

func (m *Mock) SetInstanceIsPublished(ctx context.Context, instanceID string) error

func (*Mock) SetNumberOfChildren

func (m *Mock) SetNumberOfChildren(ctx context.Context, attempt int, instanceID, dimensionName string) error

func (*Mock) StreamCSVRows

func (m *Mock) StreamCSVRows(ctx context.Context, filter *observation.Filter, limit *int) (observation.StreamRowReader, error)

Jump to

Keyboard shortcuts

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