Documentation ¶
Index ¶
- func Fail(w http.ResponseWriter, err string)
- func JSON(w http.ResponseWriter, data interface{})
- func Ok(w http.ResponseWriter, data string)
- func RequestParamTypeConvertFunc(index int, paramType reflect.Type, ctx *Context.HttpContext)
- type ActionExecutorContext
- type ActionExecutorInParam
- type ActionMethodExecutor
- type ApiController
- type ApiResult
- type ControllerBuilder
- type IController
- type RequestBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fail ¶
func Fail(w http.ResponseWriter, err string)
func JSON ¶
func JSON(w http.ResponseWriter, data interface{})
func Ok ¶
func Ok(w http.ResponseWriter, data string)
func RequestParamTypeConvertFunc ¶ added in v1.4.7
func RequestParamTypeConvertFunc(index int, paramType reflect.Type, ctx *Context.HttpContext)
Types ¶
type ActionExecutorContext ¶ added in v1.4.7
type ActionExecutorContext struct { ControllerName string ActionName string Controller IController Context *Context.HttpContext In *ActionExecutorInParam }
type ActionExecutorInParam ¶ added in v1.4.7
type ActionExecutorInParam struct { ActionParamTypes []reflect.Type MethodInovker *Utils.MethodCaller }
type ActionMethodExecutor ¶ added in v1.4.7
type ActionMethodExecutor struct { }
func NewActionMethodExecutor ¶ added in v1.4.7
func NewActionMethodExecutor() ActionMethodExecutor
func (ActionMethodExecutor) Execute ¶ added in v1.4.7
func (actionExecutor ActionMethodExecutor) Execute(ctx *ActionExecutorContext) interface{}
type ApiController ¶ added in v1.4.0
type ApiController struct { }
func (*ApiController) Fail ¶ added in v1.4.7
func (c *ApiController) Fail(msg string) ApiResult
func (*ApiController) GetName ¶ added in v1.4.7
func (c *ApiController) GetName() string
func (*ApiController) OK ¶ added in v1.4.7
func (c *ApiController) OK(data interface{}) ApiResult
type ControllerBuilder ¶ added in v1.4.7
type ControllerBuilder struct {
// contains filtered or unexported fields
}
func NewControllerBuilder ¶ added in v1.4.7
func NewControllerBuilder(sc *DependencyInjection.ServiceCollection) *ControllerBuilder
func (*ControllerBuilder) AddController ¶ added in v1.4.7
func (builder *ControllerBuilder) AddController(controllerCtor interface{})
type IController ¶ added in v1.4.0
type IController interface {
GetName() string
}
func ActivateController ¶ added in v1.4.7
func ActivateController(serviceProvider DependencyInjection.IServiceProvider, controllerName string) IController
type RequestBody ¶ added in v1.4.7
type RequestBody struct { }
Click to show internal directories.
Click to hide internal directories.