Documentation ¶
Index ¶
- Constants
- func Base64(s string) string
- func CheckIDCard(idCard string) bool
- func CheckMobile(mobile string, countryCode int) bool
- func CheckPassword(password string) bool
- func ClientIP(r *http.Request, c *websocket.Conn) string
- func Exists(path string) bool
- func GinContext(ctx context.Context) (*gin.Context, error)
- func IsDir(path string) bool
- func IsFile(path string) bool
- func ItoB(i interface{}) bool
- func ItoF64(i interface{}, val ...float64) float64
- func ItoI(i interface{}, val ...int) int
- func ItoI64(i interface{}, val ...int64) int64
- func ItoS(i interface{}, val ...string) string
- func ItoSQL(i interface{}) string
- func ItoSQLLike(i interface{}) string
- func MilliSecondTimestamp() int64
- func MixMobile(mobile string) string
- func MtoB(src map[string]interface{}, key string) bool
- func MtoF64(src map[string]interface{}, key string, val ...float64) float64
- func MtoI(src map[string]interface{}, key string, val ...int) int
- func MtoI64(src map[string]interface{}, key string, val ...int64) int64
- func MtoS(src map[string]interface{}, key string, val ...string) string
- func NewBytesMD5(data []byte) string
- func NewMD5(s string) string
- func NewMD516(s string) string
- func NewObjectID() string
- func NewPassword(pwd string, code string) string
- func NewSequenceID() int64
- func NewSnowID() snowflake.ID
- func NewTenantID() string
- func NewUUID() string
- func ParseTime(s string, layout ...string) (time.Time, error)
- func RandomInt64(b ...int) int64
- func RandomInt64MinMax(min, max int64) int64
- func SnowIDInit(n int) error
- func TimeFormat(t time.Time, layout ...string) string
- func VerifyPassword(n string, o string, code string) bool
Constants ¶
View Source
const IntMax = int(^uint(0) >> 1)
IntMax 最大int值
Variables ¶
This section is empty.
Functions ¶
func CheckMobile ¶
CheckMobile 校验手机号(只校验大陆手机号)
func RandomInt64MinMax ¶
RandomInt64MinMax 生成指定范围内的随机数字
func SnowIDInit ¶ added in v0.2.0
SnowIDInit 初始化雪花ID,n代表节点数,0~1023,不可以重复
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.