postgres

package
v0.0.0-...-76fafce Latest Latest
Warning

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

Go to latest
Published: Nov 3, 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 CatalogRepository

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

func NewCatalogRepository

func NewCatalogRepository(tableName string, db postgres.DB) CatalogRepository

func (CatalogRepository) AddProduct

func (r CatalogRepository) AddProduct(ctx context.Context, productID, storeID, name, description, sku string, price float64) error

func (CatalogRepository) Find

func (r CatalogRepository) Find(ctx context.Context, productID string) (*domain.CatalogProduct, error)

func (CatalogRepository) GetCatalog

func (r CatalogRepository) GetCatalog(ctx context.Context, storeID string) (products []*domain.CatalogProduct, err error)

func (CatalogRepository) Rebrand

func (r CatalogRepository) Rebrand(ctx context.Context, productID, name, description string) error

func (CatalogRepository) RemoveProduct

func (r CatalogRepository) RemoveProduct(ctx context.Context, productID string) error

func (CatalogRepository) UpdatePrice

func (r CatalogRepository) UpdatePrice(ctx context.Context, productID string, delta float64) error

type MallRepository

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

func NewMallRepository

func NewMallRepository(tableName string, db postgres.DB) MallRepository

func (MallRepository) AddStore

func (r MallRepository) AddStore(ctx context.Context, storeID, name, location string) error

func (MallRepository) All

func (r MallRepository) All(ctx context.Context) (stores []*domain.MallStore, err error)

func (MallRepository) AllParticipating

func (r MallRepository) AllParticipating(ctx context.Context) (stores []*domain.MallStore, err error)

func (MallRepository) Find

func (r MallRepository) Find(ctx context.Context, storeID string) (*domain.MallStore, error)

func (MallRepository) RenameStore

func (r MallRepository) RenameStore(ctx context.Context, storeID, name string) error

func (MallRepository) SetStoreParticipation

func (r MallRepository) SetStoreParticipation(ctx context.Context, storeID string, participating bool) error

Jump to

Keyboard shortcuts

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