repository

package
v0.0.0-...-3e80ac3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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)

func (*GenericRepositoryImplMock[T]) List

func (pkg *GenericRepositoryImplMock[T]) List(ctx context.Context, offset, limit int) (items []T, total int, err error)

func (*GenericRepositoryImplMock[T]) Search

func (pkg *GenericRepositoryImplMock[T]) Search(ctx context.Context, text string, offset, limit int) (items []T, total int, err error)

func (*GenericRepositoryImplMock[T]) Update

func (pkg *GenericRepositoryImplMock[T]) Update(ctx context.Context, body 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)

func (*GenericRequestImpl[T]) List

func (pkg *GenericRequestImpl[T]) List(ctx context.Context, offset, limit int) (items []T, total int, err error)

func (*GenericRequestImpl[T]) Search

func (pkg *GenericRequestImpl[T]) Search(ctx context.Context, text string, offset, limit int) (items []T, total int, err error)

func (*GenericRequestImpl[T]) Update

func (pkg *GenericRequestImpl[T]) Update(ctx context.Context, body 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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL