Documentation
¶
Index ¶
- func BrotliHandle(w http.ResponseWriter, r *http.Request)
- func DeflateHandle(w http.ResponseWriter, r *http.Request)
- func GzipHandle(w http.ResponseWriter, r *http.Request)
- func HeadersHandle(w http.ResponseWriter, r *http.Request)
- func IpHandle(w http.ResponseWriter, r *http.Request)
- func JsonError(w http.ResponseWriter, err string, code int)
- func MethodsHandle(w http.ResponseWriter, r *http.Request)
- func NewRouter() *chi.Mux
- func RobotsHandle(w http.ResponseWriter, r *http.Request)
- func UserAgentHandle(w http.ResponseWriter, r *http.Request)
- type HeadersResponse
- type IpResponse
- type MethodsResponse
- type StatusResponse
- type UserAgentResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BrotliHandle ¶ added in v0.2.0
func BrotliHandle(w http.ResponseWriter, r *http.Request)
func DeflateHandle ¶ added in v0.2.0
func DeflateHandle(w http.ResponseWriter, r *http.Request)
func GzipHandle ¶ added in v0.2.0
func GzipHandle(w http.ResponseWriter, r *http.Request)
func HeadersHandle ¶ added in v0.1.1
func HeadersHandle(w http.ResponseWriter, r *http.Request)
func MethodsHandle ¶ added in v0.1.1
func MethodsHandle(w http.ResponseWriter, r *http.Request)
func RobotsHandle ¶ added in v0.2.0
func RobotsHandle(w http.ResponseWriter, r *http.Request)
func UserAgentHandle ¶ added in v0.1.1
func UserAgentHandle(w http.ResponseWriter, r *http.Request)
Types ¶
type HeadersResponse ¶ added in v0.1.1
type IpResponse ¶ added in v0.1.1
type IpResponse struct {
Origin string `json:"origin"`
}
type MethodsResponse ¶
type MethodsResponse struct {
Args map[string][]string `json:"args"`
Data string `json:"data"`
Files map[string][]string `json:"files"`
Form map[string][]string `json:"form"`
Headers map[string][]string `json:"headers"`
JSON interface{} `json:"json"`
Origin string `json:"origin"`
URL string `json:"url"`
Gzipped bool `json:"gzipped,omitempty"`
Brotli bool `json:"brotli,omitempty"`
Deflated bool `json:"deflated,omitempty"`
}
type StatusResponse ¶ added in v0.1.1
type StatusResponse struct {
StatusText string `json:"status_text"`
}
type UserAgentResponse ¶ added in v0.1.1
type UserAgentResponse struct {
UserAgent string `json:"user-agent"`
}
Click to show internal directories.
Click to hide internal directories.