Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertPathToRegex(path string) string
- func CopyDir(src string, dst string) error
- func CopyFile(src, dst string) error
- func DetectContentType(extension string, data []byte) (ContentType, Charset)
- func Exists(file string) bool
- func GetEnv() string
- func GetFreePort() (int, error)
- func GetFunctionName(i interface{}) string
- func GetMimeType(fileName string) (mimeType string)
- func NewSimpleConfig(file string, obj interface{}) error
- func RandomBoundary() string
- func ReadFile(file string, obj interface{}) ([]byte, error)
- func ReadFileLines(file string) ([]string, error)
- func StatusText(code Status) string
- func WriteFile(file string, obj interface{}) error
- type Address
- type AppClientConfig
- type AppServerConfig
- type Attachment
- type Base
- func (r *Base) BindHeaders(obj interface{}) error
- func (r *Base) BindParams(obj interface{}) error
- func (r *Base) BindUrlParams(obj interface{}) error
- func (r *Base) GetCharset() Charset
- func (r *Base) GetContentType() *ContentType
- func (r *Base) GetCookie(name string) *Cookie
- func (r *Base) GetHeader(name string) string
- func (r *Base) GetParam(name string) string
- func (r *Base) GetParams(name string) []string
- func (r *Base) GetUrlParam(name string) string
- func (r *Base) GetUrlParams(name string) []string
- func (r *Base) SetCharset(charset Charset)
- func (r *Base) SetContentType(contentType ContentType)
- func (r *Base) SetCookie(name string, cookie Cookie)
- func (r *Base) SetHeader(name string, header []string)
- func (r *Base) SetParam(name string, param []string)
- func (r *Base) SetUrlParam(name string, urlParam []string)
- type Charset
- type Client
- func (c *Client) Config() *ClientConfig
- func (c *Client) NewRequest(method Method, url string, contentType ContentType, headers Headers) (*Request, error)
- func (c *Client) NewResponse(method Method, address *Address, conn net.Conn) (*Response, error)
- func (c *Client) Reconfigure(options ...ClientOption)
- func (c *Client) Send(request *Request) (*Response, error)
- type ClientConfig
- type ClientOption
- type Content
- type ContentDisposition
- type ContentType
- type Context
- type Cookie
- type Cookies
- type Data
- type Encoding
- type Error
- type ErrorHandler
- type Filter
- type Filters
- type FormData
- type HandlerFunc
- type Headers
- type Log
- type Method
- type MiddlewareFunc
- type MimeVersion
- type MultiAttachmentMode
- type Namespace
- type Params
- type Position
- type Protocol
- type Request
- func (r *Request) Attachment(name string, body []byte) error
- func (r *Request) Bind(obj interface{}) error
- func (r *Request) BindFormData(obj interface{}) error
- func (r *Request) Bytes(contentType ContentType, b []byte) error
- func (r *Request) File(name string, body []byte) error
- func (r *Request) GetFormDataBytes(name string) []byte
- func (r *Request) GetFormDataString(name string) string
- func (r *Request) HTML(body string) error
- func (r *Request) Inline(name string, body []byte) error
- func (r *Request) JSON(i interface{}) error
- func (r *Request) JSONPretty(i interface{}, indent string) error
- func (r *Request) Send() (*Response, error)
- func (r *Request) Set(contentType ContentType, b []byte) error
- func (r *Request) SetFormData(name string, value string)
- func (r *Request) Stream(contentType ContentType, reader io.Reader) error
- func (r *Request) String(s string) error
- func (r *Request) WithAuthBasic(username, password string) (*Request, error)
- func (r *Request) WithAuthJwt(claims jwt.Claims, key interface{}) (*Request, error)
- func (r *Request) WithBody(body []byte) *Request
- func (r *Request) WithContentType(contentType ContentType) *Request
- func (r *Request) XML(i interface{}) error
- func (r *Request) XMLPretty(i interface{}, indent string) error
- type RequestHandler
- type Response
- func (r *Response) Attachment(name string, body []byte) error
- func (r *Response) Bind(i interface{}) error
- func (r *Response) BindFormData(obj interface{}) error
- func (r *Response) Bytes(status Status, contentType ContentType, b []byte) error
- func (r *Response) File(status Status, name string, body []byte) error
- func (r *Response) GetFormDataBytes(name string) []byte
- func (r *Response) GetFormDataString(name string) string
- func (r *Response) HTML(status Status, body string) error
- func (r *Response) Inline(name string, body []byte) error
- func (r *Response) JSON(status Status, i interface{}) error
- func (r *Response) JSONPretty(status Status, i interface{}, indent string) error
- func (r *Response) NoContent(status Status) error
- func (r *Response) Set(status Status, contentType ContentType, b []byte) error
- func (r *Response) SetFormData(name string, value string)
- func (r *Response) Stream(status Status, contentType ContentType, reader io.Reader) error
- func (r *Response) String(status Status, s string) error
- func (r *Response) XML(status Status, i interface{}) error
- func (r *Response) XMLPretty(status Status, i interface{}, indent string) error
- type Route
- type Routes
- type Schema
- type Server
- func (s *Server) AddFilter(pattern string, position Position, middleware MiddlewareFunc, method Method, ...)
- func (s *Server) AddMiddlewares(middlewares ...MiddlewareFunc)
- func (s *Server) AddNamespace(path string, middlewares ...MiddlewareFunc) *Namespace
- func (s *Server) AddRoute(method Method, path string, handler HandlerFunc, middleware ...MiddlewareFunc) error
- func (s *Server) AddRoutes(route ...*Route) error
- func (s *Server) Config() *ServerConfig
- func (s *Server) DefaultErrorHandler(ctx *Context, err error) error
- func (s *Server) GetMatchedFilters(filters map[Method][]*Filter, method Method, url string) ([]*Filter, error)
- func (s *Server) GetRoute(method Method, url string) (*Route, error)
- func (s *Server) LoadUrlParms(request *Request, route *Route) error
- func (s *Server) NewRequest(conn net.Conn, server *Server) (*Request, error)
- func (s *Server) NewResponse(request *Request) *Response
- func (s *Server) Reconfigure(options ...ServerOption)
- func (s *Server) SetErrorHandler(handler ErrorHandler) error
- func (s *Server) Start(waitGroup ...*sync.WaitGroup) error
- func (s *Server) Started() bool
- func (s *Server) Stop(waitGroup ...*sync.WaitGroup) error
- type ServerConfig
- type ServerOption
- func WithServerAddress(address string) ServerOption
- func WithServerConfiguration(config *ServerConfig) ServerOption
- func WithServerLogLevel(level logger.Level) ServerOption
- func WithServerLogger(logger logger.ILogger) ServerOption
- func WithServerMultiAttachmentMode(mode MultiAttachmentMode) ServerOption
- func WithServerName(name string) ServerOption
- type Status
- type UrlParams
Constants ¶
View Source
const ( HeaderTimeFormat = "Mon, 02 Jan 2006 15:04:05 GMT" TimeFormat = time.RFC3339 RegexForURL = "^((http|https)://)?(www)?[a-zA-Z0-9-._:/?&=,%]+$" )
View Source
const ( // Headers HeaderAccept = "Accept" HeaderAcceptEncoding = "Accept-Encoding" HeaderAllow = "Allow" HeaderOrigin = "Origin" HeaderAuthorization = "Authorization" HeaderContentDisposition = "Content-Disposition" HeaderContentEncoding = "Content-Encoding" HeaderContentLength = "Content-Length" HeaderContentType = "Content-Type" HeaderCookie = "Cookie" HeaderSetCookie = "Set-Cookie" HeaderIfModifiedSince = "If-Modified-Since" HeaderLastModified = "Last-Modified" HeaderLocation = "Location" HeaderUpgrade = "Upgrade" HeaderVary = "Vary" HeaderWWWAuthenticate = "WWW-Authenticate" HeaderXForwardedFor = "X-Forwarded-For" HeaderXForwardedProto = "X-Forwarded-Proto" HeaderXForwardedProtocol = "X-Forwarded-Protocol" HeaderXForwardedSsl = "X-Forwarded-Ssl" HeaderXUrlScheme = "X-Url-Scheme" HeaderXHTTPMethodOverride = "X-HTTP-Method-Override" HeaderXRealIP = "X-Real-IP" HeaderXRequestID = "X-Request-ID" HeaderXRequestedWith = "X-Requested-With" HeaderServer = "Server" HeaderDate = "Date" HeaderHost = "Host" HeaderMimeVersion = "MIME-Version" HeaderUserAgent = "User-Agent" HeaderTransferEncoding = "Transfer-Encoding" // Access control HeaderAccessControlRequestMethod = "Access-Control-Request-Method" HeaderAccessControlRequests = "Access-Control-Request-s" HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin" HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods" HeaderAccessControlAllows = "Access-Control-Allow-s" HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials" HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers" HeaderAccessControlExposes = "Access-Control-Expose-s" HeaderAccessControlMaxAge = "Access-Control-Max-Age" // Security HeaderStrictTransportSecurity = "Strict-Transport-Security" HeaderXContentTypeOptions = "X-Content-Type-MiddlewareOptions" HeaderXXSSProtection = "X-XSS-Protection" HeaderXFrameOptions = "X-Frame-MiddlewareOptions" HeaderContentSecurityPolicy = "Content-Security-Policy" HeaderXCSRFToken = "X-CSRF-Token" )
Variables ¶
View Source
var ( ErrorNotFound = NewError(StatusNotFound, "route not found") ErrorInvalidChunk = NewError(StatusNotFound, "invalid chunk length") )
View Source
var ( Methods = []Method{ MethodGet, MethodHead, MethodConnect, MethodDelete, MethodOptions, MethodPatch, MethodPost, MethodTrace, MethodPut, MethodCopy, MethodView, MethodLink, MethodUnlink, MethodPurge, MethodLock, MethodUnlock, MethodPropFind, } MethodsStr = []string{ string(MethodGet), string(MethodHead), string(MethodConnect), string(MethodDelete), string(MethodOptions), string(MethodPatch), string(MethodPost), string(MethodTrace), string(MethodPut), string(MethodCopy), string(MethodView), string(MethodLink), string(MethodUnlink), string(MethodPurge), string(MethodLock), string(MethodUnlock), string(MethodPropFind), } MethodHasBody = map[Method]bool{ MethodGet: true, MethodHead: false, MethodConnect: true, MethodDelete: true, MethodOptions: true, MethodPatch: true, MethodPost: true, MethodTrace: true, MethodPut: true, MethodCopy: false, MethodView: true, MethodLink: true, MethodUnlink: true, MethodPurge: false, MethodLock: true, MethodUnlock: false, MethodPropFind: true, } )
View Source
var (
ErrorInvalidAuthorization = errors.New(errors.LevelError, http.StatusUnauthorized, "invalid authorization")
)
Functions ¶
func ConvertPathToRegex ¶
func DetectContentType ¶
func DetectContentType(extension string, data []byte) (ContentType, Charset)
func GetFreePort ¶
func GetFunctionName ¶
func GetFunctionName(i interface{}) string
func GetMimeType ¶
func NewSimpleConfig ¶
func RandomBoundary ¶
func RandomBoundary() string
func ReadFileLines ¶
func StatusText ¶
StatusText returns a text for the HTTP status code. It returns the empty string if the code is unknown.
Types ¶
type Address ¶
type Address struct { Full string Schema Schema Url string ParamsUrl string Host string Params Params }
func NewAddress ¶
type AppClientConfig ¶
type AppClientConfig struct {
Client ClientConfig `json:"client"`
}
func NewClientConfig ¶
func NewClientConfig() (*AppClientConfig, error)
type AppServerConfig ¶
type AppServerConfig struct {
Server ServerConfig `json:"server"`
}
func NewServerConfig ¶
func NewServerConfig() (*AppServerConfig, error)
type Attachment ¶
type Attachment struct {
*Data
}
type Base ¶
type Base struct { IP string Address *Address Method Method Protocol Protocol Headers Headers Cookies Cookies ContentType ContentType Params Params UrlParams UrlParams Charset Charset Server *Server Client *Client // contains filtered or unexported fields }
func (*Base) BindHeaders ¶
func (*Base) BindParams ¶
func (*Base) BindUrlParams ¶
func (*Base) GetCharset ¶
func (*Base) GetContentType ¶
func (r *Base) GetContentType() *ContentType
func (*Base) GetUrlParam ¶
func (*Base) GetUrlParams ¶
func (*Base) SetCharset ¶
func (*Base) SetContentType ¶
func (r *Base) SetContentType(contentType ContentType)
func (*Base) SetUrlParam ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(options ...ClientOption) (*Client, error)
func (*Client) Config ¶
func (c *Client) Config() *ClientConfig
func (*Client) NewRequest ¶
func (*Client) NewResponse ¶
type ClientConfig ¶
type ClientConfig struct {
Log Log `json:"log"`
}
type ClientOption ¶
type ClientOption func(builder *Client)
ClientOption ...
func WithClientConfiguration ¶
func WithClientConfiguration(config *ClientConfig) ClientOption
WithClientConfiguration ...
func WithClientLogLevel ¶
func WithClientLogLevel(level logger.Level) ClientOption
WithClientLogLevel ...
func WithClientLogger ¶
func WithClientLogger(logger logger.ILogger) ClientOption
WithClientLogger ...
func WithClientMultiAttachmentMode ¶
func WithClientMultiAttachmentMode(mode MultiAttachmentMode) ClientOption
WithClientMultiAttachmentMode ...
type ContentDisposition ¶
type ContentDisposition string
Mime type
const ( ContentDispositionInline ContentDisposition = "inline" ContentDispositionAttachment ContentDisposition = "attachment" ContentDispositionFormData ContentDisposition = "form-data" )
type ContentType ¶
type ContentType string
Mime type
const ( ContentTypeEmpty ContentType = "" ContentTypeApplicationJSON ContentType = "application/json" ContentTypeApplicationJavaScript ContentType = "application/javascript" ContentTypeApplicationXML ContentType = "application/xml" ContentTypeTextXML ContentType = "text/xml" ContentTypeTextCSV ContentType = "text/csv" ContentTypeApplicationForm ContentType = "application/x-www-form-urlencoded" ContentTypeApplicationProtobuf ContentType = "application/protobuf" ContentTypeApplicationMsgpack ContentType = "application/msgpack" ContentTypeTextHTML ContentType = "text/html" ContentTypeTextPlain ContentType = "text/plain" ContentTypeMultipartFormData ContentType = "multipart/form-data" ContentTypeMultipartMixed ContentType = "multipart/mixed" ContentTypeApplicationOctetStream ContentType = "application/octet-stream" ContentTypeApplicationZip ContentType = "application/zip" ContentTypeApplication7z ContentType = "application/x-7z-compressed" ContentTypeApplicationGzip ContentType = "application/x-gzip" ContentTypeVideoMp4 ContentType = "video/mp4" ContentTypeApplicationPdf ContentType = "application/pdf" ContentTypeApplicationPostScript ContentType = "application/postscript" ContentTypeImageGif ContentType = "image/gif" ContentTypeImagePng ContentType = "image/png" ContentTypeImageJpeg ContentType = "image/jpeg" ContentTypeImageBmp ContentType = "image/bmp" ContentTypeImageWebp ContentType = "image/webp" ContentTypeImageVnd ContentType = "image/vnd.microsoft.icon" ContentTypeAudioWave ContentType = "audio/wave" ContentTypeAudioAiff ContentType = "audio/aiff" ContentTypeAudioBasic ContentType = "audio/basic" ContentTypeApplicationOgg ContentType = "application/ogg" ContentTypeAudioMidi ContentType = "audio/midi" ContentTypeAudioMpeg ContentType = "audio/mpeg" ContentTypeVideoAvi ContentType = "video/avi" ContentTypeApplicationVnd ContentType = "application/vnd.ms-fontobject" ContentTypeApplicationFontTtf ContentType = "application/font-ttf" ContentTypeApplicationFontOff ContentType = "application/font-off" ContentTypeApplicationFontCff ContentType = "application/font-cff" ContentTypeApplicationFontWoff ContentType = "application/font-woff" ContentTypeApplicationVideoWebm ContentType = "video/webm" ContentTypeApplicationRar ContentType = "application/x-rar-compressed" )
type Context ¶
func NewContext ¶
type Cookie ¶
type Cookie struct { Name string Value string Path string // optional Domain string // optional Expires time.Time // optional // MaxAge=0 means no 'Max-Age' attribute specified. // MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0' // MaxAge>0 means Max-Age attribute present and given in seconds MaxAge int Secure bool HttpOnly bool }
type Data ¶
type Data struct { ContentType ContentType ContentDisposition ContentDisposition Charset Charset Name string FileName string Body []byte IsAttachment bool }
type ErrorHandler ¶
type Filter ¶
type Filter struct { Method Method Position Position Pattern string Regex string Middleware MiddlewareFunc }
type HandlerFunc ¶
type Method ¶
type Method string
const ( MethodConnect Method = "CONNECT" MethodGet Method = "GET" MethodHead Method = "HEAD" MethodPost Method = "POST" MethodPut Method = "PUT" MethodPatch Method = "PATCH" MethodDelete Method = "DELETE" MethodOptions Method = "OPTIONS" MethodTrace Method = "TRACE" MethodCopy Method = "COPY" MethodView Method = "VIEW" MethodLink Method = "LINK" MethodUnlink Method = "UNLINK" MethodPurge Method = "PURGE" MethodLock Method = "LOCK" MethodUnlock Method = "UNLOCK" MethodPropFind Method = "PROPFIND" MethodAny Method = "ANY" )
type MiddlewareFunc ¶
type MiddlewareFunc func(HandlerFunc) HandlerFunc
func MiddlewareCheckAuthBasic ¶
func MiddlewareCheckAuthBasic(user, password string) MiddlewareFunc
func MiddlewareCheckAuthJwt ¶
func MiddlewareCheckAuthJwt(keyFunc jwt.KeyFunc, checkFunc jwt.CheckFunc) MiddlewareFunc
func MiddlewareOptions ¶
func MiddlewareOptions() MiddlewareFunc
type MultiAttachmentMode ¶
type MultiAttachmentMode string
const ( MultiAttachmentModeBoundary MultiAttachmentMode = "boundary" MultiAttachmentModeZip MultiAttachmentMode = "zip" )
type Namespace ¶
type Namespace struct { Path string Middlewares []MiddlewareFunc WebServer *Server }
func (*Namespace) AddRoute ¶
func (n *Namespace) AddRoute(method Method, path string, handler HandlerFunc, middleware ...MiddlewareFunc) error
type Request ¶
type Request struct { Base Body []byte FormData map[string]*FormData Attachments map[string]*Attachment MultiAttachmentMode MultiAttachmentMode Boundary string Reader io.Reader Writer io.Writer }
func (*Request) BindFormData ¶
func (*Request) GetFormDataBytes ¶
func (*Request) GetFormDataString ¶
func (*Request) JSONPretty ¶
func (*Request) SetFormData ¶
func (*Request) WithAuthBasic ¶
func (*Request) WithAuthJwt ¶
func (*Request) WithContentType ¶
func (r *Request) WithContentType(contentType ContentType) *Request
type RequestHandler ¶
type RequestHandler struct { Conn net.Conn Handler HandlerFunc }
type Response ¶
type Response struct { Base Body []byte Status Status StatusText string FormData map[string]*FormData Attachments map[string]*Attachment MultiAttachmentMode MultiAttachmentMode Boundary string Reader io.Reader Writer io.Writer }
func (*Response) BindFormData ¶
func (*Response) Bytes ¶
func (r *Response) Bytes(status Status, contentType ContentType, b []byte) error
func (*Response) GetFormDataBytes ¶
func (*Response) GetFormDataString ¶
func (*Response) JSONPretty ¶
func (*Response) Set ¶
func (r *Response) Set(status Status, contentType ContentType, b []byte) error
func (*Response) SetFormData ¶
type Route ¶
type Route struct { Method Method Path string Regex string Name string Handler HandlerFunc Middlewares []MiddlewareFunc }
func NewRoute ¶
func NewRoute(method Method, path string, handler HandlerFunc, middleware ...MiddlewareFunc) *Route
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(options ...ServerOption) (*Server, error)
func (*Server) AddMiddlewares ¶
func (s *Server) AddMiddlewares(middlewares ...MiddlewareFunc)
func (*Server) AddNamespace ¶
func (s *Server) AddNamespace(path string, middlewares ...MiddlewareFunc) *Namespace
func (*Server) AddRoute ¶
func (s *Server) AddRoute(method Method, path string, handler HandlerFunc, middleware ...MiddlewareFunc) error
func (*Server) Config ¶
func (s *Server) Config() *ServerConfig
func (*Server) DefaultErrorHandler ¶
func (*Server) GetMatchedFilters ¶
func (*Server) NewRequest ¶
func (*Server) NewResponse ¶
func (*Server) SetErrorHandler ¶
func (s *Server) SetErrorHandler(handler ErrorHandler) error
type ServerConfig ¶
type ServerOption ¶
type ServerOption func(builder *Server)
ServerOption ...
func WithServerConfiguration ¶
func WithServerConfiguration(config *ServerConfig) ServerOption
WithServerConfiguration ...
func WithServerLogLevel ¶
func WithServerLogLevel(level logger.Level) ServerOption
WithServerLogLevel ...
func WithServerLogger ¶
func WithServerLogger(logger logger.ILogger) ServerOption
WithServerLogger ...
func WithServerMultiAttachmentMode ¶
func WithServerMultiAttachmentMode(mode MultiAttachmentMode) ServerOption
WithServerMultiAttachmentMode ...
type Status ¶
type Status int
HTTP status codes as registered with IANA. See: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
const ( StatusContinue Status = 100 // RFC 7231, 6.2.1 StatusSwitchingProtocols Status = 101 // RFC 7231, 6.2.2 StatusProcessing Status = 102 // RFC 2518, 10.1 StatusOK Status = 200 // RFC 7231, 6.3.1 StatusCreated Status = 201 // RFC 7231, 6.3.2 StatusAccepted Status = 202 // RFC 7231, 6.3.3 StatusNonAuthoritativeInfo Status = 203 // RFC 7231, 6.3.4 StatusNoContent Status = 204 // RFC 7231, 6.3.5 StatusResetContent Status = 205 // RFC 7231, 6.3.6 StatusPartialContent Status = 206 // RFC 7233, 4.1 StatusMultiStatus Status = 207 // RFC 4918, 11.1 StatusAlreadyReported Status = 208 // RFC 5842, 7.1 StatusIMUsed Status = 226 // RFC 3229, 10.4.1 StatusMultipleChoices Status = 300 // RFC 7231, 6.4.1 StatusMovedPermanently Status = 301 // RFC 7231, 6.4.2 StatusFound Status = 302 // RFC 7231, 6.4.3 StatusSeeOther Status = 303 // RFC 7231, 6.4.4 StatusNotModified Status = 304 // RFC 7232, 4.1 StatusUseProxy Status = 305 // RFC 7231, 6.4.5 StatusTemporaryRedirect Status = 307 // RFC 7231, 6.4.7 StatusPermanentRedirect Status = 308 // RFC 7538, 3 StatusBadRequest Status = 400 // RFC 7231, 6.5.1 StatusPaymentRequired Status = 402 // RFC 7231, 6.5.2 StatusForbidden Status = 403 // RFC 7231, 6.5.3 StatusNotFound Status = 404 // RFC 7231, 6.5.4 StatusMethodNotAllowed Status = 405 // RFC 7231, 6.5.5 StatusNotAcceptable Status = 406 // RFC 7231, 6.5.6 StatusProxyAuthRequired Status = 407 // RFC 7235, 3.2 StatusRequestTimeout Status = 408 // RFC 7231, 6.5.7 StatusConflict Status = 409 // RFC 7231, 6.5.8 StatusGone Status = 410 // RFC 7231, 6.5.9 StatusLengthRequired Status = 411 // RFC 7231, 6.5.10 StatusPreconditionFailed Status = 412 // RFC 7232, 4.2 StatusRequestEntityTooLarge Status = 413 // RFC 7231, 6.5.11 StatusRequestURITooLong Status = 414 // RFC 7231, 6.5.12 StatusUnsupportedMediaType Status = 415 // RFC 7231, 6.5.13 StatusRequestedRangeNotSatisfiable Status = 416 // RFC 7233, 4.4 StatusExpectationFailed Status = 417 // RFC 7231, 6.5.14 StatusTeapot Status = 418 // RFC 7168, 2.3.3 StatusUnprocessableEntity Status = 422 // RFC 4918, 11.2 StatusLocked Status = 423 // RFC 4918, 11.3 StatusFailedDependency Status = 424 // RFC 4918, 11.4 StatusUpgradeRequired Status = 426 // RFC 7231, 6.5.15 StatusPreconditionRequired Status = 428 // RFC 6585, 3 StatusTooManyRequests Status = 429 // RFC 6585, 4 StatusRequestHeaderFieldsTooLarge Status = 431 // RFC 6585, 5 StatusInternalServerError Status = 500 // RFC 7231, 6.6.1 StatusNotImplemented Status = 501 // RFC 7231, 6.6.2 StatusBadGateway Status = 502 // RFC 7231, 6.6.3 StatusGatewayTimeout Status = 504 // RFC 7231, 6.6.5 StatusHTTPVersionNotSupported Status = 505 // RFC 7231, 6.6.6 StatusVariantAlsoNegotiates Status = 506 // RFC 2295, 8.1 StatusInsufficientStorage Status = 507 // RFC 4918, 11.5 StatusLoopDetected Status = 508 // RFC 5842, 7.2 StatusNotExtended Status = 510 // RFC 2774, 7 StatusNetworkAuthenticationRequired Status = 511 // RFC 6585, 6 )
Source Files ¶
- address.go
- base.go
- charset.go
- client.go
- client_config.go
- client_options.go
- client_request.go
- client_response.go
- config.go
- consts.go
- content_disposition.go
- content_type.go
- context.go
- encoder_hexadecimal.go
- encoding.go
- errors.go
- filters.go
- headers.go
- method.go
- middleware_auth_basic.go
- middleware_auth_jwt.go
- middleware_errors.go
- middleware_options.go
- mime.go
- multi_attachment_mode.go
- parse.go
- position.go
- protocol.go
- request.go
- response.go
- schema.go
- server.go
- server_config.go
- server_context.go
- server_handlers.go
- server_options.go
- server_request.go
- server_response.go
- server_routes.go
- status.go
- structs.go
- utils.go
Click to show internal directories.
Click to hide internal directories.