Documentation
¶
Index ¶
- Constants
- func GetClientIPByHeaderForwardedFor(headerForwardedFor string) string
- func GetClientIPByHeaderRealIP(headerRealIP string) string
- func RedirectWithStatusFound(uri string) *statusFound
- func RedirectWithStatusMovedPermanently(uri string) *statusMovedPermanently
- func RedirectWithStatusPermanentRedirect(uri string) *statusPermanentRedirect
- func RedirectWithStatusSeeOther(uri string) *statusSeeOther
- func RedirectWithStatusTemporaryRedirect(uri string) *statusTemporaryRedirect
- type HTML
- type ICookie
- type IRedirect
- type MethodDelete
- type MethodGet
- type MethodHead
- type MethodPatch
- type MethodPost
- type MethodPut
- type WithCookie
Constants ¶
View Source
const ( HeaderUserAgent = "User-Agent" HeaderContentType = "Content-Type" HeaderRequestID = "X-Request-ID" HeaderForwardedFor = "X-Forwarded-For" HeaderRealIP = "X-Real-IP" )
View Source
const ( MIME_JSON = "application/json" MIME_HTML = "text/html" MIME_XML = "application/xml" MIME_PLAIN = "text/plain" MIME_POST_URLENCODED = "application/x-www-form-urlencoded" MIME_MULTIPART_FORM_DATA = "multipart/form-data" MIME_PROTOBUF = "application/x-protobuf" MIME_MSGPACK = "application/x-msgpack" )
Variables ¶
This section is empty.
Functions ¶
func RedirectWithStatusFound ¶
func RedirectWithStatusFound(uri string) *statusFound
func RedirectWithStatusMovedPermanently ¶
func RedirectWithStatusMovedPermanently(uri string) *statusMovedPermanently
func RedirectWithStatusPermanentRedirect ¶
func RedirectWithStatusPermanentRedirect(uri string) *statusPermanentRedirect
func RedirectWithStatusSeeOther ¶
func RedirectWithStatusSeeOther(uri string) *statusSeeOther
func RedirectWithStatusTemporaryRedirect ¶
func RedirectWithStatusTemporaryRedirect(uri string) *statusTemporaryRedirect
Types ¶
type MethodDelete ¶
type MethodDelete struct{}
func (MethodDelete) Method ¶
func (MethodDelete) Method() string
type MethodHead ¶
type MethodHead struct{}
func (MethodHead) Method ¶
func (MethodHead) Method() string
type MethodPatch ¶
type MethodPatch struct{}
func (MethodPatch) Method ¶
func (MethodPatch) Method() string
type MethodPost ¶
type MethodPost struct{}
func (MethodPost) Method ¶
func (MethodPost) Method() string
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.