repository

package
v0.0.0-...-34c33d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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) GetUser

func (m *Repository) GetUser(name string) (*models.User, error)

func (*Repository) GetUserById

func (m *Repository) GetUserById(userId string) (*models.User, error)

func (*Repository) HasValidPassword

func (m *Repository) HasValidPassword(user *models.User, clientPassword string) (bool, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL