Documentation ¶
Index ¶
- Constants
- func GetClientIPByHeaderForwardedFor(headerForwardedFor string) string
- func GetClientIPByHeaderRealIP(headerRealIP string) string
- type HTML
- type ICookie
- type IRedirect
- type MethodDelete
- type MethodGet
- type MethodHead
- type MethodPatch
- type MethodPost
- type MethodPut
- type StatusFound
- type StatusMovedPermanently
- type StatusPermanentRedirect
- type StatusSeeOther
- type StatusTemporaryRedirect
- type WithCookie
Constants ¶
View Source
const ( HeaderUserAgent = "User-Agent" HeaderContentType = "Content-Type" HeaderRequestID = "X-Request-ID" HeaderForwardedFor = "X-Forwarded-For" HeaderRealIP = "X-Real-IP" HeaderAuthorization = "Authorization" )
View Source
const ( MIMEJSON = "application/json" MIMEHTML = "text/html" MIMEXML = "application/xml" MIMEXML2 = "text/xml" MIMEPlain = "text/plain" MIMEPOSTForm = "application/x-www-form-urlencoded" MIMEMultipartPOSTForm = "multipart/form-data" MIMEPROTOBUF = "application/x-protobuf" MIMEMSGPACK = "application/x-msgpack" MIMEMSGPACK2 = "application/msgpack" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MethodDelete ¶
type MethodDelete string
func (MethodDelete) Method ¶
func (m MethodDelete) Method() string
type MethodHead ¶
type MethodHead string
func (MethodHead) Method ¶
func (m MethodHead) Method() string
type MethodPatch ¶
type MethodPatch string
func (MethodPatch) Method ¶
func (m MethodPatch) Method() string
type MethodPost ¶
type MethodPost string
func (MethodPost) Method ¶
func (m MethodPost) Method() string
type StatusFound ¶
type StatusFound struct {
// contains filtered or unexported fields
}
func RedirectWithStatusFound ¶
func RedirectWithStatusFound(uri string) *StatusFound
func (*StatusFound) Status ¶
func (s *StatusFound) Status() int
type StatusMovedPermanently ¶
type StatusMovedPermanently struct {
// contains filtered or unexported fields
}
func RedirectWithStatusMovedPermanently ¶
func RedirectWithStatusMovedPermanently(uri string) *StatusMovedPermanently
func (*StatusMovedPermanently) Status ¶
func (s *StatusMovedPermanently) Status() int
type StatusPermanentRedirect ¶
type StatusPermanentRedirect struct {
// contains filtered or unexported fields
}
func RedirectWithStatusPermanentRedirect ¶
func RedirectWithStatusPermanentRedirect(uri string) *StatusPermanentRedirect
func (*StatusPermanentRedirect) Status ¶
func (s *StatusPermanentRedirect) Status() int
type StatusSeeOther ¶
type StatusSeeOther struct {
// contains filtered or unexported fields
}
func RedirectWithStatusSeeOther ¶
func RedirectWithStatusSeeOther(uri string) *StatusSeeOther
func (*StatusSeeOther) Status ¶
func (s *StatusSeeOther) Status() int
type StatusTemporaryRedirect ¶
type StatusTemporaryRedirect struct {
// contains filtered or unexported fields
}
func RedirectWithStatusTemporaryRedirect ¶
func RedirectWithStatusTemporaryRedirect(uri string) *StatusTemporaryRedirect
func (*StatusTemporaryRedirect) Status ¶
func (s *StatusTemporaryRedirect) Status() int
type WithCookie ¶
type WithCookie struct {
// contains filtered or unexported fields
}
func (*WithCookie) Cookies ¶
func (c *WithCookie) Cookies() *http.Cookie
func (*WithCookie) SetCookie ¶
func (c *WithCookie) SetCookie(cookie *http.Cookie)
Click to show internal directories.
Click to hide internal directories.