Documentation
¶
Index ¶
- Variables
- func CompressString(s string) string
- func ConvertToEnglishDigits(input string) string
- func DecodeBase64(data string) ([]byte, error)
- func GenerateOTP() (string, error)
- func GenerateRandomKey(length int) (string, error)
- func GenerateUUID() string
- func GetJsonMapFromFile(path string) (map[string]interface{}, error)
- func HasValidExtension(name string, validExtensions map[string]struct{}) bool
- func IsEmail(email string) (string, bool)
- func IsPhone(phone string) (string, bool)
- func Is_IR_Phone(phone string) bool
- func PhoneOrMail(data string) (string, string)
- func SafeString(input string, charsToRemove []rune) string
- func SanitizeInput(input string) (string, error)
- func StrToOriginal(value string, targetType string) (interface{}, error)
- func ToBase64(data []byte) string
- func ToJSON(data interface{}) string
- func UnJSON(data []byte) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
OTP_Length int = 6
)
View Source
var SanitizeInputRegex *regexp.Regexp = regexp.MustCompile(`^[a-zA-Z0-9@._-]+$`)
Functions ¶
func CompressString ¶
func ConvertToEnglishDigits ¶
Converts any digits in the input string to English digits
func DecodeBase64 ¶
func GenerateOTP ¶
func GenerateRandomKey ¶
func GenerateUUID ¶
func GenerateUUID() string
func GetJsonMapFromFile ¶
func HasValidExtension ¶
Check if the given file name has a valid extension from the provided list
func Is_IR_Phone ¶
func PhoneOrMail ¶
func SafeString ¶
Sanitize the entire input string by processing it in chunks
func SanitizeInput ¶
func StrToOriginal ¶
Converts string values to the specified target type
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.