Versions in this module Expand all Collapse all v1 v1.0.1 Mar 22, 2024 Changes in this version + var ErrMismatchingCurrency = errors.New("the currency is not the same") + var ErrMismatchingUnit = errors.New("the unit is not the same") + type AttributeFilter struct + Key string + Value *string + ValueRegex *string + type Filter struct + AttributeFilters []*AttributeFilter + Currency *string + Unit *string + type ID uint32 + type Price struct + Attributes map[string]string + Currency string + ID ID + Unit string + Value decimal.Decimal + func (p *Price) Add(pr Price) error + func (p *Price) GenerateHash() string + type Repository interface + DeleteByProductWithKeep func(ctx context.Context, productID product.ID, keep []ID) error + Filter func(ctx context.Context, productID product.ID, filter *Filter) ([]*Price, error) + Upsert func(ctx context.Context, p *WithProduct) (ID, error) + type WithProduct struct + Product *product.Product