Documentation ¶
Overview ¶
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Index ¶
- func Handler(handler func(c Context)) iris.Handler
- type Context
- func (c *Context) Application() context.Application
- func (c *Context) ClientIP() string
- func (c *Context) GetBody() ([]byte, error)
- func (c *Context) GetContext(key string) interface{}
- func (c *Context) GetHeader(key string) string
- func (c *Context) GetStatusCode() int
- func (c *Context) Header(key string, value string)
- func (c *Context) JSON(err error, data interface{}, meta *schema.Meta)
- func (c *Context) Param(key string) string
- func (c *Context) Redirect(status int, url string)
- func (c *Context) Request() *http.Request
- func (c *Context) ResetRequest(r *http.Request)
- func (c *Context) Response(err error, res schema.Response)
- func (c *Context) ResponseFunc(err error, fn func() schema.Response)
- func (c *Context) SetContext(key string, value interface{})
- func (c *Context) ShouldBindJSON(pr interface{}) error
- func (c *Context) ShouldBindQuery(pr interface{}) error
- func (c *Context) StatusCode(code int)
- func (c *Context) Uid() string
- func (c *Context) Writer() http.ResponseWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) Application ¶
func (c *Context) Application() context.Application
func (*Context) GetContext ¶
func (*Context) GetStatusCode ¶
func (*Context) ResetRequest ¶
func (*Context) SetContext ¶
func (*Context) ShouldBindJSON ¶
func (*Context) ShouldBindQuery ¶
func (*Context) StatusCode ¶
func (*Context) Writer ¶
func (c *Context) Writer() http.ResponseWriter
Click to show internal directories.
Click to hide internal directories.