repository

package
v0.0.0-...-afd1d67 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBInfo

type DBInfo struct {
	Name     string
	Host     string
	Port     string
	User     string
	Password string
}

func (*DBInfo) Connect

func (db *DBInfo) Connect(driver string) (*sqlx.DB, error)

type UserRepository

type UserRepository interface {
	GetUserByID(ctx context.Context, id string) (*model.User, error)
	GetUserByEmail(ctx context.Context, email string) (*model.User, error)
	CreateUser(ctx context.Context, user *model.User) error
}

func NewUserRepository

func NewUserRepository(conn *sqlx.DB) UserRepository

NewUserRepository creates a new UserRepository with the provided sql db connection.

Jump to

Keyboard shortcuts

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