Documentation ¶
Index ¶
- func CalculatePercentVariation(currentValue, lastValue float64) float64
- func Controller(handler func(*fiber.Ctx) (PaginateResponse, error)) func(*fiber.Ctx) error
- func GenerateEnumErrorDetail(fieldName string, validValues []interface{}) string
- func GetLastMonth() (time.Month, int)
- func RegisterBirthDateFormatValidation(validate *validator.Validate) error
- func RegisterCPFValidation(validate *validator.Validate) error
- func RegisterNotFutureDateValidation(validate *validator.Validate) error
- func UpdateModelFromDTO(model interface{}, dto interface{})
- func ValidateBirthDateFormat(fl validator.FieldLevel) bool
- func ValidateCPF(fl validator.FieldLevel) bool
- func ValidateNotFutureDate(fl validator.FieldLevel) bool
- type PaginateErrorResponse
- type PaginateResponse
- type TQueryBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Controller ¶
func Controller(handler func(*fiber.Ctx) (PaginateResponse, error)) func(*fiber.Ctx) error
func GenerateEnumErrorDetail ¶
func GetLastMonth ¶
func RegisterBirthDateFormatValidation ¶
func RegisterBirthDateFormatValidation(validate *validator.Validate) error
func RegisterCPFValidation ¶
func RegisterCPFValidation(validate *validator.Validate) error
func RegisterNotFutureDateValidation ¶
func RegisterNotFutureDateValidation(validate *validator.Validate) error
func UpdateModelFromDTO ¶
func UpdateModelFromDTO(model interface{}, dto interface{})
func ValidateBirthDateFormat ¶
func ValidateBirthDateFormat(fl validator.FieldLevel) bool
func ValidateCPF ¶
func ValidateCPF(fl validator.FieldLevel) bool
func ValidateNotFutureDate ¶
func ValidateNotFutureDate(fl validator.FieldLevel) bool
Types ¶
type PaginateErrorResponse ¶
type PaginateErrorResponse struct { Meta appDto.MetaDTO `json:"meta"` Errors []appDto.CustomErrorDTO `json:"errors"` }
func PaginateError ¶
func PaginateError(errors []appDto.CustomErrorDTO) PaginateErrorResponse
type PaginateResponse ¶
type PaginateResponse struct { Meta appDto.MetaDTO `json:"meta"` Result interface{} `json:"result"` }
func Paginate ¶
func Paginate(data interface{}, totalCount int64, page int, limit int) PaginateResponse
func PaginateSingle ¶
func PaginateSingle(data interface{}) PaginateResponse
type TQueryBuilder ¶
type TQueryBuilder struct {
// contains filtered or unexported fields
}
func QueryBuilder ¶
func QueryBuilder(dto interface{}, query *gorm.DB) *TQueryBuilder
func (*TQueryBuilder) ApplyOrder ¶
func (qb *TQueryBuilder) ApplyOrder() *gorm.DB
func (*TQueryBuilder) BuildQuery ¶
func (qb *TQueryBuilder) BuildQuery() *gorm.DB
func (*TQueryBuilder) GetPagination ¶
func (qb *TQueryBuilder) GetPagination() (int, int)
Click to show internal directories.
Click to hide internal directories.