repo

package
v0.0.0-...-ac3ec41 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ItemRepo

type ItemRepo struct {
	*postgres.Postgres
}

ItemRepo -.

func New

func New(pg *postgres.Postgres) *ItemRepo

New -.

func (*ItemRepo) Create

func (r *ItemRepo) Create(ctx context.Context, item *entity.Item) error

Create -.

func (*ItemRepo) Delete

func (r *ItemRepo) Delete(ctx context.Context, id int) (entity.Item, error)

Delete помечает как удаленный

func (*ItemRepo) List

func (r *ItemRepo) List(ctx context.Context) ([]entity.Item, error)

List возвращает слайс всех не удаленных записей БД

func (*ItemRepo) MaxPriority

func (r *ItemRepo) MaxPriority(ctx context.Context) (int, error)

MaxPriority -.

func (*ItemRepo) Update

func (r *ItemRepo) Update(ctx context.Context, u entity.UpdateData) (entity.Item, error)

Update записывает персону вБД

Jump to

Keyboard shortcuts

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