Documentation
¶
Index ¶
- Constants
- func BuildMetaData(page int, size int, order string, totalData int, totalPage int) *model.Metadata
- func CheckPasswordHash(hash, password string) bool
- func GenerateRandomToken(n int) string
- func GetEnvInt(key string) int
- func GetEnvString(key string) string
- func HashPassword(password string) (string, error)
- func OptionsHandler(ctx *fiber.Ctx) error
- func QueryUpdateBuilder(tableName string, mapArgs map[string]interface{}, wheres []string) (query string, args []interface{}, err error)
- func ResponseFormatter[T any](ctx *fiber.Ctx, statusCode int, err error, message string, data T, ...) error
Constants ¶
View Source
const (
StandardLayout = "2006-01-02"
)
Variables ¶
This section is empty.
Functions ¶
func BuildMetaData ¶
BuildMetaData will building a meta data responses based on param
func CheckPasswordHash ¶
CheckPasswordHash will compare current password with hashed password in database
func GenerateRandomToken ¶
GenerateRandomToken is wrapper function to generating a unique random token
func GetEnvString ¶
GetEnvString return env string based on key
func HashPassword ¶
HashPassword will transform from plain password into hashed password
func OptionsHandler ¶
func OptionsHandler(ctx *fiber.Ctx) error
OptionsHandler will handing preflight requests
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.