Versions in this module Expand all Collapse all v0 v0.0.1 May 20, 2025 Changes in this version + const Header + var Countries = map[string]struct + func ExportToFile(cat Catalog, filename string, pretty bool) error + func ExportToWriter(cat Catalog, w io.Writer, pretty bool) error + type Age struct + Unit string + Value string + type Catalog struct + Date string + Shop Shop + XMLName struct{} + func NewYML(name, company, url string) Catalog + func (c *Catalog) AddCategory(id, parentId int, name string) + func (c *Catalog) AddCurrency(id, rate string, plus float64) + func (c *Catalog) AddDeliveryOption(cost int, daysFrom, daysTo int, orderBefore int) + func (c *Catalog) AddOffer(offer Offer) + func (c *Catalog) SetDate(t time.Time) + type Categories struct + Category []Category + type Category struct + Id int + Name string + ParentId int + type Currencies struct + Currency []Currency + type Currency struct + Id string + Plus float64 + Rate string + type DeliveryOption struct + Cost int + Days string + OrderBefore int + type DeliveryOptions struct + Options []DeliveryOption + type Offer struct + Adult bool + Age *Age + Available bool + Barcode []string + Bid uint + CBid uint + CategoryId int + Count int + CountryOfOrigin string + Cpa int + CurrencyId string + Delivery bool + DeliveryOptions *DeliveryOptions + Description string + Dimensions string + Downloadable bool + Expiry string + Id string + ManufacturerWarranty bool + MarketCategory string + MinQuantity int + Model string + Name string + OldPrice float64 + Params []Param + Pickup bool + Picture []string + Price float64 + Rec string + SalesNotes string + Store bool + Type OfferType + TypePrefix string + Url string + Vendor string + VendorCode string + Weight float64 + func (o *Offer) AddAge(unit string, value string) + func (o *Offer) AddBarcode(barcode string) + func (o *Offer) AddDeliveryOption(cost int, daysFrom, daysTo int, orderBefore int) + func (o *Offer) AddParam(name, unit, value string) + func (o *Offer) AddPicture(pic string) + func (o Offer) Validate() error + type OfferType string + const TypeVendorModel + type Offers struct + Offers []Offer + type Param struct + Name string + Unit string + Value string + type Shop struct + Agency string + Categories Categories + Company string + Cpa int + Currencies Currencies + DeliveryOptions *DeliveryOptions + Email string + Name string + Offers Offers + Platform string + Url string + Version string