Documentation ¶
Index ¶
- func CompareLabels(search map[string]string, labels map[string]string) bool
- func DoHashsMatchWithString(hash, text string, salt []byte) bool
- func GetMD5Hash(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 GetMD5Hash ¶
GetMD5Hash returns the md5 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.