Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
WrongPasswordOrLoginError = errors.New("wrong password or login")
)
Functions ¶
This section is empty.
Types ¶
type RegisterParams ¶
type Repository ¶
type Repository interface { Authenticate(email, password string) (models.User, error) SetSession(id string, session *models.Session, expiration time.Duration) error CheckAuth(userId, sessionId string) (models.User, error) Register(user *models.User) error DeleteSession(userId, sessionId string) error }
type Service ¶
type Service interface { Authenticate(login, hashedPassword string) (models.User, SessionParams, error) Register(user *RegisterParams) (models.User, SessionParams, error) SetSession(id string, session *models.Session, expiration time.Duration) error CheckAuth(userId, sessionId string) (models.User, error) DeleteSession(userId, sessionId string) error CreateSession(userId int) SessionParams }
type SessionParams ¶
Directories ¶
Path | Synopsis |
---|---|
delivery
|
|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
repository
|
|
Click to show internal directories.
Click to hide internal directories.