Documentation ¶
Index ¶
- type Repository
- func (_m *Repository) Delete(ctx context.Context, id uuid.UUID) error
- func (_m *Repository) DeleteExpiredSessions(ctx context.Context) error
- func (_m *Repository) EXPECT() *Repository_Expecter
- func (_m *Repository) Get(ctx context.Context, id uuid.UUID) (*session.Session, error)
- func (_m *Repository) Set(ctx context.Context, _a1 *session.Session) error
- func (_m *Repository) UpdateValidity(ctx context.Context, id uuid.UUID, validity time.Duration) error
- type Repository_DeleteExpiredSessions_Call
- func (_c *Repository_DeleteExpiredSessions_Call) Return(_a0 error) *Repository_DeleteExpiredSessions_Call
- func (_c *Repository_DeleteExpiredSessions_Call) Run(run func(ctx context.Context)) *Repository_DeleteExpiredSessions_Call
- func (_c *Repository_DeleteExpiredSessions_Call) RunAndReturn(run func(context.Context) error) *Repository_DeleteExpiredSessions_Call
- type Repository_Delete_Call
- type Repository_Expecter
- func (_e *Repository_Expecter) Delete(ctx interface{}, id interface{}) *Repository_Delete_Call
- func (_e *Repository_Expecter) DeleteExpiredSessions(ctx interface{}) *Repository_DeleteExpiredSessions_Call
- func (_e *Repository_Expecter) Get(ctx interface{}, id interface{}) *Repository_Get_Call
- func (_e *Repository_Expecter) Set(ctx interface{}, _a1 interface{}) *Repository_Set_Call
- func (_e *Repository_Expecter) UpdateValidity(ctx interface{}, id interface{}, validity interface{}) *Repository_UpdateValidity_Call
- type Repository_Get_Call
- func (_c *Repository_Get_Call) Return(_a0 *session.Session, _a1 error) *Repository_Get_Call
- func (_c *Repository_Get_Call) Run(run func(ctx context.Context, id uuid.UUID)) *Repository_Get_Call
- func (_c *Repository_Get_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*session.Session, error)) *Repository_Get_Call
- type Repository_Set_Call
- type Repository_UpdateValidity_Call
- func (_c *Repository_UpdateValidity_Call) Return(_a0 error) *Repository_UpdateValidity_Call
- func (_c *Repository_UpdateValidity_Call) Run(run func(ctx context.Context, id uuid.UUID, validity time.Duration)) *Repository_UpdateValidity_Call
- func (_c *Repository_UpdateValidity_Call) RunAndReturn(run func(context.Context, uuid.UUID, time.Duration) error) *Repository_UpdateValidity_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) DeleteExpiredSessions ¶
func (_m *Repository) DeleteExpiredSessions(ctx context.Context) error
DeleteExpiredSessions provides a mock function with given fields: ctx
func (*Repository) EXPECT ¶
func (_m *Repository) EXPECT() *Repository_Expecter
func (*Repository) UpdateValidity ¶
func (_m *Repository) UpdateValidity(ctx context.Context, id uuid.UUID, validity time.Duration) error
UpdateValidity provides a mock function with given fields: ctx, id, validity
type Repository_DeleteExpiredSessions_Call ¶
Repository_DeleteExpiredSessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteExpiredSessions'
func (*Repository_DeleteExpiredSessions_Call) Return ¶
func (_c *Repository_DeleteExpiredSessions_Call) Return(_a0 error) *Repository_DeleteExpiredSessions_Call
func (*Repository_DeleteExpiredSessions_Call) Run ¶
func (_c *Repository_DeleteExpiredSessions_Call) Run(run func(ctx context.Context)) *Repository_DeleteExpiredSessions_Call
func (*Repository_DeleteExpiredSessions_Call) RunAndReturn ¶
func (_c *Repository_DeleteExpiredSessions_Call) RunAndReturn(run func(context.Context) error) *Repository_DeleteExpiredSessions_Call
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 uuid.UUID)) *Repository_Delete_Call
func (*Repository_Delete_Call) RunAndReturn ¶
func (_c *Repository_Delete_Call) RunAndReturn(run func(context.Context, uuid.UUID) 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 uuid.UUID
func (*Repository_Expecter) DeleteExpiredSessions ¶
func (_e *Repository_Expecter) DeleteExpiredSessions(ctx interface{}) *Repository_DeleteExpiredSessions_Call
DeleteExpiredSessions is a helper method to define mock.On call
- ctx context.Context
func (*Repository_Expecter) Get ¶
func (_e *Repository_Expecter) Get(ctx interface{}, id interface{}) *Repository_Get_Call
Get is a helper method to define mock.On call
- ctx context.Context
- id uuid.UUID
func (*Repository_Expecter) Set ¶
func (_e *Repository_Expecter) Set(ctx interface{}, _a1 interface{}) *Repository_Set_Call
Set is a helper method to define mock.On call
- ctx context.Context
- _a1 *session.Session
func (*Repository_Expecter) UpdateValidity ¶
func (_e *Repository_Expecter) UpdateValidity(ctx interface{}, id interface{}, validity interface{}) *Repository_UpdateValidity_Call
UpdateValidity is a helper method to define mock.On call
- ctx context.Context
- id uuid.UUID
- validity time.Duration
type Repository_Get_Call ¶
Repository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
func (*Repository_Get_Call) Return ¶
func (_c *Repository_Get_Call) Return(_a0 *session.Session, _a1 error) *Repository_Get_Call
func (*Repository_Get_Call) Run ¶
func (_c *Repository_Get_Call) Run(run func(ctx context.Context, id uuid.UUID)) *Repository_Get_Call
func (*Repository_Get_Call) RunAndReturn ¶
func (_c *Repository_Get_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*session.Session, error)) *Repository_Get_Call
type Repository_Set_Call ¶
Repository_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'
func (*Repository_Set_Call) Return ¶
func (_c *Repository_Set_Call) Return(_a0 error) *Repository_Set_Call
func (*Repository_Set_Call) Run ¶
func (_c *Repository_Set_Call) Run(run func(ctx context.Context, _a1 *session.Session)) *Repository_Set_Call
func (*Repository_Set_Call) RunAndReturn ¶
func (_c *Repository_Set_Call) RunAndReturn(run func(context.Context, *session.Session) error) *Repository_Set_Call
type Repository_UpdateValidity_Call ¶
Repository_UpdateValidity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateValidity'
func (*Repository_UpdateValidity_Call) Return ¶
func (_c *Repository_UpdateValidity_Call) Return(_a0 error) *Repository_UpdateValidity_Call
func (*Repository_UpdateValidity_Call) Run ¶
func (_c *Repository_UpdateValidity_Call) Run(run func(ctx context.Context, id uuid.UUID, validity time.Duration)) *Repository_UpdateValidity_Call
func (*Repository_UpdateValidity_Call) RunAndReturn ¶
func (_c *Repository_UpdateValidity_Call) RunAndReturn(run func(context.Context, uuid.UUID, time.Duration) error) *Repository_UpdateValidity_Call