Documentation
¶
Index ¶
- type Connection
- type PostgresConnection
- func (connection *PostgresConnection) CheckRefreshToken(userId uuid.UUID, refreshToken string) error
- func (connection *PostgresConnection) Close()
- func (connection *PostgresConnection) CreateUser(user *UserDB, hash string) error
- func (connection *PostgresConnection) DeleteUser(userId uuid.UUID) error
- func (connection *PostgresConnection) LoginUser(user *UserDB) error
- func (connection *PostgresConnection) UpdatePassword(userId uuid.UUID, password string, hash string) error
- func (connection *PostgresConnection) UpdateRefreshToken(userId uuid.UUID, refreshToken string, refreshTokenExpireAt time.Time) error
- type UserDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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
}
func NewConnection ¶
func NewConnection() (Connection, error)
type PostgresConnection ¶
type PostgresConnection struct {
// contains filtered or unexported fields
}
func (*PostgresConnection) CheckRefreshToken ¶
func (connection *PostgresConnection) CheckRefreshToken(userId uuid.UUID, refreshToken string) error
func (*PostgresConnection) Close ¶
func (connection *PostgresConnection) Close()
func (*PostgresConnection) CreateUser ¶
func (connection *PostgresConnection) CreateUser(user *UserDB, hash string) error
func (*PostgresConnection) DeleteUser ¶
func (connection *PostgresConnection) DeleteUser(userId uuid.UUID) error
func (*PostgresConnection) LoginUser ¶
func (connection *PostgresConnection) LoginUser(user *UserDB) error
func (*PostgresConnection) UpdatePassword ¶
func (*PostgresConnection) UpdateRefreshToken ¶
Click to show internal directories.
Click to hide internal directories.