storage

package
v0.0.0-...-663df1f Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DivisionStorage

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

DivisionStorage embed the ES client and is the gateway for stored division

func New

func New(client *elastic.Client) *DivisionStorage

New is the DivisionStorage factory

func (*DivisionStorage) FindOneByID

func (storage *DivisionStorage) FindOneByID(id string, showGeometry bool) (*geojson.Feature, error)

FindOneByID gets a division by its ID

func (*DivisionStorage) GetGeoShapeQuery

func (storage *DivisionStorage) GetGeoShapeQuery(lat float64, lon float64, radius uint64) elastic.Query

GetGeoShapeQuery returns a geo_shape Query

func (*DivisionStorage) GetSearchResults

func (storage *DivisionStorage) GetSearchResults(query elastic.Query, sorter elastic.Sorter, from int, size int, showGeometry bool) ([]*geojson.Feature, int64, error)

GetSearchResults returns a FeatureCollection from a BoolQuery

Jump to

Keyboard shortcuts

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