Documentation ¶
Index ¶
- func BsonSanitize(data *bson.M)
- func ComparePassword(hashedPassword string, password string) bool
- func CreateTokenString(userID primitive.ObjectID, username string, role string) (string, error)
- func GenerateHTMLTemplate(code, p1, p2, p3 string) string
- func GenerateRandomString(length int) (string, error)
- func GetIntQueryParam(param string) (int, error)
- func HashPassword(password string) string
- func PetSanitize(pet *models.Pet)
- func SanitizeString(data string) string
- func UnescapeString(data string) string
- func UserSaniatize(user *models.User)
- func ValidateArrayQueryParam(param []string) ([]string, error)
- func ValidateBase64Image(base64Image string) (*[]string, error)
- func ValidateEmail(email string) bool
- func ValidateStringQueryParam(param string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BsonSanitize ¶
func ComparePassword ¶
ComparePassword compares a hashed password with a plaintext password
func CreateTokenString ¶
func GenerateHTMLTemplate ¶
func GenerateRandomString ¶
GenerateRandomString generates a random string of the given length
func GetIntQueryParam ¶
func HashPassword ¶
HashPassword hashes a password using bcrypt
func PetSanitize ¶
func SanitizeString ¶
func UnescapeString ¶
func UserSaniatize ¶
func ValidateArrayQueryParam ¶
func ValidateBase64Image ¶
func ValidateEmail ¶
ValidateEmail checks if a string is a valid email address
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.