tools

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheKey

func CacheKey(key string, keys ...string) string

CacheKey 缓存KEY前缀

func ExtractValidCodes added in v1.0.5

func ExtractValidCodes(no string) []string

ExtractValidCodes 验证并过滤有效编号

func FmtSearchDate added in v1.0.5

func FmtSearchDate(searchAt string) []string

FmtSearchDate 格式化搜索时间

func GenAccount

func GenAccount(ps ...string) string

GenAccount 生成账户名

func IsValidDateTime added in v1.0.5

func IsValidDateTime(value string) bool

IsValidDateTime 检测是否时间 Example: IsValidDateTime(`2006-01-01`) true IsValidDateTime(`2006-01-01 12:00:00`) true IsValidDateTime(`2006/01/01 12:00:00`) true IsValidDateTime(`2006.01.01 12:00:00`) true

func LoginAuthTokenKey

func LoginAuthTokenKey(uid uint, token string) string

LoginAuthTokenKey 登录授权TokenKEY

func SafeLoginCacheKey

func SafeLoginCacheKey(key string, keys ...string) string

SafeLoginCacheKey 账户登录安全密钥KEY

func SafeSecretCacheKey

func SafeSecretCacheKey(key string, keys ...string) string

SafeSecretCacheKey 安全密钥缓存KEY

func SmsCaptchaCacheKey

func SmsCaptchaCacheKey(key string, keys ...string) string

SmsCaptchaCacheKey 短信验证码缓存KEY

func TokenCacheKey

func TokenCacheKey(token string, subjects ...string) string

TokenCacheKey Token 缓存KEY

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL