Documentation ¶
Index ¶
- type Repository
- func (_m *Repository[T]) Count(ctx context.Context, entity interface{}) (int64, error)
- func (_m *Repository[T]) CountInTransaction(ctx context.Context, db *gorm.DB, entity interface{}) (int64, error)
- func (_m *Repository[T]) Create(ctx context.Context, entity *T) error
- func (_m *Repository[T]) CreateInTransaction(ctx context.Context, db *gorm.DB, entity *T) error
- func (_m *Repository[T]) Delete(ctx context.Context, id string) (bool, error)
- func (_m *Repository[T]) DeleteInTransaction(ctx context.Context, db *gorm.DB, id string) (bool, error)
- func (_m *Repository[T]) Find(ctx context.Context, entity interface{}, options *repository.FindOptions) ([]*T, error)
- func (_m *Repository[T]) FindInTransaction(ctx context.Context, db *gorm.DB, entity interface{}, ...) ([]*T, error)
- func (_m *Repository[T]) Get(ctx context.Context, id string) (*T, error)
- func (_m *Repository[T]) GetDB() *gorm.DB
- func (_m *Repository[T]) GetInTransaction(ctx context.Context, db *gorm.DB, id string) (*T, error)
- func (_m *Repository[T]) Update(ctx context.Context, entity T) (*T, error)
- func (_m *Repository[T]) UpdateInTransaction(ctx context.Context, db *gorm.DB, entity T) (*T, error)
- type Rulesheets
- func (_m *Rulesheets) Count(ctx context.Context, entity interface{}) (int64, error)
- func (_m *Rulesheets) CountInTransaction(ctx context.Context, db *gorm.DB, entity interface{}) (int64, error)
- func (_m *Rulesheets) Create(ctx context.Context, entity *models.Rulesheet) error
- func (_m *Rulesheets) CreateInTransaction(ctx context.Context, db *gorm.DB, entity *models.Rulesheet) error
- func (_m *Rulesheets) Delete(ctx context.Context, id string) (bool, error)
- func (_m *Rulesheets) DeleteInTransaction(ctx context.Context, db *gorm.DB, id string) (bool, error)
- func (_m *Rulesheets) Find(ctx context.Context, entity interface{}, options *repository.FindOptions) ([]*models.Rulesheet, error)
- func (_m *Rulesheets) FindInTransaction(ctx context.Context, db *gorm.DB, entity interface{}, ...) ([]*models.Rulesheet, error)
- func (_m *Rulesheets) Get(ctx context.Context, id string) (*models.Rulesheet, error)
- func (_m *Rulesheets) GetDB() *gorm.DB
- func (_m *Rulesheets) GetInTransaction(ctx context.Context, db *gorm.DB, id string) (*models.Rulesheet, error)
- func (_m *Rulesheets) Update(ctx context.Context, entity models.Rulesheet) (*models.Rulesheet, error)
- func (_m *Rulesheets) UpdateInTransaction(ctx context.Context, db *gorm.DB, entity models.Rulesheet) (*models.Rulesheet, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶ added in v1.8.0
Repository is an autogenerated mock type for the Repository type
func NewRepository ¶ added in v1.8.0
func NewRepository[T interface{}](t mockConstructorTestingTNewRepository) *Repository[T]
NewRepository creates a new instance of Repository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Repository[T]) Count ¶ added in v1.8.0
func (_m *Repository[T]) Count(ctx context.Context, entity interface{}) (int64, error)
Count provides a mock function with given fields: ctx, entity
func (*Repository[T]) CountInTransaction ¶ added in v1.8.0
func (_m *Repository[T]) CountInTransaction(ctx context.Context, db *gorm.DB, entity interface{}) (int64, error)
CountInTransaction provides a mock function with given fields: ctx, db, entity
func (*Repository[T]) Create ¶ added in v1.8.0
func (_m *Repository[T]) Create(ctx context.Context, entity *T) error
Create provides a mock function with given fields: ctx, entity
func (*Repository[T]) CreateInTransaction ¶ added in v1.8.0
CreateInTransaction provides a mock function with given fields: ctx, db, entity
func (*Repository[T]) Delete ¶ added in v1.8.0
Delete provides a mock function with given fields: ctx, id
func (*Repository[T]) DeleteInTransaction ¶ added in v1.8.0
func (_m *Repository[T]) DeleteInTransaction(ctx context.Context, db *gorm.DB, id string) (bool, error)
DeleteInTransaction provides a mock function with given fields: ctx, db, id
func (*Repository[T]) Find ¶ added in v1.8.0
func (_m *Repository[T]) Find(ctx context.Context, entity interface{}, options *repository.FindOptions) ([]*T, error)
Find provides a mock function with given fields: ctx, entity, options
func (*Repository[T]) FindInTransaction ¶ added in v1.8.0
func (_m *Repository[T]) FindInTransaction(ctx context.Context, db *gorm.DB, entity interface{}, options *repository.FindOptions) ([]*T, error)
FindInTransaction provides a mock function with given fields: ctx, db, entity, options
func (*Repository[T]) Get ¶ added in v1.8.0
func (_m *Repository[T]) Get(ctx context.Context, id string) (*T, error)
Get provides a mock function with given fields: ctx, id
func (*Repository[T]) GetDB ¶ added in v1.8.0
func (_m *Repository[T]) GetDB() *gorm.DB
GetDB provides a mock function with given fields:
func (*Repository[T]) GetInTransaction ¶ added in v1.8.0
GetInTransaction provides a mock function with given fields: ctx, db, id
func (*Repository[T]) Update ¶ added in v1.8.0
func (_m *Repository[T]) Update(ctx context.Context, entity T) (*T, error)
Update provides a mock function with given fields: ctx, entity
func (*Repository[T]) UpdateInTransaction ¶ added in v1.8.0
func (_m *Repository[T]) UpdateInTransaction(ctx context.Context, db *gorm.DB, entity T) (*T, error)
UpdateInTransaction provides a mock function with given fields: ctx, db, entity
type Rulesheets ¶
Rulesheets is an autogenerated mock type for the Rulesheets type
func NewRulesheets ¶
func NewRulesheets(t mockConstructorTestingTNewRulesheets) *Rulesheets
NewRulesheets creates a new instance of Rulesheets. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Rulesheets) Count ¶ added in v1.3.2
func (_m *Rulesheets) Count(ctx context.Context, entity interface{}) (int64, error)
Count provides a mock function with given fields: ctx, entity
func (*Rulesheets) CountInTransaction ¶ added in v1.8.0
func (_m *Rulesheets) CountInTransaction(ctx context.Context, db *gorm.DB, entity interface{}) (int64, error)
CountInTransaction provides a mock function with given fields: ctx, db, entity
func (*Rulesheets) CreateInTransaction ¶ added in v1.8.0
func (_m *Rulesheets) CreateInTransaction(ctx context.Context, db *gorm.DB, entity *models.Rulesheet) error
CreateInTransaction provides a mock function with given fields: ctx, db, entity
func (*Rulesheets) DeleteInTransaction ¶ added in v1.8.0
func (_m *Rulesheets) DeleteInTransaction(ctx context.Context, db *gorm.DB, id string) (bool, error)
DeleteInTransaction provides a mock function with given fields: ctx, db, id
func (*Rulesheets) Find ¶
func (_m *Rulesheets) Find(ctx context.Context, entity interface{}, options *repository.FindOptions) ([]*models.Rulesheet, error)
Find provides a mock function with given fields: ctx, entity, options
func (*Rulesheets) FindInTransaction ¶ added in v1.8.0
func (_m *Rulesheets) FindInTransaction(ctx context.Context, db *gorm.DB, entity interface{}, options *repository.FindOptions) ([]*models.Rulesheet, error)
FindInTransaction provides a mock function with given fields: ctx, db, entity, options
func (*Rulesheets) GetDB ¶ added in v1.8.0
func (_m *Rulesheets) GetDB() *gorm.DB
GetDB provides a mock function with given fields:
func (*Rulesheets) GetInTransaction ¶ added in v1.8.0
func (_m *Rulesheets) GetInTransaction(ctx context.Context, db *gorm.DB, id string) (*models.Rulesheet, error)
GetInTransaction provides a mock function with given fields: ctx, db, id