Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigLocalFilesystemLogger(logPath, logFileName string, maxAge, rotationTime time.Duration)
- func GetMessage(status int) string
- func GetStatus(status int) int
- func Redirect(c *gin.Context, httpCode int, url string)
- func Response(c *gin.Context, httpCode, status int, data interface{})
- func ResponseError(c *gin.Context, httpCode, status int, data interface{})
- func ResponseList(c *gin.Context, httpCode, status int, list interface{}, count int)
Constants ¶
View Source
const ( // UTCDatetime : 2006-01-02 15:04:05 UTCDatetime = "2006-01-02 15:04:05" UTCMonth = "200601" // UTCDay : 20060102 UTCDay = "20060102" UTCHour = "2006010215" UTCDatetimeDay = "2006-01-02" UTCDatetimeMinute = "2006-01-02 15:04:00" UTCDatetimeHour = "2006-01-02 15:00:00" UTCDatetimeOnlyDay = "2006-01-02 00:00:00" )
View Source
const ( Success = 200 Error = 500 ErrorAuth = 403 InvalidParams = 10001 InvalidAppID = 10002 InvalidCoinType = 10003 ConfigError = 10004 Exist = 409 )
Variables ¶
View Source
var MessageFlags = map[int]string{ Success: "success", Error: "fail", ErrorAuth: "auth error", InvalidParams: "invalid params", InvalidAppID: "invalid app id", InvalidCoinType: "invalid coin type", ConfigError: "config error", Exist: "exists", }
View Source
var StatusFlags = map[int]int{ Success: 0, Error: 1, }
Functions ¶
func GetMessage ¶
func ResponseError ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.