Documentation ¶
Index ¶
- Variables
- func DecodeBasicAuthHeader(header string) (string, string, error)
- func Decrypt(payload []byte, secret string) ([]byte, error)
- func EncodeMd5(str string) string
- func EncodePassword(password string, salt string) string
- func Encrypt(payload []byte, secret string) ([]byte, error)
- func GenerateShortUid() string
- func GetAgeString(t time.Time) string
- func GetBasicAuthHeader(user string, password string) string
- func GetRandomString(n int, alphabets ...byte) string
- func IsEmail(str string) bool
- func IsValidShortUid(uid string) bool
- func JoinUrlFragments(a, b string) string
- func Md5Sum(reader io.Reader) (string, error)
- func Md5SumString(input string) (string, error)
- func PBKDF2(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte
- func SplitString(str string) []string
- func StringsFallback2(val1 string, val2 string) string
- func StringsFallback3(val1 string, val2 string, val3 string) string
- func Walk(path string, followSymlinks bool, detectSymlinkInfiniteLoop bool, ...) error
- type DynMap
- type UrlQueryReader
- type WalkFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var WalkSkipDir = errors.New("skip this directory")
WalkSkipDir is the Error returned when we want to skip descending into a directory
Functions ¶
func EncodePassword ¶
func GenerateShortUid ¶
func GenerateShortUid() string
GenerateShortUid generates a short unique identifier.
func GetAgeString ¶
func GetBasicAuthHeader ¶
func GetRandomString ¶
func IsValidShortUid ¶
IsValidShortUid checks if short unique identifier contains valid characters
func JoinUrlFragments ¶
func Md5SumString ¶ added in v5.2.0
Md5Sum calculates the md5sum of a string
func SplitString ¶
func StringsFallback2 ¶
func Walk ¶
Walk walks a path, optionally following symbolic links, and for each path, it calls the walkFn passed.
It is similar to filepath.Walk, except that it supports symbolic links and can detect infinite loops while following sym links. It solves the issue where your WalkFunc needs a path relative to the symbolic link (resolving links within walkfunc loses the path to the symbolic link for each traversal).
Types ¶
type UrlQueryReader ¶
type UrlQueryReader struct {
// contains filtered or unexported fields
}
func NewUrlQueryReader ¶
func NewUrlQueryReader(urlInfo *url.URL) (*UrlQueryReader, error)
Click to show internal directories.
Click to hide internal directories.