Documentation ¶
Index ¶
- Variables
- type MockService
- func (_m *MockService) CreateSession(accountID uuid.UUID, identityID uuid.UUID, clientID models.ClientID, ...) (*models.Session, error)
- func (_m *MockService) DeleteAllSessionsByAccountID(accountID uuid.UUID, tx *sql.Tx) error
- func (_m *MockService) DeleteExpiredSessions() error
- func (_m *MockService) DeleteSessionBySessionID(sessionID uuid.UUID) error
- func (_m *MockService) GetSessionByAccessToken(accessToken uuid.UUID) (*models.Session, error)
- func (_m *MockService) RefreshSession(refreshToken uuid.UUID) (*models.Session, error)
- type Repository
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSessionNotFound = errors.New("session not found") ErrNoSessionsUpdated = errors.New("sessions with sent params are not updated") )
Functions ¶
This section is empty.
Types ¶
type MockService ¶
MockService is an autogenerated mock type for the Service type
func (*MockService) CreateSession ¶
func (_m *MockService) CreateSession(accountID uuid.UUID, identityID uuid.UUID, clientID models.ClientID, tx *sql.Tx) (*models.Session, error)
CreateSession provides a mock function with given fields: accountID, identityID, clientID, tx
func (*MockService) DeleteAllSessionsByAccountID ¶
DeleteAllSessionsByAccountID provides a mock function with given fields: accountID, tx
func (*MockService) DeleteExpiredSessions ¶
func (_m *MockService) DeleteExpiredSessions() error
DeleteExpiredSessions provides a mock function with given fields:
func (*MockService) DeleteSessionBySessionID ¶
func (_m *MockService) DeleteSessionBySessionID(sessionID uuid.UUID) error
DeleteSessionBySessionID provides a mock function with given fields: sessionID
func (*MockService) GetSessionByAccessToken ¶
GetSessionByAccessToken provides a mock function with given fields: accessToken
func (*MockService) RefreshSession ¶
RefreshSession provides a mock function with given fields: refreshToken
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 }
type Service ¶
type Service interface { GetSessionByAccessToken(executor database.QueryExecutor, accessToken uuid.UUID) (*models.Session, error) CreateSession( executor database.QueryExecutor, accountID, identityID uuid.UUID, clientID models.ClientID, ) (*models.Session, error) DeleteAllSessionsByAccountID(executor database.QueryExecutor, accountID uuid.UUID) error DeleteSessionBySessionID(executor database.QueryExecutor, sessionID uuid.UUID) error DeleteExpiredSessions(executor database.QueryExecutor) error RefreshSession(executor database.QueryExecutor, refreshToken uuid.UUID) (*models.Session, error) }
Click to show internal directories.
Click to hide internal directories.