package export import "time" type Param struct { Name string `xml:"name,attr"` Value string `xml:",chardata"` } type Offer struct { ID int64 `xml:"id,attr"` Type string `xml:"type,attr"` Available bool `xml:"available,attr"` URL string `xml:"url"` Price int `xml:"price"` CurrencyID string `xml:"currencyId"` CategoryID int64 `xml:"categoryId"` PictureURLs []string `xml:"picture"` Vendor string `xml:"vendor"` Model string `xml:"model"` VendorCode string `xml:"vendorCode"` TypePrefix string `xml:"typePrefix"` Description string `xml:"description"` ManufacturerWarrany bool `xml:"manufacturer_warranty"` Dimensions string `xml:"dimensions"` Params []Param `xml:"param,omitempty"` } type Currency struct { ID string `xml:"id,attr"` // RUR only Rate int64 `xml:"rate,attr"` // 1? } type Category struct { ID int64 `xml:"id,attr"` ParentID int64 `xml:"parent_id,attr,omitempty"` Name string `xml:",chardata"` } type Shop struct { Name string `xml:"name"` // r Company string `xml:"company"` // r URL string `xml:"url"` // r Platform string `xml:"platform"` Version string `xml:"version"` Currencies []Currency `xml:"currencies"` // r RUR only Categories []Category `xml:"categories>category"` // r Offers []Offer `xml:"offer"` // r } type YmlContainer struct { XMLName struct{} `xml:"yml_catalog"` YmlCatalog } type YmlCatalog struct { Date time.Time `xml:"date,attr"` Shop Shop `xml:"shop"` }