Documentation ¶
Index ¶
- type BaseController
- func (c *BaseController) Serve(v interface{})
- func (c *BaseController) ServeCreated(v interface{})
- func (c *BaseController) ServeError(err error)
- func (c *BaseController) ServeGeneral(message string, status int)
- func (c *BaseController) ServeStatus(status int)
- func (c *BaseController) ServeSuccess()
- type Created
- type Error
- type General
- type HealthCheckerFunc
- type Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseController ¶
type BaseController struct {
beego.Controller
}
func (*BaseController) Serve ¶
func (c *BaseController) Serve(v interface{})
func (*BaseController) ServeCreated ¶
func (c *BaseController) ServeCreated(v interface{})
func (*BaseController) ServeError ¶
func (c *BaseController) ServeError(err error)
func (*BaseController) ServeGeneral ¶
func (c *BaseController) ServeGeneral(message string, status int)
func (*BaseController) ServeStatus ¶
func (c *BaseController) ServeStatus(status int)
func (*BaseController) ServeSuccess ¶
func (c *BaseController) ServeSuccess()
type Error ¶
type Error struct { // HTML 状态码 Status int `json:"status,omitempty"` // 错误码,如果没有则为 Code Code int `json:"code,omitempty"` // 错误消息 Message string `json:"message,omitempty"` // 请求路径 Path string `json:"path,omitempty"` // contains filtered or unexported fields }
func CreateError ¶
func CreateError(err interface{}) (e Error)
func CreateErrorBadRequest ¶
func CreateErrorBadRequest(err interface{}) Error
func CreateErrorWithStatus ¶
type HealthCheckerFunc ¶
type HealthCheckerFunc func() error
func (HealthCheckerFunc) Check ¶
func (c HealthCheckerFunc) Check() error
Click to show internal directories.
Click to hide internal directories.