Documentation ¶
Index ¶
- Constants
- func Capitalize(str string) string
- func GetIp(r *http.Request) string
- func Md5(text string) string
- func Para(c *gin.Context) interface{}
- func ResToMap(rows *sql.Rows) map[string]string
- func Response(c *gin.Context) interface{}
- func SaveMapData(key string, data interface{}) interface{}
- func TransformVersionToInt(version string) int
- func UUID(ctx *gin.Context) string
- func UserId(ctx *gin.Context) int64
- func UserToken(ctx *gin.Context) string
- func XRequestId(ctx *gin.Context) string
- type CompareState
Constants ¶
View Source
const ( KeyAuthorization = "Authorization" KeyUUID = "UUID" KeyUserAgent = "User-Agent" KeyContextPara = "_key_ctx_para" KeyContextResponse = "_key_ctx_response" KeyContextUserId = "_key_ctx_userId_" KeyContextRequestId = "X-Reqid" KeyContextResponseCode = "_key_ctx_response_code" )
Variables ¶
This section is empty.
Functions ¶
func SaveMapData ¶
func SaveMapData(key string, data interface{}) interface{}
组合数据
FIXME 此处方法名需要重新命名 否则会产生干扰
func TransformVersionToInt ¶
func XRequestId ¶
Types ¶
type CompareState ¶
type CompareState int
const ( CompareVersionStateFailed CompareState = iota CompareVersionStateGreater CompareVersionStateEqual CompareVersionStateLess )
func VersionCompare ¶
func VersionCompare(version1, version2 string) (CompareState, error)
版本号规则xx.xx.xx 只能有数字和点 version1
Click to show internal directories.
Click to hide internal directories.