Documentation ¶
Index ¶
- type CRUDRepository
- func (_m *CRUDRepository[T, ID]) Count(_a0 squirrel.Sqlizer) (uint, httperrors.HTTPError)
- func (_m *CRUDRepository[T, ID]) Create(_a0 *T) httperrors.HTTPError
- func (_m *CRUDRepository[T, ID]) Delete(_a0 *T) httperrors.HTTPError
- func (_m *CRUDRepository[T, ID]) Find(_a0 squirrel.Sqlizer, _a1 pagination.Paginator, _a2 repository.SortOption) (*pagination.Page[T], httperrors.HTTPError)
- func (_m *CRUDRepository[T, ID]) GetAll(_a0 repository.SortOption) ([]*T, httperrors.HTTPError)
- func (_m *CRUDRepository[T, ID]) GetByID(_a0 ID) (*T, httperrors.HTTPError)
- func (_m *CRUDRepository[T, ID]) Save(_a0 *T) httperrors.HTTPError
- func (_m *CRUDRepository[T, ID]) Transaction(fn func(repository.CRUDRepository[T, ID]) (interface{}, error)) (interface{}, httperrors.HTTPError)
- type SortOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRUDRepository ¶
CRUDRepository is an autogenerated mock type for the CRUDRepository type
func NewCRUDRepository ¶
func NewCRUDRepository[T models.Tabler, ID interface{}](t mockConstructorTestingTNewCRUDRepository) *CRUDRepository[T, ID]
NewCRUDRepository creates a new instance of CRUDRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*CRUDRepository[T, ID]) Count ¶
func (_m *CRUDRepository[T, ID]) Count(_a0 squirrel.Sqlizer) (uint, httperrors.HTTPError)
Count provides a mock function with given fields: _a0
func (*CRUDRepository[T, ID]) Create ¶
func (_m *CRUDRepository[T, ID]) Create(_a0 *T) httperrors.HTTPError
Create provides a mock function with given fields: _a0
func (*CRUDRepository[T, ID]) Delete ¶
func (_m *CRUDRepository[T, ID]) Delete(_a0 *T) httperrors.HTTPError
Delete provides a mock function with given fields: _a0
func (*CRUDRepository[T, ID]) Find ¶
func (_m *CRUDRepository[T, ID]) Find(_a0 squirrel.Sqlizer, _a1 pagination.Paginator, _a2 repository.SortOption) (*pagination.Page[T], httperrors.HTTPError)
Find provides a mock function with given fields: _a0, _a1, _a2
func (*CRUDRepository[T, ID]) GetAll ¶
func (_m *CRUDRepository[T, ID]) GetAll(_a0 repository.SortOption) ([]*T, httperrors.HTTPError)
GetAll provides a mock function with given fields: _a0
func (*CRUDRepository[T, ID]) GetByID ¶
func (_m *CRUDRepository[T, ID]) GetByID(_a0 ID) (*T, httperrors.HTTPError)
GetByID provides a mock function with given fields: _a0
func (*CRUDRepository[T, ID]) Save ¶
func (_m *CRUDRepository[T, ID]) Save(_a0 *T) httperrors.HTTPError
Save provides a mock function with given fields: _a0
func (*CRUDRepository[T, ID]) Transaction ¶
func (_m *CRUDRepository[T, ID]) Transaction(fn func(repository.CRUDRepository[T, ID]) (interface{}, error)) (interface{}, httperrors.HTTPError)
Transaction provides a mock function with given fields: fn
type SortOption ¶
SortOption is an autogenerated mock type for the SortOption type
func NewSortOption ¶
func NewSortOption(t mockConstructorTestingTNewSortOption) *SortOption
NewSortOption creates a new instance of SortOption. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*SortOption) Column ¶
func (_m *SortOption) Column() string
Column provides a mock function with given fields:
func (*SortOption) Desc ¶
func (_m *SortOption) Desc() bool
Desc provides a mock function with given fields: