Documentation ¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func ClearDir(dir string) error
- func ConvertToJSON(item interface{}) (string, error)
- func Decrypt(data []byte, passphrase string) ([]byte, error)
- func DeleteDir(dir string) bool
- func DeleteFile(path string) error
- func DirExists(path string) bool
- func Encrypt(data []byte, passphrase string) ([]byte, error)
- func EnsureDir(dirName string, mode int) (bool, error)
- func EnsureTrailingSlash(dir string) string
- func FileExists(path string) bool
- func FilterFiles(files, filters []string) []string
- func GenerateUUID4() string
- func GetHostname() (string, error)
- func HashPassword(password string) (string, error)
- func InArray(val interface{}, array interface{}) bool
- func IsEmailValid(email string) bool
- func IsEmpty(item string) bool
- func LoadFromJSON(item interface{}, data []byte) error
- func PathExists(path string) bool
- func ReadFile(path string) (string, error)
- func RemoveStartingSlash(dir string) string
- func RemoveTrailingSlash(dir string) string
- func StoreFile(path, content string) error
- func Unset(a []string, i int) []string
- func ValidRelPath(path string) bool
- type Map
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
CheckPasswordHash validate password with a hash
func ConvertToJSON ¶
ConvertToJSON convert object to json
func EnsureTrailingSlash ¶
EnsureTrailingSlash ensure there is a trailing slash
func FileExists ¶
FileExists reports whether the named file exists
func FilterFiles ¶
FilterFiles filters files list based on specific sub-strings
func HashPassword ¶
HashPassword hashes the password
func InArray ¶
func InArray(val interface{}, array interface{}) bool
InArray check if value is on array
func IsEmailValid ¶
IsEmailValid checks if the email provided passes the required structure and length test. It also checks the domain has a valid MX record.
func LoadFromJSON ¶
LoadFromJSON update object from json
func RemoveStartingSlash ¶
RemoveStartingSlash removes any starting slash
func RemoveTrailingSlash ¶
RemoveTrailingSlash removes any trailing slash
func ValidRelPath ¶
ValidRelPath checks for path traversal and correct forward slashes