Documentation
¶
Index ¶
- func NewContext(routeParsed RouteParsed, writer http.ResponseWriter, req *http.Request) core.HttpContext
- type Config
- type Context
- func (c *Context) Abort() core.HttpContext
- func (c *Context) Blob(code int, contentType string, data []byte) core.HttpContext
- func (c *Context) Body() []byte
- func (c *Context) Cookie(name string) string
- func (c *Context) File(code int, filepath string) core.HttpContext
- func (c *Context) FormFile(name string) ([]byte, error)
- func (c *Context) FormValue(key string) string
- func (c *Context) Get(key string) any
- func (c *Context) HTML(code int, html string) core.HttpContext
- func (c *Context) Header(key string) string
- func (c *Context) IsAborted() bool
- func (c *Context) JSON(code int, data any) core.HttpContext
- func (c *Context) Method() string
- func (c *Context) MustGet(key string) any
- func (c *Context) Next() core.HttpContext
- func (c *Context) Param(key string) string
- func (c *Context) Path() string
- func (c *Context) Protocol() string
- func (c *Context) Query(key string) string
- func (c *Context) QueryDefault(key, def string) string
- func (c *Context) Set(key string, value any) core.HttpContext
- func (c *Context) SetCookie(name, value string, options ...any) core.HttpContext
- func (c *Context) SetHeader(key, value string) core.HttpContext
- func (c *Context) Status(code int) core.HttpContext
- func (c *Context) Text(code int, data string) core.HttpContext
- type Gateway
- type Route
- type RouteParsed
- type Scope
- func (s *Scope) Connect(path string, handlers ...core.HttpHandler)
- func (s *Scope) Delete(path string, handlers ...core.HttpHandler)
- func (s *Scope) Get(path string, handlers ...core.HttpHandler)
- func (s *Scope) Head(path string, handlers ...core.HttpHandler)
- func (s *Scope) Options(path string, handlers ...core.HttpHandler)
- func (s *Scope) Patch(path string, handlers ...core.HttpHandler)
- func (s *Scope) Post(path string, handlers ...core.HttpHandler)
- func (s *Scope) Put(path string, handlers ...core.HttpHandler)
- func (s *Scope) SetLogger(logger *core.Logger)
- func (s *Scope) Trace(path string, handlers ...core.HttpHandler)
- func (s *Scope) Use(mw ...core.HttpHandler)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
func NewContext(routeParsed RouteParsed, writer http.ResponseWriter, req *http.Request) core.HttpContext
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) Abort ¶
func (c *Context) Abort() core.HttpContext
func (*Context) Next ¶
func (c *Context) Next() core.HttpContext
func (*Context) QueryDefault ¶
type Gateway ¶
type Gateway struct {
Routes []Route
Middlewares []core.HttpHandler
// contains filtered or unexported fields
}
func (*Gateway) CreateScope ¶
func (*Gateway) Use ¶
func (g *Gateway) Use(mw ...core.HttpHandler)
type Route ¶
type Route struct {
Method string
Pattern string
Handlers []core.HttpHandler
Scope *Scope
}
type Scope ¶
type Scope struct {
Gateway *Gateway
Middlewares []core.HttpHandler
// contains filtered or unexported fields
}
func (*Scope) Use ¶
func (s *Scope) Use(mw ...core.HttpHandler)
Click to show internal directories.
Click to hide internal directories.