Documentation ¶
Index ¶
- func GenerateJwt(user entity.User, secret string) (string, error)
- func GetPageMeta(db *gorm.DB, entity any, page, size *uint) (*model.PageMeta, error)
- func GetValidationErrorsResponse(c *fiber.Ctx) []*model.ValidationErrorResponse
- func PaginateGorm(page, size *uint) func(db *gorm.DB) *gorm.DB
- func ParseAndValidateRequest[T any](c *fiber.Ctx, validate *validator.Validate, request *T, options ParseOptions) error
- func ParseJwt(tokenString, secret string) (model.JwtClaims, error)
- type ParseOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPageMeta ¶
func GetValidationErrorsResponse ¶
func GetValidationErrorsResponse(c *fiber.Ctx) []*model.ValidationErrorResponse
func PaginateGorm ¶
how to use: db.Scopes(PaginateGorm(page, size)).Find()
func ParseAndValidateRequest ¶
func ParseAndValidateRequest[T any](c *fiber.Ctx, validate *validator.Validate, request *T, options ParseOptions) error
Types ¶
type ParseOptions ¶
Click to show internal directories.
Click to hide internal directories.