mocks

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 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 BuildSearch

type BuildSearch struct {
	ReturnError bool
}

BuildSearch contains a flag indicating whether the message failed to go on queue

func (*BuildSearch) Queue

func (bs *BuildSearch) Queue(search *searchoutputqueue.Search) error

Queue checks whether the filter job has errored

type DatasetAPI

type DatasetAPI struct {
	InternalServerError bool
	VersionNotFound     bool
	RequireAuth         bool
	RequireNoAuth       bool
	Calls               int
	IsAuthenticated     bool
}

DatasetAPI represents a list of error flags to set error in mocked dataset API

func (*DatasetAPI) GetVersion

func (api *DatasetAPI) GetVersion(ctx context.Context, userAuthToken, serviceAuthToken, downloadServiceAuthToken, collectionID, datasetID, edition, version string) (ver dataset.Version, err error)

GetVersion represents the mocked version that queries the dataset API to get a version resource

func (*DatasetAPI) Healthcheck

func (api *DatasetAPI) Healthcheck() (string, error)

Healthcheck represents the mocked version of the healthcheck

type Elasticsearch

type Elasticsearch struct {
	InternalServerError bool
	IndexNotFound       bool
}

Elasticsearch represents a list of error flags to set error in mocked elasticsearch

func (*Elasticsearch) DeleteSearchIndex

func (api *Elasticsearch) DeleteSearchIndex(ctx context.Context, instanceID, dimension string) (int, error)

DeleteSearchIndex represents the mocked version that removes an index from elasticsearch

func (*Elasticsearch) QuerySearchIndex

func (api *Elasticsearch) QuerySearchIndex(ctx context.Context, instanceID, dimension, term string, limit, offset int) (*models.SearchResponse, int, error)

QuerySearchIndex represents the mocked version of building a query and then calling elasticsearch index

type MessageData

type MessageData struct {
	Dimension  string
	InstanceID string
}

MessageData contains the unique identifiers for search message

Jump to

Keyboard shortcuts

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