Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeFilter ¶
AttributeFilter is used for filtering of products by attribute.
type Filter ¶
type Filter struct {
Provider *string
SKU *string
Service *string
Family *string
Location *string
AttributeFilters []*AttributeFilter
}
Filter is used to filter products.
type Product ¶
type Product struct {
ID ID
Provider string
SKU string
Service string
Family string
Location string
Attributes map[string]string
}
Product is an entry of a single SKU.
type Repository ¶
type Repository interface {
// Filter returns Products with attributes matching the Filter.
Filter(ctx context.Context, filter *Filter) ([]*Product, error)
// FindByVendorAndSKU finds a single Product by its vendor and SKU.
FindByVendorAndSKU(ctx context.Context, vendor string, sku string) (*Product, error)
// Upsert updates a Product or creates a new one if it doesn't already exist.
Upsert(ctx context.Context, p *Product) (ID, error)
}
Repository describes interactions with a storage system to deal with Product entries.
Click to show internal directories.
Click to hide internal directories.