Versions in this module Expand all Collapse all v1 v1.0.0 Sep 7, 2023 Changes in this version + func AddrCheck(addr string) bool + func CreateToken(userId int64) (string, error) + func GetDeviceID(sid int64) (datacenterid, workerid int64) + func GetGenTime(sid int64) (t string) + func GetGenTimestamp(sid int64) (timestamp int64) + func GetMQUrl() string + func GetMysqlDSN() string + func GetTimestamp(sid int64) (timestamp int64) + func GetTimestampStatus() (state float64) + func IsVideoFile(header *multipart.FileHeader) bool + func MD5(str string) string + func MD5Bytes(str []byte) string + func SHA256(str string) string + type Claims struct + UserId int64 + func CheckToken(token string) (*Claims, error) + type SensitiveTrie struct + func NewSensitiveTrie() *SensitiveTrie + func (st *SensitiveTrie) AddWord(sensitiveWord string) + func (st *SensitiveTrie) AddWords(sensitiveWords []string) + func (st *SensitiveTrie) FilterSpecialChar(text string) string + func (st *SensitiveTrie) Match(text string) bool + type Snowflake struct + func NewSnowflake(datacenterid, workerid int64) (*Snowflake, error) + func (s *Snowflake) NextVal() int64 + type TrieNode struct + End bool + func (tn *TrieNode) AddChild(c rune) *TrieNode + func (tn *TrieNode) FindChild(c rune) *TrieNode