Documentation ¶
Index ¶
- func ErrHttpBody(url string) error
- func ErrHttpResponse(url string, code int, resp []byte) error
- func ErrInvalidUrl(url string) error
- type Client
- type ComparisonFilter
- type ComparisonOperator
- type Filter
- type Geo
- type GeoCircle
- type GeoOperator
- type GeoRect
- type Hours
- type LogicalFilter
- type LogicalOperator
- type Option
- type Place
- type PlaceResponse
- type PlaceWrap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrHttpBody ¶
func ErrInvalidUrl ¶
Types ¶
type Client ¶
type ComparisonFilter ¶
type ComparisonFilter struct { Field string Op ComparisonOperator Vals interface{} }
func NewComparisonFilter ¶
func NewComparisonFilter(field string, op ComparisonOperator, vals interface{}) *ComparisonFilter
func (*ComparisonFilter) MarshalJSON ¶
func (f *ComparisonFilter) MarshalJSON() ([]byte, error)
type ComparisonOperator ¶
type ComparisonOperator string
const ( Blank ComparisonOperator = "$blank" Bw ComparisonOperator = "$bw" Bwin ComparisonOperator = "$bwin" Eq ComparisonOperator = "$eq" Excludes ComparisonOperator = "$excludes" ExcludesAny ComparisonOperator = "$excludes_any" Gt ComparisonOperator = "$gt" Gte ComparisonOperator = "$gte" Includes ComparisonOperator = "$includes" IncludesAny ComparisonOperator = "$includes_any" Lt ComparisonOperator = "$lt" Lte ComparisonOperator = "$lte" Nbw ComparisonOperator = "$nbw" Nbwin ComparisonOperator = "$bnwin" Neq ComparisonOperator = "$neq" Nin ComparisonOperator = "$nin" Search ComparisonOperator = "$search" )
type GeoCircle ¶
type GeoCircle struct {
// contains filtered or unexported fields
}
func (*GeoCircle) MarshalJSON ¶
type GeoOperator ¶
type GeoOperator string
const ( Circle GeoOperator = "$circle" Rect GeoOperator = "$rect" Center GeoOperator = "$center" Within GeoOperator = "$within" Meters GeoOperator = "$meters" )
type Hours ¶
type Hours struct { Monday [][]string `json:"monday"` Tuesday [][]string `json:"tuesday"` Wednesday [][]string `json:"wednesday"` Thursday [][]string `json:"thursday"` Friday [][]string `json:"friday"` Saturday [][]string `json:"saturday"` Sunday [][]string `json:"sunday"` }
Hours describes the open hours for a place
type LogicalFilter ¶
type LogicalFilter struct { Op LogicalOperator Vals []Filter }
func NewLogicalFilter ¶
func NewLogicalFilter(op LogicalOperator, vals []Filter) *LogicalFilter
func (*LogicalFilter) MarshalJSON ¶
func (f *LogicalFilter) MarshalJSON() ([]byte, error)
type LogicalOperator ¶
type LogicalOperator string
const ( And LogicalOperator = "$and" Or LogicalOperator = "$or" )
type Place ¶
type Place struct { FactualID string `json:"factual_id"` CategoryIDs []int `json:"category_ids"` CategoryLabels [][]string `json:"category_labels"` ChainID string `json:"chain_id,omitempty"` ChainName string `json:"chain_name,omitempty"` Address string `json:"address"` Country string `json:"country"` Postcode string `json:"postcode"` Fax string `json:"fac"` Region string `json:"region"` Tel string `json:"tel"` Hours Hours `json:"hours"` HoursDisplay string `json:"hours_display"` Latitude float64 `json:"latitude"` Longitude float64 `json:"latitude"` Locality string `json:"locality"` Name string `json:"name"` Neighborhood []string `json:"neighborhood"` Website string `json:"website"` }
Place contains the properties of a Place
type PlaceResponse ¶
PlaceResponse is schema returned by the Factual API
type PlaceWrap ¶
type PlaceWrap struct { Version int `json:"version"` Status string `json:"status"` Response PlaceResponse `json:"response"` }
PlaceWrap allows unmarshalling of API response metadata
Click to show internal directories.
Click to hide internal directories.