repository

package
v0.0.0-...-14cdc90 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserRepository

func NewUserRepository(db *sqlx.DB) model.UserRepository

Types

type PGUserRepository

type PGUserRepository struct {
	DB *sqlx.DB
}

PGUserRepository is data/repository implementation of service layer UserRepository

func (*PGUserRepository) Create

func (r *PGUserRepository) Create(ctx context.Context, user *model.User) error

Create reaches out to database SQLX api

func (*PGUserRepository) FindByID

func (r *PGUserRepository) FindByID(ctx context.Context, uid uuid.UUID) (*model.User, error)

FindByID fetches user by id

Jump to

Keyboard shortcuts

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