Documentation
¶
Index ¶
- Constants
- func GenerateMd5WithSalt(password, salt string) string
- func GenerateNumericString(bits int64) string
- func GetMetaWithError(err error) *api.Metadata
- func GetMetaWithErrorString(err string) *api.Metadata
- func GetPasswordSalt() (string, error)
- func GetSnowflakeId() int64
- func GetSuccessMeta() *api.Metadata
- func InitDefaultSnowflakeNode(node int64)
- func IsValidWithRegex(pattern, str string) bool
- func SetJsonLogger() log.Logger
- func Validate(value proto.Message) error
Constants ¶
View Source
const ( LogPath = "./logs/" LogFileName = "log.log" LogMaxSize = 5 LogMaxBackups = 5 LogMaxAge = 30 LogCompress = false )
Variables ¶
This section is empty.
Functions ¶
func GenerateMd5WithSalt ¶
func GenerateNumericString ¶
GenerateNumericString generate a string only contains numeric characters
func GetMetaWithError ¶
func GetMetaWithErrorString ¶
func GetPasswordSalt ¶
GetPasswordSalt returns a random salt string with the given length
func GetSnowflakeId ¶
func GetSnowflakeId() int64
func GetSuccessMeta ¶
func InitDefaultSnowflakeNode ¶
func InitDefaultSnowflakeNode(node int64)
func IsValidWithRegex ¶
func SetJsonLogger ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.