api

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: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close added in v1.0.0

func Close(ctx context.Context) error

Close represents the graceful shutting down of the http server

func CreateSearchAPI added in v1.8.0

func CreateSearchAPI(ctx context.Context,
	host, bindAddr, authAPIURL string, errorChan chan error, searchOutputQueue OutputQueue,
	datasetAPIClient DatasetAPIClient, serviceAuthToken string, elasticsearch Elasticsearcher,
	defaultMaxResults int, hasPrivateEndpoints bool, auditor audit.AuditorService,
	healthCheck *healthcheck.HealthCheck)

CreateSearchAPI manages all the routes configured to API

Types

type DatasetAPIClient added in v1.8.0

type DatasetAPIClient interface {
	GetVersion(ctx context.Context, userAuthToken, serviceAuthToken, downloadServiceAuthToken, collectionID, datasetID, edition, version string) (m dataset.Version, err error)
}

type DownloadsGenerator added in v1.8.0

type DownloadsGenerator interface {
	Generate(datasetID, instanceID, edition, version string) error
}

DownloadsGenerator pre generates full file downloads for the specified dataset/edition/version

type Elasticsearcher added in v1.8.0

type Elasticsearcher interface {
	DeleteSearchIndex(ctx context.Context, instanceID, dimension string) (int, error)
	QuerySearchIndex(ctx context.Context, instanceID, dimension, term string, limit, offset int) (*models.SearchResponse, int, error)
}

Elasticsearcher - An interface used to access elasticsearch

type HealthCheck added in v1.8.0

type HealthCheck interface {
	Start(ctx context.Context)
	Stop()
}

type OutputQueue added in v1.8.0

type OutputQueue interface {
	Queue(output *searchoutputqueue.Search) error
}

OutputQueue - An interface used to queue search outputs

type SearchAPI

type SearchAPI struct {
	// contains filtered or unexported fields
}

SearchAPI manages searches across indices

Jump to

Keyboard shortcuts

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