session

package
v0.0.0-...-ca0f7d1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRepository

type MockRepository struct {
	mock.Mock
}

MockRepository is an autogenerated mock type for the Repository type

func (*MockRepository) CreateSession

func (_m *MockRepository) CreateSession(session models.Session, executor database.QueryExecutor) error

CreateSession provides a mock function with given fields: session, executor

func (*MockRepository) DeleteAllSessionsByAccountID

func (_m *MockRepository) DeleteAllSessionsByAccountID(accountID uuid.UUID, executor database.QueryExecutor) error

DeleteAllSessionsByAccountID provides a mock function with given fields: accountID, executor

func (*MockRepository) DeleteExpiredSessions

func (_m *MockRepository) DeleteExpiredSessions(executor database.QueryExecutor) error

DeleteExpiredSessions provides a mock function with given fields: executor

func (*MockRepository) DeleteSessionBySessionID

func (_m *MockRepository) DeleteSessionBySessionID(sessionID uuid.UUID, executor database.QueryExecutor) error

DeleteSessionBySessionID provides a mock function with given fields: sessionID, executor

func (*MockRepository) GetSessionByAccessToken

func (_m *MockRepository) GetSessionByAccessToken(accessToken uuid.UUID, executor database.QueryExecutor) (*models.Session, error)

GetSessionByAccessToken provides a mock function with given fields: accessToken, executor

func (*MockRepository) UpdateSessionByRefreshToken

func (_m *MockRepository) UpdateSessionByRefreshToken(refreshToken uuid.UUID, accessTokenExpiresDate string, refreshTokenExpiresDate string, executor database.QueryExecutor) (*models.Session, error)

UpdateSessionByRefreshToken provides a mock function with given fields: refreshToken, accessTokenExpiresDate, refreshTokenExpiresDate, executor

type Repository

type Repository interface {
	CreateSession(executor database.QueryExecutor, session models.Session) error
	UpdateSessionByRefreshToken(
		executor database.QueryExecutor,
		refreshToken uuid.UUID,
		accessTokenExpiresDate, refreshTokenExpiresDate time.Time,
	) (*models.Session, error)
	DeleteAllSessionsByAccountID(executor database.QueryExecutor, accountID uuid.UUID) error
	DeleteSessionBySessionID(executor database.QueryExecutor, sessionID uuid.UUID) error
	GetSessionByAccessToken(executor database.QueryExecutor, accessToken uuid.UUID) (*models.Session, error)
	DeleteExpiredSessions(executor database.QueryExecutor) error
}

Repository is an interface for Session repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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