Documentation ¶
Index ¶
- func Clone[T any](fromValue T) (toValue T)
- func CorsHeaders() map[string]string
- func DeepCopy(fromValue interface{}) (toValue interface{})
- func DetermineDaysLeft(fromDateLocal time.Time, toDateLocal time.Time) int
- func EscapeOpenSearchSearchString(str string) string
- func FormatPhoneNumber(phoneNumber string) string
- func GetEnv(name string, def string) (env string)
- func IsEqual(expected interface{}, actual interface{}) bool
- func IsUrlStrict(str string) bool
- func IsValidUsername(str string) bool
- func NormalizeEmail(email string) string
- func PointerToValue[V any](value *V) V
- func RemoveUrlScheme(str string) string
- func SplitAndCleanEmailAddresses(emails string) []string
- func StandardisePhoneNumber(number string) string
- func StripEmail(email string) (strippedEmail string, strippedDomain string)
- func StripQueryString(inputUrl string) (string, error)
- func ValidateEmailAddress(email string, options ...map[string]string) (string, error)
- func ValidateIPAddress(ipAddress string) (cleanedIPAddress string, err error)
- func ValueToPointer[V any](value V) *V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetermineDaysLeft ¶ added in v1.201.0
func EscapeOpenSearchSearchString ¶ added in v1.113.0
EscapeOpenSearchSearchString See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_reserved_characters
func FormatPhoneNumber ¶ added in v1.113.0
func IsEqual ¶ added in v1.121.0
func IsEqual(expected interface{}, actual interface{}) bool
IsEqual returns if the two objects are equal
func IsUrlStrict ¶ added in v1.113.0
IsUrlStrict Returns whether a URL is valid in a strict way (Must have scheme and host)
func IsValidUsername ¶ added in v1.113.0
func NormalizeEmail ¶ added in v1.217.0
func PointerToValue ¶ added in v1.113.0
func PointerToValue[V any](value *V) V
func RemoveUrlScheme ¶ added in v1.113.0
RemoveUrlScheme Removes http:// or https:// from a URL
func SplitAndCleanEmailAddresses ¶ added in v1.201.0
func StandardisePhoneNumber ¶ added in v1.113.0
StandardisePhoneNumber standardises phone numbers with +27 instead of 0 prefix
func StripEmail ¶ added in v1.181.0
func StripQueryString ¶ added in v1.113.0
StripQueryString - Strips the query parameters from a URL
func ValidateEmailAddress ¶ added in v1.113.0
func ValidateIPAddress ¶ added in v1.217.0
func ValueToPointer ¶ added in v1.113.0
func ValueToPointer[V any](value V) *V
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.