repos

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserRepo

type UserRepo struct {
	// contains filtered or unexported fields
}

func NewUserRepo

func NewUserRepo(db *sql.DB) *UserRepo

func (*UserRepo) CountUsers added in v0.0.3

func (r *UserRepo) CountUsers() (int, error)

func (*UserRepo) CreateUser

func (m *UserRepo) CreateUser(user *models.UserDB) error

func (*UserRepo) GetUserByEmail

func (r *UserRepo) GetUserByEmail(email string) (*models.UserDB, error)

func (*UserRepo) GetUserByID

func (r *UserRepo) GetUserByID(id string) (*models.UserDB, error)

type UserRepoInterface

type UserRepoInterface interface {
	CountUsers() (int, error)
	CreateUser(user *models.UserDB) error
	GetUserByEmail(email string) (*models.UserDB, error)
	GetUserByID(id string) (*models.UserDB, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳