Documentation ¶
Index ¶
- type GenericRepositoryImplMock
- func (pkg *GenericRepositoryImplMock[T]) Create(ctx context.Context, body T) (item T, err error)
- func (pkg *GenericRepositoryImplMock[T]) Delete(ctx context.Context, id int) (err error)
- func (pkg *GenericRepositoryImplMock[T]) GetByID(ctx context.Context, id int) (item T, err error)
- func (pkg *GenericRepositoryImplMock[T]) List(ctx context.Context, offset, limit int) (items []T, total int, err error)
- func (pkg *GenericRepositoryImplMock[T]) Search(ctx context.Context, text string, offset, limit int) (items []T, total int, err error)
- func (pkg *GenericRepositoryImplMock[T]) Update(ctx context.Context, body T) (err error)
- type GenericRequestImpl
- func (pkg *GenericRequestImpl[T]) Create(ctx context.Context, body T) (item T, err error)
- func (pkg *GenericRequestImpl[T]) Delete(ctx context.Context, id int) (err error)
- func (pkg *GenericRequestImpl[T]) GetByID(ctx context.Context, id int) (item T, err error)
- func (pkg *GenericRequestImpl[T]) List(ctx context.Context, offset, limit int) (items []T, total int, err error)
- func (pkg *GenericRequestImpl[T]) Search(ctx context.Context, text string, offset, limit int) (items []T, total int, err error)
- func (pkg *GenericRequestImpl[T]) Update(ctx context.Context, body T) (err error)
- type ProductRequestImpl
- func (pkg *ProductRequestImpl) Create(ctx context.Context, body *domain.ProductResource) (item *domain.ProductResource, err error)
- func (pkg *ProductRequestImpl) Delete(ctx context.Context, id int) (err error)
- func (pkg *ProductRequestImpl) GetByID(ctx context.Context, id int) (item *domain.ProductResource, err error)
- func (pkg *ProductRequestImpl) List(ctx context.Context, offset, limit int) (items []*domain.ProductResource, total int, err error)
- func (pkg *ProductRequestImpl) Search(ctx context.Context, text string, offset, limit int) (items []*domain.ProductResource, total int, err error)
- func (pkg *ProductRequestImpl) Update(ctx context.Context, body *domain.ProductResource) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericRepositoryImplMock ¶
type GenericRepositoryImplMock[T domain.GenericResource] struct { mock.Mock Resource T }
func (*GenericRepositoryImplMock[T]) Create ¶
func (pkg *GenericRepositoryImplMock[T]) Create(ctx context.Context, body T) (item T, err error)
func (*GenericRepositoryImplMock[T]) Delete ¶
func (pkg *GenericRepositoryImplMock[T]) Delete(ctx context.Context, id int) (err error)
func (*GenericRepositoryImplMock[T]) GetByID ¶
func (pkg *GenericRepositoryImplMock[T]) GetByID(ctx context.Context, id int) (item T, err error)
type GenericRequestImpl ¶
type GenericRequestImpl[T domain.GenericResource] struct { Resource T }
func (*GenericRequestImpl[T]) Create ¶
func (pkg *GenericRequestImpl[T]) Create(ctx context.Context, body T) (item T, err error)
func (*GenericRequestImpl[T]) Delete ¶
func (pkg *GenericRequestImpl[T]) Delete(ctx context.Context, id int) (err error)
func (*GenericRequestImpl[T]) GetByID ¶
func (pkg *GenericRequestImpl[T]) GetByID(ctx context.Context, id int) (item T, err error)
type ProductRequestImpl ¶
type ProductRequestImpl struct { }
func (*ProductRequestImpl) Create ¶
func (pkg *ProductRequestImpl) Create(ctx context.Context, body *domain.ProductResource) (item *domain.ProductResource, err error)
func (*ProductRequestImpl) Delete ¶
func (pkg *ProductRequestImpl) Delete(ctx context.Context, id int) (err error)
func (*ProductRequestImpl) GetByID ¶
func (pkg *ProductRequestImpl) GetByID(ctx context.Context, id int) (item *domain.ProductResource, err error)
func (*ProductRequestImpl) List ¶
func (pkg *ProductRequestImpl) List(ctx context.Context, offset, limit int) (items []*domain.ProductResource, total int, err error)
func (*ProductRequestImpl) Search ¶
func (pkg *ProductRequestImpl) Search(ctx context.Context, text string, offset, limit int) (items []*domain.ProductResource, total int, err error)
func (*ProductRequestImpl) Update ¶
func (pkg *ProductRequestImpl) Update(ctx context.Context, body *domain.ProductResource) (err error)
Click to show internal directories.
Click to hide internal directories.