Documentation ¶
Index ¶
- Variables
- type CheckRefreshTokenRecord
- type CloseRecord
- type Connection
- type CreateUserRecord
- type DBMock
- func (mock *DBMock) CheckRefreshToken(userId uuid.UUID, refreshToken string) error
- func (mock *DBMock) Close()
- func (mock *DBMock) CreateUser(user *UserDB, hash string) error
- func (mock *DBMock) DeleteInitUsers() error
- func (mock *DBMock) DeleteUser(userId uuid.UUID) error
- func (mock *DBMock) LoginUser(user *UserDB) error
- func (mock *DBMock) UpdatePassword(userId uuid.UUID, password string, hash string) error
- func (mock *DBMock) UpdateRefreshToken(userId uuid.UUID, refreshToken string, refreshTokenExpireAt time.Time) error
- type DeleteUserRecord
- type ErrorResponse
- type LoginUserRecord
- type UpdatePasswordRecord
- type UpdateRefreshTokenRecord
- type UserDB
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUserAlreadyExists = errors.New("user already exists")
)
Functions ¶
This section is empty.
Types ¶
type CheckRefreshTokenRecord ¶ added in v0.3.0
type CloseRecord ¶ added in v0.3.0
type CloseRecord struct { }
type Connection ¶
type Connection interface { Close() CreateUser(user *UserDB, hash string) error UpdateRefreshToken(userId uuid.UUID, refreshToken string, refreshTokenExpireAt time.Time) error LoginUser(user *UserDB) error CheckRefreshToken(userId uuid.UUID, refreshToken string) error UpdatePassword(userId uuid.UUID, password string, hash string) error DeleteUser(userId uuid.UUID) error DeleteInitUsers() error }
func NewConnection ¶
func NewConnection() (Connection, error)
type CreateUserRecord ¶ added in v0.3.0
type DBMock ¶ added in v0.3.0
type DBMock struct { CloseRecordArray []*CloseRecord CreateUserRecordArray []*CreateUserRecord UpdateRefreshTokenRecordArray []*UpdateRefreshTokenRecord LoginUserRecordArray []*LoginUserRecord CheckRefreshTokenRecordArray []*CheckRefreshTokenRecord UpdatePasswordRecordArray []*UpdatePasswordRecord DeleteUserRecordArray []*DeleteUserRecord DeleteInitUsersRecordArray []*CloseRecord CreateUserResponseArray []*ErrorResponse UpdateRefreshTokenResponseArray []*ErrorResponse LoginUserResponseArray []*ErrorResponse CheckRefreshTokenResponseArray []*ErrorResponse UpdatePasswordResponseArray []*ErrorResponse DeleteUserResponseArray []*ErrorResponse DeleteInitUsersResponseArray []*ErrorResponse }
func (*DBMock) CheckRefreshToken ¶ added in v0.3.0
func (*DBMock) CreateUser ¶ added in v0.3.0
func (*DBMock) DeleteInitUsers ¶ added in v0.7.0
func (*DBMock) UpdatePassword ¶ added in v0.3.0
type DeleteUserRecord ¶ added in v0.3.0
type ErrorResponse ¶ added in v0.3.0
type ErrorResponse struct {
Err error
}
type LoginUserRecord ¶ added in v0.3.0
type LoginUserRecord struct {
User *UserDB
}
type UpdatePasswordRecord ¶ added in v0.3.0
type UpdateRefreshTokenRecord ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.