Documentation ¶
Index ¶
- func DuplicateError(err error, size int) []error
- func FileExists(path string) (bool, error)
- func FindField(m map[string]interface{}, qualifiedField string) (interface{}, bool)
- func GenerateRandomKey(l int) (string, error)
- func GenerateRandomPassword(l int) (string, error)
- func GetYMDFromDatabaseDate(dateString string) string
- func IsBannedPassword(password string) bool
- func MD5FromBytes(data []byte) string
- func MD5FromFilePath(filePath string) (string, error)
- func MD5FromString(str string) string
- func ParseDateStringAsFormat(dateString string, format string) (string, error)
- func ParseDateStringAsTime(dateString string) (time.Time, error)
- func ResolveEnum(value sql.NullString, out interface{}) bool
- func ResolveEnumString(value string, out interface{}) bool
- func StrFilter(vs []string, f func(string) bool) []string
- func StrInclude(vs []string, t string) bool
- func StrIndex(vs []string, t string) int
- func StrMap(vs []string, f func(string) string) []string
- func StrSliceCompare(subject []string, against []string) (added []string, missing []string)
- func Touch(path string) error
- func UUIDInclude(vs []uuid.UUID, t uuid.UUID) bool
- func UUIDIndex(vs []uuid.UUID, t uuid.UUID) int
- func UUIDSliceCompare(subject []uuid.UUID, against []uuid.UUID) (added []uuid.UUID, missing []uuid.UUID)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DuplicateError ¶
func FileExists ¶
FileExists returns true if the given path exists
func FindField ¶
FindField traverses a json map, searching for the field matching the qualified field string provided.
For example: a qualifiedField of "foo" returns value of the "foo" key in the provided map. A qualifiedField of "foo.bar" will find the "foo" value, and if it is a map[string]interface{}, will return the "bar" value of that map. Returns the value and true if the value was found. Returns nil and false if the value was not found, or if one of the intermediate values was not a map[string]interface{}
func GenerateRandomKey ¶
func GenerateRandomPassword ¶
func GetYMDFromDatabaseDate ¶
func IsBannedPassword ¶
IsBannedPassword returns true if the password matches one from the banned password list.
func MD5FromBytes ¶
func MD5FromFilePath ¶
func MD5FromString ¶
func ParseDateStringAsFormat ¶
func ResolveEnum ¶
func ResolveEnum(value sql.NullString, out interface{}) bool
func ResolveEnumString ¶
func StrInclude ¶
func StrSliceCompare ¶
StrSliceCompare returns a slice of strings that are present in subject but not in against - in the added slice - and a slice of strings that are not present in subject, and are in against - in the missing slice.
func UUIDSliceCompare ¶ added in v0.1.0
func UUIDSliceCompare(subject []uuid.UUID, against []uuid.UUID) (added []uuid.UUID, missing []uuid.UUID)
UUIDSliceCompare returns a slice of UUIDs that are present in subject but not in against - in the added slice - and a slice of strings that are not present in subject, and are in against - in the missing slice.
Types ¶
This section is empty.