Documentation ¶
Index ¶
- type EntityCreationValidator
- type EntityCreationValidator_Expecter
- type EntityCreationValidator_ValidateToCreate_Call
- type EntityDeleteValidator
- type EntityDeleteValidator_Expecter
- type EntityDeleteValidator_ValidateToDelete_Call
- type EntityUpdateValidator
- type EntityUpdateValidator_Expecter
- type EntityUpdateValidator_ValidateToUpdate_Call
- type EntityValidator
- func (_m *EntityValidator[T]) EXPECT() *EntityValidator_Expecter[T]
- func (_m *EntityValidator[T]) ValidateToCreate(ctx context.Context, entity *T) error
- func (_m *EntityValidator[T]) ValidateToDelete(ctx context.Context, entity *T) error
- func (_m *EntityValidator[T]) ValidateToUpdate(ctx context.Context, origin *T, updated *T) error
- func (_m *EntityValidator[T]) WithTx(tx *gorm.DB) validation.EntityValidator[T]
- type EntityValidator_Expecter
- func (_e *EntityValidator_Expecter[T]) ValidateToCreate(ctx interface{}, entity interface{}) *EntityValidator_ValidateToCreate_Call[T]
- func (_e *EntityValidator_Expecter[T]) ValidateToDelete(ctx interface{}, entity interface{}) *EntityValidator_ValidateToDelete_Call[T]
- func (_e *EntityValidator_Expecter[T]) ValidateToUpdate(ctx interface{}, origin interface{}, updated interface{}) *EntityValidator_ValidateToUpdate_Call[T]
- func (_e *EntityValidator_Expecter[T]) WithTx(tx interface{}) *EntityValidator_WithTx_Call[T]
- type EntityValidator_ValidateToCreate_Call
- type EntityValidator_ValidateToDelete_Call
- type EntityValidator_ValidateToUpdate_Call
- type EntityValidator_WithTx_Call
- type ValidationFunc
- type ValidationFunc_Execute_Call
- type ValidationFunc_Expecter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityCreationValidator ¶
type EntityCreationValidator[T common.EntityConstraint] struct { mock.Mock }
EntityCreationValidator is an autogenerated mock type for the EntityCreationValidator type
func NewEntityCreationValidator ¶
func NewEntityCreationValidator[T common.EntityConstraint](t mockConstructorTestingTNewEntityCreationValidator) *EntityCreationValidator[T]
NewEntityCreationValidator creates a new instance of EntityCreationValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*EntityCreationValidator[T]) EXPECT ¶
func (_m *EntityCreationValidator[T]) EXPECT() *EntityCreationValidator_Expecter[T]
func (*EntityCreationValidator[T]) ValidateToCreate ¶
func (_m *EntityCreationValidator[T]) ValidateToCreate(ctx context.Context, entity *T) error
ValidateToCreate provides a mock function with given fields: ctx, entity
type EntityCreationValidator_Expecter ¶
type EntityCreationValidator_Expecter[T common.EntityConstraint] struct { // contains filtered or unexported fields }
func (*EntityCreationValidator_Expecter[T]) ValidateToCreate ¶
func (_e *EntityCreationValidator_Expecter[T]) ValidateToCreate(ctx interface{}, entity interface{}) *EntityCreationValidator_ValidateToCreate_Call[T]
ValidateToCreate is a helper method to define mock.On call
- ctx context.Context
- entity *T
type EntityCreationValidator_ValidateToCreate_Call ¶
type EntityCreationValidator_ValidateToCreate_Call[T common.EntityConstraint] struct { *mock.Call }
EntityCreationValidator_ValidateToCreate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateToCreate'
func (*EntityCreationValidator_ValidateToCreate_Call[T]) Return ¶
func (_c *EntityCreationValidator_ValidateToCreate_Call[T]) Return(_a0 error) *EntityCreationValidator_ValidateToCreate_Call[T]
func (*EntityCreationValidator_ValidateToCreate_Call[T]) Run ¶
func (_c *EntityCreationValidator_ValidateToCreate_Call[T]) Run(run func(ctx context.Context, entity *T)) *EntityCreationValidator_ValidateToCreate_Call[T]
type EntityDeleteValidator ¶
type EntityDeleteValidator[T common.EntityConstraint] struct { mock.Mock }
EntityDeleteValidator is an autogenerated mock type for the EntityDeleteValidator type
func NewEntityDeleteValidator ¶
func NewEntityDeleteValidator[T common.EntityConstraint](t mockConstructorTestingTNewEntityDeleteValidator) *EntityDeleteValidator[T]
NewEntityDeleteValidator creates a new instance of EntityDeleteValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*EntityDeleteValidator[T]) EXPECT ¶
func (_m *EntityDeleteValidator[T]) EXPECT() *EntityDeleteValidator_Expecter[T]
func (*EntityDeleteValidator[T]) ValidateToDelete ¶
func (_m *EntityDeleteValidator[T]) ValidateToDelete(ctx context.Context, entity *T) error
ValidateToDelete provides a mock function with given fields: ctx, entity
type EntityDeleteValidator_Expecter ¶
type EntityDeleteValidator_Expecter[T common.EntityConstraint] struct { // contains filtered or unexported fields }
func (*EntityDeleteValidator_Expecter[T]) ValidateToDelete ¶
func (_e *EntityDeleteValidator_Expecter[T]) ValidateToDelete(ctx interface{}, entity interface{}) *EntityDeleteValidator_ValidateToDelete_Call[T]
ValidateToDelete is a helper method to define mock.On call
- ctx context.Context
- entity *T
type EntityDeleteValidator_ValidateToDelete_Call ¶
type EntityDeleteValidator_ValidateToDelete_Call[T common.EntityConstraint] struct { *mock.Call }
EntityDeleteValidator_ValidateToDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateToDelete'
func (*EntityDeleteValidator_ValidateToDelete_Call[T]) Return ¶
func (_c *EntityDeleteValidator_ValidateToDelete_Call[T]) Return(_a0 error) *EntityDeleteValidator_ValidateToDelete_Call[T]
func (*EntityDeleteValidator_ValidateToDelete_Call[T]) Run ¶
func (_c *EntityDeleteValidator_ValidateToDelete_Call[T]) Run(run func(ctx context.Context, entity *T)) *EntityDeleteValidator_ValidateToDelete_Call[T]
type EntityUpdateValidator ¶
type EntityUpdateValidator[T common.EntityConstraint] struct { mock.Mock }
EntityUpdateValidator is an autogenerated mock type for the EntityUpdateValidator type
func NewEntityUpdateValidator ¶
func NewEntityUpdateValidator[T common.EntityConstraint](t mockConstructorTestingTNewEntityUpdateValidator) *EntityUpdateValidator[T]
NewEntityUpdateValidator creates a new instance of EntityUpdateValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*EntityUpdateValidator[T]) EXPECT ¶
func (_m *EntityUpdateValidator[T]) EXPECT() *EntityUpdateValidator_Expecter[T]
func (*EntityUpdateValidator[T]) ValidateToUpdate ¶
func (_m *EntityUpdateValidator[T]) ValidateToUpdate(ctx context.Context, origin *T, updated *T) error
ValidateToUpdate provides a mock function with given fields: ctx, origin, updated
type EntityUpdateValidator_Expecter ¶
type EntityUpdateValidator_Expecter[T common.EntityConstraint] struct { // contains filtered or unexported fields }
func (*EntityUpdateValidator_Expecter[T]) ValidateToUpdate ¶
func (_e *EntityUpdateValidator_Expecter[T]) ValidateToUpdate(ctx interface{}, origin interface{}, updated interface{}) *EntityUpdateValidator_ValidateToUpdate_Call[T]
ValidateToUpdate is a helper method to define mock.On call
- ctx context.Context
- origin *T
- updated *T
type EntityUpdateValidator_ValidateToUpdate_Call ¶
type EntityUpdateValidator_ValidateToUpdate_Call[T common.EntityConstraint] struct { *mock.Call }
EntityUpdateValidator_ValidateToUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateToUpdate'
func (*EntityUpdateValidator_ValidateToUpdate_Call[T]) Return ¶
func (_c *EntityUpdateValidator_ValidateToUpdate_Call[T]) Return(_a0 error) *EntityUpdateValidator_ValidateToUpdate_Call[T]
func (*EntityUpdateValidator_ValidateToUpdate_Call[T]) Run ¶
func (_c *EntityUpdateValidator_ValidateToUpdate_Call[T]) Run(run func(ctx context.Context, origin *T, updated *T)) *EntityUpdateValidator_ValidateToUpdate_Call[T]
type EntityValidator ¶
type EntityValidator[T common.EntityConstraint] struct { mock.Mock }
EntityValidator is an autogenerated mock type for the EntityValidator type
func NewEntityValidator ¶
func NewEntityValidator[T common.EntityConstraint](t mockConstructorTestingTNewEntityValidator) *EntityValidator[T]
NewEntityValidator creates a new instance of EntityValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*EntityValidator[T]) EXPECT ¶
func (_m *EntityValidator[T]) EXPECT() *EntityValidator_Expecter[T]
func (*EntityValidator[T]) ValidateToCreate ¶
func (_m *EntityValidator[T]) ValidateToCreate(ctx context.Context, entity *T) error
ValidateToCreate provides a mock function with given fields: ctx, entity
func (*EntityValidator[T]) ValidateToDelete ¶
func (_m *EntityValidator[T]) ValidateToDelete(ctx context.Context, entity *T) error
ValidateToDelete provides a mock function with given fields: ctx, entity
func (*EntityValidator[T]) ValidateToUpdate ¶
func (_m *EntityValidator[T]) ValidateToUpdate(ctx context.Context, origin *T, updated *T) error
ValidateToUpdate provides a mock function with given fields: ctx, origin, updated
func (*EntityValidator[T]) WithTx ¶
func (_m *EntityValidator[T]) WithTx(tx *gorm.DB) validation.EntityValidator[T]
WithTx provides a mock function with given fields: tx
type EntityValidator_Expecter ¶
type EntityValidator_Expecter[T common.EntityConstraint] struct { // contains filtered or unexported fields }
func (*EntityValidator_Expecter[T]) ValidateToCreate ¶
func (_e *EntityValidator_Expecter[T]) ValidateToCreate(ctx interface{}, entity interface{}) *EntityValidator_ValidateToCreate_Call[T]
ValidateToCreate is a helper method to define mock.On call
- ctx context.Context
- entity *T
func (*EntityValidator_Expecter[T]) ValidateToDelete ¶
func (_e *EntityValidator_Expecter[T]) ValidateToDelete(ctx interface{}, entity interface{}) *EntityValidator_ValidateToDelete_Call[T]
ValidateToDelete is a helper method to define mock.On call
- ctx context.Context
- entity *T
func (*EntityValidator_Expecter[T]) ValidateToUpdate ¶
func (_e *EntityValidator_Expecter[T]) ValidateToUpdate(ctx interface{}, origin interface{}, updated interface{}) *EntityValidator_ValidateToUpdate_Call[T]
ValidateToUpdate is a helper method to define mock.On call
- ctx context.Context
- origin *T
- updated *T
func (*EntityValidator_Expecter[T]) WithTx ¶
func (_e *EntityValidator_Expecter[T]) WithTx(tx interface{}) *EntityValidator_WithTx_Call[T]
WithTx is a helper method to define mock.On call
- tx *gorm.DB
type EntityValidator_ValidateToCreate_Call ¶
type EntityValidator_ValidateToCreate_Call[T common.EntityConstraint] struct { *mock.Call }
EntityValidator_ValidateToCreate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateToCreate'
func (*EntityValidator_ValidateToCreate_Call[T]) Return ¶
func (_c *EntityValidator_ValidateToCreate_Call[T]) Return(_a0 error) *EntityValidator_ValidateToCreate_Call[T]
func (*EntityValidator_ValidateToCreate_Call[T]) Run ¶
func (_c *EntityValidator_ValidateToCreate_Call[T]) Run(run func(ctx context.Context, entity *T)) *EntityValidator_ValidateToCreate_Call[T]
type EntityValidator_ValidateToDelete_Call ¶
type EntityValidator_ValidateToDelete_Call[T common.EntityConstraint] struct { *mock.Call }
EntityValidator_ValidateToDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateToDelete'
func (*EntityValidator_ValidateToDelete_Call[T]) Return ¶
func (_c *EntityValidator_ValidateToDelete_Call[T]) Return(_a0 error) *EntityValidator_ValidateToDelete_Call[T]
func (*EntityValidator_ValidateToDelete_Call[T]) Run ¶
func (_c *EntityValidator_ValidateToDelete_Call[T]) Run(run func(ctx context.Context, entity *T)) *EntityValidator_ValidateToDelete_Call[T]
type EntityValidator_ValidateToUpdate_Call ¶
type EntityValidator_ValidateToUpdate_Call[T common.EntityConstraint] struct { *mock.Call }
EntityValidator_ValidateToUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateToUpdate'
func (*EntityValidator_ValidateToUpdate_Call[T]) Return ¶
func (_c *EntityValidator_ValidateToUpdate_Call[T]) Return(_a0 error) *EntityValidator_ValidateToUpdate_Call[T]
func (*EntityValidator_ValidateToUpdate_Call[T]) Run ¶
func (_c *EntityValidator_ValidateToUpdate_Call[T]) Run(run func(ctx context.Context, origin *T, updated *T)) *EntityValidator_ValidateToUpdate_Call[T]
type EntityValidator_WithTx_Call ¶
type EntityValidator_WithTx_Call[T common.EntityConstraint] struct { *mock.Call }
EntityValidator_WithTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithTx'
func (*EntityValidator_WithTx_Call[T]) Return ¶
func (_c *EntityValidator_WithTx_Call[T]) Return(_a0 validation.EntityValidator[T]) *EntityValidator_WithTx_Call[T]
func (*EntityValidator_WithTx_Call[T]) Run ¶
func (_c *EntityValidator_WithTx_Call[T]) Run(run func(tx *gorm.DB)) *EntityValidator_WithTx_Call[T]
type ValidationFunc ¶
ValidationFunc is an autogenerated mock type for the ValidationFunc type
func NewValidationFunc ¶
func NewValidationFunc[T interface{}](t mockConstructorTestingTNewValidationFunc) *ValidationFunc[T]
NewValidationFunc creates a new instance of ValidationFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*ValidationFunc[T]) EXPECT ¶
func (_m *ValidationFunc[T]) EXPECT() *ValidationFunc_Expecter[T]
type ValidationFunc_Execute_Call ¶
ValidationFunc_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
func (*ValidationFunc_Execute_Call[T]) Return ¶
func (_c *ValidationFunc_Execute_Call[T]) Return(_a0 error) *ValidationFunc_Execute_Call[T]
func (*ValidationFunc_Execute_Call[T]) Run ¶
func (_c *ValidationFunc_Execute_Call[T]) Run(run func(ctx context.Context, subject *T)) *ValidationFunc_Execute_Call[T]
type ValidationFunc_Expecter ¶
type ValidationFunc_Expecter[T interface{}] struct {
// contains filtered or unexported fields
}
func (*ValidationFunc_Expecter[T]) Execute ¶
func (_e *ValidationFunc_Expecter[T]) Execute(ctx interface{}, subject interface{}) *ValidationFunc_Execute_Call[T]
Execute is a helper method to define mock.On call
- ctx context.Context
- subject *T