repositories

package
v0.0.0-...-e7a9347 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repos

type Repos struct {
	User *UserRepo
	Task *TaskRepo
}

func New

func New(driver *postgresql.Postgres) *Repos

type TaskRepo

type TaskRepo struct {
	Driver *postgresql.Postgres
}

func NewTask

func NewTask(d *postgresql.Postgres) *TaskRepo

func (*TaskRepo) Create

func (r *TaskRepo) Create(ctx context.Context, userID string) (string, error)

func (*TaskRepo) GetReportSummaryTime

func (r *TaskRepo) GetReportSummaryTime(ctx context.Context, userID string, sort entities.TaskSort) ([]entities.TaskSummary, error)

func (*TaskRepo) SetFinishedAt

func (r *TaskRepo) SetFinishedAt(ctx context.Context, id string) (string, error)

type UserRepo

type UserRepo struct {
	Driver *postgresql.Postgres
}

func NewUser

func NewUser(d *postgresql.Postgres) *UserRepo

func (*UserRepo) Create

func (r *UserRepo) Create(ctx context.Context, user entities.User) (string, error)

func (*UserRepo) Delete

func (r *UserRepo) Delete(ctx context.Context, id string) error

func (*UserRepo) Get

func (r *UserRepo) Get(ctx context.Context, passportNumber string) (entities.User, error)

func (*UserRepo) GetAll

func (r *UserRepo) GetAll(ctx context.Context, representation entities.UserRepresentation) ([]entities.User, error)

func (*UserRepo) Update

func (r *UserRepo) Update(ctx context.Context, user entities.User) error

Jump to

Keyboard shortcuts

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