Documentation ¶
Index ¶
- Constants
- func Fail(c *gin.Context)
- func FailWithData(c *gin.Context, ResData interface{})
- func FailWithDetailed(c *gin.Context, ResCode int, ResMsg interface{}, ResData interface{})
- func FailWithError(c *gin.Context, err error)
- func FailWithMessage(c *gin.Context, ResMsg interface{})
- func Ok(c *gin.Context)
- func OkDetailed(c *gin.Context, ResMsg interface{}, ResData interface{})
- func OkWithData(c *gin.Context, ResData interface{})
- func OkWithMessage(c *gin.Context, ResMsg interface{})
- func Result(c *gin.Context, ResCode int, ResMsg interface{}, ResData interface{})
- type GinService
- type Response
Constants ¶
View Source
const ( SUCCESS = 0 BusinessError = 501 // 逻辑异常 ERROR = 500 // 服务器内部逻辑异常 NoFind = 404 ERROR_PARAM = 400 // 参数错误 )
Variables ¶
This section is empty.
Functions ¶
func FailWithData ¶
func FailWithDetailed ¶
func FailWithError ¶
func FailWithMessage ¶
func OkDetailed ¶
func OkWithData ¶
func OkWithMessage ¶
Types ¶
type GinService ¶
func (*GinService) Name ¶
func (g *GinService) Name() string
func (*GinService) OpenHealthApi ¶
func (s *GinService) OpenHealthApi() error
func (*GinService) StartUp ¶
func (g *GinService) StartUp() error
func (*GinService) Stop ¶
func (g *GinService) Stop()
Click to show internal directories.
Click to hide internal directories.