mocks

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository added in v1.8.0

type Repository[T interface{}] struct {
	mock.Mock
}

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

func (_m *Repository[T]) CreateInTransaction(ctx context.Context, db *gorm.DB, entity *T) error

CreateInTransaction provides a mock function with given fields: ctx, db, entity

func (*Repository[T]) Delete added in v1.8.0

func (_m *Repository[T]) Delete(ctx context.Context, id string) (bool, error)

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

func (_m *Repository[T]) GetInTransaction(ctx context.Context, db *gorm.DB, id string) (*T, error)

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

type Rulesheets struct {
	mock.Mock
}

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) Create

func (_m *Rulesheets) Create(ctx context.Context, entity *models.Rulesheet) error

Create provides a mock function with given fields: ctx, 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) Delete

func (_m *Rulesheets) Delete(ctx context.Context, id string) (bool, error)

Delete provides a mock function with given fields: ctx, id

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) Get

func (_m *Rulesheets) Get(ctx context.Context, id string) (*models.Rulesheet, error)

Get provides a mock function with given fields: ctx, id

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

func (*Rulesheets) Update

func (_m *Rulesheets) Update(ctx context.Context, entity models.Rulesheet) (*models.Rulesheet, error)

Update provides a mock function with given fields: ctx, entity

func (*Rulesheets) UpdateInTransaction added in v1.8.0

func (_m *Rulesheets) UpdateInTransaction(ctx context.Context, db *gorm.DB, entity models.Rulesheet) (*models.Rulesheet, error)

UpdateInTransaction provides a mock function with given fields: ctx, db, entity

Jump to

Keyboard shortcuts

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