Documentation ¶
Index ¶
- Constants
- func ComparePassword(hashedPassword, password string) bool
- func CurrentTimestamp() int64
- func GenRandStr(size int) string
- func GenerateClientId() string
- func GenerateHashedPassword(password string) (string, error)
- func GenerateRandNumStr(size int) string
- func GenerateRandomBytes(n int) ([]byte, error)
- func GenerateRandomBytesToHex(bytes int) (string, error)
- func GetBlockTimeByEpoch(epoch int64) time.Time
- func GetClientIP(c *gin.Context) string
- func GetDurationByEpoch(epoch int64) time.Duration
- func GetEpochByTime(t time.Time) int64
- func GetFileList(args []string) (fileList []string, err error)
- func GetGenesisTime() time.Time
- func MonthBegin(t time.Time) time.Time
- func PaginationHelper(page, pageSize, defaultPageSize int) (offset int, size int)
- func RandInt(min, max int) int
- func TmpFileName(name string) string
- type AsyncManager
Constants ¶
View Source
const (
GenesisUnixTime = 1598306400
)
View Source
const (
HashStrength = bcrypt.MinCost + 1
)
Variables ¶
This section is empty.
Functions ¶
func ComparePassword ¶
func CurrentTimestamp ¶
func CurrentTimestamp() int64
func GenRandStr ¶
GenRandStr Generates a random string, space contains number, uppercase and lowercase letters
func GenerateClientId ¶
func GenerateClientId() string
func GenerateHashedPassword ¶
func GenerateRandNumStr ¶
GenerateRandNumStr Generates a random numeric string
func GenerateRandomBytes ¶
func GetBlockTimeByEpoch ¶
func GetClientIP ¶
func GetDurationByEpoch ¶
func GetEpochByTime ¶
func GetFileList ¶
func GetGenesisTime ¶
func PaginationHelper ¶
func TmpFileName ¶
Types ¶
type AsyncManager ¶
type AsyncManager struct {
// contains filtered or unexported fields
}
func (*AsyncManager) AddTask ¶
func (a *AsyncManager) AddTask(funcTask func())
func (*AsyncManager) Wait ¶
func (a *AsyncManager) Wait()
Click to show internal directories.
Click to hide internal directories.