repository

package
v0.0.0-...-e604231 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserRepository

func NewUserRepository(connpool *pgxpool.Pool) domain.Repository

TODO: Implement the UnitOfWork pattern

Types

type UserRepository

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

func (*UserRepository) GetByEmail

func (r *UserRepository) GetByEmail(ctx context.Context, email string) (*domain.User, error)

func (*UserRepository) GetByPublicID

func (r *UserRepository) GetByPublicID(ctx context.Context, id string) (*domain.User, error)

func (*UserRepository) Save

func (r *UserRepository) Save(ctx context.Context, user *domain.UserCreate) (*domain.User, error)

func (*UserRepository) UpdateBalance

func (r *UserRepository) UpdateBalance(ctx context.Context, id string, amount int64) (int64, error)

Jump to

Keyboard shortcuts

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