repo

package
v0.0.0-...-398e551 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyExists = errors.New("user already exists")
)

Functions

func GenPasswordHash

func GenPasswordHash(pass string) string

func NewpDB

func NewpDB(db *gorm.DB) *pDB

func PGConn

func PGConn(url string) (*gorm.DB, error)

Types

type AuthRepository

type AuthRepository interface {
	Create(ctx context.Context, req *UserRequest) error
	Get(ctx context.Context, req *UserRequest) (*models.User, error)
}

type Repository

type Repository struct {
	AuthRepository
}

func NewRepository

func NewRepository(db *gorm.DB) *Repository

type UserRequest

type UserRequest struct {
	Email    string
	Password string
}

Directories

Path Synopsis
Package mock_repo is a generated GoMock package.
Package mock_repo is a generated GoMock package.

Jump to

Keyboard shortcuts

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