Documentation
¶
Index ¶
- type Repository
- func (_m *Repository) Delete(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], ...) error
- func (_m *Repository) EXPECT() *Repository_Expecter
- func (_m *Repository) FindByAPIKeyHash(ctx context.Context, keyHash string) (*auth.Auth, error)
- func (_m *Repository) FindByID(ctx context.Context, id ids.ID[ids.AuthKind]) (*auth.Auth, error)
- func (_m *Repository) FindByIDs(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], ...) ([]*auth.Auth, error)
- func (_m *Repository) FindEnabledByTypes(ctx context.Context, types []auth.Type) ([]*auth.Auth, error)
- func (_m *Repository) List(ctx context.Context, filter auth.ListFilter) ([]*auth.Auth, int, error)
- func (_m *Repository) ListEnabledByGatewayAndType(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], authType auth.Type) ([]*auth.Auth, error)
- func (_m *Repository) Save(ctx context.Context, a *auth.Auth) error
- func (_m *Repository) Update(ctx context.Context, a *auth.Auth) 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, gatewayID ids.ID[ids.GatewayKind], ...)) *Repository_Delete_Call
- func (_c *Repository_Delete_Call) RunAndReturn(run func(context.Context, ids.ID[ids.GatewayKind], ids.ID[ids.AuthKind]) error) *Repository_Delete_Call
- type Repository_Expecter
- func (_e *Repository_Expecter) Delete(ctx interface{}, gatewayID interface{}, id interface{}) *Repository_Delete_Call
- func (_e *Repository_Expecter) FindByAPIKeyHash(ctx interface{}, keyHash interface{}) *Repository_FindByAPIKeyHash_Call
- func (_e *Repository_Expecter) FindByID(ctx interface{}, id interface{}) *Repository_FindByID_Call
- func (_e *Repository_Expecter) FindByIDs(ctx interface{}, gatewayID interface{}, authIDs interface{}) *Repository_FindByIDs_Call
- func (_e *Repository_Expecter) FindEnabledByTypes(ctx interface{}, types interface{}) *Repository_FindEnabledByTypes_Call
- func (_e *Repository_Expecter) List(ctx interface{}, filter interface{}) *Repository_List_Call
- func (_e *Repository_Expecter) ListEnabledByGatewayAndType(ctx interface{}, gatewayID interface{}, authType interface{}) *Repository_ListEnabledByGatewayAndType_Call
- func (_e *Repository_Expecter) Save(ctx interface{}, a interface{}) *Repository_Save_Call
- func (_e *Repository_Expecter) Update(ctx interface{}, a interface{}) *Repository_Update_Call
- type Repository_FindByAPIKeyHash_Call
- func (_c *Repository_FindByAPIKeyHash_Call) Return(_a0 *auth.Auth, _a1 error) *Repository_FindByAPIKeyHash_Call
- func (_c *Repository_FindByAPIKeyHash_Call) Run(run func(ctx context.Context, keyHash string)) *Repository_FindByAPIKeyHash_Call
- func (_c *Repository_FindByAPIKeyHash_Call) RunAndReturn(run func(context.Context, string) (*auth.Auth, error)) *Repository_FindByAPIKeyHash_Call
- type Repository_FindByID_Call
- func (_c *Repository_FindByID_Call) Return(_a0 *auth.Auth, _a1 error) *Repository_FindByID_Call
- func (_c *Repository_FindByID_Call) Run(run func(ctx context.Context, id ids.ID[ids.AuthKind])) *Repository_FindByID_Call
- func (_c *Repository_FindByID_Call) RunAndReturn(run func(context.Context, ids.ID[ids.AuthKind]) (*auth.Auth, error)) *Repository_FindByID_Call
- type Repository_FindByIDs_Call
- func (_c *Repository_FindByIDs_Call) Return(_a0 []*auth.Auth, _a1 error) *Repository_FindByIDs_Call
- func (_c *Repository_FindByIDs_Call) Run(run func(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], ...)) *Repository_FindByIDs_Call
- func (_c *Repository_FindByIDs_Call) RunAndReturn(...) *Repository_FindByIDs_Call
- type Repository_FindEnabledByTypes_Call
- func (_c *Repository_FindEnabledByTypes_Call) Return(_a0 []*auth.Auth, _a1 error) *Repository_FindEnabledByTypes_Call
- func (_c *Repository_FindEnabledByTypes_Call) Run(run func(ctx context.Context, types []auth.Type)) *Repository_FindEnabledByTypes_Call
- func (_c *Repository_FindEnabledByTypes_Call) RunAndReturn(run func(context.Context, []auth.Type) ([]*auth.Auth, error)) *Repository_FindEnabledByTypes_Call
- type Repository_ListEnabledByGatewayAndType_Call
- func (_c *Repository_ListEnabledByGatewayAndType_Call) Return(_a0 []*auth.Auth, _a1 error) *Repository_ListEnabledByGatewayAndType_Call
- func (_c *Repository_ListEnabledByGatewayAndType_Call) Run(...) *Repository_ListEnabledByGatewayAndType_Call
- func (_c *Repository_ListEnabledByGatewayAndType_Call) RunAndReturn(...) *Repository_ListEnabledByGatewayAndType_Call
- type Repository_List_Call
- func (_c *Repository_List_Call) Return(items []*auth.Auth, total int, err error) *Repository_List_Call
- func (_c *Repository_List_Call) Run(run func(ctx context.Context, filter auth.ListFilter)) *Repository_List_Call
- func (_c *Repository_List_Call) RunAndReturn(run func(context.Context, auth.ListFilter) ([]*auth.Auth, int, error)) *Repository_List_Call
- type Repository_Save_Call
- type 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, gatewayID ids.ID[ids.GatewayKind], id ids.ID[ids.AuthKind]) error
Delete provides a mock function with given fields: ctx, gatewayID, id
func (*Repository) EXPECT ¶
func (_m *Repository) EXPECT() *Repository_Expecter
func (*Repository) FindByAPIKeyHash ¶
FindByAPIKeyHash provides a mock function with given fields: ctx, keyHash
func (*Repository) FindByIDs ¶
func (_m *Repository) FindByIDs(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], authIDs []ids.ID[ids.AuthKind]) ([]*auth.Auth, error)
FindByIDs provides a mock function with given fields: ctx, gatewayID, authIDs
func (*Repository) FindEnabledByTypes ¶
func (_m *Repository) FindEnabledByTypes(ctx context.Context, types []auth.Type) ([]*auth.Auth, error)
FindEnabledByTypes provides a mock function with given fields: ctx, types
func (*Repository) List ¶
func (_m *Repository) List(ctx context.Context, filter auth.ListFilter) ([]*auth.Auth, int, error)
List provides a mock function with given fields: ctx, filter
func (*Repository) ListEnabledByGatewayAndType ¶
func (_m *Repository) ListEnabledByGatewayAndType(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], authType auth.Type) ([]*auth.Auth, error)
ListEnabledByGatewayAndType provides a mock function with given fields: ctx, gatewayID, authType
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, gatewayID ids.ID[ids.GatewayKind], id ids.ID[ids.AuthKind])) *Repository_Delete_Call
func (*Repository_Delete_Call) RunAndReturn ¶
func (_c *Repository_Delete_Call) RunAndReturn(run func(context.Context, ids.ID[ids.GatewayKind], ids.ID[ids.AuthKind]) 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{}, gatewayID interface{}, id interface{}) *Repository_Delete_Call
Delete is a helper method to define mock.On call
- ctx context.Context
- gatewayID ids.ID[ids.GatewayKind]
- id ids.ID[ids.AuthKind]
func (*Repository_Expecter) FindByAPIKeyHash ¶
func (_e *Repository_Expecter) FindByAPIKeyHash(ctx interface{}, keyHash interface{}) *Repository_FindByAPIKeyHash_Call
FindByAPIKeyHash is a helper method to define mock.On call
- ctx context.Context
- keyHash 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.AuthKind]
func (*Repository_Expecter) FindByIDs ¶
func (_e *Repository_Expecter) FindByIDs(ctx interface{}, gatewayID interface{}, authIDs interface{}) *Repository_FindByIDs_Call
FindByIDs is a helper method to define mock.On call
- ctx context.Context
- gatewayID ids.ID[ids.GatewayKind]
- authIDs []ids.ID[ids.AuthKind]
func (*Repository_Expecter) FindEnabledByTypes ¶
func (_e *Repository_Expecter) FindEnabledByTypes(ctx interface{}, types interface{}) *Repository_FindEnabledByTypes_Call
FindEnabledByTypes is a helper method to define mock.On call
- ctx context.Context
- types []auth.Type
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 auth.ListFilter
func (*Repository_Expecter) ListEnabledByGatewayAndType ¶
func (_e *Repository_Expecter) ListEnabledByGatewayAndType(ctx interface{}, gatewayID interface{}, authType interface{}) *Repository_ListEnabledByGatewayAndType_Call
ListEnabledByGatewayAndType is a helper method to define mock.On call
- ctx context.Context
- gatewayID ids.ID[ids.GatewayKind]
- authType auth.Type
func (*Repository_Expecter) Save ¶
func (_e *Repository_Expecter) Save(ctx interface{}, a interface{}) *Repository_Save_Call
Save is a helper method to define mock.On call
- ctx context.Context
- a *auth.Auth
func (*Repository_Expecter) Update ¶
func (_e *Repository_Expecter) Update(ctx interface{}, a interface{}) *Repository_Update_Call
Update is a helper method to define mock.On call
- ctx context.Context
- a *auth.Auth
type Repository_FindByAPIKeyHash_Call ¶
Repository_FindByAPIKeyHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByAPIKeyHash'
func (*Repository_FindByAPIKeyHash_Call) Return ¶
func (_c *Repository_FindByAPIKeyHash_Call) Return(_a0 *auth.Auth, _a1 error) *Repository_FindByAPIKeyHash_Call
func (*Repository_FindByAPIKeyHash_Call) Run ¶
func (_c *Repository_FindByAPIKeyHash_Call) Run(run func(ctx context.Context, keyHash string)) *Repository_FindByAPIKeyHash_Call
func (*Repository_FindByAPIKeyHash_Call) RunAndReturn ¶
func (_c *Repository_FindByAPIKeyHash_Call) RunAndReturn(run func(context.Context, string) (*auth.Auth, error)) *Repository_FindByAPIKeyHash_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 *auth.Auth, _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.AuthKind])) *Repository_FindByID_Call
func (*Repository_FindByID_Call) RunAndReturn ¶
type Repository_FindByIDs_Call ¶
Repository_FindByIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByIDs'
func (*Repository_FindByIDs_Call) Return ¶
func (_c *Repository_FindByIDs_Call) Return(_a0 []*auth.Auth, _a1 error) *Repository_FindByIDs_Call
func (*Repository_FindByIDs_Call) Run ¶
func (_c *Repository_FindByIDs_Call) Run(run func(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], authIDs []ids.ID[ids.AuthKind])) *Repository_FindByIDs_Call
func (*Repository_FindByIDs_Call) RunAndReturn ¶
func (_c *Repository_FindByIDs_Call) RunAndReturn(run func(context.Context, ids.ID[ids.GatewayKind], []ids.ID[ids.AuthKind]) ([]*auth.Auth, error)) *Repository_FindByIDs_Call
type Repository_FindEnabledByTypes_Call ¶
Repository_FindEnabledByTypes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindEnabledByTypes'
func (*Repository_FindEnabledByTypes_Call) Return ¶
func (_c *Repository_FindEnabledByTypes_Call) Return(_a0 []*auth.Auth, _a1 error) *Repository_FindEnabledByTypes_Call
func (*Repository_FindEnabledByTypes_Call) Run ¶
func (_c *Repository_FindEnabledByTypes_Call) Run(run func(ctx context.Context, types []auth.Type)) *Repository_FindEnabledByTypes_Call
func (*Repository_FindEnabledByTypes_Call) RunAndReturn ¶
func (_c *Repository_FindEnabledByTypes_Call) RunAndReturn(run func(context.Context, []auth.Type) ([]*auth.Auth, error)) *Repository_FindEnabledByTypes_Call
type Repository_ListEnabledByGatewayAndType_Call ¶
Repository_ListEnabledByGatewayAndType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListEnabledByGatewayAndType'
func (*Repository_ListEnabledByGatewayAndType_Call) Return ¶
func (_c *Repository_ListEnabledByGatewayAndType_Call) Return(_a0 []*auth.Auth, _a1 error) *Repository_ListEnabledByGatewayAndType_Call
func (*Repository_ListEnabledByGatewayAndType_Call) Run ¶
func (_c *Repository_ListEnabledByGatewayAndType_Call) Run(run func(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], authType auth.Type)) *Repository_ListEnabledByGatewayAndType_Call
func (*Repository_ListEnabledByGatewayAndType_Call) RunAndReturn ¶
func (_c *Repository_ListEnabledByGatewayAndType_Call) RunAndReturn(run func(context.Context, ids.ID[ids.GatewayKind], auth.Type) ([]*auth.Auth, error)) *Repository_ListEnabledByGatewayAndType_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 []*auth.Auth, total int, err error) *Repository_List_Call
func (*Repository_List_Call) Run ¶
func (_c *Repository_List_Call) Run(run func(ctx context.Context, filter auth.ListFilter)) *Repository_List_Call
func (*Repository_List_Call) RunAndReturn ¶
func (_c *Repository_List_Call) RunAndReturn(run func(context.Context, auth.ListFilter) ([]*auth.Auth, 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, a *auth.Auth)) *Repository_Save_Call
func (*Repository_Save_Call) RunAndReturn ¶
func (_c *Repository_Save_Call) RunAndReturn(run func(context.Context, *auth.Auth) 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, a *auth.Auth)) *Repository_Update_Call
func (*Repository_Update_Call) RunAndReturn ¶
func (_c *Repository_Update_Call) RunAndReturn(run func(context.Context, *auth.Auth) error) *Repository_Update_Call