Documentation
¶
Overview ¶
Package utils is a utility package that provides functions for program's utility operations
Index ¶
- func AutoMigrate(db *sql.DB) error
- func BindJSONWithValidation(c *gin.Context, obj any) bool
- func CtxWithTimeOut(c *gin.Context) (context.Context, context.CancelFunc)
- func GenerateJWT(user models.User, jwtType string) (jwtToken string, jti string, err error)
- func GetUser(c *gin.Context) (models.User, error)
- func IsPGUniqueViolation(err error) bool
- func SendEmail(to string, subject string, body string) error
- func ValidateJWT(tokenString string, jwtType string) (jwt.MapClaims, error)
- func ValidateStruct(s any) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrate ¶
func CtxWithTimeOut ¶
func GenerateJWT ¶
func IsPGUniqueViolation ¶
func ValidateStruct ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.