Versions in this module Expand all Collapse all v1 v1.0.1 Mar 25, 2022 v1.0.0 Mar 16, 2022 Changes in this version + const CharsetUTF8 + const DefaultMaxBodySize + const ErrDuplicateHandler + const ErrEmptyRoutePath + const ErrInvalidRouteMethod + const ErrNilRouteHandler + const HeaderAIM + const HeaderAccept + const HeaderAcceptAdditions + const HeaderAcceptCharset + const HeaderAcceptEncoding + const HeaderAcceptFeatures + const HeaderAcceptLanguage + const HeaderAcceptRanges + const HeaderAccessControlAllowCredentials + const HeaderAccessControlAllowHeaders + const HeaderAccessControlAllowMethods + const HeaderAccessControlAllowOrigin + const HeaderAccessControlExposeHeaders + const HeaderAccessControlMaxAge + const HeaderAccessControlRequestHeaders + const HeaderAccessControlRequestMethod + const HeaderAge + const HeaderAllow + const HeaderAlternates + const HeaderAuthenticationInfo + const HeaderAuthorization + const HeaderCExt + const HeaderCMan + const HeaderCOpt + const HeaderCPEP + const HeaderCPEPInfo + const HeaderCacheControl + const HeaderConnection + const HeaderContentBase + const HeaderContentDisposition + const HeaderContentEncoding + const HeaderContentID + const HeaderContentLanguage + const HeaderContentLength + const HeaderContentLocation + const HeaderContentMD5 + const HeaderContentRange + const HeaderContentScriptType + const HeaderContentSecurityPolicy + const HeaderContentSecurityPolicyReportOnly + const HeaderContentStyleType + const HeaderContentType + const HeaderContentVersion + const HeaderCookie + const HeaderCookie2 + const HeaderDAV + const HeaderDate + const HeaderDefaultStyle + const HeaderDeltaBase + const HeaderDepth + const HeaderDerivedFrom + const HeaderDestination + const HeaderDifferentialID + const HeaderDigest + const HeaderETag + const HeaderExpect + const HeaderExpires + const HeaderExt + const HeaderFrom + const HeaderGetProfile + const HeaderHost + const HeaderIM + const HeaderIf + const HeaderIfMatch + const HeaderIfModifiedSince + const HeaderIfNoneMatch + const HeaderIfRange + const HeaderIfUnmodifiedSince + const HeaderKeepAlive + const HeaderLabel + const HeaderLastModified + const HeaderLink + const HeaderLocation + const HeaderLockToken + const HeaderMIMEVersion + const HeaderMan + const HeaderMaxForwards + const HeaderMeter + const HeaderNegotiate + const HeaderOpt + const HeaderOrderingType + const HeaderOrigin + const HeaderOverwrite + const HeaderP3P + const HeaderPEP + const HeaderPICSLabel + const HeaderPepInfo + const HeaderPosition + const HeaderPragma + const HeaderProfileObject + const HeaderProtocol + const HeaderProtocolInfo + const HeaderProtocolQuery + const HeaderProtocolRequest + const HeaderProxyAuthenticate + const HeaderProxyAuthenticationInfo + const HeaderProxyAuthorization + const HeaderProxyFeatures + const HeaderProxyInstruction + const HeaderPublic + const HeaderRange + const HeaderReferer + const HeaderReferrerPolicy + const HeaderRetryAfter + const HeaderSafe + const HeaderSecurityScheme + const HeaderServer + const HeaderSetCookie + const HeaderSetCookie2 + const HeaderSetProfile + const HeaderSoapAction + const HeaderStatusURI + const HeaderStrictTransportSecurity + const HeaderSurrogateCapability + const HeaderSurrogateControl + const HeaderTCN + const HeaderTE + const HeaderTimeout + const HeaderTrailer + const HeaderTransferEncoding + const HeaderURI + const HeaderUpgrade + const HeaderUserAgent + const HeaderVariantVary + const HeaderVary + const HeaderVia + const HeaderWWWAuthenticate + const HeaderWantDigest + const HeaderWarning + const HeaderXCSRFToken + const HeaderXContentTypeOptions + const HeaderXForwardedFor + const HeaderXForwardedProto + const HeaderXForwardedProtocol + const HeaderXForwardedSsl + const HeaderXFrameOptions + const HeaderXHTTPMethodOverride + const HeaderXRealIP + const HeaderXRequestID + const HeaderXRequestedWith + const HeaderXUrlScheme + const HeaderXXSSProtection + const MIMEApplicationForm + const MIMEApplicationJSON + const MIMEApplicationJSONCharsetUTF8 + const MIMEApplicationJavaScript + const MIMEApplicationJavaScriptCharsetUTF8 + const MIMEApplicationMsgpack + const MIMEApplicationProtobuf + const MIMEApplicationXML + const MIMEApplicationXMLCharsetUTF8 + const MIMEMultipartForm + const MIMEOctetStream + const MIMETextHTML + const MIMETextHTMLCharsetUTF8 + const MIMETextPlain + const MIMETextPlainCharsetUTF8 + const MIMETextXML + const MIMETextXMLCharsetUTF8 + const Version + const Website + var ContextKey = &struct{} + func Canonical(p string) string + func IsValidMethod(method string) bool + type App struct + func New(configure ...func(*Config)) (app *App) + func (app *App) AcquireContext() *Context + func (app *App) All(path string, handler HandlerFunc) + func (app *App) Config() *Config + func (app *App) Connect(path string, handler HandlerFunc) + func (app *App) Delete(path string, handler HandlerFunc) + func (app *App) Get(path string, handler HandlerFunc) + func (app *App) Handle(method, path string, handler HandlerFunc) + func (app *App) HandleError(c *Context, e error) + func (app *App) Head(path string, handler HandlerFunc) + func (app *App) Listen(addr string) error + func (app *App) ListenTLS(addr, certFile, keyFile string) error + func (app *App) Mount(pattern string, group *App) + func (app *App) NewContext(w http.ResponseWriter, r *http.Request) *Context + func (app *App) Options(path string, handler HandlerFunc) + func (app *App) Patch(path string, handler HandlerFunc) + func (app *App) Post(path string, handler HandlerFunc) + func (app *App) Put(path string, handler HandlerFunc) + func (app *App) ReleaseContext(c *Context) + func (app *App) Serve(l net.Listener) error + func (app *App) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (app *App) ServeTLS(l net.Listener, certFile, keyFile string) error + func (app *App) Server() *http.Server + func (app *App) Shutdown(ctx context.Context) error + func (app *App) Static(path, root string) + func (app *App) Trace(path string, handler HandlerFunc) + func (app *App) Use(middlewares ...Middleware) + type Config struct + MaxBodySize int + type Context struct + App *App + Params url.Values + Request *http.Request + Response http.ResponseWriter + func (c *Context) AddHeader(key, value string) + func (c *Context) AddParam(key, value string) + func (c *Context) Cookie(name string) (*http.Cookie, error) + func (c *Context) Cookies() []*http.Cookie + func (c *Context) DecodeJSONBody(dst interface{}) error + func (c *Context) DeleteParam(key string) + func (c *Context) Error(code int) (err error) + func (c *Context) Errorf(code int, message interface{}) (err error) + func (c *Context) File(name string) (err error) + func (c *Context) Flush() + func (c *Context) Header(key string) string + func (c *Context) Hijack() (net.Conn, *bufio.ReadWriter, error) + func (c *Context) Json(code int, value interface{}) (err error) + func (c *Context) Method() string + func (c *Context) NoContent() (err error) + func (c *Context) NotFound() error + func (c *Context) Param(key string) string + func (c *Context) ParamOrDefault(key, val string) string + func (c *Context) ParseMediaType() (mediatype string, params map[string]string, err error) + func (c *Context) Path() string + func (c *Context) Reset(w http.ResponseWriter, r *http.Request) + func (c *Context) SetCookie(cookie *http.Cookie) + func (c *Context) SetHeader(key, value string) + func (c *Context) SetParam(key, value string) + func (c *Context) Text(code int, value interface{}) (err error) + func (c *Context) WriteHeader(code int) + type Handler interface + ServeHTTP func(c *Context) error + func FileHandler(root string) Handler + func NotFoundHandler() Handler + func RedirectHandler(url string, code int) Handler + type HandlerFunc func(c *Context) error + func WithContext(handler http.Handler) HandlerFunc + func (h HandlerFunc) ServeHTTP(c *Context) error + type Map map[string]interface + type Middleware func(Handler) Handler + type Redirect struct + func (redirect *Redirect) ServeHTTP(c *Context) error + type RequestError struct + Code int + Message string + func (e *RequestError) Error() string + type Route struct + Handler Handler + Method string + Path string + func (route *Route) ServeHTTP(c *Context) error + type Router struct + func NewRouter() *Router + func (router *Router) Handle(route Route) + func (router *Router) Handler(r *http.Request) Handler + func (router *Router) ServeHTTP(c *Context) error + func (router *Router) Use(middlewares ...Middleware)