Documentation
¶
Index ¶
- Constants
- func AssertThrowsGetWayErr(throwable bool, code State, subCode, subMsg string)
- func AssertThrowsGetWaySErr(throwable bool, code State, subCode, subMsg string)
- func BindRequestBody(c *gin.Context, param interface{}) error
- func ExceptionGetWayCatch(c *gin.Context)
- func FailAndMsg(c *gin.Context, subCode, subMsg string)
- func FailAndMsgNoTx(c *gin.Context, subCode, subMsg string)
- func FailGetWay(c *gin.Context, state State, subCode, subMsg string)
- func GetAppId(c *gin.Context) string
- func GetClientIP(c *gin.Context) string
- func GetClientSource(c *gin.Context) string
- func GetCurrentUserId(c *gin.Context) (uint32, bool)
- func GetMethod(c *gin.Context) string
- func GetParams(c *gin.Context) string
- func GetPlatform(c *gin.Context) string
- func GetServerIP() string
- func GetSign(c *gin.Context) string
- func GetStartTime(c *gin.Context) int64
- func GetTimeStamp(c *gin.Context) string
- func GetToken(c *gin.Context) string
- func GetURL(c *gin.Context) string
- func LogEnd(c *gin.Context, data interface{})
- func SetStartTime(c *gin.Context)
- func SetToken(v string, c *gin.Context)
- func Success(c *gin.Context)
- func SuccessData(c *gin.Context, data interface{})
- func SuccessDataNoTx(c *gin.Context, data interface{})
- func SuccessGetWay(c *gin.Context, state State, subCode, subMsg string)
- func SuccessNoTx(c *gin.Context)
- func SuccessString(c *gin.Context, data string)
- func ThrowsGetWayErr(code State, subCode, subMsg string)
- func ThrowsGetWaySErr(code State, subCode, subMsg string)
- type Admin
- type AdminResponse
- type Error
- type SError
- type ServerDataResponse
- type ServerResponse
- type State
- type UserInfo
Constants ¶
View Source
const CurrentUserIdKey = "userID"
View Source
const CurrentUserKey = "userInfo"
View Source
const StartTimeKey = "StartTime"
Variables ¶
This section is empty.
Functions ¶
func AssertThrowsGetWayErr ¶
func AssertThrowsGetWaySErr ¶
func BindRequestBody ¶
func ExceptionGetWayCatch ¶
func FailAndMsg ¶
func FailAndMsgNoTx ¶
FailAndMsgNoTx 不带事务
func GetClientIP ¶
func GetClientSource ¶
func GetPlatform ¶
func GetServerIP ¶
func GetServerIP() string
func GetStartTime ¶
func GetTimeStamp ¶
func SetStartTime ¶
func SuccessDataNoTx ¶
SuccessDataNoTx 不带事务提交
func SuccessString ¶
func ThrowsGetWayErr ¶
func ThrowsGetWaySErr ¶
Types ¶
type AdminResponse ¶
type AdminResponse struct { Admin Admin // contains filtered or unexported fields }
type ServerDataResponse ¶
type ServerDataResponse struct { ServerResponse Data interface{} `json:"data,omitempty"` }
type ServerResponse ¶
Click to show internal directories.
Click to hide internal directories.