Documentation ¶
Index ¶
- Constants
- type RedisConnection
- type Repository
- func (m *Repository) DeleteUserToken(userId string) error
- func (m *Repository) GetUser(name string) (*models.User, error)
- func (m *Repository) GetUserById(userId string) (*models.User, error)
- func (m *Repository) HasValidPassword(user *models.User, clientPassword string) (bool, error)
- func (m *Repository) IsValidUser(userId string) bool
- func (m *Repository) StoreUserToken(userId string, tokenPair *models.TokenPair) error
- func (m *Repository) UpdataPasswordByUserId(userId, newPasswordHash string) error
Constants ¶
View Source
const DATABASEDRIVER = "mysql"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisConnection ¶
type RedisConnection struct {
// contains filtered or unexported fields
}
type Repository ¶
type Repository struct { DB *sql.DB RedisCon RedisConnection }
func NewRepository ¶
func NewRepository(migrationPath string, dbConfig config.DB) (*Repository, error)
func (*Repository) DeleteUserToken ¶
func (m *Repository) DeleteUserToken(userId string) error
func (*Repository) GetUserById ¶
func (m *Repository) GetUserById(userId string) (*models.User, error)
func (*Repository) HasValidPassword ¶
func (*Repository) IsValidUser ¶
func (m *Repository) IsValidUser(userId string) bool
func (*Repository) StoreUserToken ¶
func (m *Repository) StoreUserToken(userId string, tokenPair *models.TokenPair) error
func (*Repository) UpdataPasswordByUserId ¶
func (m *Repository) UpdataPasswordByUserId(userId, newPasswordHash string) error
Click to show internal directories.
Click to hide internal directories.