Documentation ¶
Index ¶
- Constants
- func DecryptToken(token string, key string) (srcStr string)
- func EncryptToken(srcStr string, timeTs int64, key string) (token string)
- func FlorPageInt(pageSize int, total int) (res int)
- func FormatShortTs(ts int64) (res string)
- func FormatSubTimeStr(duration int64) (res string)
- func FormatTs(ts int64) (res string)
- func GetDayByTimeStampRange(startTs, endTs int64) []string
- func GetDefaultPage(page int) (res int)
- func GetDefaultPageSize(pageSize int) (res int)
- func GetTodayFirstTs() int64
- func MapToStruct(mmap map[string]interface{}, structure interface{}) (err error)
- func Md5String(str string) string
- func PathExists(path string) (bool, error)
- func StrArrayIndexOf(arr []string, val string) (index int, status bool)
- func UniqArr(arr []string) (ret []string)
Constants ¶
View Source
const DefaultPassword string = "123456"
DefaultPassword const Params
View Source
const TokenInvaild string = "Token invaild"
TokenInvaild Const Params
Variables ¶
This section is empty.
Functions ¶
func EncryptToken ¶
EncryptToken Init Token
func GetDayByTimeStampRange ¶
GetDayByTimeStampRange 获取时间戳之间的日期
func GetDefaultPageSize ¶
GetDefaultPageSize 校验每页行数,小于0返回默认20
func MapToStruct ¶
@func 将map转为Struct @param
mmap 需要转换的map[string]interface structure 转换后的结构体指针
@return
error 错误信息 暂不支持递归转换
func StrArrayIndexOf ¶
StrArrayIndexOf 检查字符串数组中是否存在
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.