persistence

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOrderRepository

func NewOrderRepository() order.Repository

func NewPositionRepository

func NewPositionRepository() position.Repository

func NewProductRepository

func NewProductRepository() product2.Repository

func NewUnitRepository

func NewUnitRepository() unit2.Repository

Types

type GormOrderRepository

type GormOrderRepository struct{}

func (*GormOrderRepository) Count

func (g *GormOrderRepository) Count(ctx context.Context) (int64, error)

func (*GormOrderRepository) Create

func (g *GormOrderRepository) Create(ctx context.Context, data *order.Order) error

func (*GormOrderRepository) Delete

func (g *GormOrderRepository) Delete(ctx context.Context, id uint) error

func (*GormOrderRepository) GetAll

func (g *GormOrderRepository) GetAll(ctx context.Context) ([]*order.Order, error)

func (*GormOrderRepository) GetByID

func (g *GormOrderRepository) GetByID(ctx context.Context, id uint) (*order.Order, error)

func (*GormOrderRepository) GetPaginated

func (g *GormOrderRepository) GetPaginated(
	ctx context.Context, limit, offset int,
	sortBy []string,
) ([]*order.Order, error)

func (*GormOrderRepository) Update

func (g *GormOrderRepository) Update(ctx context.Context, data *order.Order) error

type GormPositionRepository

type GormPositionRepository struct{}

func (*GormPositionRepository) Count

func (*GormPositionRepository) Create

func (*GormPositionRepository) CreateOrUpdate

func (g *GormPositionRepository) CreateOrUpdate(ctx context.Context, data *position.Position) error

func (*GormPositionRepository) Delete

func (g *GormPositionRepository) Delete(ctx context.Context, id uint) error

func (*GormPositionRepository) GetAll

func (*GormPositionRepository) GetByID

func (*GormPositionRepository) GetPaginated

func (g *GormPositionRepository) GetPaginated(
	ctx context.Context, params *position.FindParams,
) ([]*position.Position, error)

func (*GormPositionRepository) Update

type GormProductRepository

type GormProductRepository struct{}

func (*GormProductRepository) Count

func (g *GormProductRepository) Count(ctx context.Context) (int64, error)

func (*GormProductRepository) Create

func (*GormProductRepository) CreateOrUpdate

func (g *GormProductRepository) CreateOrUpdate(ctx context.Context, data *product2.Product) error

func (*GormProductRepository) Delete

func (g *GormProductRepository) Delete(ctx context.Context, id uint) error

func (*GormProductRepository) GetAll

func (*GormProductRepository) GetByID

func (*GormProductRepository) GetPaginated

func (g *GormProductRepository) GetPaginated(
	ctx context.Context, limit, offset int,
	sortBy []string,
) ([]*product2.Product, error)

func (*GormProductRepository) Update

type GormUnitRepository

type GormUnitRepository struct{}

func (*GormUnitRepository) Count

func (g *GormUnitRepository) Count(ctx context.Context) (uint, error)

func (*GormUnitRepository) Create

func (g *GormUnitRepository) Create(ctx context.Context, data *unit2.Unit) error

func (*GormUnitRepository) CreateOrUpdate

func (g *GormUnitRepository) CreateOrUpdate(ctx context.Context, data *unit2.Unit) error

func (*GormUnitRepository) Delete

func (g *GormUnitRepository) Delete(ctx context.Context, id uint) error

func (*GormUnitRepository) GetAll

func (g *GormUnitRepository) GetAll(ctx context.Context) ([]*unit2.Unit, error)

func (*GormUnitRepository) GetByID

func (g *GormUnitRepository) GetByID(ctx context.Context, id uint) (*unit2.Unit, error)

func (*GormUnitRepository) GetPaginated

func (g *GormUnitRepository) GetPaginated(
	ctx context.Context,
	limit, offset int,
	sortBy []string,
) ([]*unit2.Unit, error)

func (*GormUnitRepository) Update

func (g *GormUnitRepository) Update(ctx context.Context, data *unit2.Unit) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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