productpg

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductPostgres

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

func NewProductPostgres

func NewProductPostgres(db *gorm.DB) (*ProductPostgres, error)

func (*ProductPostgres) CreateCategory

func (r *ProductPostgres) CreateCategory(e *entities.Category) (*entities.Category, error)

func (*ProductPostgres) CreateManufacturer

func (r *ProductPostgres) CreateManufacturer(e *entities.Manufacturer) (*entities.Manufacturer, error)

func (*ProductPostgres) CreateProduct

func (r *ProductPostgres) CreateProduct(e *entities.Product) (*entities.Product, error)

func (*ProductPostgres) DeleteCategory

func (r *ProductPostgres) DeleteCategory(id entities.ID) error

func (*ProductPostgres) DeleteImage

func (r *ProductPostgres) DeleteImage(id entities.ID) error

func (*ProductPostgres) DeleteManufacturer

func (r *ProductPostgres) DeleteManufacturer(id entities.ID) error

func (*ProductPostgres) DeleteProduct

func (r *ProductPostgres) DeleteProduct(id entities.ID) error

func (*ProductPostgres) GetCategory

func (r *ProductPostgres) GetCategory(id entities.ID) (*entities.Category, error)

func (*ProductPostgres) GetImage

func (r *ProductPostgres) GetImage(id entities.ID) (*entities.Image, error)

func (*ProductPostgres) GetManufacturer

func (r *ProductPostgres) GetManufacturer(id entities.ID) (*entities.Manufacturer, error)

func (*ProductPostgres) GetProduct

func (r *ProductPostgres) GetProduct(id entities.ID) (*entities.Product, error)

func (*ProductPostgres) ListCategories

func (r *ProductPostgres) ListCategories() ([]*entities.Category, error)

func (*ProductPostgres) ListManufacturers

func (r *ProductPostgres) ListManufacturers() ([]*entities.Manufacturer, error)

func (*ProductPostgres) ListProducts

func (r *ProductPostgres) ListProducts() ([]*entities.Product, error)

func (*ProductPostgres) UpdateCategory

func (r *ProductPostgres) UpdateCategory(e *entities.Category) (*entities.Category, error)

func (*ProductPostgres) UpdateImage

func (r *ProductPostgres) UpdateImage(id entities.ID, ownerID entities.ID, newOrder int) ([]*entities.Image, error)

func (*ProductPostgres) UpdateManufacturer

func (r *ProductPostgres) UpdateManufacturer(e *entities.Manufacturer) (*entities.Manufacturer, error)

func (*ProductPostgres) UpdateProduct

func (r *ProductPostgres) UpdateProduct(e *entities.Product) (*entities.Product, error)

func (*ProductPostgres) UpdateProductImages added in v0.4.0

func (r *ProductPostgres) UpdateProductImages(id entities.ID, images []*entities.Image) ([]*entities.Image, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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