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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomerCacheRepository

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

func NewCustomerCacheRepository

func NewCustomerCacheRepository(tableName string, db postgres.DB, fallback application.CustomerRepository) CustomerCacheRepository

func (CustomerCacheRepository) Add

func (r CustomerCacheRepository) Add(ctx context.Context, customerID, name string) error

func (CustomerCacheRepository) Find

func (r CustomerCacheRepository) Find(ctx context.Context, customerID string) (*models.Customer, error)

type IDArray

type IDArray []string

func (*IDArray) Scan

func (a *IDArray) Scan(src any) error

func (IDArray) Value

func (a IDArray) Value() (driver.Value, error)

type OrderRepository

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

func NewOrderRepository

func NewOrderRepository(tableName string, db postgres.DB) OrderRepository

func (OrderRepository) Add

func (r OrderRepository) Add(ctx context.Context, order *models.Order) error

func (OrderRepository) Get

func (r OrderRepository) Get(ctx context.Context, orderID string) (*models.Order, error)

func (OrderRepository) Search

func (OrderRepository) UpdateStatus

func (r OrderRepository) UpdateStatus(ctx context.Context, orderID, status string) error

type ProductCacheRepository

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

func NewProductCacheRepository

func NewProductCacheRepository(tableName string, db postgres.DB, fallback application.ProductRepository) ProductCacheRepository

func (ProductCacheRepository) Add

func (r ProductCacheRepository) Add(ctx context.Context, productID, storeID, name string) error

func (ProductCacheRepository) Find

func (r ProductCacheRepository) Find(ctx context.Context, productID string) (*models.Product, error)

func (ProductCacheRepository) Rebrand

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

func (ProductCacheRepository) Remove

func (r ProductCacheRepository) Remove(ctx context.Context, productID string) error

type StoreCacheRepository

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

func NewStoreCacheRepository

func NewStoreCacheRepository(tableName string, db postgres.DB, fallback application.StoreRepository) StoreCacheRepository

func (StoreCacheRepository) Add

func (r StoreCacheRepository) Add(ctx context.Context, storeID, name string) error

func (StoreCacheRepository) Find

func (r StoreCacheRepository) Find(ctx context.Context, storeID string) (*models.Store, error)

func (StoreCacheRepository) Rename

func (r StoreCacheRepository) Rename(ctx context.Context, storeID, name string) error

Jump to

Keyboard shortcuts

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