google

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdsDestinationType

type AdsDestinationType string
const (
	ShoppingAds         AdsDestinationType = "Shopping_ads"
	BuyOnGoogleListings AdsDestinationType = "Buy_on_Google_listings"
	DisplayAds          AdsDestinationType = "Display_ads"
	LocalInventoryAds   AdsDestinationType = "Local_inventory_ads"
	FreeListings        AdsDestinationType = "Free_listings"
	FreeLocalListings   AdsDestinationType = "Free_local_listings"
)

func (*AdsDestinationType) MarshalCSV

func (adt *AdsDestinationType) MarshalCSV() (string, error)

func (*AdsDestinationType) UnmarshalCSV

func (adt *AdsDestinationType) UnmarshalCSV(csv string) error

type AgeGroupType

type AgeGroupType string
const (
	Newborn AgeGroupType = "newborn"
	Infant  AgeGroupType = "infant"
	Toddler AgeGroupType = "toddler"
	Kids    AgeGroupType = "kids"
	Adult   AgeGroupType = "adult"
)

func (*AgeGroupType) MarshalCSV

func (agt *AgeGroupType) MarshalCSV() (string, error)

func (*AgeGroupType) UnmarshalCSV

func (agt *AgeGroupType) UnmarshalCSV(csv string) error

type AvailabilityType

type AvailabilityType string
const (
	InStock    AvailabilityType = "in_stock"
	OutOfStock AvailabilityType = "out_of_stock"
	Preorder   AvailabilityType = "preorder"
	Backorder  AvailabilityType = "backorder"
)

func (*AvailabilityType) MarshalCSV

func (at *AvailabilityType) MarshalCSV() (string, error)

func (*AvailabilityType) UnmarshalCSV

func (at *AvailabilityType) UnmarshalCSV(csv string) error

type ConditionType

type ConditionType string
const (
	New         ConditionType = "new"
	Refurbished ConditionType = "refurbished"
	Used        ConditionType = "used"
)

func (*ConditionType) MarshalCSV

func (ct *ConditionType) MarshalCSV() (string, error)

func (*ConditionType) UnmarshalCSV

func (ct *ConditionType) UnmarshalCSV(csv string) error

type ConvertibleBooleanType

type ConvertibleBooleanType bool

func (*ConvertibleBooleanType) MarshalCSV

func (b *ConvertibleBooleanType) MarshalCSV() (string, error)

func (*ConvertibleBooleanType) UnmarshalCSV

func (b *ConvertibleBooleanType) UnmarshalCSV(data []byte) error

type DSAElement

type DSAElement struct {
	URL         *GUrl  `csv:"Page URL" json:"Page URL"`
	CustomLabel string `csv:"Custom label,omitempty" json:"Custom label"`
}

type DSAFeed

type DSAFeed struct {
	Rows []*DSAElement
}

type EnergyEfficiencyClassType

type EnergyEfficiencyClassType string

func (*EnergyEfficiencyClassType) MarshalCSV

func (eect *EnergyEfficiencyClassType) MarshalCSV() (string, error)

func (*EnergyEfficiencyClassType) UnmarshalCSV

func (eect *EnergyEfficiencyClassType) UnmarshalCSV(csv string) error

type GDate

type GDate struct {
	time.Time
}

GDate YYYY-MM-DDThh:mmZ / ISO 8601 / RFC3339

func (*GDate) MarshalCSV

func (gt *GDate) MarshalCSV() (string, error)

func (*GDate) UnmarshalCSV

func (gt *GDate) UnmarshalCSV(csv string) error

type GUrl

type GUrl struct {
	*url.URL
}

func (*GUrl) MarshalCSV

func (gurl *GUrl) MarshalCSV() (string, error)

func (*GUrl) UnmarshalCSV

func (gurl *GUrl) UnmarshalCSV(csv string) error

type GenderType

type GenderType string
const (
	Male   GenderType = "male"
	Female GenderType = "female"
	Unisex GenderType = "unisex"
)

func (*GenderType) MarshalCSV

func (gt *GenderType) MarshalCSV() (string, error)

func (*GenderType) UnmarshalCSV

func (gt *GenderType) UnmarshalCSV(csv string) error

type InstallmentType

type InstallmentType struct {
	Months *uint64
	Amount *NumericValue
}

func (*InstallmentType) MarshalCSV

func (it *InstallmentType) MarshalCSV() (string, error)

func (*InstallmentType) UnmarshalCSV

func (it *InstallmentType) UnmarshalCSV(csv string) error

type LoyaltyPointsType

type LoyaltyPointsType struct {
	Name        *string
	PointsValue *uint64  // TODO decimal
	Ratio       *float32 // TODO decimal
}

func (*LoyaltyPointsType) MarshalCSV

func (lpt *LoyaltyPointsType) MarshalCSV() (string, error)

func (*LoyaltyPointsType) UnmarshalCSV

func (lpt *LoyaltyPointsType) UnmarshalCSV(csv string) error

type MultipleGUrl

type MultipleGUrl struct {
	Urls []*GUrl
}

func (*MultipleGUrl) MarshalCSV

func (mg *MultipleGUrl) MarshalCSV() (string, error)

func (*MultipleGUrl) UnmarshalCSV

func (mg *MultipleGUrl) UnmarshalCSV(csv string) error

type MultipleProductDetailType

type MultipleProductDetailType []*ProductDetailType

TODO

type NumericValue

type NumericValue struct {
	Value     decimal.NullDecimal
	Dimension string
	HasSpace  bool
}

func (*NumericValue) MarshalCSV

func (nv *NumericValue) MarshalCSV() (string, error)

func (*NumericValue) UnmarshalCSV

func (nv *NumericValue) UnmarshalCSV(csv string) error

type ProductCategoryType

type ProductCategoryType struct {
	ID         *uint64
	Categories []*string
}

func (*ProductCategoryType) MarshalCSV

func (cat *ProductCategoryType) MarshalCSV() (string, error)

func (*ProductCategoryType) UnmarshalCSV

func (cat *ProductCategoryType) UnmarshalCSV(csv string) error

type ProductDetailType

type ProductDetailType struct {
	Section        *string
	AttributeName  *string
	AttributeValue *string
}

func (*ProductDetailType) MarshalCSV

func (pdt *ProductDetailType) MarshalCSV() (string, error)

func (*ProductDetailType) UnmarshalCSV

func (pdt *ProductDetailType) UnmarshalCSV(csv string) error

type ShippingType

type ShippingType struct {
	Country           *string       `xml:"g:country,omitempty"`
	Region            *string       `xml:"g:region,omitempty"`
	PostalCode        *string       `xml:"g:postal_code,omitempty"`
	LocationID        *string       `xml:"g:location_id,omitempty"`
	LocationGroupName *string       `xml:"g:location_group_name,omitempty"`
	Service           *string       `xml:"g:service,omitempty"`
	Price             *NumericValue `xml:"g:price,omitempty"`
	MinHandlingTime   *string       `xml:"g:min_handling_time,omitempty"`
	MaxHandlingTime   *string       `xml:"g:max_handling_time,omitempty"`
	MinTransitTime    *string       `xml:"g:min_transit_time,omitempty"`
	MaxTransitTime    *string       `xml:"g:max_transit_time,omitempty"`
}

TODO unmarshal and marshal

type ShoppingElement

type ShoppingElement struct {
	ID                              *string                    `csv:"id,omitempty" json:"id" xml:"g:id" validate:"required,min=1,max=50"`                   // Your product’s unique identifier
	Title                           *string                    `csv:"title,omitempty" json:"title" xml:"g:title" validate:"required,min=1,max=150"`         // Your product’s name
	Description                     *string                    `csv:"description,omitempty" xml:"g:description" validate:"required,min=1,max=5000"`         // Your product’s description
	Link                            *GUrl                      `csv:"link,omitempty" xml:"link,omitempty" validate:"required,min=1,max=2000"`               // Your product’s landing page
	ImageLink                       *GUrl                      `csv:"image_link,omitempty" xml:"g:image_link,omitempty" validate:"required,min=1,max=2000"` // The URL of your product’s main image
	AdditionalImageLink             *MultipleGUrl              `csv:"additional_image_link,omitempty"`                                                      // The URL of an additional image for your product
	MobileLink                      *GUrl                      `csv:"mobile_link,omitempty" xml:"g:mobile_link,omitempty" validate:"min=1,max=2000"`
	Availability                    *AvailabilityType          `csv:"availability,omitempty" xml:"g:availability,omitempty" validate:"required"`
	AvailabilityDate                *GDate                     `csv:"availability_date,omitempty" xml:"g:availability_date,omitempty"`
	CostOfGoodsSold                 *NumericValue              `csv:"cost_of_goods_sold,omitempty" xml:"g:cost_of_goods_sold,omitempty"`
	ExpirationDate                  *GDate                     `csv:"expiration_date,omitempty" xml:"g:expiration_date,omitempty"`
	Price                           *NumericValue              `csv:"price,omitempty" xml:"g:price,omitempty" validate:"required"`
	SalePrice                       *NumericValue              `csv:"sale_price,omitempty" xml:"g:sale_price,omitempty"`
	SalePriceEffectiveDate          *GDate                     `csv:"sale_price_effective_date,omitempty" xml:"g:sale_price_effective_date,omitempty"`
	UnitPricingMeasure              *NumericValue              `csv:"unit_pricing_measure,omitempty"`
	UnitPricingBaseMeasure          *NumericValue              `csv:"unit_pricing_base_measure,omitempty"`
	Installment                     *InstallmentType           `csv:"installment,omitempty"`
	SubscriptionCost                *SubscriptionCostType      `csv:"subscription_cost,omitempty"`
	LoyaltyPoints                   *LoyaltyPointsType         `csv:"loyalty_points,omitempty"`
	GoogleProductCategory           *ProductCategoryType       `csv:"google_product_category,omitempty"`
	ProductType                     *ProductCategoryType       `csv:"product_type,omitempty"`
	Brand                           *string                    `csv:"brand,omitempty" xml:"g:brand,omitempty" validate:"max=70" `
	GTIN                            *string                    `csv:"gtin,omitempty" xml:"g:gtin"`
	MPN                             *string                    `csv:"mpn,omitempty" xml:"g:mpn"`
	IdentifierExists                *ConvertibleBooleanType    `csv:"identifier_exists,omitempty" xml:"g:identifier_exists,omitempty"`
	Condition                       *ConditionType             `csv:"condition,omitempty"`
	Adult                           *ConvertibleBooleanType    `csv:"adult,omitempty"`
	Multipack                       *uint64                    `csv:"multipack,omitempty"`
	Bundle                          *ConvertibleBooleanType    `csv:"is_bundle,omitempty"`
	EnergyEfficiencyClass           *EnergyEfficiencyClassType `csv:"energy_efficiency_class,omitempty"`
	MinimumEnergyEfficiencyClass    *EnergyEfficiencyClassType `csv:"min_energy_efficiency_class,omitempty"`
	MaximumEnergyEfficiencyClass    *EnergyEfficiencyClassType `csv:"max_energy_efficiency_class,omitempty"`
	AgeGroup                        *AgeGroupType              `csv:"age_group,omitempty"`
	Color                           *string                    `csv:"color,omitempty"`
	Gender                          *GenderType                `csv:"gender,omitempty"`
	Material                        *string                    `csv:"material,omitempty"`
	Pattern                         *string                    `csv:"pattern,omitempty"`
	Size                            *string                    `csv:"size,omitempty"`
	SizeType                        *SizeType                  `csv:"size_type,omitempty"`
	SizeSystem                      *string                    `csv:"size_system,omitempty" validate:"max=3"`
	ItemGroupID                     *string                    `csv:"item_group_id,omitempty" validate:"max=50"`
	ProductLength                   *NumericValue              `csv:"product_length,omitempty"`
	ProductWidth                    *NumericValue              `csv:"product_width,omitempty"`
	ProductHeight                   *NumericValue              `csv:"product_height,omitempty"`
	ProductWeight                   *NumericValue              `csv:"product_weight,omitempty"`
	ProductDetail                   *MultipleProductDetailType `csv:"product_detail,omitempty"`
	ProductHighlight                *string                    `csv:"product_highlight,omitempty" validate:"max=150"`
	AdsRedirect                     *GUrl                      `csv:"ads_redirect,omitempty"`
	CustomLabel0                    *string                    `csv:"custom_label_0,omitempty" validate:"max=100"`
	CustomLabel1                    *string                    `csv:"custom_label_1,omitempty" validate:"max=100"`
	CustomLabel2                    *string                    `csv:"custom_label_2,omitempty" validate:"max=100"`
	CustomLabel3                    *string                    `csv:"custom_label_3,omitempty" validate:"max=100"`
	CustomLabel4                    *string                    `csv:"custom_label_4,omitempty" validate:"max=100"`
	PromotionID                     *string                    `csv:"promotion_id,omitempty" validate:"max=50"`
	ExcludedDestination             *AdsDestinationType        `csv:"excluded_destination,omitempty"`
	IncludedDestination             *AdsDestinationType        `csv:"included_destination,omitempty"`
	ExcludedCountriesForShoppingAds *string                    `csv:"shopping_ads_excluded_country,omitempty" validate:"max=2"`
	Shipping                        *ShippingType              `csv:"shipping,omitempty"`
	ShippingLabel                   *string                    `csv:"shipping_label,omitempty" validate:"max=100"`
	ShippingWeight                  *NumericValue              `csv:"shipping_weight,omitempty"`
	ShippingLength                  *NumericValue              `csv:"shipping_length,omitempty"`
	ShippingWidth                   *NumericValue              `csv:"shipping_width,omitempty"`
	ShippingHeight                  *NumericValue              `csv:"shipping_height,omitempty"`
	ShipsFromCountry                *string                    `csv:"ships_from_country,omitempty" xml:"g:ships_from_country,omitempty"`
	TransitTimeLabel                *string                    `csv:"transit_time_label,omitempty" xml:"g:transit_time_label,omitempty" validate:"max=100"`
	MinHandlingTime                 *uint64                    `csv:"min_handling_time,omitempty" xml:"g:min_handling_time,omitempty"`
	MaxHandlingTime                 *uint64                    `csv:"max_handling_time,omitempty" xml:"g:max_handling_time,omitempty"`
	Tax                             *TaxType                   `csv:"tax,omitempty" json:"tax,omitempty" xml:"g:tax,omitempty"`
	TaxCategory                     *string                    `csv:"tax_category,omitempty" json:"tax_category,omitempty" xml:"g:tax_category,omitempty" validate:"max=100"`
}

ShoppingElement https://support.google.com/merchants/answer/7052112?hl=en

type ShoppingFeed

type ShoppingFeed struct {
	Rows []*ShoppingElement
}

type SizeType

type SizeType string
const (
	Regular   SizeType = "regular"
	Petite    SizeType = "petite"
	Maternity SizeType = "maternity"
	Big       SizeType = "big"
	Tall      SizeType = "tall"
	Plus      SizeType = "plus"
)

func (*SizeType) MarshalCSV

func (st *SizeType) MarshalCSV() (string, error)

func (*SizeType) UnmarshalCSV

func (st *SizeType) UnmarshalCSV(csv string) error

type SubscriptionCostPeriodType

type SubscriptionCostPeriodType string
const (
	Month SubscriptionCostPeriodType = "month"
	Year  SubscriptionCostPeriodType = "year"
)

func (*SubscriptionCostPeriodType) MarshalCSV

func (scpt *SubscriptionCostPeriodType) MarshalCSV() (string, error)

func (*SubscriptionCostPeriodType) UnmarshalCSV

func (scpt *SubscriptionCostPeriodType) UnmarshalCSV(csv string) error

type SubscriptionCostType

type SubscriptionCostType struct {
	Period       *SubscriptionCostPeriodType
	PeriodLength *uint64
	Amount       *NumericValue
}

type TaxType

type TaxType struct {
	Country     *string                `xml:"g:country,omitempty"`
	Area        *string                `xml:"g:region,omitempty"`
	Rate        *float64               `xml:"g:rate,omitempty"`
	ShippingTax ConvertibleBooleanType `xml:"g:tax_ship,omitempty"`
}

func (*TaxType) MarshalCSV

func (tt *TaxType) MarshalCSV() (string, error)

func (*TaxType) UnmarshalCSV

func (tt *TaxType) UnmarshalCSV(csv string) error

Jump to

Keyboard shortcuts

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