Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
Aggregator is the registry of ElasticFilters
func NewAggregator ¶
func NewAggregator(values url.Values, filters ...ElasticFilter) Aggregator
NewAggregator is the factory method of Aggregator
type CityFilter ¶
type CityFilter struct {
City bool `form:"city"`
}
CityFilter holds the filter behavior and the query form data
func NewCityFilter ¶
func NewCityFilter() *CityFilter
NewCityFilter is the factory method for CityFilter
type ElasticFilter ¶
type ElasticFilter interface { // Filter add new conditions to the BoolQuery from url Filter(values url.Values, query *elastic.BoolQuery) error }
ElasticFilter defines the Filter method which builds the ElasticSearch BoolQuery depending on url values
type FeatureCoordinatesFilter ¶
type FeatureCoordinatesFilter struct { Longitude float64 `form:"longitude"` Latitude float64 `form:"latitude"` Radius uint64 `form:"radius"` }
FeatureCoordinatesFilter holds the filter behavior and the query form data
func NewFeatureCoordinatesFilter ¶
func NewFeatureCoordinatesFilter() *FeatureCoordinatesFilter
NewFeatureCoordinatesFilter is the factory method for FeatureCoordinatesFilter
type SearchFilter ¶
type SearchFilter struct {
Search string `form:"q"`
}
SearchFilter holds the filter behavior and the query form data
func NewSearchFilter ¶
func NewSearchFilter() *SearchFilter
NewSearchFilter is the factory method for SearchFilter
Click to show internal directories.
Click to hide internal directories.