utils

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KB = 1024
	MB = 1024 * KB
	GB = 1024 * MB
	TB = 1024 * GB
	PB = 1024 * TB
)

Variables

This section is empty.

Functions

func BytesToString

func BytesToString(b []byte) string

BytesToString converts byte slice to string.

func HumanByte

func HumanByte(bf interface{}) string

func InArrStr

func InArrStr(arr []string, str string) bool

func Ip2long

func Ip2long(ip net.IP) uint32

func Long2ip

func Long2ip(i uint32) net.IP

func NowSec

func NowSec() time.Time

func PasswordHash

func PasswordHash(password string) (string, error)

func PasswordVerify

func PasswordVerify(password, hash string) bool

func RandSecret

func RandSecret(min int, max int) (string, error)

func RandomRunes

func RandomRunes(length int) string

func StringToBytes

func StringToBytes(s string) []byte

StringToBytes converts string to byte slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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