Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAndInitialiseSearchAPI ¶
func CreateAndInitialiseSearchAPI(ctx context.Context, bindAddr string, esAPI Elasticsearcher, defaultMaxResults int, datasetIndex, postcodeIndex, boundaryFileIndex string, errorChan chan error)
CreateAndInitialiseSearchAPI manages all the routes configured to API
Types ¶
type Elasticsearcher ¶
type Elasticsearcher interface { AddBoundaryFile(ctx context.Context, indexName string, boundaryDoc *models.BoundaryDoc) (int, error) GetBoundaryFile(ctx context.Context, indexName, id string) (*models.BoundaryFileResponse, int, error) GetBoundaryFiles(ctx context.Context, indexName string, query interface{}) (*models.GeoResponseWithLocation, int, error) GetPostcodes(ctx context.Context, indexName, postcode string) (*models.PostcodeResponse, int, error) QueryGeoLocation(ctx context.Context, indexName string, geoLocation *models.GeoLocation, limit, offset int, relation string) (*models.GeoResponse, int, error) }
Elasticsearcher - An interface used to access elasticsearch
Click to show internal directories.
Click to hide internal directories.