Documentation ¶
Index ¶
- func Recover(plgName string)
- type Context
- func (c *Context) Abort()
- func (c *Context) AbortWithStatus(status int)
- func (c *Context) Aborted() bool
- func (c *Context) Error() error
- func (c *Context) JSON(status int, v interface{})
- func (c *Context) Next()
- func (c *Context) Request() *http.Request
- func (c *Context) Reset()
- func (c *Context) ResponseWriter() http.ResponseWriter
- func (c *Context) Set(req *http.Request, w http.ResponseWriter)
- func (c *Context) SetError(err error)
- func (c *Context) SetResponseWriter(w http.ResponseWriter)
- func (c *Context) String(status int, s string)
- type PlgStatus
- type Plugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { Ctx context.Context // ctx control signal for multi goroutine Method string // request method Path string // request Path // contains filtered or unexported fields }
Context ... contains infomation to transfer
func (*Context) Abort ¶
func (c *Context) Abort()
Abort process to stop calling next plugin [done] TODO: ignore response here, should call JSON, or String manually
func (*Context) AbortWithStatus ¶
AbortWithStatus abort process and set response status
func (*Context) ResponseWriter ¶
func (c *Context) ResponseWriter() http.ResponseWriter
ResponseWriter ...
func (*Context) Set ¶
func (c *Context) Set(req *http.Request, w http.ResponseWriter)
Set set request and responseWriter
func (*Context) SetResponseWriter ¶
func (c *Context) SetResponseWriter(w http.ResponseWriter)
SetResponseWriter ...
Click to show internal directories.
Click to hide internal directories.