formatutil

package
v0.0.0-...-a563701 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2016 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Aes128Decrypt

func Aes128Decrypt(key, cipherString, encodedSrc string, decode textToBinary) (string, error)

Aes128Decrypt decrypts by AES128

func Aes128Encrypt

func Aes128Encrypt(key, cipherString, src string, encode binaryToText) (string, error)

Aes128Encrypt encrypts by AES128

func CheckIPInRange

func CheckIPInRange(ip string, start net.IP, end net.IP) bool

CheckIPInRange check input `ip` is between `start` and `end` IP range

func GetLastSplit

func GetLastSplit(src, separator string) string

GetLastSplit get the last part of splits

func IsBase32Encoded

func IsBase32Encoded(data string) bool

IsBase32Encoded checks if data is Base32 encoded

func IsIP

func IsIP(ip string) bool

IsIP check the input is IP or not

func JSONMapToString

func JSONMapToString(jsonMap map[string]interface{}) []byte

JSONMapToString converts json map to string

func JSONStringToList

func JSONStringToList(jsonString string) []interface{}

JSONStringToList converts json string to list

func JSONStringToMap

func JSONStringToMap(jsonString string) map[string]interface{}

JSONStringToMap converts json string to map

func PrettyPrintJSONMap

func PrettyPrintJSONMap(jsonMap map[string]interface{})

PrettyPrintJSONMap print json map with indent

func RandSeq

func RandSeq(n int) string

RandSeq generates the random string of length n

func Sha1SumWithSalt

func Sha1SumWithSalt(seed, salt string) string

Sha1SumWithSalt caculates SHA1 hash with salt

func StringValidate

func StringValidate(body string, filters ...func(body string) bool) bool

StringValidate return true if the input string pass all validator checking

Types

This section is empty.

Jump to

Keyboard shortcuts

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