api

package
v0.0.0-...-f24859d Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(ctx context.Context) error

Close represents the graceful shutting down of the http server

func CreateAndInitialiseSearchAPI

func CreateAndInitialiseSearchAPI(ctx context.Context, bindAddr string, esAPI Elasticsearcher, defaultMaxResults int, datasetIndex string, dimensions models.DimensionsDoc, taxonomy models.Taxonomy, errorChan chan error)

CreateAndInitialiseSearchAPI manages all the routes configured to API

Types

type Elasticsearcher

type Elasticsearcher interface {
	QueryDatasetSearch(ctx context.Context, indexName string, query interface{}, limit, offset int) (*models.SearchResponse, int, error)
}

Elasticsearcher - An interface used to access elasticsearch

type SearchAPI

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

SearchAPI manages searches across indices

type Topic

type Topic struct {
	ParentTopic string   `json:"parent_topic,omitempty"`
	Title       string   `json:"title"`
	Topic       string   `json:"topic"`
	ChildTopics []string `json:"child_topics,omitempty"`
}

Topic ...

Jump to

Keyboard shortcuts

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