Documentation
¶
Index ¶
- type Repository
- func (_m *Repository) Delete(ctx context.Context, id ids.ID[ids.GatewayKind]) error
- func (_m *Repository) EXPECT() *Repository_Expecter
- func (_m *Repository) FindByDomain(ctx context.Context, domain string) (*gateway.Gateway, error)
- func (_m *Repository) FindByID(ctx context.Context, id ids.ID[ids.GatewayKind]) (*gateway.Gateway, error)
- func (_m *Repository) FindBySlug(ctx context.Context, slug string) (*gateway.Gateway, error)
- func (_m *Repository) List(ctx context.Context, filter gateway.ListFilter) ([]*gateway.Gateway, int, error)
- func (_m *Repository) Save(ctx context.Context, g *gateway.Gateway) error
- func (_m *Repository) Update(ctx context.Context, g *gateway.Gateway) error
- type Repository_Delete_Call
- func (_c *Repository_Delete_Call) Return(_a0 error) *Repository_Delete_Call
- func (_c *Repository_Delete_Call) Run(run func(ctx context.Context, id ids.ID[ids.GatewayKind])) *Repository_Delete_Call
- func (_c *Repository_Delete_Call) RunAndReturn(run func(context.Context, ids.ID[ids.GatewayKind]) error) *Repository_Delete_Call
- type Repository_Expecter
- func (_e *Repository_Expecter) Delete(ctx interface{}, id interface{}) *Repository_Delete_Call
- func (_e *Repository_Expecter) FindByDomain(ctx interface{}, domain interface{}) *Repository_FindByDomain_Call
- func (_e *Repository_Expecter) FindByID(ctx interface{}, id interface{}) *Repository_FindByID_Call
- func (_e *Repository_Expecter) FindBySlug(ctx interface{}, slug interface{}) *Repository_FindBySlug_Call
- func (_e *Repository_Expecter) List(ctx interface{}, filter interface{}) *Repository_List_Call
- func (_e *Repository_Expecter) Save(ctx interface{}, g interface{}) *Repository_Save_Call
- func (_e *Repository_Expecter) Update(ctx interface{}, g interface{}) *Repository_Update_Call
- type Repository_FindByDomain_Call
- func (_c *Repository_FindByDomain_Call) Return(_a0 *gateway.Gateway, _a1 error) *Repository_FindByDomain_Call
- func (_c *Repository_FindByDomain_Call) Run(run func(ctx context.Context, domain string)) *Repository_FindByDomain_Call
- func (_c *Repository_FindByDomain_Call) RunAndReturn(run func(context.Context, string) (*gateway.Gateway, error)) *Repository_FindByDomain_Call
- type Repository_FindByID_Call
- func (_c *Repository_FindByID_Call) Return(_a0 *gateway.Gateway, _a1 error) *Repository_FindByID_Call
- func (_c *Repository_FindByID_Call) Run(run func(ctx context.Context, id ids.ID[ids.GatewayKind])) *Repository_FindByID_Call
- func (_c *Repository_FindByID_Call) RunAndReturn(run func(context.Context, ids.ID[ids.GatewayKind]) (*gateway.Gateway, error)) *Repository_FindByID_Call
- type Repository_FindBySlug_Call
- func (_c *Repository_FindBySlug_Call) Return(_a0 *gateway.Gateway, _a1 error) *Repository_FindBySlug_Call
- func (_c *Repository_FindBySlug_Call) Run(run func(ctx context.Context, slug string)) *Repository_FindBySlug_Call
- func (_c *Repository_FindBySlug_Call) RunAndReturn(run func(context.Context, string) (*gateway.Gateway, error)) *Repository_FindBySlug_Call
- type Repository_List_Call
- func (_c *Repository_List_Call) Return(items []*gateway.Gateway, total int, err error) *Repository_List_Call
- func (_c *Repository_List_Call) Run(run func(ctx context.Context, filter gateway.ListFilter)) *Repository_List_Call
- func (_c *Repository_List_Call) RunAndReturn(run func(context.Context, gateway.ListFilter) ([]*gateway.Gateway, int, error)) *Repository_List_Call
- type Repository_Save_Call
- type Repository_Update_Call
- func (_c *Repository_Update_Call) Return(_a0 error) *Repository_Update_Call
- func (_c *Repository_Update_Call) Run(run func(ctx context.Context, g *gateway.Gateway)) *Repository_Update_Call
- func (_c *Repository_Update_Call) RunAndReturn(run func(context.Context, *gateway.Gateway) error) *Repository_Update_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
Repository is an autogenerated mock type for the Repository type
func NewRepository ¶
func NewRepository(t interface {
mock.TestingT
Cleanup(func())
}) *Repository
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. The first argument is typically a *testing.T value.
func (*Repository) Delete ¶
func (_m *Repository) Delete(ctx context.Context, id ids.ID[ids.GatewayKind]) error
Delete provides a mock function with given fields: ctx, id
func (*Repository) EXPECT ¶
func (_m *Repository) EXPECT() *Repository_Expecter
func (*Repository) FindByDomain ¶
FindByDomain provides a mock function with given fields: ctx, domain
func (*Repository) FindByID ¶
func (_m *Repository) FindByID(ctx context.Context, id ids.ID[ids.GatewayKind]) (*gateway.Gateway, error)
FindByID provides a mock function with given fields: ctx, id
func (*Repository) FindBySlug ¶
FindBySlug provides a mock function with given fields: ctx, slug
func (*Repository) List ¶
func (_m *Repository) List(ctx context.Context, filter gateway.ListFilter) ([]*gateway.Gateway, int, error)
List provides a mock function with given fields: ctx, filter
type Repository_Delete_Call ¶
Repository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*Repository_Delete_Call) Return ¶
func (_c *Repository_Delete_Call) Return(_a0 error) *Repository_Delete_Call
func (*Repository_Delete_Call) Run ¶
func (_c *Repository_Delete_Call) Run(run func(ctx context.Context, id ids.ID[ids.GatewayKind])) *Repository_Delete_Call
func (*Repository_Delete_Call) RunAndReturn ¶
func (_c *Repository_Delete_Call) RunAndReturn(run func(context.Context, ids.ID[ids.GatewayKind]) error) *Repository_Delete_Call
type Repository_Expecter ¶
type Repository_Expecter struct {
// contains filtered or unexported fields
}
func (*Repository_Expecter) Delete ¶
func (_e *Repository_Expecter) Delete(ctx interface{}, id interface{}) *Repository_Delete_Call
Delete is a helper method to define mock.On call
- ctx context.Context
- id ids.ID[ids.GatewayKind]
func (*Repository_Expecter) FindByDomain ¶
func (_e *Repository_Expecter) FindByDomain(ctx interface{}, domain interface{}) *Repository_FindByDomain_Call
FindByDomain is a helper method to define mock.On call
- ctx context.Context
- domain string
func (*Repository_Expecter) FindByID ¶
func (_e *Repository_Expecter) FindByID(ctx interface{}, id interface{}) *Repository_FindByID_Call
FindByID is a helper method to define mock.On call
- ctx context.Context
- id ids.ID[ids.GatewayKind]
func (*Repository_Expecter) FindBySlug ¶
func (_e *Repository_Expecter) FindBySlug(ctx interface{}, slug interface{}) *Repository_FindBySlug_Call
FindBySlug is a helper method to define mock.On call
- ctx context.Context
- slug string
func (*Repository_Expecter) List ¶
func (_e *Repository_Expecter) List(ctx interface{}, filter interface{}) *Repository_List_Call
List is a helper method to define mock.On call
- ctx context.Context
- filter gateway.ListFilter
func (*Repository_Expecter) Save ¶
func (_e *Repository_Expecter) Save(ctx interface{}, g interface{}) *Repository_Save_Call
Save is a helper method to define mock.On call
- ctx context.Context
- g *gateway.Gateway
func (*Repository_Expecter) Update ¶
func (_e *Repository_Expecter) Update(ctx interface{}, g interface{}) *Repository_Update_Call
Update is a helper method to define mock.On call
- ctx context.Context
- g *gateway.Gateway
type Repository_FindByDomain_Call ¶
Repository_FindByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByDomain'
func (*Repository_FindByDomain_Call) Return ¶
func (_c *Repository_FindByDomain_Call) Return(_a0 *gateway.Gateway, _a1 error) *Repository_FindByDomain_Call
func (*Repository_FindByDomain_Call) Run ¶
func (_c *Repository_FindByDomain_Call) Run(run func(ctx context.Context, domain string)) *Repository_FindByDomain_Call
func (*Repository_FindByDomain_Call) RunAndReturn ¶
func (_c *Repository_FindByDomain_Call) RunAndReturn(run func(context.Context, string) (*gateway.Gateway, error)) *Repository_FindByDomain_Call
type Repository_FindByID_Call ¶
Repository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID'
func (*Repository_FindByID_Call) Return ¶
func (_c *Repository_FindByID_Call) Return(_a0 *gateway.Gateway, _a1 error) *Repository_FindByID_Call
func (*Repository_FindByID_Call) Run ¶
func (_c *Repository_FindByID_Call) Run(run func(ctx context.Context, id ids.ID[ids.GatewayKind])) *Repository_FindByID_Call
func (*Repository_FindByID_Call) RunAndReturn ¶
func (_c *Repository_FindByID_Call) RunAndReturn(run func(context.Context, ids.ID[ids.GatewayKind]) (*gateway.Gateway, error)) *Repository_FindByID_Call
type Repository_FindBySlug_Call ¶
Repository_FindBySlug_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindBySlug'
func (*Repository_FindBySlug_Call) Return ¶
func (_c *Repository_FindBySlug_Call) Return(_a0 *gateway.Gateway, _a1 error) *Repository_FindBySlug_Call
func (*Repository_FindBySlug_Call) Run ¶
func (_c *Repository_FindBySlug_Call) Run(run func(ctx context.Context, slug string)) *Repository_FindBySlug_Call
func (*Repository_FindBySlug_Call) RunAndReturn ¶
func (_c *Repository_FindBySlug_Call) RunAndReturn(run func(context.Context, string) (*gateway.Gateway, error)) *Repository_FindBySlug_Call
type Repository_List_Call ¶
Repository_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
func (*Repository_List_Call) Return ¶
func (_c *Repository_List_Call) Return(items []*gateway.Gateway, total int, err error) *Repository_List_Call
func (*Repository_List_Call) Run ¶
func (_c *Repository_List_Call) Run(run func(ctx context.Context, filter gateway.ListFilter)) *Repository_List_Call
func (*Repository_List_Call) RunAndReturn ¶
func (_c *Repository_List_Call) RunAndReturn(run func(context.Context, gateway.ListFilter) ([]*gateway.Gateway, int, error)) *Repository_List_Call
type Repository_Save_Call ¶
Repository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
func (*Repository_Save_Call) Return ¶
func (_c *Repository_Save_Call) Return(_a0 error) *Repository_Save_Call
func (*Repository_Save_Call) Run ¶
func (_c *Repository_Save_Call) Run(run func(ctx context.Context, g *gateway.Gateway)) *Repository_Save_Call
func (*Repository_Save_Call) RunAndReturn ¶
func (_c *Repository_Save_Call) RunAndReturn(run func(context.Context, *gateway.Gateway) error) *Repository_Save_Call
type Repository_Update_Call ¶
Repository_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
func (*Repository_Update_Call) Return ¶
func (_c *Repository_Update_Call) Return(_a0 error) *Repository_Update_Call
func (*Repository_Update_Call) Run ¶
func (_c *Repository_Update_Call) Run(run func(ctx context.Context, g *gateway.Gateway)) *Repository_Update_Call
func (*Repository_Update_Call) RunAndReturn ¶
func (_c *Repository_Update_Call) RunAndReturn(run func(context.Context, *gateway.Gateway) error) *Repository_Update_Call