Documentation ¶
Index ¶
- Constants
- func GinFailed(c *gin.Context)
- func GinFailedWithMsg(c *gin.Context, msg string)
- func GinResult(c *gin.Context, result interface{})
- func GinResultVO(c *gin.Context, result ResultVO)
- func GinSuccess(c *gin.Context)
- func GinSuccessWith(c *gin.Context, data interface{})
- func GracefulExit(srv *http.Server)
- func GracefulExitWithHook(srv *http.Server, hook func())
- func WrapVoidFunc(action func()) func(context *gin.Context)
- type ResultVO
- type StaticResource
Constants ¶
View Source
const ( SUCCESS = 0 FAILED = 1 )
Variables ¶
This section is empty.
Functions ¶
func GinFailedWithMsg ¶
func GinResultVO ¶
func GinSuccess ¶
func GinSuccessWith ¶
func GracefulExit ¶
func GracefulExitWithHook ¶
func WrapVoidFunc ¶ added in v1.0.1
Types ¶
type ResultVO ¶
type ResultVO struct { Data interface{} `json:"data"` Code int8 `json:"code"` Success bool `json:"success"` Msg string `json:"msg"` }
func FailedWithMsg ¶
func SuccessWith ¶
func SuccessWith(data interface{}) ResultVO
Click to show internal directories.
Click to hide internal directories.