Documentation
¶
Index ¶
- type SessionStore
- func (_m *SessionStore) CountByUserID(ctx context.Context, userID string) (int, error)
- func (_m *SessionStore) Create(ctx context.Context, s *internal.Session) error
- func (_m *SessionStore) Delete(ctx context.Context, id string) error
- func (_m *SessionStore) DeleteByUserID(ctx context.Context, userID string) error
- func (_m *SessionStore) DeleteByUserIDExcept(ctx context.Context, userID string, exceptID string) error
- func (_m *SessionStore) DeleteOldestByUserID(ctx context.Context, userID string) error
- func (_m *SessionStore) EXPECT() *SessionStore_Expecter
- func (_m *SessionStore) GetByTokenHash(ctx context.Context, tokenHash string) (*internal.Session, error)
- func (_m *SessionStore) ListByUserID(ctx context.Context, userID string) ([]*internal.Session, error)
- func (_m *SessionStore) Touch(ctx context.Context, id string, lastActiveAt time.Time) error
- func (_m *SessionStore) Update(ctx context.Context, s *internal.Session) error
- type SessionStore_CountByUserID_Call
- func (_c *SessionStore_CountByUserID_Call) Return(_a0 int, _a1 error) *SessionStore_CountByUserID_Call
- func (_c *SessionStore_CountByUserID_Call) Run(run func(ctx context.Context, userID string)) *SessionStore_CountByUserID_Call
- func (_c *SessionStore_CountByUserID_Call) RunAndReturn(run func(context.Context, string) (int, error)) *SessionStore_CountByUserID_Call
- type SessionStore_Create_Call
- func (_c *SessionStore_Create_Call) Return(_a0 error) *SessionStore_Create_Call
- func (_c *SessionStore_Create_Call) Run(run func(ctx context.Context, s *internal.Session)) *SessionStore_Create_Call
- func (_c *SessionStore_Create_Call) RunAndReturn(run func(context.Context, *internal.Session) error) *SessionStore_Create_Call
- type SessionStore_DeleteByUserIDExcept_Call
- func (_c *SessionStore_DeleteByUserIDExcept_Call) Return(_a0 error) *SessionStore_DeleteByUserIDExcept_Call
- func (_c *SessionStore_DeleteByUserIDExcept_Call) Run(run func(ctx context.Context, userID string, exceptID string)) *SessionStore_DeleteByUserIDExcept_Call
- func (_c *SessionStore_DeleteByUserIDExcept_Call) RunAndReturn(run func(context.Context, string, string) error) *SessionStore_DeleteByUserIDExcept_Call
- type SessionStore_DeleteByUserID_Call
- func (_c *SessionStore_DeleteByUserID_Call) Return(_a0 error) *SessionStore_DeleteByUserID_Call
- func (_c *SessionStore_DeleteByUserID_Call) Run(run func(ctx context.Context, userID string)) *SessionStore_DeleteByUserID_Call
- func (_c *SessionStore_DeleteByUserID_Call) RunAndReturn(run func(context.Context, string) error) *SessionStore_DeleteByUserID_Call
- type SessionStore_DeleteOldestByUserID_Call
- func (_c *SessionStore_DeleteOldestByUserID_Call) Return(_a0 error) *SessionStore_DeleteOldestByUserID_Call
- func (_c *SessionStore_DeleteOldestByUserID_Call) Run(run func(ctx context.Context, userID string)) *SessionStore_DeleteOldestByUserID_Call
- func (_c *SessionStore_DeleteOldestByUserID_Call) RunAndReturn(run func(context.Context, string) error) *SessionStore_DeleteOldestByUserID_Call
- type SessionStore_Delete_Call
- func (_c *SessionStore_Delete_Call) Return(_a0 error) *SessionStore_Delete_Call
- func (_c *SessionStore_Delete_Call) Run(run func(ctx context.Context, id string)) *SessionStore_Delete_Call
- func (_c *SessionStore_Delete_Call) RunAndReturn(run func(context.Context, string) error) *SessionStore_Delete_Call
- type SessionStore_Expecter
- func (_e *SessionStore_Expecter) CountByUserID(ctx interface{}, userID interface{}) *SessionStore_CountByUserID_Call
- func (_e *SessionStore_Expecter) Create(ctx interface{}, s interface{}) *SessionStore_Create_Call
- func (_e *SessionStore_Expecter) Delete(ctx interface{}, id interface{}) *SessionStore_Delete_Call
- func (_e *SessionStore_Expecter) DeleteByUserID(ctx interface{}, userID interface{}) *SessionStore_DeleteByUserID_Call
- func (_e *SessionStore_Expecter) DeleteByUserIDExcept(ctx interface{}, userID interface{}, exceptID interface{}) *SessionStore_DeleteByUserIDExcept_Call
- func (_e *SessionStore_Expecter) DeleteOldestByUserID(ctx interface{}, userID interface{}) *SessionStore_DeleteOldestByUserID_Call
- func (_e *SessionStore_Expecter) GetByTokenHash(ctx interface{}, tokenHash interface{}) *SessionStore_GetByTokenHash_Call
- func (_e *SessionStore_Expecter) ListByUserID(ctx interface{}, userID interface{}) *SessionStore_ListByUserID_Call
- func (_e *SessionStore_Expecter) Touch(ctx interface{}, id interface{}, lastActiveAt interface{}) *SessionStore_Touch_Call
- func (_e *SessionStore_Expecter) Update(ctx interface{}, s interface{}) *SessionStore_Update_Call
- type SessionStore_GetByTokenHash_Call
- func (_c *SessionStore_GetByTokenHash_Call) Return(_a0 *internal.Session, _a1 error) *SessionStore_GetByTokenHash_Call
- func (_c *SessionStore_GetByTokenHash_Call) Run(run func(ctx context.Context, tokenHash string)) *SessionStore_GetByTokenHash_Call
- func (_c *SessionStore_GetByTokenHash_Call) RunAndReturn(run func(context.Context, string) (*internal.Session, error)) *SessionStore_GetByTokenHash_Call
- type SessionStore_ListByUserID_Call
- func (_c *SessionStore_ListByUserID_Call) Return(_a0 []*internal.Session, _a1 error) *SessionStore_ListByUserID_Call
- func (_c *SessionStore_ListByUserID_Call) Run(run func(ctx context.Context, userID string)) *SessionStore_ListByUserID_Call
- func (_c *SessionStore_ListByUserID_Call) RunAndReturn(run func(context.Context, string) ([]*internal.Session, error)) *SessionStore_ListByUserID_Call
- type SessionStore_Touch_Call
- func (_c *SessionStore_Touch_Call) Return(_a0 error) *SessionStore_Touch_Call
- func (_c *SessionStore_Touch_Call) Run(run func(ctx context.Context, id string, lastActiveAt time.Time)) *SessionStore_Touch_Call
- func (_c *SessionStore_Touch_Call) RunAndReturn(run func(context.Context, string, time.Time) error) *SessionStore_Touch_Call
- type SessionStore_Update_Call
- func (_c *SessionStore_Update_Call) Return(_a0 error) *SessionStore_Update_Call
- func (_c *SessionStore_Update_Call) Run(run func(ctx context.Context, s *internal.Session)) *SessionStore_Update_Call
- func (_c *SessionStore_Update_Call) RunAndReturn(run func(context.Context, *internal.Session) error) *SessionStore_Update_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionStore ¶
SessionStore is an autogenerated mock type for the Store type
func NewSessionStore ¶
func NewSessionStore(t interface {
mock.TestingT
Cleanup(func())
}) *SessionStore
NewSessionStore creates a new instance of SessionStore. 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 (*SessionStore) CountByUserID ¶
CountByUserID provides a mock function with given fields: ctx, userID
func (*SessionStore) Delete ¶
func (_m *SessionStore) Delete(ctx context.Context, id string) error
Delete provides a mock function with given fields: ctx, id
func (*SessionStore) DeleteByUserID ¶
func (_m *SessionStore) DeleteByUserID(ctx context.Context, userID string) error
DeleteByUserID provides a mock function with given fields: ctx, userID
func (*SessionStore) DeleteByUserIDExcept ¶
func (_m *SessionStore) DeleteByUserIDExcept(ctx context.Context, userID string, exceptID string) error
DeleteByUserIDExcept provides a mock function with given fields: ctx, userID, exceptID
func (*SessionStore) DeleteOldestByUserID ¶
func (_m *SessionStore) DeleteOldestByUserID(ctx context.Context, userID string) error
DeleteOldestByUserID provides a mock function with given fields: ctx, userID
func (*SessionStore) EXPECT ¶
func (_m *SessionStore) EXPECT() *SessionStore_Expecter
func (*SessionStore) GetByTokenHash ¶
func (_m *SessionStore) GetByTokenHash(ctx context.Context, tokenHash string) (*internal.Session, error)
GetByTokenHash provides a mock function with given fields: ctx, tokenHash
func (*SessionStore) ListByUserID ¶
func (_m *SessionStore) ListByUserID(ctx context.Context, userID string) ([]*internal.Session, error)
ListByUserID provides a mock function with given fields: ctx, userID
type SessionStore_CountByUserID_Call ¶
SessionStore_CountByUserID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountByUserID'
func (*SessionStore_CountByUserID_Call) Return ¶
func (_c *SessionStore_CountByUserID_Call) Return(_a0 int, _a1 error) *SessionStore_CountByUserID_Call
func (*SessionStore_CountByUserID_Call) Run ¶
func (_c *SessionStore_CountByUserID_Call) Run(run func(ctx context.Context, userID string)) *SessionStore_CountByUserID_Call
func (*SessionStore_CountByUserID_Call) RunAndReturn ¶
func (_c *SessionStore_CountByUserID_Call) RunAndReturn(run func(context.Context, string) (int, error)) *SessionStore_CountByUserID_Call
type SessionStore_Create_Call ¶
SessionStore_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
func (*SessionStore_Create_Call) Return ¶
func (_c *SessionStore_Create_Call) Return(_a0 error) *SessionStore_Create_Call
func (*SessionStore_Create_Call) Run ¶
func (_c *SessionStore_Create_Call) Run(run func(ctx context.Context, s *internal.Session)) *SessionStore_Create_Call
func (*SessionStore_Create_Call) RunAndReturn ¶
func (_c *SessionStore_Create_Call) RunAndReturn(run func(context.Context, *internal.Session) error) *SessionStore_Create_Call
type SessionStore_DeleteByUserIDExcept_Call ¶
SessionStore_DeleteByUserIDExcept_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByUserIDExcept'
func (*SessionStore_DeleteByUserIDExcept_Call) Return ¶
func (_c *SessionStore_DeleteByUserIDExcept_Call) Return(_a0 error) *SessionStore_DeleteByUserIDExcept_Call
func (*SessionStore_DeleteByUserIDExcept_Call) Run ¶
func (_c *SessionStore_DeleteByUserIDExcept_Call) Run(run func(ctx context.Context, userID string, exceptID string)) *SessionStore_DeleteByUserIDExcept_Call
func (*SessionStore_DeleteByUserIDExcept_Call) RunAndReturn ¶
func (_c *SessionStore_DeleteByUserIDExcept_Call) RunAndReturn(run func(context.Context, string, string) error) *SessionStore_DeleteByUserIDExcept_Call
type SessionStore_DeleteByUserID_Call ¶
SessionStore_DeleteByUserID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByUserID'
func (*SessionStore_DeleteByUserID_Call) Return ¶
func (_c *SessionStore_DeleteByUserID_Call) Return(_a0 error) *SessionStore_DeleteByUserID_Call
func (*SessionStore_DeleteByUserID_Call) Run ¶
func (_c *SessionStore_DeleteByUserID_Call) Run(run func(ctx context.Context, userID string)) *SessionStore_DeleteByUserID_Call
func (*SessionStore_DeleteByUserID_Call) RunAndReturn ¶
func (_c *SessionStore_DeleteByUserID_Call) RunAndReturn(run func(context.Context, string) error) *SessionStore_DeleteByUserID_Call
type SessionStore_DeleteOldestByUserID_Call ¶
SessionStore_DeleteOldestByUserID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteOldestByUserID'
func (*SessionStore_DeleteOldestByUserID_Call) Return ¶
func (_c *SessionStore_DeleteOldestByUserID_Call) Return(_a0 error) *SessionStore_DeleteOldestByUserID_Call
func (*SessionStore_DeleteOldestByUserID_Call) Run ¶
func (_c *SessionStore_DeleteOldestByUserID_Call) Run(run func(ctx context.Context, userID string)) *SessionStore_DeleteOldestByUserID_Call
func (*SessionStore_DeleteOldestByUserID_Call) RunAndReturn ¶
func (_c *SessionStore_DeleteOldestByUserID_Call) RunAndReturn(run func(context.Context, string) error) *SessionStore_DeleteOldestByUserID_Call
type SessionStore_Delete_Call ¶
SessionStore_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*SessionStore_Delete_Call) Return ¶
func (_c *SessionStore_Delete_Call) Return(_a0 error) *SessionStore_Delete_Call
func (*SessionStore_Delete_Call) Run ¶
func (_c *SessionStore_Delete_Call) Run(run func(ctx context.Context, id string)) *SessionStore_Delete_Call
func (*SessionStore_Delete_Call) RunAndReturn ¶
func (_c *SessionStore_Delete_Call) RunAndReturn(run func(context.Context, string) error) *SessionStore_Delete_Call
type SessionStore_Expecter ¶
type SessionStore_Expecter struct {
// contains filtered or unexported fields
}
func (*SessionStore_Expecter) CountByUserID ¶
func (_e *SessionStore_Expecter) CountByUserID(ctx interface{}, userID interface{}) *SessionStore_CountByUserID_Call
CountByUserID is a helper method to define mock.On call
- ctx context.Context
- userID string
func (*SessionStore_Expecter) Create ¶
func (_e *SessionStore_Expecter) Create(ctx interface{}, s interface{}) *SessionStore_Create_Call
Create is a helper method to define mock.On call
- ctx context.Context
- s *internal.Session
func (*SessionStore_Expecter) Delete ¶
func (_e *SessionStore_Expecter) Delete(ctx interface{}, id interface{}) *SessionStore_Delete_Call
Delete is a helper method to define mock.On call
- ctx context.Context
- id string
func (*SessionStore_Expecter) DeleteByUserID ¶
func (_e *SessionStore_Expecter) DeleteByUserID(ctx interface{}, userID interface{}) *SessionStore_DeleteByUserID_Call
DeleteByUserID is a helper method to define mock.On call
- ctx context.Context
- userID string
func (*SessionStore_Expecter) DeleteByUserIDExcept ¶
func (_e *SessionStore_Expecter) DeleteByUserIDExcept(ctx interface{}, userID interface{}, exceptID interface{}) *SessionStore_DeleteByUserIDExcept_Call
DeleteByUserIDExcept is a helper method to define mock.On call
- ctx context.Context
- userID string
- exceptID string
func (*SessionStore_Expecter) DeleteOldestByUserID ¶
func (_e *SessionStore_Expecter) DeleteOldestByUserID(ctx interface{}, userID interface{}) *SessionStore_DeleteOldestByUserID_Call
DeleteOldestByUserID is a helper method to define mock.On call
- ctx context.Context
- userID string
func (*SessionStore_Expecter) GetByTokenHash ¶
func (_e *SessionStore_Expecter) GetByTokenHash(ctx interface{}, tokenHash interface{}) *SessionStore_GetByTokenHash_Call
GetByTokenHash is a helper method to define mock.On call
- ctx context.Context
- tokenHash string
func (*SessionStore_Expecter) ListByUserID ¶
func (_e *SessionStore_Expecter) ListByUserID(ctx interface{}, userID interface{}) *SessionStore_ListByUserID_Call
ListByUserID is a helper method to define mock.On call
- ctx context.Context
- userID string
func (*SessionStore_Expecter) Touch ¶
func (_e *SessionStore_Expecter) Touch(ctx interface{}, id interface{}, lastActiveAt interface{}) *SessionStore_Touch_Call
Touch is a helper method to define mock.On call
- ctx context.Context
- id string
- lastActiveAt time.Time
func (*SessionStore_Expecter) Update ¶
func (_e *SessionStore_Expecter) Update(ctx interface{}, s interface{}) *SessionStore_Update_Call
Update is a helper method to define mock.On call
- ctx context.Context
- s *internal.Session
type SessionStore_GetByTokenHash_Call ¶
SessionStore_GetByTokenHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByTokenHash'
func (*SessionStore_GetByTokenHash_Call) Return ¶
func (_c *SessionStore_GetByTokenHash_Call) Return(_a0 *internal.Session, _a1 error) *SessionStore_GetByTokenHash_Call
func (*SessionStore_GetByTokenHash_Call) Run ¶
func (_c *SessionStore_GetByTokenHash_Call) Run(run func(ctx context.Context, tokenHash string)) *SessionStore_GetByTokenHash_Call
func (*SessionStore_GetByTokenHash_Call) RunAndReturn ¶
func (_c *SessionStore_GetByTokenHash_Call) RunAndReturn(run func(context.Context, string) (*internal.Session, error)) *SessionStore_GetByTokenHash_Call
type SessionStore_ListByUserID_Call ¶
SessionStore_ListByUserID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByUserID'
func (*SessionStore_ListByUserID_Call) Return ¶
func (_c *SessionStore_ListByUserID_Call) Return(_a0 []*internal.Session, _a1 error) *SessionStore_ListByUserID_Call
func (*SessionStore_ListByUserID_Call) Run ¶
func (_c *SessionStore_ListByUserID_Call) Run(run func(ctx context.Context, userID string)) *SessionStore_ListByUserID_Call
func (*SessionStore_ListByUserID_Call) RunAndReturn ¶
func (_c *SessionStore_ListByUserID_Call) RunAndReturn(run func(context.Context, string) ([]*internal.Session, error)) *SessionStore_ListByUserID_Call
type SessionStore_Touch_Call ¶
SessionStore_Touch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Touch'
func (*SessionStore_Touch_Call) Return ¶
func (_c *SessionStore_Touch_Call) Return(_a0 error) *SessionStore_Touch_Call
func (*SessionStore_Touch_Call) Run ¶
func (_c *SessionStore_Touch_Call) Run(run func(ctx context.Context, id string, lastActiveAt time.Time)) *SessionStore_Touch_Call
func (*SessionStore_Touch_Call) RunAndReturn ¶
func (_c *SessionStore_Touch_Call) RunAndReturn(run func(context.Context, string, time.Time) error) *SessionStore_Touch_Call
type SessionStore_Update_Call ¶
SessionStore_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
func (*SessionStore_Update_Call) Return ¶
func (_c *SessionStore_Update_Call) Return(_a0 error) *SessionStore_Update_Call
func (*SessionStore_Update_Call) Run ¶
func (_c *SessionStore_Update_Call) Run(run func(ctx context.Context, s *internal.Session)) *SessionStore_Update_Call
func (*SessionStore_Update_Call) RunAndReturn ¶
func (_c *SessionStore_Update_Call) RunAndReturn(run func(context.Context, *internal.Session) error) *SessionStore_Update_Call