Documentation
¶
Index ¶
- func AbsInt64(x int64) int64
- func CheckGateWay(c *gin.Context) bool
- func GetDayH(h int) time.Time
- func GetEveryDayH(h int) time.Duration
- func GetLastDayH(h int) time.Time
- func GetLastTimeHourH(h int) time.Time
- func GetTimeHourH(h int) time.Time
- func IsPrivateIP(ip net.IP) bool
- func MaxInt(a, b int) int
- func MaxInt32(a, b int32) int32
- func MaxInt64(a, b int64) int64
- func MinInt(a, b int) int
- func MinInt32(a, b int32) int32
- func MinInt64(a, b int64) int64
- func RandCode() int32
- func RandCodeInt64() int64
- func RandStr(length int) string
- func S2I32(msg string) int32
- func S2I64(msg string) int64
- func S2U64(msg string) uint64
- func Xor(data []byte, key []byte)
- type SnowflakeWorker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckGateWay ¶
func GetEveryDayH ¶
func GetLastDayH ¶
func GetLastTimeHourH ¶
func GetTimeHourH ¶
func IsPrivateIP ¶
func RandCodeInt64 ¶
func RandCodeInt64() int64
Types ¶
type SnowflakeWorker ¶
type SnowflakeWorker struct {
// contains filtered or unexported fields
}
func GetSnow ¶
func GetSnow() *SnowflakeWorker
func NewSnowflakeWorker ¶
func NewSnowflakeWorker(workerId int64) *SnowflakeWorker
func (*SnowflakeWorker) GenId ¶
func (s *SnowflakeWorker) GenId() int64
Click to show internal directories.
Click to hide internal directories.