package
0.0.0-20180406072006-48c86bf67681
Repository: https://github.com/hardikdr/gardener.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

CheckVersionMeetsConstraint returns true if the <version> meets the <constraint>.
CompareVersions returns true if the constraint <version1> compared by <operator> to <version2> returns true, and false otherwise.
ComputeRandomTimeWindow computes a random time window and returns both in the format HHMMSS+ZONE.
ComputeSHA1Hex computes the hexadecimal representation of the SHA1 hash of the given input byte slice <in>, converts it to a string and returns it (length of returned string is 40 characters).
ComputeSHA256Hex computes the hexadecimal representation of the SHA256 hash of the given input byte slice <in>, converts it to a string and returns it.
CreateSHA1Secret takes a username and a password and returns a sha1-schemed credentials pair as string.
DecodeBase64 takes a Base64-encoded string and returns the decoded byte slice.
DecodeCertificate takes a byte slice, decodes it from the PEM format, converts it to an x509.Certificate object, and returns it.
DecodePrivateKey takes a byte slice, decodes it from the PEM format, converts it to an rsa.PrivateKey object, and returns it.
EncodeBase64 takes a byte slice and returns the Base64-encoded string.
EncodeCertificate takes a certificate as a byte slice, encodes it to the PEM format, and returns it as byte slice.
EncodePrivateKey takes a RSA private key object, encodes it to the PEM format, and returns it as a byte slice.
EncodeSHA1 takes a byte slice and returns the sha1-hashed string (base64-encoded).
FindFreePort finds a free port on the host machine and returns it.
FormatMaintenanceTime formats a time object to the maintenance time format.
FuncName takes a function <f> as input and returns its name as a string.
GenerateRandomString generates a random string of the specified length <n>.
GenerateRandomStringFromCharset generates a random string of the specified length <n>.
HashForMap creates a hash value for a map of type map[string]interface{} and returns it.
LookupDNS performs a DNS lookup for the given <domain>.
MergeMaps takes two maps <defaults>, <custom> and merges them.
ParseMaintenanceTime parses the maintenance time and returns it as Time object.
RenderLocalTemplate uses a template <tpl> given as a string and renders it.
RenderTemplate reads the template file in the <templateDir> directory and renders it.
RenderTemplatesWithFuncs does the same as RenderTemplateWithFuncs except that it allows providing multiple template files instead of only exactly one.
RenderTemplateWithFuncs reads the template file in the <templateDir> directory and renders it.
Retry tries a condition function <f> until it returns true or the timeout <maxWaitTime> is reached.
RetryFunc is a convenience wrapper which returns a condition function that fits the requirements of the Retry function.
SHA1 takes a byte slice and returns the sha1-hashed byte slice.
SHA256 takes a byte slice and returns the sha256-hashed byte slice.
TestEmail validates the provided <email> against a regular expression and returns whether it matches.
TimeElapsed takes a <timestamp> and a <duration> checks whether the elapsed time until now is less than the <duration>.
ValueExists returns true or false, depending on whether the given string <value> is part of the given []string list <list>.
WaitUntilDNSNameResolvable is a helper function which takes a <domain> and waits for a maximum of five minutes that the domain name is resolvable by a DNS.