Documentation ¶
Index ¶
- Constants
- type API
- func (a *API) CLIHandler(w http.ResponseWriter, r *http.Request) *appError
- func (a *API) DefaultHandler(w http.ResponseWriter, r *http.Request) *appError
- func (a *API) Handlers() http.Handler
- func (a *API) JSONAllHandler(w http.ResponseWriter, r *http.Request) *appError
- func (a *API) JSONHandler(w http.ResponseWriter, r *http.Request) *appError
- func (a *API) ListenAndServe(addr string) error
- type Cmd
Constants ¶
View Source
const ( IP_HEADER = "x-ifconfig-ip" COUNTRY_HEADER = "x-ifconfig-country" HOSTNAME_HEADER = "x-ifconfig-hostname" TEXT_PLAIN = "text/plain; charset=utf-8" APPLICATION_JSON = "application/json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
func NewWithGeoIP ¶
func (*API) CLIHandler ¶
func (a *API) CLIHandler(w http.ResponseWriter, r *http.Request) *appError
func (*API) DefaultHandler ¶
func (a *API) DefaultHandler(w http.ResponseWriter, r *http.Request) *appError
func (*API) JSONAllHandler ¶
func (a *API) JSONAllHandler(w http.ResponseWriter, r *http.Request) *appError
func (*API) JSONHandler ¶
func (a *API) JSONHandler(w http.ResponseWriter, r *http.Request) *appError
func (*API) ListenAndServe ¶
Click to show internal directories.
Click to hide internal directories.