Documentation
¶
Index ¶
- Variables
- type AppError
- type Cache
- type CacheStats
- type PortResponse
- type Response
- type Route
- type Router
- type Server
- func (s *Server) CLIASNHandler(w http.ResponseWriter, r *http.Request) *AppError
- func (s *Server) CLIASNOrgHandler(w http.ResponseWriter, r *http.Request) *AppError
- func (s *Server) CLICityHandler(w http.ResponseWriter, r *http.Request) *AppError
- func (s *Server) CLICoordinatesHandler(w http.ResponseWriter, r *http.Request) *AppError
- func (s *Server) CLICountryHandler(w http.ResponseWriter, r *http.Request) *AppError
- func (s *Server) CLICountryISOHandler(w http.ResponseWriter, r *http.Request) *AppError
- func (s *Server) CLIHandler(w http.ResponseWriter, r *http.Request) *AppError
- func (s *Server) DefaultHandler(w http.ResponseWriter, r *http.Request) *AppError
- func (s *Server) Handler() http.Handler
- func (s *Server) HealthHandler(w http.ResponseWriter, r *http.Request) *AppError
- func (s *Server) JSONHandler(w http.ResponseWriter, r *http.Request) *AppError
- func (s *Server) ListenAndServe(addr string) error
- func (s *Server) PortHandler(w http.ResponseWriter, r *http.Request) *AppError
Constants ¶
This section is empty.
Variables ¶
View Source
var Assets embed.FS
Functions ¶
This section is empty.
Types ¶
type AppError ¶
func NotFoundHandler ¶
func NotFoundHandler(_ http.ResponseWriter, r *http.Request) *AppError
func (*AppError) WithMessage ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) Stats ¶
func (c *Cache) Stats() CacheStats
type CacheStats ¶
type PortResponse ¶
type Response ¶
type Response struct { IP net.IP `json:"ip"` Country string `json:"country,omitempty"` CountryISO string `json:"country_iso,omitempty"` CountryEU *bool `json:"country_eu,omitempty"` RegionName string `json:"region_name,omitempty"` RegionCode string `json:"region_code,omitempty"` MetroCode uint `json:"metro_code,omitempty"` PostalCode string `json:"zip_code,omitempty"` City string `json:"city,omitempty"` Latitude float64 `json:"latitude,omitempty"` Longitude float64 `json:"longitude,omitempty"` Timezone string `json:"time_zone,omitempty"` ASN string `json:"asn,omitempty"` ASNOrg string `json:"asn_org,omitempty"` ReverseDNS string `json:"hostname,omitempty"` ForwardReverseDNS string `json:"forward_reverse_dns,omitempty"` UserAgent *useragent.UserAgent `json:"user_agent,omitempty"` Protocol string `json:"protocol,omitempty"` FRDNSMatch bool `json:"frdns_match,omitempty"` }
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) RoutePrefix ¶
type Server ¶
type Server struct { IPHeaders []string LookupAddr func(net.IP) (string, error) LookupPort func(net.IP, uint64) error Sponsor bool // contains filtered or unexported fields }
func (*Server) CLIASNHandler ¶
func (*Server) CLIASNOrgHandler ¶
func (*Server) CLICityHandler ¶
func (*Server) CLICoordinatesHandler ¶
func (*Server) CLICountryHandler ¶
func (*Server) CLICountryISOHandler ¶
func (*Server) CLIHandler ¶
func (*Server) DefaultHandler ¶
func (*Server) HealthHandler ¶
func (*Server) JSONHandler ¶
func (*Server) ListenAndServe ¶
func (*Server) PortHandler ¶
Click to show internal directories.
Click to hide internal directories.