Documentation ¶
Index ¶
- Variables
- func GenRequestID() string
- func GenShortID() (string, error)
- func GetAvatarURL(key string) string
- func GetBytes(key interface{}) ([]byte, error)
- func GetDate() string
- func GetDefaultAvatarURL() string
- func GetLocalIP() string
- func GetQiNiuPublicAccessURL(path string) string
- func GetRealIP(ctx *gin.Context) (ip string)
- func GetRequestID(c *gin.Context) string
- func GetTodayDateInt() int
- func IsEmail(email string) bool
- func IsEmpty(s string) bool
- func IsInSlice(value interface{}, sli interface{}) bool
- func Md5(str string) (string, error)
- func RandomStr(n int) string
- func RegexpReplace(reg, src, temp string) string
- func ReplaceDNS1123(name string) string
- func SliceShuffle(slice []interface{})
- func StringSliceContains(ss []string, s string) bool
- func StringSliceEqual(a, b []string) bool
- func StringSliceReflectEqual(a, b []string) bool
- func StringToInt(str string) (int, error)
- func StringToInt64(str string) (int64, error)
- func StringToUint64(str string) (uint64, error)
- func TimeLayout() string
- func TimeToShortString(ts time.Time) string
- func TimeToString(ts time.Time) string
- func Uint64DeleteElemInSlice(i int, s []uint64) []uint64
- func Uint64DeleteElemInSliceWithOrder(i int, s []uint64) []uint64
- func Uint64ShuffleSlice(a []uint64) []uint64
- func Uint64SliceReverse(a []uint64) []uint64
Constants ¶
This section is empty.
Variables ¶
View Source
var XRequestID = "X-Request-ID"
XRequestID
Functions ¶
func GenRequestID ¶
func GenRequestID() string
GenRequestID eg: 76d27e8c-a80e-48c8-ad20-e5562e0f67e4
func GetAvatarURL ¶
GetAvatarURL user's avatar, if empty, use default avatar
func GetQiNiuPublicAccessURL ¶
GetQiNiuPublicAccessURL
func StringSliceReflectEqual ¶
StringSliceReflectEqual
func Uint64DeleteElemInSlice ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.