Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheEntries ¶
type CacheEntries []*CacheEntry
func (CacheEntries) MarshalEasyJSON ¶
func (v CacheEntries) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CacheEntries) MarshalJSON ¶
func (v CacheEntries) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CacheEntries) UnmarshalEasyJSON ¶
func (v *CacheEntries) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CacheEntries) UnmarshalJSON ¶
func (v *CacheEntries) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type CacheEntry ¶
type CacheEntry struct { IP string `json:"query"` Lang string `json:"lang"` Fields field.Fields `json:"fields"` Expires time.Time `json:"-"` Response Response `json:"-"` }
func (CacheEntry) MarshalEasyJSON ¶
func (v CacheEntry) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CacheEntry) MarshalJSON ¶
func (v CacheEntry) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CacheEntry) Size ¶
func (c *CacheEntry) Size() int
Size returns the size of the CacheEntry in bytes.
func (*CacheEntry) UnmarshalEasyJSON ¶
func (v *CacheEntry) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CacheEntry) UnmarshalJSON ¶
func (v *CacheEntry) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Response ¶
type Response struct { Status *string `json:"status,omitempty"` // "success" Continent *string `json:"continent,omitempty"` // "North America" ContinentCode *string `json:"continentCode,omitempty"` // "NA" Country *string `json:"country,omitempty"` // "Canada" CountryCode *string `json:"countryCode,omitempty"` // "CA" Region *string `json:"region,omitempty"` // "QC" RegionName *string `json:"regionName,omitempty"` // "Quebec" City *string `json:"city,omitempty"` // "Montreal" District *string `json:"district,omitempty"` // """" Zip *string `json:"zip,omitempty"` // "H1S" Lat *float64 `json:"lat,omitempty"` // 45.5808 Lon *float64 `json:"lon,omitempty"` // -73.5825 Timezone *string `json:"timezone,omitempty"` // "America/Toronto" Offset *int `json:"offset,omitempty"` // -14400 Currency *string `json:"currency,omitempty"` // "CAD" ISP *string `json:"isp,omitempty"` // "Le Groupe Videotron Ltee" Org *string `json:"org,omitempty"` // "Videotron Ltee" AS *string `json:"as,omitempty"` // "AS5769 Videotron Telecom Ltee" ASName *string `json:"asname,omitempty"` // "VIDEOTRON" Reverse *string `json:"reverse,omitempty"` // "modemcable001.0-48-24.mc.videotron.ca" Mobile *bool `json:"mobile,omitempty"` // false Proxy *bool `json:"proxy,omitempty"` // false Hosting *bool `json:"hosting,omitempty"` // false Message *string `json:"message,omitempty"` // "invalid query" Query *string `json:"query,omitempty"` // "24.48.0.1" }
func ErrorResponse ¶
func (Response) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Response) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Response) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Response) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Responses ¶
type Responses []Response
func (Responses) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Responses) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Responses) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Responses) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface