Documentation ¶
Index ¶
- func CompareLabels(search map[string]string, labels map[string]string) bool
- func DoHashsMatchWithString(hash, text string, salt []byte) bool
- func EscapeString(str string) string
- func GetMD5Hash(data []byte) stringdeprecated
- func GetSHA256Hash(data []byte) string
- func GetSHA384Hash(data []byte) string
- func GetSHA512Hash(data []byte) string
- func HashSHA512(text string, salt []byte) string
- func JsonToMap(jsonStr string) (map[string]interface{}, error)
- func PrettyprintStruct(obj interface{})
- func RandomString(strSize int, randType StringType) string
- type StringType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareLabels ¶
CompareLabels compares two maps of labels
func DoHashsMatchWithString ¶
Check if two passwords match
func EscapeString ¶ added in v0.3.7
func GetMD5Hash
deprecated
func GetSHA256Hash ¶ added in v0.3.5
GetSHA256Hash returns the SHA256 hash of a byte array
func GetSHA384Hash ¶ added in v0.3.5
GetSHA384Hash returns the SHA384 hash of a byte array
func GetSHA512Hash ¶ added in v0.3.5
GetSHA512Hash returns the SHA512 hash of a byte array
func HashSHA512 ¶
Hash a password with the SHA-512 algorithm
func PrettyprintStruct ¶
func PrettyprintStruct(obj interface{})
PrettyprintStruct prints a struct in a pretty way
func RandomString ¶
func RandomString(strSize int, randType StringType) string
RandomString returns a random string of the specified length
Types ¶
type StringType ¶
type StringType = string
const ( StringTypeUnknown StringType = "Unknown" StringTypeAlphaNum StringType = "alphanum" StringTypeClusterId StringType = "clusterid" StringTypeAlpha StringType = "alpha" StringTypeNumber StringType = "number" )
Click to show internal directories.
Click to hide internal directories.