Documentation ¶
Index ¶
- Constants
- Variables
- func Decrypt(key, text []byte) ([]byte, error)
- func DecryptString(key, text string) (string, error)
- func DecryptStringBase64(key, text string) (string, error)
- func DirSize(path string) (int64, error)
- func Encrypt(key, text []byte) ([]byte, error)
- func EncryptString(key, text string) (string, error)
- func EncryptStringBase64(key, text string) (string, error)
- func Every(duration time.Duration, f func())
- func FileSize(filepath string) (int64, error)
- func Flatten2DFloat32(f interface{}) [][]float32
- func FlattenBoolSlice(data interface{}) []bool
- func FlattenFloat32(f interface{}) ([]float32, error)
- func FlattenFloat32Slice(data interface{}) []float32
- func FlattenFloat64Slice(data interface{}) []float64
- func FlattenInt16Slice(data interface{}) []int16
- func FlattenInt32Slice(data interface{}) []int32
- func FlattenInt64Slice(data interface{}) []int64
- func FlattenInt8Slice(data interface{}) []int8
- func FlattenIntSlice(data interface{}) []int
- func FlattenUint16Slice(data interface{}) []uint16
- func FlattenUint32Slice(data interface{}) []uint32
- func FlattenUint64Slice(data interface{}) []uint64
- func FlattenUint8Slice(data interface{}) []uint8
- func FlattenUintSlice(data interface{}) []uint
- func FlattenUintptrSlice(data interface{}) []uintptr
- func FlattenedLength(val interface{}) (int64, error)
- func Flops(s uint64) string
- func GetExternalIp() (string, error)
- func GetFunctionName(i interface{}) string
- func GetHostIP() string
- func GetLocalIP0() (string, error)
- func GetLocalIp() (string, error)
- func IsEncrypted(b []byte) bool
- func IsEncryptedString(s string) bool
- func IsURL(str string) bool
- func RandString(strSize int, randType string) string
- func ShapeAndTypeOf(val interface{}) (shape []int64, dt reflect.Type, err error)
- type ElementType
Constants ¶
View Source
const ( Flop = 1 KFlop = Flop * 1000 MFlop = KFlop * 1000 GFlop = MFlop * 1000 TFlop = GFlop * 1000 PFlop = TFlop * 1000 EFlop = PFlop * 1000 )
Flop Sizes.
View Source
const ( IP string = `` /* 659-byte string literal not displayed */ URLSchema string = `((ftp|tcp|udp|wss?|https?):\/\/)` URLUsername string = `(\S+(:\S*)?@)` Hostname string = `` URLPath string = `((\/|\?|#)[^\s]*)` URLPort string = `(:(\d{1,5}))` URLIP string = `([1-9]\d?|1\d\d|2[01]\d|22[0-3])(\.(1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-4]))` URLSubdomain string = `((www\.)|([a-zA-Z0-9]([-\.][-\._a-zA-Z0-9]+)*))` URL string = `^` + URLSchema + `?` + URLUsername + `?` + `((` + URLIP + `|(\[` + IP + `\])|(([a-zA-Z0-9]([a-zA-Z0-9-_]+)?[a-zA-Z0-9]([-\.][a-zA-Z0-9]+)*)|(` + URLSubdomain + `?))?(([a-zA-Z\x{00a1}-\x{ffff}0-9]+-?-?)*[a-zA-Z\x{00a1}-\x{ffff}0-9]+)(?:\.([a-zA-Z\x{00a1}-\x{ffff}]{1,}))?))\.?` + URLPort + `?` + URLPath + `?$` )
Variables ¶
View Source
var ( KeyLength = 32 CryptoHeader = fmt.Sprintf("==AES%d==", KeyLength) KeyBuffer = []byte(strings.Repeat("=", 32)) )
View Source
var MD5Sum = md5sumTy{}
View Source
var SHASum = shasumTy{}
Functions ¶
func DecryptString ¶
func DecryptStringBase64 ¶
func EncryptString ¶
func EncryptStringBase64 ¶
func Flatten2DFloat32 ¶
func Flatten2DFloat32(f interface{}) [][]float32
func FlattenBoolSlice ¶
func FlattenBoolSlice(data interface{}) []bool
func FlattenFloat32 ¶
func FlattenFloat32Slice ¶
func FlattenFloat32Slice(data interface{}) []float32
func FlattenFloat64Slice ¶
func FlattenFloat64Slice(data interface{}) []float64
func FlattenInt16Slice ¶
func FlattenInt16Slice(data interface{}) []int16
func FlattenInt32Slice ¶
func FlattenInt32Slice(data interface{}) []int32
func FlattenInt64Slice ¶
func FlattenInt64Slice(data interface{}) []int64
func FlattenInt8Slice ¶
func FlattenInt8Slice(data interface{}) []int8
func FlattenIntSlice ¶
func FlattenIntSlice(data interface{}) []int
func FlattenUint16Slice ¶
func FlattenUint16Slice(data interface{}) []uint16
func FlattenUint32Slice ¶
func FlattenUint32Slice(data interface{}) []uint32
func FlattenUint64Slice ¶
func FlattenUint64Slice(data interface{}) []uint64
func FlattenUint8Slice ¶
func FlattenUint8Slice(data interface{}) []uint8
func FlattenUintSlice ¶
func FlattenUintSlice(data interface{}) []uint
func FlattenUintptrSlice ¶
func FlattenUintptrSlice(data interface{}) []uintptr
func FlattenedLength ¶
func Flops ¶
Flops produces a human readable representation of an SI size.
Flops(82854982) -> 83 MFlops
func GetExternalIp ¶
func GetFunctionName ¶
func GetFunctionName(i interface{}) string
func GetLocalIP0 ¶
func GetLocalIp ¶
GetLocalIp returns the non loopback local IP of the host
func IsEncrypted ¶
func IsEncryptedString ¶
func IsURL ¶
IsURL check if the string is an URL. from https://github.com/asaskevich/govalidator/blob/aa5cce4a76edb1a5acecab1870c17abbffb5419e/validator.go#L53
func RandString ¶
Types ¶
type ElementType ¶
func FlattenElementTypeSlice ¶
func FlattenElementTypeSlice(data interface{}) []ElementType
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package browser provides utilities for interacting with users' browsers.
|
Package browser provides utilities for interacting with users' browsers. |
Click to show internal directories.
Click to hide internal directories.