mocks

package
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionStore

type SessionStore struct {
	mock.Mock
}

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

func (_m *SessionStore) CountByUserID(ctx context.Context, userID string) (int, error)

CountByUserID provides a mock function with given fields: ctx, userID

func (*SessionStore) Create

func (_m *SessionStore) Create(ctx context.Context, s *internal.Session) error

Create provides a mock function with given fields: ctx, s

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

func (*SessionStore) Touch

func (_m *SessionStore) Touch(ctx context.Context, id string, lastActiveAt time.Time) error

Touch provides a mock function with given fields: ctx, id, lastActiveAt

func (*SessionStore) Update

func (_m *SessionStore) Update(ctx context.Context, s *internal.Session) error

Update provides a mock function with given fields: ctx, s

type SessionStore_CountByUserID_Call

type SessionStore_CountByUserID_Call struct {
	*mock.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 (*SessionStore_CountByUserID_Call) Run

func (*SessionStore_CountByUserID_Call) RunAndReturn

type SessionStore_Create_Call

type SessionStore_Create_Call struct {
	*mock.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 (*SessionStore_Create_Call) Run

func (*SessionStore_Create_Call) RunAndReturn

type SessionStore_DeleteByUserIDExcept_Call

type SessionStore_DeleteByUserIDExcept_Call struct {
	*mock.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 (*SessionStore_DeleteByUserIDExcept_Call) Run

func (*SessionStore_DeleteByUserIDExcept_Call) RunAndReturn

type SessionStore_DeleteByUserID_Call

type SessionStore_DeleteByUserID_Call struct {
	*mock.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 (*SessionStore_DeleteByUserID_Call) Run

func (*SessionStore_DeleteByUserID_Call) RunAndReturn

type SessionStore_DeleteOldestByUserID_Call

type SessionStore_DeleteOldestByUserID_Call struct {
	*mock.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 (*SessionStore_DeleteOldestByUserID_Call) Run

func (*SessionStore_DeleteOldestByUserID_Call) RunAndReturn

type SessionStore_Delete_Call

type SessionStore_Delete_Call struct {
	*mock.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 (*SessionStore_Delete_Call) Run

func (*SessionStore_Delete_Call) RunAndReturn

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

type SessionStore_GetByTokenHash_Call struct {
	*mock.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 (*SessionStore_GetByTokenHash_Call) Run

func (*SessionStore_GetByTokenHash_Call) RunAndReturn

type SessionStore_ListByUserID_Call

type SessionStore_ListByUserID_Call struct {
	*mock.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 (*SessionStore_ListByUserID_Call) Run

func (*SessionStore_ListByUserID_Call) RunAndReturn

type SessionStore_Touch_Call

type SessionStore_Touch_Call struct {
	*mock.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 (*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

type SessionStore_Update_Call

type SessionStore_Update_Call struct {
	*mock.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 (*SessionStore_Update_Call) Run

func (*SessionStore_Update_Call) RunAndReturn

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL