Versions in this module Expand all Collapse all v1 v1.0.0 Mar 11, 2026 Changes in this version + type Contain struct + func Contains(sub string, opts ...HookOpts) *Contain + func (c *Contain) Match(method, path string) bool + type Context struct + func NewContext(w http.ResponseWriter, r *http.Request) *Context + func (c *Context) Abort() + func (c *Context) AbortWithStatus(code int) + func (c *Context) AjaxError(code int, message string, data any) + func (c *Context) AjaxJson(code int, message string, data any) + func (c *Context) AjaxSuccess(message string, data any) + func (c *Context) Authorization() string + func (c *Context) Cookie(key string) string + func (c *Context) Ctx() context.Context + func (c *Context) Error(message string, code int) + func (c *Context) IsAborted() bool + func (c *Context) JSON(httpCode int, data any) + func (c *Context) JSONArgs(v schema.ISchema) error + func (c *Context) Next() + func (c *Context) NotFound() + func (c *Context) PostForm(key string) string + func (c *Context) Query(key string) string + func (c *Context) QueryArray(key string) []string + func (c *Context) QueryInt(key string, missing int) int + func (c *Context) QueryInt64(key string, missing int64) int64 + func (c *Context) QueryMap() url.Values + func (c *Context) Redirect(code int, url string) + func (c *Context) Request() *http.Request + func (c *Context) Response() http.ResponseWriter + func (c *Context) SetAuthorization(s string) + func (c *Context) SetCookie(key string, value []byte, expired time.Duration) + func (c *Context) SetCookieV2(cookie *http.Cookie) + func (c *Context) SetDomain(domain string) + func (c *Context) SetUserValue(key string, value interface{}) + func (c *Context) String(code int, text string) + func (c *Context) UserValue(key string) any + type Engine struct + func New(opts ...IEnginOpt) *Engine + func (e *Engine) DELETE(path string, fn ...HandlerFunc) + func (e *Engine) GET(path string, fn ...HandlerFunc) + func (e *Engine) OPTIONS(path string, fn ...HandlerFunc) + func (e *Engine) PATCH(path string, fn ...HandlerFunc) + func (e *Engine) POST(path string, fn ...HandlerFunc) + func (e *Engine) PUT(path string, fn ...HandlerFunc) + func (e *Engine) Rest(path string, rest any) + func (e *Engine) Run() (err error) + func (e *Engine) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (e *Engine) SetAddr(addr string) + func (e *Engine) SetGuard(gd Guard) + func (e *Engine) SetRest(path string, rest any) + func (e *Engine) Union(methods []string, path string, fn ...HandlerFunc) + func (e *Engine) Use(pos HookPos, matcher IMatcher, fn HandlerFunc) + type Guard struct + HandlerFunc HandlerFunc + Method HttpMethod + Pos HookPos + func Cors(fn HandlerFunc) Guard + type HandlerFunc func(ctx *Context) + type Hook struct + HandlerFunc HandlerFunc + Pos HookPos + type HookOpts func(m IMatcher) + type HookPos int + const PosAhead + const PosBehind + type HttpMethod string + const MethodConnect + const MethodDelete + const MethodGet + const MethodHead + const MethodOptions + const MethodPatch + const MethodPost + const MethodPut + const MethodTrace + type IEnginOpt func(e *Engine) + type IHttpCONNECT interface + CONNECT func(ctx *Context) + type IHttpDELETE interface + DELETE func(ctx *Context) + type IHttpGET interface + GET func(ctx *Context) + type IHttpHEAD interface + HEAD func(ctx *Context) + type IHttpOPTIONS interface + OPTIONS func(ctx *Context) + type IHttpPATCH interface + PATCH func(ctx *Context) + type IHttpPOST interface + POST func(ctx *Context) + type IHttpPUT interface + PUT func(ctx *Context) + type IHttpTRACE interface + TRACE func(ctx *Context) + type IMatcher interface + Match func(method, path string) bool + type IRouter interface + DELETE func(path string, fn ...HandlerFunc) + GET func(path string, fn ...HandlerFunc) + OPTIONS func(path string, fn ...HandlerFunc) + POST func(path string, fn ...HandlerFunc) + PUT func(path string, fn ...HandlerFunc) + Rest func(path string, rest any) + SetGuard func(gd Guard) + Union func(methods []string, path string, fn ...HandlerFunc) + Use func(pos HookPos, matcher IMatcher, fn HandlerFunc) + type Identically struct + func Identical(path string) *Identically + func (i *Identically) Match(method, path string) bool + type Pre struct + func Prefix(prefix string, exclusive []string) *Pre + func (p *Pre) Match(method, path string) bool + type Reg struct + func RegExp(expr string) *Reg + func (r *Reg) Match(method, path string) bool + type Route struct + AfterHooks []HandlerFunc + BeforeHooks []HandlerFunc + HandlerFuncs []HandlerFunc + Method string + Methods int + Path string + type Routes map[string]*Route