account_api

package
v0.18.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Extension generation names returned by the Account API.
	ExtensionGenerationClassic  = "classic"
	ExtensionGenerationPlatform = "platform" // Shopware 6 plugins
	ExtensionGenerationApps     = "apps"     // Shopware apps
)
View Source
const ClientCredentialsScopes = "extension_management_read_write"

ClientCredentialsScopes excludes openid as it is not allowed for client credentials grant.

View Source
const OIDCScopes = "openid offline_access email profile extension_management_read_write"

Variables

This section is empty.

Functions

func ExtensionsTable

func ExtensionsTable(extensions []Extension) *tui.Table

func IncludeExtension

func IncludeExtension(extension Extension, pluginOnly, appOnly bool) bool

func InteractiveLogin

func InteractiveLogin(ctx context.Context) (*oauth2.Token, error)

func InvalidateTokenCache

func InvalidateTokenCache() error

func PullExtensionStoreInfo

func PullExtensionStoreInfo(ctx context.Context, producer ProducerAPI, zipExt extension.Extension, opts PullOptions) error

PullExtensionStoreInfo generates the local store configuration from the account data and downloads all store assets into the extension folder.

func PushExtensionStoreInfo

func PushExtensionStoreInfo(ctx context.Context, producer ProducerAPI, zipExt extension.Extension) error

PushExtensionStoreInfo synchronizes the local extension metadata and store configuration with the Shopware Account.

func SetUserAgent

func SetUserAgent(userAgent string)

func UploadExtension

func UploadExtension(ctx context.Context, producer ProducerAPI, zipExt extension.Extension, zipPath string, opts UploadOptions) error

UploadExtension uploads a new extension version to the Shopware Account, updates the changelog and software versions and waits for the automatic code review result.

func WriteExtensionsJSON

func WriteExtensionsJSON(w io.Writer, extensions []Extension) error

func WriteExtensionsTable

func WriteExtensionsTable(w io.Writer, extensions []Extension) error

Types

type BinaryReviewResult

type BinaryReviewResult struct {
	Id       int `json:"id"`
	BinaryId int `json:"binaryId"`
	Type     struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"type"`
	Message         string `json:"message"`
	CreationDate    string `json:"creationDate"`
	SubCheckResults []struct {
		SubCheck    string `json:"subCheck"`
		Status      string `json:"status"`
		Passed      bool   `json:"passed"`
		Message     string `json:"message"`
		HasWarnings bool   `json:"hasWarnings"`
	} `json:"subCheckResults"`
}

func (BinaryReviewResult) GetSummary

func (review BinaryReviewResult) GetSummary() string

func (BinaryReviewResult) HasPassed

func (review BinaryReviewResult) HasPassed() bool

func (BinaryReviewResult) HasWarnings

func (review BinaryReviewResult) HasWarnings() bool

func (BinaryReviewResult) IsPending

func (review BinaryReviewResult) IsPending() bool

type Client

type Client struct {
	Token       *oauth2.Token `json:"token,omitempty"`
	LegacyToken *legacyToken  `json:"legacyToken,omitempty"`
}

func NewApi

func NewApi(ctx context.Context) (*Client, error)

func (*Client) NewAuthenticatedRequest

func (c *Client) NewAuthenticatedRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error)

func (*Client) Producer

func (c *Client) Producer(ctx context.Context) (*ProducerEndpoint, error)

type CreateExtensionRequest

type CreateExtensionRequest struct {
	Name       string `json:"name,omitempty"`
	Generation struct {
		Name string `json:"name"`
	} `json:"generation"`
	ProducerID int `json:"producerId"`
}

type Extension

type Extension struct {
	Id       int `json:"id"`
	Producer struct {
		Id       int    `json:"id"`
		Prefix   string `json:"prefix"`
		Contract struct {
			Id                                int     `json:"id"`
			BaseProvisionInPercent            float64 `json:"baseProvisionInPercent"`
			InAppProvisionForAppsInPercent    float64 `json:"inAppProvisionForAppsInPercent"`
			InAppProvisionForPluginsInPercent float64 `json:"inAppProvisionForPluginsInPercent"`
			ApplicationDate                   int     `json:"applicationDate"`
			ConfirmationDate                  int     `json:"confirmationDate"`
			SdkLicense                        bool    `json:"sdkLicense"`
			ShopwareApproved                  bool    `json:"shopwareApproved"`
			ProducerApproved                  bool    `json:"producerApproved"`
			SignedDocument                    struct {
				Id   int `json:"id"`
				Type struct {
					Id          int    `json:"id"`
					Name        string `json:"name"`
					Description string `json:"description"`
				} `json:"type"`
				Version string `json:"version"`
				Texts   []struct {
					Id           int    `json:"id"`
					Locale       Locale `json:"locale"`
					Text         string `json:"text"`
					ChangeNotice string `json:"changeNotice"`
				} `json:"texts"`
				CreationDate     string `json:"creationDate"`
				LastChangeDate   string `json:"lastChangeDate"`
				IsCurrentVersion bool   `json:"isCurrentVersion"`
			} `json:"signedDocument"`
			FirstSignatureDate string `json:"firstSignatureDate"`
		} `json:"contract"`
		Name    string `json:"name"`
		Details []struct {
			Id     int `json:"id"`
			Locale struct {
				Id   int    `json:"id"`
				Name string `json:"name"`
			} `json:"locale"`
			Description string      `json:"description"`
			WebsiteGtc  string      `json:"websiteGtc"`
			SupportInfo interface{} `json:"supportInfo"`
		} `json:"details"`
		Website              string `json:"website"`
		Fixed                bool   `json:"fixed"`
		HasCancelledContract bool   `json:"hasCancelledContract"`
		IconPath             string `json:"iconPath"`
		IconIsSet            bool   `json:"iconIsSet"`
		UserId               int    `json:"userId"`
		CompanyId            int    `json:"companyId"`
		CompanyName          string `json:"companyName"`
		SaleMail             string `json:"saleMail"`
		SupportMail          string `json:"supportMail"`
		RatingMail           string `json:"ratingMail"`
		SupportedLanguages   []struct {
			Id   int    `json:"id"`
			Name string `json:"name"`
		} `json:"supportedLanguages"`
		HasSupportInfoActivated   bool        `json:"hasSupportInfoActivated"`
		IconURL                   string      `json:"iconUrl"`
		CancelledContract         interface{} `json:"cancelledContract"`
		IsPremiumExtensionPartner bool        `json:"isPremiumExtensionPartner"`
	} `json:"producer"`
	Type struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"type"`
	Name            string `json:"name"`
	Code            string `json:"code"`
	ModuleKey       string `json:"moduleKey"`
	LifecycleStatus struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"lifecycleStatus"`
	Generation struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"generation"`
	ActivationStatus struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"activationStatus"`
	ApprovalStatus struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"approvalStatus"`
	StandardLocale Locale `json:"standardLocale"`
	License        struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"license"`
	Infos               []*ExtensionInfo   `json:"infos"`
	PriceModels         []interface{}      `json:"priceModels"`
	Variants            []interface{}      `json:"variants"`
	StoreAvailabilities []StoreAvailablity `json:"storeAvailabilities"`
	Categories          []StoreCategory    `json:"categories"`
	Category            *StoreCategory     `json:"selectedFutureCategory"`
	Addons              []struct {
		Id             int    `json:"id"`
		Name           string `json:"name"`
		Description    string `json:"description"`
		AddedProvision int    `json:"addedProvision"`
		Public         bool   `json:"public"`
	} `json:"addons"`
	LastChange                          string            `json:"lastChange"`
	CreationDate                        string            `json:"creationDate"`
	Support                             bool              `json:"support"`
	SupportOnlyCommercial               bool              `json:"supportOnlyCommercial"`
	IconPath                            string            `json:"iconPath"`
	IconIsSet                           bool              `json:"iconIsSet"`
	ExamplePageUrl                      string            `json:"examplePageUrl"`
	Demos                               []ExtensionDemo   `json:"demos"`
	Localizations                       []Locale          `json:"localizations"`
	LatestBinary                        interface{}       `json:"latestBinary"`
	MigrationSupport                    bool              `json:"migrationSupport"`
	AutomaticBugfixVersionCompatibility bool              `json:"automaticBugfixVersionCompatibility"`
	HiddenInStore                       bool              `json:"hiddenInStore"`
	Certification                       interface{}       `json:"certification"`
	ProductType                         *StoreProductType `json:"productType"`
	Status                              struct {
		Name string `json:"name"`
	} `json:"status"`
	MinimumMarketingSoftwareVersion       interface{}   `json:"minimumMarketingSoftwareVersion"`
	IsSubscriptionEnabled                 bool          `json:"isSubscriptionEnabled"`
	ReleaseDate                           interface{}   `json:"releaseDate"`
	PlannedReleaseDate                    interface{}   `json:"plannedReleaseDate"`
	LastBusinessModelChangeDate           string        `json:"lastBusinessModelChangeDate"`
	IsSW5Compatible                       bool          `json:"isSW5Compatible"`
	Subprocessors                         interface{}   `json:"subprocessors"`
	PluginTestingInstanceDisabled         bool          `json:"pluginTestingInstanceDisabled"`
	IconURL                               string        `json:"iconUrl"`
	Pictures                              string        `json:"pictures"`
	HasPictures                           bool          `json:"hasPictures"`
	Comments                              string        `json:"comments"`
	Reviews                               string        `json:"reviews"`
	IsPremiumPlugin                       bool          `json:"isPremiumPlugin"`
	IsAdvancedFeature                     bool          `json:"isAdvancedFeature"`
	IsEnterpriseAccelerator               bool          `json:"isEnterpriseAccelerator"`
	IsSW6EnterpriseFeature                bool          `json:"isSW6EnterpriseFeature"`
	IsSW6ProfessionalEditionFeature       bool          `json:"isSW6ProfessionalEditionFeature"`
	Binaries                              interface{}   `json:"binaries"`
	Predecessor                           interface{}   `json:"predecessor"`
	Successor                             interface{}   `json:"successor"`
	IsCompatibleWithLatestShopwareVersion bool          `json:"isCompatibleWithLatestShopwareVersion"`
	PluginPreview                         interface{}   `json:"pluginPreview"`
	IsNoLongerAvailableForDownload        bool          `json:"isNoLongerAvailableForDownload"`
	AddonsLog                             []interface{} `json:"addonsLog"`
	HasPurchasableInAppFeatures           bool          `json:"hasPurchasableInAppFeatures"`
	ActiveShowcase                        bool          `json:"activeShowcase"`
	CancellationOffers                    []interface{} `json:"cancellationOffers"`
}

func FilterExtensions

func FilterExtensions(extensions []Extension, pluginOnly, appOnly bool) []Extension

FilterExtensions removes deleted/classic/empty entries and optionally keeps only plugins or apps.

func ListProducerExtensions

func ListProducerExtensions(ctx context.Context, producer ProducerAPI, opts ListExtensionOptions) ([]Extension, error)

ListProducerExtensions fetches the extensions of the current producer, filters out deleted/classic/empty entries and sorts them by producer and name.

type ExtensionBinary

type ExtensionBinary struct {
	Id      int    `json:"id"`
	Name    string `json:"name"`
	Version string `json:"version"`
	Status  struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"status"`
	CompatibleSoftwareVersions SoftwareVersionList `json:"compatibleSoftwareVersions"`
	Changelogs                 []struct {
		Id     int `json:"id"`
		Locale struct {
			Id   int    `json:"id"`
			Name string `json:"name"`
		} `json:"locale"`
		Text string `json:"text"`
	} `json:"changelogs"`
	CreationDate                string `json:"creationDate"`
	LastChangeDate              string `json:"lastChangeDate"`
	IonCubeEncrypted            bool   `json:"ionCubeEncrypted"`
	LicenseCheckRequired        bool   `json:"licenseCheckRequired"`
	HasActiveCodeReviewWarnings bool   `json:"hasActiveCodeReviewWarnings"`
}

type ExtensionCreate

type ExtensionCreate struct {
	SoftwareVersions []string                   `json:"softwareVersions"`
	Changelogs       []ExtensionUpdateChangelog `json:"changelogs"`
	Version          string                     `json:"version"`
}

type ExtensionDemo

type ExtensionDemo struct {
	Id            int           `json:"id,omitempty"`
	Type          StoreDemoType `json:"type"`
	Link          string        `json:"link"`
	Localization  Locale        `json:"localization"`
	LoginName     string        `json:"loginName"`
	LoginPassword string        `json:"loginPassword"`
}

type ExtensionGeneralInformation

type ExtensionGeneralInformation struct {
	Categories       []StoreCategory `json:"categories"`
	FutureCategories []StoreCategory `json:"futureCategories"`
	Addons           interface{}     `json:"addons"`
	Generations      []struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"generations"`
	ActivationStatus []struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"activationStatus"`
	ApprovalStatus []struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"approvalStatus"`
	LifecycleStatus []struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"lifecycleStatus"`
	BinaryStatus []struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"binaryStatus"`
	Locales  []Locale `json:"locales"`
	Licenses []struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"licenses"`
	StoreAvailabilities  []StoreAvailablity  `json:"storeAvailabilities"`
	PriceModels          []interface{}       `json:"priceModels"`
	SoftwareVersions     SoftwareVersionList `json:"softwareVersions"`
	DemoTypes            []StoreDemoType     `json:"demoTypes"`
	Localizations        []Locale            `json:"localizations"`
	ProductTypes         []StoreProductType  `json:"productTypes"`
	ReleaseRequestStatus interface{}         `json:"releaseRequestStatus"`
}

type ExtensionImage

type ExtensionImage struct {
	Id         int    `json:"id"`
	RemoteLink string `json:"remoteLink"`
	Details    []struct {
		Id        int    `json:"id"`
		Preview   bool   `json:"preview"`
		Activated bool   `json:"activated"`
		Caption   string `json:"caption"`
		Locale    Locale `json:"locale"`
	} `json:"details"`
	Priority int `json:"priority"`
}

type ExtensionInfo

type ExtensionInfo struct {
	Id                 int          `json:"id"`
	Locale             Locale       `json:"locale"`
	Name               string       `json:"name"`
	Description        string       `json:"description"`
	InstallationManual string       `json:"installationManual"`
	ShortDescription   string       `json:"shortDescription"`
	Highlights         string       `json:"highlights"`
	Features           string       `json:"features"`
	MetaTitle          string       `json:"metaTitle"`
	MetaDescription    string       `json:"metaDescription"`
	Tags               []StoreTag   `json:"tags"`
	Videos             []StoreVideo `json:"videos"`
	Faqs               []StoreFaq   `json:"faqs"`
	SupportInfo        interface{}  `json:"supportInfo"`
}

type ExtensionUpdate

type ExtensionUpdate struct {
	Id                   int
	SoftwareVersions     []string                   `json:"softwareVersions"`
	IonCubeEncrypted     bool                       `json:"ionCubeEncrypted"`
	LicenseCheckRequired bool                       `json:"licenseCheckRequired"`
	Changelogs           []ExtensionUpdateChangelog `json:"changelogs"`
}

type ExtensionUpdateChangelog

type ExtensionUpdateChangelog struct {
	Locale string `json:"locale"`
	Text   string `json:"text"`
}

type ListExtensionCriteria

type ListExtensionCriteria struct {
	Limit         int    `schema:"limit,omitempty"`
	Offset        int    `schema:"offset,omitempty"`
	OrderBy       string `schema:"orderBy,omitempty"`
	OrderSequence string `schema:"orderSequence,omitempty"`
	Search        string `schema:"search,omitempty"`
}

type ListExtensionOptions

type ListExtensionOptions struct {
	Search     string
	PluginOnly bool
	AppOnly    bool
}

type Locale

type Locale struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

type Producer

type Producer struct {
	Id       int    `json:"id"`
	Prefix   string `json:"prefix"`
	Contract struct {
		Id   int    `json:"id"`
		Path string `json:"path"`
	} `json:"contract"`
	Name    string `json:"name"`
	Details []struct {
		Id     int `json:"id"`
		Locale struct {
			Id   int    `json:"id"`
			Name string `json:"name"`
		} `json:"locale"`
		Description string `json:"description"`
	} `json:"details"`
	Website              string `json:"website"`
	Fixed                bool   `json:"fixed"`
	HasCancelledContract bool   `json:"hasCancelledContract"`
	IconPath             string `json:"iconPath"`
	IconIsSet            bool   `json:"iconIsSet"`
	ShopwareID           string `json:"shopwareId"`
	UserId               int    `json:"userId"`
	CompanyId            int    `json:"companyId"`
	CompanyName          string `json:"companyName"`
	SaleMail             string `json:"saleMail"`
	SupportMail          string `json:"supportMail"`
	RatingMail           string `json:"ratingMail"`
	SupportedLanguages   []struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"supportedLanguages"`
	IconURL                   string      `json:"iconUrl"`
	CancelledContract         interface{} `json:"cancelledContract"`
	HasSupportInfoActivated   bool        `json:"hasSupportInfoActivated"`
	IsPremiumExtensionPartner bool        `json:"isPremiumExtensionPartner"`
}

type ProducerAPI

type ProducerAPI interface {
	Extensions(ctx context.Context, criteria *ListExtensionCriteria) ([]Extension, error)
	GetExtensionByName(ctx context.Context, name string) (*Extension, error)
	UpdateExtension(ctx context.Context, extension *Extension) error
	GetExtensionGeneralInfo(ctx context.Context) (*ExtensionGeneralInformation, error)
	UpdateExtensionIcon(ctx context.Context, extensionId int, iconFilePath string) error
	GetExtensionImages(ctx context.Context, extensionId int) ([]*ExtensionImage, error)
	DeleteExtensionImages(ctx context.Context, extensionId, imageId int) error
	AddExtensionImage(ctx context.Context, extensionId int, file string) (*ExtensionImage, error)
	UpdateExtensionImage(ctx context.Context, extensionId int, image *ExtensionImage) error
	GetExtensionBinaries(ctx context.Context, producerId, extensionId int) ([]*ExtensionBinary, error)
	CreateExtensionBinary(ctx context.Context, producerId, extensionId int, create ExtensionCreate) (*ExtensionBinary, error)
	UpdateExtensionBinaryInfo(ctx context.Context, producerId, extensionId int, update ExtensionUpdate) error
	UpdateExtensionBinaryFile(ctx context.Context, producerId, extensionId, binaryId int, zipPath string) error
	GetSoftwareVersions(ctx context.Context, generation string) (*SoftwareVersionList, error)
	TriggerCodeReview(ctx context.Context, extensionId int) error
	GetBinaryReviewResults(ctx context.Context, extensionId, binaryId int) ([]BinaryReviewResult, error)
}

ProducerAPI describes the producer operations of the Shopware Account API. It is implemented by *ProducerEndpoint and exists so that the store synchronization logic can be tested without hitting the real API.

type ProducerEndpoint

type ProducerEndpoint struct {
	// contains filtered or unexported fields
}

func (ProducerEndpoint) AddExtensionImage

func (e ProducerEndpoint) AddExtensionImage(ctx context.Context, extensionId int, file string) (*ExtensionImage, error)

func (ProducerEndpoint) CreateExtensionBinary

func (e ProducerEndpoint) CreateExtensionBinary(ctx context.Context, producerId, extensionId int, create ExtensionCreate) (*ExtensionBinary, error)

func (ProducerEndpoint) DeleteExtensionImages

func (e ProducerEndpoint) DeleteExtensionImages(ctx context.Context, extensionId, imageId int) error

func (ProducerEndpoint) Extensions

func (e ProducerEndpoint) Extensions(ctx context.Context, criteria *ListExtensionCriteria) ([]Extension, error)

func (ProducerEndpoint) GetBinaryReviewResults

func (e ProducerEndpoint) GetBinaryReviewResults(ctx context.Context, extensionId, binaryId int) ([]BinaryReviewResult, error)

func (ProducerEndpoint) GetExtensionBinaries

func (e ProducerEndpoint) GetExtensionBinaries(ctx context.Context, producerId int, extensionId int) ([]*ExtensionBinary, error)

func (ProducerEndpoint) GetExtensionById

func (e ProducerEndpoint) GetExtensionById(ctx context.Context, id int) (*Extension, error)

func (ProducerEndpoint) GetExtensionByName

func (e ProducerEndpoint) GetExtensionByName(ctx context.Context, name string) (*Extension, error)

func (ProducerEndpoint) GetExtensionGeneralInfo

func (e ProducerEndpoint) GetExtensionGeneralInfo(ctx context.Context) (*ExtensionGeneralInformation, error)

func (ProducerEndpoint) GetExtensionImages

func (e ProducerEndpoint) GetExtensionImages(ctx context.Context, extensionId int) ([]*ExtensionImage, error)

func (ProducerEndpoint) GetSoftwareVersions

func (e ProducerEndpoint) GetSoftwareVersions(ctx context.Context, generation string) (*SoftwareVersionList, error)

func (ProducerEndpoint) TriggerCodeReview

func (e ProducerEndpoint) TriggerCodeReview(ctx context.Context, extensionId int) error

func (ProducerEndpoint) UpdateExtension

func (e ProducerEndpoint) UpdateExtension(ctx context.Context, extension *Extension) error

func (ProducerEndpoint) UpdateExtensionBinaryFile

func (e ProducerEndpoint) UpdateExtensionBinaryFile(ctx context.Context, producerId, extensionId, binaryId int, zipPath string) error

func (ProducerEndpoint) UpdateExtensionBinaryInfo

func (e ProducerEndpoint) UpdateExtensionBinaryInfo(ctx context.Context, producerId, extensionId int, update ExtensionUpdate) error

func (ProducerEndpoint) UpdateExtensionIcon

func (e ProducerEndpoint) UpdateExtensionIcon(ctx context.Context, extensionId int, iconFilePath string) error

func (ProducerEndpoint) UpdateExtensionImage

func (e ProducerEndpoint) UpdateExtensionImage(ctx context.Context, extensionId int, image *ExtensionImage) error

type PullOptions

type PullOptions struct {
	// HTTPClient is used to download the icon and images. Defaults to http.DefaultClient.
	HTTPClient *http.Client
}

type SoftwareVersion

type SoftwareVersion struct {
	Id          int         `json:"id"`
	Name        string      `json:"name"`
	Parent      interface{} `json:"parent"`
	Selectable  bool        `json:"selectable"`
	Major       string      `json:"major"`
	ReleaseDate string      `json:"releaseDate"`
	Status      string      `json:"status"`
}

type SoftwareVersionList

type SoftwareVersionList []SoftwareVersion

func (SoftwareVersionList) FilterOnVersion

func (list SoftwareVersionList) FilterOnVersion(constriant *version.Constraints) SoftwareVersionList

func (SoftwareVersionList) FilterOnVersionStringList

func (list SoftwareVersionList) FilterOnVersionStringList(constriant *version.Constraints) []string

type StoreAvailablity

type StoreAvailablity struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type StoreCategory

type StoreCategory struct {
	Id          int         `json:"id"`
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Parent      interface{} `json:"parent"`
	Position    int         `json:"position"`
	Public      bool        `json:"public"`
	Visible     bool        `json:"visible"`
	Suggested   bool        `json:"suggested"`
	Applicable  bool        `json:"applicable"`
	Details     interface{} `json:"details"`
	Active      bool        `json:"active"`
}

type StoreChangelog

type StoreChangelog struct {
	Version      string
	Text         string
	CreationDate StoreDate
}

StoreChangelog is a single changelog entry for a store plugin.

type StoreDate

type StoreDate struct {
	Date string `json:"date"`
}

StoreDate is the date wrapper the store API uses for timestamp fields.

type StoreDemoType

type StoreDemoType struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type StoreFaq

type StoreFaq struct {
	Question string `json:"question"`
	Answer   string `json:"answer"`
	Position int    `json:"position"`
}

type StorePicture

type StorePicture struct {
	URL      string
	Preview  bool
	Priority int
}

StorePicture is a listing image (screenshot) of a store plugin.

type StorePlugin

type StorePlugin struct {
	ID                 int
	Name               string
	Label              string
	Description        string
	ShortDescription   string
	InstallationManual string
	Version            string
	RatingAverage      float64
	StoreLink          string
	IconPath           string
	ReleaseDate        string
	ProducerName       string
	ProducerWebsite    string
	Pictures           []StorePicture
	Changelogs         []StoreChangelog
}

StorePlugin is a plugin entry returned by the store pluginsByName endpoint, flattened to the useful fields. Localized fields (label, description, short description, installation manual, changelog text) reflect the locale passed to GetStorePluginsByName.

func GetStorePluginsByName

func GetStorePluginsByName(ctx context.Context, locale, shopwareVersion string, technicalNames []string) ([]StorePlugin, error)

GetStorePluginsByName fetches store metadata (versions, rating, changelogs, pictures, localized descriptions, store link, ...) for the given technical names, scoped to a Shopware version. The locale must be in the store's underscore form (e.g. "en_GB", "de_DE"); hyphenated locales are silently ignored by the API. No authentication is required.

type StoreProductType

type StoreProductType struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type StoreTag

type StoreTag struct {
	Name string `json:"name"`
}

type StoreVideo

type StoreVideo struct {
	URL string `json:"url"`
}

type UpdateCheckExtension

type UpdateCheckExtension struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type UpdateCheckExtensionCompatibility

type UpdateCheckExtensionCompatibility struct {
	Name     string                                  `json:"name"`
	Label    string                                  `json:"label"`
	IconPath string                                  `json:"iconPath"`
	Status   UpdateCheckExtensionCompatibilityStatus `json:"status"`
}

func GetFutureExtensionUpdates

func GetFutureExtensionUpdates(ctx context.Context, currentVersion string, futureVersion string, extensions []UpdateCheckExtension) ([]UpdateCheckExtensionCompatibility, error)

type UpdateCheckExtensionCompatibilityStatus

type UpdateCheckExtensionCompatibilityStatus struct {
	Name  string `json:"name"`
	Label string `json:"label"`
	Type  string `json:"type"`
}

func (UpdateCheckExtensionCompatibilityStatus) IsBlocker

type UploadOptions

type UploadOptions struct {
	// SkipReviewWait skips waiting for the code review result after the upload.
	SkipReviewWait bool
	// Sleep is used while waiting for the code review result. Defaults to time.Sleep and can be
	// replaced in tests.
	Sleep func(time.Duration)
}

Jump to

Keyboard shortcuts

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