Documentation
¶
Index ¶
- func Adapter(h HandlerFunc) http.HandlerFunc
- type Context
- func (c *Context) AbortWithJSON(status int, obj interface{})
- func (c *Context) AbortWithString(status int, s string)
- func (c *Context) Data(status int, contentType string, data []byte)
- func (c *Context) DefaultQuery(key, def string) string
- func (c *Context) Flush()
- func (c *Context) FormFile(key string) (*multipart.FileHeader, error)
- func (c *Context) GetHeader(key string) string
- func (c *Context) GetString(key string) string
- func (c *Context) Header(key, value string)
- func (c *Context) JSON(status int, obj interface{})
- func (c *Context) Param(key string) string
- func (c *Context) PostForm(key string) string
- func (c *Context) Query(key string) string
- func (c *Context) Redirect(code int, url string)
- func (c *Context) Reset()
- func (c *Context) SSEvent(name string, data interface{})
- func (c *Context) ShouldBind(obj interface{}) error
- func (c *Context) ShouldBindJSON(obj interface{}) error
- func (c *Context) ShouldBindQuery(obj interface{}) error
- func (c *Context) Status(status int) *Context
- func (c *Context) String(status int, s string)
- type ContextKey
- type H
- type HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Adapter ¶
func Adapter(h HandlerFunc) http.HandlerFunc
Types ¶
type Context ¶
type Context struct {
Writer http.ResponseWriter
Request *http.Request
}
func FromRequest ¶
func (*Context) AbortWithJSON ¶
func (*Context) AbortWithString ¶
func (*Context) DefaultQuery ¶
func (*Context) ShouldBind ¶
func (*Context) ShouldBindJSON ¶
func (*Context) ShouldBindQuery ¶
type ContextKey ¶
type ContextKey struct{}
type HandlerFunc ¶
type HandlerFunc func(*Context)
Click to show internal directories.
Click to hide internal directories.