package
6.0.0-beta1+incompatible
Repository: https://github.com/genofire/grafana.git
Documentation: pkg.go.dev
# Functions
DecodeBasicAuthHeader decodes user and password from a basic auth header.
Decrypt decrypts a payload with a given secret.
EncodeMd5 encodes a string to md5 hex value.
EncodePassword encodes a password using PBKDF2.
Encrypt encrypts a payload with a given secret.
GenerateShortUID generates a short unique identifier.
GetAgeString returns a string representing certain time from years to minutes.
GetBasicAuthHeader returns a base64 encoded string from user and password.
GetRandomString generate random string by specify chars.
IsEmail checks if a string is a valid email address.
IsValidShortUID checks if short unique identifier contains valid characters.
JoinURLFragments joins two URL fragments into only one URL string.
Md5Sum calculates the md5sum of a stream.
Md5SumString calculates the md5sum of a string.
NewURLQueryReader parses a raw query and returns it as a URLQueryReader type.
ParseIPAddress parses an IP address and removes port and/or IPV6 format.
PBKDF2 implements Password-Based Key Derivation Function 2), aimed to reduce the vulnerability of encrypted keys to brute force attacks.
RandomHex returns a random string from a n seed.
SplitIPPort splits the ip string and port.
SplitString splits a string by commas or empty spaces.
StringsFallback2 returns the first of two not empty strings.
StringsFallback3 returns the first of three not empty strings.
Walk walks a path, optionally following symbolic links, and for each path,it calls the walkFn passed.
# Variables
ErrWalkSkipDir is the Error returned when we want to skip descending into a directory.
# Structs
URLQueryReader is a URL query type.