alg

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsInt64

func AbsInt64(x int64) int64

func CheckGateWay

func CheckGateWay(c *gin.Context) bool

func GetDayH

func GetDayH(h int) time.Time

func GetEveryDayH

func GetEveryDayH(h int) time.Duration

func GetLastDayH

func GetLastDayH(h int) time.Time

func GetLastTimeHourH

func GetLastTimeHourH(h int) time.Time

func GetTimeHourH

func GetTimeHourH(h int) time.Time

func IsPrivateIP

func IsPrivateIP(ip net.IP) bool

func MaxInt

func MaxInt(a, b int) int

func MaxInt32

func MaxInt32(a, b int32) int32

func MaxInt64

func MaxInt64(a, b int64) int64

func MinInt

func MinInt(a, b int) int

func MinInt32

func MinInt32(a, b int32) int32

func MinInt64

func MinInt64(a, b int64) int64

func RandCode

func RandCode() int32

func RandCodeInt64

func RandCodeInt64() int64

func RandStr

func RandStr(length int) string

func S2I32

func S2I32(msg string) int32

func S2I64

func S2I64(msg string) int64

func S2U64

func S2U64(msg string) uint64

func Xor

func Xor(data []byte, key []byte)

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

Jump to

Keyboard shortcuts

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