Documentation ¶
Index ¶
- func NewRestHandler(o IController) app.HandlerFunc
- func RestAccessLog() app.HandlerFunc
- type Controller
- func (obj *Controller) Execute()
- func (obj *Controller) Finish()
- func (obj *Controller) GetContext() context.Context
- func (obj *Controller) GetHttpStatus() int
- func (obj *Controller) GetRequestCtx() *app.RequestContext
- func (obj *Controller) GetResp() *RestResponse
- func (obj *Controller) Prepare(c context.Context, ctx *app.RequestContext, para interface{}) error
- func (obj *Controller) SetHttpStatus(code int)
- type IController
- type RestResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRestHandler ¶
func NewRestHandler(o IController) app.HandlerFunc
func RestAccessLog ¶
func RestAccessLog() app.HandlerFunc
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func (*Controller) Execute ¶
func (obj *Controller) Execute()
func (*Controller) Finish ¶
func (obj *Controller) Finish()
func (*Controller) GetContext ¶
func (obj *Controller) GetContext() context.Context
func (*Controller) GetHttpStatus ¶
func (obj *Controller) GetHttpStatus() int
func (*Controller) GetRequestCtx ¶
func (obj *Controller) GetRequestCtx() *app.RequestContext
func (*Controller) GetResp ¶
func (obj *Controller) GetResp() *RestResponse
func (*Controller) Prepare ¶
func (obj *Controller) Prepare(c context.Context, ctx *app.RequestContext, para interface{}) error
func (*Controller) SetHttpStatus ¶
func (obj *Controller) SetHttpStatus(code int)
type IController ¶
type IController interface { Prepare(c context.Context, ctx *app.RequestContext, para interface{}) error Execute() Finish() }
type RestResponse ¶
Click to show internal directories.
Click to hide internal directories.