Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Airport ¶
type Airport struct {
AirportFields AirportFields `json:"fields,omitempty"`
}
Airport holds airport related record - only "fields" is required from it right now
type AirportFields ¶
AirportFields holds airport fields (name + geo location)
type AirportResponse ¶
type AirportResponse struct {
Airports []Airport `json:"rows,omitempty"`
}
AirportResponse response from airport db
type FieldQuery ¶
type FieldQuery struct {
FieldName string
RangeValue *RangeValue
SimpleValue *SimpleValue
}
FieldQuery holds field expressions with name and values
func (*FieldQuery) And ¶
func (f *FieldQuery) And(field *FieldQuery) string
And provide 'and' logical expression for field query
func (*FieldQuery) Negate ¶
func (f *FieldQuery) Negate() string
Negate provide 'negate' logical expression for field query
func (*FieldQuery) Or ¶
func (f *FieldQuery) Or(field *FieldQuery) string
Or provide 'or' logical expression for field query
func (*FieldQuery) ToQueryString ¶
func (f *FieldQuery) ToQueryString() string
ToQueryString generate a string from a field query object
type Location ¶
type Location struct {
Latitude float64 `json:"lat,omitempty"`
Longitude float64 `json:"lon,omitempty"`
}
Location holds position (geo location) data
type Query ¶
Query holds query object that holds uri query params
func CreateQuery ¶
CreateQuery create query from fields expression
func (*Query) AddDistanceSort ¶
AddDistanceSort extend query with distance sorting
type RangeValue ¶
RangeValue holds 'from' and 'to' range values for field queries
type SimpleValue ¶
type SimpleValue struct {
Value string
}
SimpleValue holds simple values for field queries (equals)