Documentation ¶
Index ¶
- func Wrapper[TEntity any, TRequest any, TResult any](ctx *Context[TRequest], callback Callback[TEntity, TRequest, TResult]) (*TResult, int64, error)
- type Callback
- type Context
- type Crud
- func (uc *Crud[T]) GetById(ctx context.Context, request model.GetByIDRequest[int]) (*[]T, int64, error)
- func (uc *Crud[T]) GetFirstById(ctx context.Context, request model.GetByIDRequest[int]) (*T, int64, error)
- func (uc *Crud[T]) List(ctx context.Context, request model.ListRequest) (*[]T, int64, error)
- type CruderUseCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Crud ¶
type Crud[T any] struct { Log *zap.Logger DB *gorm.DB Repository repository.CruderRepository[T] }
func NewCrud ¶
func NewCrud[T any](log *zap.Logger, db *gorm.DB, repository repository.CruderRepository[T]) *Crud[T]
func (*Crud[T]) GetFirstById ¶
type CruderUseCase ¶
Click to show internal directories.
Click to hide internal directories.