postgres

package
v0.0.0-...-dae7fcb Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserRepository

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

UserRepository defines a PostgreSQL user repository

func NewUserRepository

func NewUserRepository(db *sql.DB) *UserRepository

NewUserRepository creates a new PostgreSQL user repository

func (*UserRepository) Get

func (r *UserRepository) Get(ctx context.Context, id string) (*model.User, error)

Get retrieves a user by id

func (*UserRepository) GetIDByEmail

func (r *UserRepository) GetIDByEmail(ctx context.Context, email string) (string, error)

GetIDByEmail retrieves a user id by email

func (*UserRepository) Post

func (r *UserRepository) Post(ctx context.Context, user *model.User) error

Post adds a new user

Jump to

Keyboard shortcuts

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