Documentation
¶
Index ¶
- type Context
- func (c *Context) BindJson(val any) error
- func (c *Context) FormValue(key string) StringValue
- func (c *Context) PathValue(key string) StringValue
- func (c *Context) QueryValue(key string) StringValue
- func (c *Context) Render(tpl string, data any) error
- func (c *Context) RespJSON(code int, val any) error
- func (c *Context) RespJSONOK(val any) error
- func (c *Context) SetCookie(cookie *http.Cookie)
- type StringValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Req *http.Request Resp http.ResponseWriter RespStatusCode int RespData []byte MatchedRoute string PathParams map[string]string TplEngine template.TemplateEngine UserValues map[string]any // contains filtered or unexported fields }
func (*Context) FormValue ¶
func (c *Context) FormValue(key string) StringValue
func (*Context) PathValue ¶
func (c *Context) PathValue(key string) StringValue
func (*Context) QueryValue ¶
func (c *Context) QueryValue(key string) StringValue
func (*Context) RespJSONOK ¶
type StringValue ¶
type StringValue struct {
// contains filtered or unexported fields
}
func (StringValue) ToInt64 ¶
func (s StringValue) ToInt64() (int64, error)
func (StringValue) ToString ¶
func (s StringValue) ToString() (string, error)
Click to show internal directories.
Click to hide internal directories.