Documentation ¶
Index ¶
- func Logger(c *Context)
- func NotFound(c *Context)
- func ParseParamsJSON(c *Context)
- func ParseParamsQuery(c *Context)
- type Context
- func (c *Context) AddParam(key string, v any)
- func (c *Context) AllParams() map[string][]any
- func (c *Context) AllStringParams() map[string][]string
- func (c *Context) BindJSON(v any) error
- func (c *Context) ContentType() string
- func (c *Context) DefaultParam(k string, d any) any
- func (c *Context) DefaultQuery(p string, defaultValue string) string
- func (c *Context) DefaultStringParam(k string, d string) string
- func (c *Context) DisableLog()
- func (c *Context) EnableLog()
- func (c *Context) GetRequest() *http.Request
- func (c *Context) GetResponseWriter() http.ResponseWriter
- func (c *Context) Json(code int, data any)
- func (c *Context) Log(format string, a ...any)
- func (c *Context) Next()
- func (c *Context) Param(k string) (any, bool)
- func (c *Context) Params() map[string]any
- func (c *Context) Query(p string) (string, bool)
- func (c *Context) ReadAllBody() ([]byte, error)
- func (c *Context) StatusCode(code int)
- func (c *Context) Stream(code int, data []byte)
- func (c *Context) String(code int, s string)
- func (c *Context) StringParam(k string) (string, bool)
- func (c *Context) StringParams() map[string]string
- type H
- type Handler
- type ServerMux
- func (p *ServerMux) GET(pattern string, handler ...Handler)
- func (p *ServerMux) Group() *group
- func (p *ServerMux) Handle(pattern string, handler ...Handler)
- func (p *ServerMux) POST(pattern string, handler ...Handler)
- func (p *ServerMux) Run(addr string) error
- func (p *ServerMux) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (p *ServerMux) Use(handler ...Handler)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseParamsJSON ¶
func ParseParamsJSON(c *Context)
func ParseParamsQuery ¶
func ParseParamsQuery(c *Context)
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) AllStringParams ¶
func (*Context) ContentType ¶
func (*Context) DefaultStringParam ¶
func (*Context) DisableLog ¶
func (c *Context) DisableLog()
func (*Context) GetRequest ¶
func (*Context) GetResponseWriter ¶
func (c *Context) GetResponseWriter() http.ResponseWriter
func (*Context) ReadAllBody ¶
func (*Context) StatusCode ¶
func (*Context) StringParams ¶
Click to show internal directories.
Click to hide internal directories.