db

package
v0.0.0-...-01078f8 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresRepository

type PostgresRepository struct {
	DB *sql.DB
}

func (*PostgresRepository) CheckUserExistance

func (s *PostgresRepository) CheckUserExistance(userEmail, userUserName string) (bool, error)

func (*PostgresRepository) GetLoginCridentials

func (s *PostgresRepository) GetLoginCridentials(userEmail string) (*models.LoginCridentials, bool, error)

func (*PostgresRepository) InsertUser

func (s *PostgresRepository) InsertUser(user *pb.SignUpRequest) error

func (*PostgresRepository) UpdateUserPassword

func (s *PostgresRepository) UpdateUserPassword(password, username string) error

func (*PostgresRepository) VerifyUser

func (s *PostgresRepository) VerifyUser(username string) error

type Repository

type Repository interface {
	InsertUser(user *pb.SignUpRequest) error
	CheckUserExistance(userEmail, userUserName string) (bool, error)
	GetLoginCridentials(userEmail string) (*models.LoginCridentials, bool, error)
	UpdateUserPassword(password, username string) error
	VerifyUser(username string) error
}

func NewPostgresRepository

func NewPostgresRepository(db *sql.DB) Repository

Jump to

Keyboard shortcuts

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