Documentation
¶
Index ¶
- Constants
- func GetIntPathParam[T constraints.Integer](ctx *gin.Context, key string) (ret T, err error)
- func GetIntPathParamFiber[T constraints.Integer](ctx *fiber.Ctx, key string) (ret T, err error)
- func GetIntQueryParam[T constraints.Integer](ctx *gin.Context, key string) (ret T, err error)
- func GetRange(ctx *gin.Context, limitDef, offsetDef int64) rangeConf
- func LoadGormDB() *gorm.DB
- func NewErrResponseRegistry(err ...error) errRepo
- func NewListResponse[T any](status int64, rangeInfo rangeConf, total int64, body []T) listResponse[T]
- func NewResponse[T Model](status int64, body T) response[T]
- func NewResponseRegistry[T Model]() respOk[T]
- type CRud
- type CrudOpt
- type ErrorResponser
- type GormModel
- type ICrud
- type LogicFunc
- type Model
- type ModelBase
- type Responser
Constants ¶
View Source
const ( ErrorUnknown = 0 ErrorNotFound = 1 ErrorInvalidRequest = 2 ErrorAuthNoSessionCookie = 3 ErrorAuthServiceError = 4 ErrorAuthNoPhone = 5 ErrorAuthWrongPhone = 6 ErrorTelegramSendError = 7 ErrorTelegramNoBotToken = 8 ErrorTelegramNoChatID = 9 ErrorTooManyResult = 10 ErrorShortRequest = 11 ErrorEmployeeIsNull = 12 ErrorTimeout = 14 )
Variables ¶
This section is empty.
Functions ¶
func GetIntPathParam ¶
func GetIntPathParamFiber ¶
func GetIntQueryParam ¶
func LoadGormDB ¶
func NewErrResponseRegistry ¶
func NewErrResponseRegistry(err ...error) errRepo
NewErrResponseRegistry ...
func NewListResponse ¶
func NewListResponse[T any](status int64, rangeInfo rangeConf, total int64, body []T) listResponse[T]
NewListResponse ...
Types ¶
type CRud ¶
type CRud[T Model] struct { ReadOneLogic LogicFunc CreateOneLogic LogicFunc ReadManyLogic LogicFunc UpdateOneLogic LogicFunc DeleteOneLogic LogicFunc // contains filtered or unexported fields }
func (*CRud[T]) CrudRouter ¶
type ErrorResponser ¶
type ErrorResponser interface {
Match(error) errorResponse
}
ErrorResponser ...
Click to show internal directories.
Click to hide internal directories.