Documentation ¶
Index ¶
- Constants
- Variables
- func AddZipFiles(w *zip.Writer, basePath, baseInZip string) error
- func BuildAssetsForExtensions(ctx context.Context, sources []asset.Source, assetConfig AssetBuildConfig) error
- func BuildModifier(ext Extension, extensionRoot string, config BuildModifierConfig) error
- func CleanupExtensionFolder(path string, additionalPaths []string) error
- func ConvertExtensionsToSources(ctx context.Context, extensions []Extension) []asset.Source
- func CreateZip(baseFolder, zipFile string) error
- func DumpAndLoadAssetSourcesOfProject(ctx context.Context, project string, shopCfg *shop.Config) ([]asset.Source, error)
- func FindAssetSourcesOfProject(ctx context.Context, project string, shopCfg *shop.Config) []asset.Source
- func GetConfiguredGoldMark() goldmark.Markdown
- func GetPhpVersion(ctx context.Context, constraint *version.Constraints) (string, error)
- func GetShopwareProjectConstraint(project string) (*version.Constraints, error)
- func GitCopyFolder(source, target, commitHash string) (string, error)
- func InstallNPMDependencies(path string, packageJsonData NpmPackage, additionalParams ...string) error
- func InstallNodeModulesOfConfigs(ctx context.Context, cfgs ExtensionAssetConfig, force bool) ([]string, error)
- func IsContributeProject(projectRoot string) bool
- func LoadSymfonyEnvFile(projectRoot string) error
- func PlatformPath(projectRoot, component, path string) string
- func PrepareExtensionForRelease(ctx context.Context, sourceRoot, extensionRoot string, ext Extension) error
- func PrepareFolderForZipping(ctx context.Context, path string, ext Extension, extCfg *Config) error
- func Unzip(r *zip.Reader, dest string) error
- type ActionButton
- type Admin
- type AllowedHosts
- type App
- func (a App) GetChangelog() (*extensionTranslated, error)
- func (a App) GetExtensionConfig() *Config
- func (a App) GetLicense() (string, error)
- func (a App) GetMetaData() *extensionMetadata
- func (a App) GetName() (string, error)
- func (a App) GetPath() string
- func (a App) GetResourcesDir() string
- func (a App) GetRootDir() string
- func (a App) GetShopwareVersionConstraint() (*version.Constraints, error)
- func (App) GetType() string
- func (a App) GetVersion() (*version.Version, error)
- func (a App) Validate(_ context.Context, ctx *ValidationContext)
- type AssetBuildConfig
- type BuildModifierConfig
- type Config
- type ConfigBuild
- type ConfigExtraBundle
- type ConfigStore
- type ConfigStoreFaq
- type ConfigStoreImage
- type ConfigStoreImageActivate
- type ConfigStoreImagePreview
- type ConfigTranslated
- type Cookie
- type CookieEntry
- type CookieGroup
- type Cookies
- type CustomFieldBase
- type CustomFieldBool
- type CustomFieldColorPicker
- type CustomFieldDatetime
- type CustomFieldFloat
- type CustomFieldInt
- type CustomFieldList
- type CustomFieldMedia
- type CustomFieldMultiEntitySelect
- type CustomFieldMultiSelect
- type CustomFieldPrice
- type CustomFieldSet
- type CustomFieldSingleEntitySelect
- type CustomFieldSingleSelect
- type CustomFieldText
- type CustomFieldTextArea
- type CustomFields
- type DeliveryTime
- type EntityList
- type Extension
- type ExtensionAssetConfig
- func (c ExtensionAssetConfig) FilterByAdmin() ExtensionAssetConfig
- func (c ExtensionAssetConfig) FilterByAdminAndEsBuild(esbuildEnabled bool) ExtensionAssetConfig
- func (c ExtensionAssetConfig) FilterByStorefrontAndEsBuild(esbuildEnabled bool) ExtensionAssetConfig
- func (c ExtensionAssetConfig) Has(name string) bool
- func (c ExtensionAssetConfig) Not(extensions []string) ExtensionAssetConfig
- func (c ExtensionAssetConfig) Only(extensions []string) ExtensionAssetConfig
- func (c ExtensionAssetConfig) RequiresAdminBuild() bool
- func (c ExtensionAssetConfig) RequiresShopwareRepository() bool
- func (c ExtensionAssetConfig) RequiresStorefrontBuild() bool
- type ExtensionAssetConfigAdmin
- type ExtensionAssetConfigEntry
- type ExtensionAssetConfigStorefront
- type Gateways
- type MainModule
- type Manifest
- type Meta
- type Module
- type NpmPackage
- type Option
- type OptionCollection
- type PaymentMethod
- type Payments
- type Permissions
- type PlatformPlugin
- func (p PlatformPlugin) GetChangelog() (*extensionTranslated, error)
- func (p PlatformPlugin) GetExtensionConfig() *Config
- func (p PlatformPlugin) GetLicense() (string, error)
- func (p PlatformPlugin) GetMetaData() *extensionMetadata
- func (p PlatformPlugin) GetName() (string, error)
- func (p PlatformPlugin) GetPath() string
- func (p PlatformPlugin) GetResourcesDir() string
- func (p PlatformPlugin) GetRootDir() string
- func (p PlatformPlugin) GetShopwareVersionConstraint() (*version.Constraints, error)
- func (PlatformPlugin) GetType() string
- func (p PlatformPlugin) GetVersion() (*version.Version, error)
- func (p PlatformPlugin) Validate(c context.Context, ctx *ValidationContext)
- type RuleCondition
- type RuleConditions
- type Setup
- type ShippingMethod
- type ShippingMethods
- type ShopwareBundle
- func (p ShopwareBundle) GetChangelog() (*extensionTranslated, error)
- func (p ShopwareBundle) GetExtensionConfig() *Config
- func (p ShopwareBundle) GetLicense() (string, error)
- func (p ShopwareBundle) GetMetaData() *extensionMetadata
- func (p ShopwareBundle) GetName() (string, error)
- func (p ShopwareBundle) GetPath() string
- func (p ShopwareBundle) GetResourcesDir() string
- func (p ShopwareBundle) GetRootDir() string
- func (p ShopwareBundle) GetShopwareVersionConstraint() (*version.Constraints, error)
- func (ShopwareBundle) GetType() string
- func (p ShopwareBundle) GetVersion() (*version.Version, error)
- func (p ShopwareBundle) Validate(c context.Context, ctx *ValidationContext)
- type Storefront
- type Tax
- type TaxProvider
- type Translatable
- type TranslatableString
- type ValidationContext
- type Webhook
- type Webhooks
Constants ¶
View Source
const ( StorefrontWebpackConfig = "Resources/app/storefront/build/webpack.config.js" StorefrontWebpackCJSConfig = "Resources/app/storefront/build/webpack.config.cjs" StorefrontEntrypointJS = "Resources/app/storefront/src/main.js" StorefrontEntrypointTS = "Resources/app/storefront/src/main.ts" StorefrontBaseCSS = "Resources/app/storefront/src/scss/base.scss" AdministrationWebpackConfig = "Resources/app/administration/build/webpack.config.js" AdministrationWebpackCJSConfig = "Resources/app/administration/build/webpack.config.cjs" AdministrationEntrypointJS = "Resources/app/administration/src/main.js" AdministrationEntrypointTS = "Resources/app/administration/src/main.ts" )
View Source
const ( TypePlatformApp = "app" TypePlatformPlugin = "plugin" TypeShopwareBundle = "shopware-bundle" ComposerTypePlugin = "shopware-platform-plugin" ComposerTypeApp = "shopware-app" ComposerTypeBundle = "shopware-bundle" )
View Source
const DevVersionNumber = "6.9.9.9"
Variables ¶
View Source
var ErrPlatformInvalidType = errors.New("invalid composer type")
Functions ¶
func BuildModifier ¶
func BuildModifier(ext Extension, extensionRoot string, config BuildModifierConfig) error
func CleanupExtensionFolder ¶
func FindAssetSourcesOfProject ¶
func FindAssetSourcesOfProject(ctx context.Context, project string, shopCfg *shop.Config) []asset.Source
FindAssetSourcesOfProject This finds all assets without invoking any PHP function and thinks all plugins / apps are active. Optional for CI usage.
func GetConfiguredGoldMark ¶
func GetPhpVersion ¶
func GetShopwareProjectConstraint ¶
func GetShopwareProjectConstraint(project string) (*version.Constraints, error)
func GitCopyFolder ¶
func InstallNPMDependencies ¶
func InstallNPMDependencies(path string, packageJsonData NpmPackage, additionalParams ...string) error
func IsContributeProject ¶
IsContributeProject checks if the project is a contribution project aka shopware/shopware.
func LoadSymfonyEnvFile ¶
LoadSymfonyEnvFile loads the Symfony .env file from the project root.
func PlatformPath ¶
func PrepareExtensionForRelease ¶
func PrepareExtensionForRelease(ctx context.Context, sourceRoot, extensionRoot string, ext Extension) error
PrepareExtensionForRelease Remove secret from the manifest. sourceRoot is the original folder (contains also .git).
func PrepareFolderForZipping ¶
Types ¶
type ActionButton ¶
type ActionButton struct { Label TranslatableString `xml:"label"` Action string `xml:"action,attr"` Entity string `xml:"entity,attr"` View string `xml:"view,attr"` URL string `xml:"url,attr"` }
type Admin ¶
type Admin struct { ActionButton []ActionButton `xml:"action-button,omitempty"` Module []Module `xml:"module,omitempty"` MainModule *MainModule `xml:"main-module,omitempty"` BaseAppUrl string `xml:"base-app-url,omitempty"` }
type AllowedHosts ¶
type AllowedHosts struct {
Host []string `xml:"host"`
}
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (App) GetChangelog ¶
func (App) GetExtensionConfig ¶
func (App) GetLicense ¶
func (App) GetMetaData ¶
func (a App) GetMetaData() *extensionMetadata
func (App) GetResourcesDir ¶
func (App) GetRootDir ¶
func (App) GetShopwareVersionConstraint ¶
func (a App) GetShopwareVersionConstraint() (*version.Constraints, error)
type AssetBuildConfig ¶
type BuildModifierConfig ¶
type Config ¶
type Config struct { FileName string Store ConfigStore `yaml:"store"` Build ConfigBuild `yaml:"build"` Changelog changelog.Config `yaml:"changelog"` }
type ConfigBuild ¶
type ConfigBuild struct { ExtraBundles []ConfigExtraBundle `yaml:"extraBundles,omitempty"` ShopwareVersionConstraint string `yaml:"shopwareVersionConstraint,omitempty"` Zip struct { Composer struct { Enabled bool `yaml:"enabled"` BeforeHooks []string `yaml:"before_hooks,omitempty"` AfterHooks []string `yaml:"after_hooks,omitempty"` ExcludedPackages []string `yaml:"excluded_packages,omitempty"` } `yaml:"composer"` Assets struct { Enabled bool `yaml:"enabled"` BeforeHooks []string `yaml:"before_hooks,omitempty"` AfterHooks []string `yaml:"after_hooks,omitempty"` EnableESBuildForAdmin bool `yaml:"enable_es_build_for_admin"` EnableESBuildForStorefront bool `yaml:"enable_es_build_for_storefront"` DisableSass bool `yaml:"es_build_disable_sass"` NpmStrict bool `yaml:"npm_strict"` } `yaml:"assets"` Pack struct { Excludes struct { Paths []string `yaml:"paths,omitempty"` } `yaml:"excludes,omitempty"` BeforeHooks []string `yaml:"before_hooks,omitempty"` } `yaml:"pack"` } `yaml:"zip"` }
type ConfigExtraBundle ¶
type ConfigStore ¶
type ConfigStore struct { Availabilities *[]string `yaml:"availabilities"` DefaultLocale *string `yaml:"default_locale"` Localizations *[]string `yaml:"localizations"` Categories *[]string `yaml:"categories"` Type *string `yaml:"type"` Icon *string `yaml:"icon"` AutomaticBugfixVersionCompatibility *bool `yaml:"automatic_bugfix_version_compatibility"` Description ConfigTranslated[string] `yaml:"description"` InstallationManual ConfigTranslated[string] `yaml:"installation_manual"` Tags ConfigTranslated[[]string] `yaml:"tags"` Videos ConfigTranslated[[]string] `yaml:"videos"` Highlights ConfigTranslated[[]string] `yaml:"highlights"` Features ConfigTranslated[[]string] `yaml:"features"` Faq ConfigTranslated[[]ConfigStoreFaq] `yaml:"faq"` Images *[]ConfigStoreImage `yaml:"images,omitempty"` ImageDirectory *string `yaml:"image_directory,omitempty"` }
type ConfigStoreFaq ¶
type ConfigStoreImage ¶
type ConfigStoreImage struct { File string `yaml:"file"` Activate ConfigStoreImageActivate `yaml:"activate"` Preview ConfigStoreImagePreview `yaml:"preview"` Priority int `yaml:"priority"` }
type ConfigStoreImagePreview ¶
type ConfigTranslated ¶
type ConfigTranslated[T Translatable] struct { German *T `yaml:"de"` English *T `yaml:"en"` }
type CookieEntry ¶
type CookieEntry struct {
Cookie
}
type CookieGroup ¶
type CookieGroup struct { SnippetName string `xml:"snippet-name"` SnippetDescription string `xml:"snippet-description,omitempty"` Entries []CookieEntry `xml:"entries>cookie,omitempty"` }
type Cookies ¶
type Cookies struct { Cookie []Cookie `xml:"cookie,omitempty"` Group []CookieGroup `xml:"group,omitempty"` }
type CustomFieldBase ¶
type CustomFieldBase struct { Label TranslatableString `xml:"label"` HelpText TranslatableString `xml:"help-text,omitempty"` Required bool `xml:"required,omitempty"` Position int `xml:"position,omitempty"` AllowCustomerWrite bool `xml:"allow-customer-write,omitempty"` AllowCartExpose bool `xml:"allow-cart-expose,omitempty"` }
type CustomFieldBool ¶
type CustomFieldBool struct { CustomFieldBase XMLName xml.Name `xml:"bool"` Name string `xml:"name,attr"` }
type CustomFieldColorPicker ¶
type CustomFieldColorPicker struct { CustomFieldBase XMLName xml.Name `xml:"color-picker"` Name string `xml:"name,attr"` }
type CustomFieldDatetime ¶
type CustomFieldDatetime struct { CustomFieldBase XMLName xml.Name `xml:"datetime"` Name string `xml:"name,attr"` }
type CustomFieldFloat ¶
type CustomFieldFloat struct { CustomFieldBase XMLName xml.Name `xml:"float"` Name string `xml:"name,attr"` Placeholder TranslatableString `xml:"placeholder,omitempty"` Steps float64 `xml:"steps,omitempty"` Min float64 `xml:"min,omitempty"` Max float64 `xml:"max,omitempty"` }
type CustomFieldInt ¶
type CustomFieldInt struct { CustomFieldBase XMLName xml.Name `xml:"int"` Name string `xml:"name,attr"` Placeholder TranslatableString `xml:"placeholder,omitempty"` Steps int `xml:"steps,omitempty"` Min int `xml:"min,omitempty"` Max int `xml:"max,omitempty"` }
type CustomFieldList ¶
type CustomFieldList struct { Int []CustomFieldInt `xml:"int,omitempty"` Float []CustomFieldFloat `xml:"float,omitempty"` Text []CustomFieldText `xml:"text,omitempty"` TextArea []CustomFieldTextArea `xml:"text-area,omitempty"` Bool []CustomFieldBool `xml:"bool,omitempty"` Datetime []CustomFieldDatetime `xml:"datetime,omitempty"` SingleSelect []CustomFieldSingleSelect `xml:"single-select,omitempty"` MultiSelect []CustomFieldMultiSelect `xml:"multi-select,omitempty"` SingleEntitySelect []CustomFieldSingleEntitySelect `xml:"single-entity-select,omitempty"` MultiEntitySelect []CustomFieldMultiEntitySelect `xml:"multi-entity-select,omitempty"` ColorPicker []CustomFieldColorPicker `xml:"color-picker,omitempty"` MediaSelection []CustomFieldMedia `xml:"media-selection,omitempty"` Price []CustomFieldPrice `xml:"price,omitempty"` }
type CustomFieldMedia ¶
type CustomFieldMedia struct { CustomFieldBase XMLName xml.Name `xml:"media-selection"` Name string `xml:"name,attr"` }
type CustomFieldMultiEntitySelect ¶
type CustomFieldMultiEntitySelect struct { CustomFieldSingleEntitySelect XMLName xml.Name `xml:"multi-entity-select"` }
type CustomFieldMultiSelect ¶
type CustomFieldMultiSelect struct { CustomFieldSingleSelect XMLName xml.Name `xml:"multi-select"` }
type CustomFieldPrice ¶
type CustomFieldPrice struct { CustomFieldBase XMLName xml.Name `xml:"price"` Name string `xml:"name,attr"` }
type CustomFieldSet ¶
type CustomFieldSet struct { Name string `xml:"name"` Label TranslatableString `xml:"label"` RelatedEntities EntityList `xml:"related-entities"` Fields CustomFieldList `xml:"fields"` Global bool `xml:"global,attr,omitempty"` }
type CustomFieldSingleEntitySelect ¶
type CustomFieldSingleEntitySelect struct { CustomFieldBase XMLName xml.Name `xml:"single-entity-select"` Name string `xml:"name,attr"` Placeholder TranslatableString `xml:"placeholder,omitempty"` Entity string `xml:"entity"` LabelProperty string `xml:"label-property"` }
type CustomFieldSingleSelect ¶
type CustomFieldSingleSelect struct { CustomFieldBase XMLName xml.Name `xml:"single-select"` Name string `xml:"name,attr"` Placeholder TranslatableString `xml:"placeholder,omitempty"` Options OptionCollection `xml:"options"` }
type CustomFieldText ¶
type CustomFieldText struct { CustomFieldBase XMLName xml.Name `xml:"text"` Name string `xml:"name,attr"` Placeholder TranslatableString `xml:"placeholder,omitempty"` }
type CustomFieldTextArea ¶
type CustomFieldTextArea struct { CustomFieldBase XMLName xml.Name `xml:"text-area"` Name string `xml:"name,attr"` Placeholder TranslatableString `xml:"placeholder,omitempty"` }
type CustomFields ¶
type CustomFields struct {
CustomFieldSet []CustomFieldSet `xml:"custom-field-set,omitempty"`
}
type DeliveryTime ¶
type DeliveryTime struct { ID string `xml:"id"` Name TranslatableString `xml:"name"` Min int `xml:"min"` Max int `xml:"max"` Unit string `xml:"unit"` }
type EntityList ¶
type EntityList struct { Product *struct{} `xml:"product,omitempty"` Order *struct{} `xml:"order,omitempty"` Category *struct{} `xml:"category,omitempty"` Customer *struct{} `xml:"customer,omitempty"` CustomerAddress *struct{} `xml:"customer_address,omitempty"` Media *struct{} `xml:"media,omitempty"` ProductManufacturer *struct{} `xml:"product_manufacturer,omitempty"` SalesChannel *struct{} `xml:"sales_channel,omitempty"` LandingPage *struct{} `xml:"landing_page,omitempty"` Promotion *struct{} `xml:"promotion,omitempty"` ProductStream *struct{} `xml:"product_stream,omitempty"` PropertyGroup *struct{} `xml:"property_group,omitempty"` ProductReview *struct{} `xml:"product_review,omitempty"` EventAction *struct{} `xml:"event_action,omitempty"` Country *struct{} `xml:"country,omitempty"` Currency *struct{} `xml:"currency,omitempty"` CustomerGroup *struct{} `xml:"customer_group,omitempty"` DeliveryTime *struct{} `xml:"delivery_time,omitempty"` DocumentBaseConfig *struct{} `xml:"document_base_config,omitempty"` Language *struct{} `xml:"language,omitempty"` NumberRange *struct{} `xml:"number_range,omitempty"` PaymentMethod *struct{} `xml:"payment_method,omitempty"` Rule *struct{} `xml:"rule,omitempty"` Salutation *struct{} `xml:"salutation,omitempty"` ShippingMethod *struct{} `xml:"shipping_method,omitempty"` Tax *struct{} `xml:"tax,omitempty"` }
type Extension ¶
type Extension interface { GetName() (string, error) GetResourcesDir() string // GetRootDir Returns the root folder where the code is located plugin -> src, app -> GetRootDir() string GetVersion() (*version.Version, error) GetLicense() (string, error) GetShopwareVersionConstraint() (*version.Constraints, error) GetType() string GetPath() string GetChangelog() (*extensionTranslated, error) GetMetaData() *extensionMetadata GetExtensionConfig() *Config Validate(context.Context, *ValidationContext) }
func GetExtensionByFolder ¶
func GetExtensionByZip ¶
type ExtensionAssetConfig ¶
type ExtensionAssetConfig map[string]ExtensionAssetConfigEntry
func BuildAssetConfigFromExtensions ¶
func BuildAssetConfigFromExtensions(ctx context.Context, sources []asset.Source, assetCfg AssetBuildConfig) ExtensionAssetConfig
func (ExtensionAssetConfig) FilterByAdmin ¶
func (c ExtensionAssetConfig) FilterByAdmin() ExtensionAssetConfig
func (ExtensionAssetConfig) FilterByAdminAndEsBuild ¶
func (c ExtensionAssetConfig) FilterByAdminAndEsBuild(esbuildEnabled bool) ExtensionAssetConfig
func (ExtensionAssetConfig) FilterByStorefrontAndEsBuild ¶
func (c ExtensionAssetConfig) FilterByStorefrontAndEsBuild(esbuildEnabled bool) ExtensionAssetConfig
func (ExtensionAssetConfig) Has ¶
func (c ExtensionAssetConfig) Has(name string) bool
func (ExtensionAssetConfig) Not ¶
func (c ExtensionAssetConfig) Not(extensions []string) ExtensionAssetConfig
func (ExtensionAssetConfig) Only ¶
func (c ExtensionAssetConfig) Only(extensions []string) ExtensionAssetConfig
func (ExtensionAssetConfig) RequiresAdminBuild ¶
func (c ExtensionAssetConfig) RequiresAdminBuild() bool
func (ExtensionAssetConfig) RequiresShopwareRepository ¶
func (c ExtensionAssetConfig) RequiresShopwareRepository() bool
func (ExtensionAssetConfig) RequiresStorefrontBuild ¶
func (c ExtensionAssetConfig) RequiresStorefrontBuild() bool
type ExtensionAssetConfigEntry ¶
type ExtensionAssetConfigEntry struct { BasePath string `json:"basePath"` Views []string `json:"views"` TechnicalName string `json:"technicalName"` Administration ExtensionAssetConfigAdmin `json:"administration"` Storefront ExtensionAssetConfigStorefront `json:"storefront"` EnableESBuildForAdmin bool EnableESBuildForStorefront bool DisableSass bool NpmStrict bool }
type MainModule ¶
type MainModule struct {
Source string `xml:"source,attr"`
}
type Manifest ¶
type Manifest struct { XMLName xml.Name `xml:"manifest"` Meta Meta `xml:"meta"` Setup *Setup `xml:"setup,omitempty"` Admin *Admin `xml:"admin,omitempty"` Storefront *Storefront `xml:"storefront,omitempty"` Permissions *Permissions `xml:"permissions,omitempty"` AllowedHosts *AllowedHosts `xml:"allowed-hosts,omitempty"` CustomFields *CustomFields `xml:"custom-fields,omitempty"` Webhooks *Webhooks `xml:"webhooks,omitempty"` Cookies *Cookies `xml:"cookies,omitempty"` Payments *Payments `xml:"payments,omitempty"` ShippingMethods *ShippingMethods `xml:"shipping-methods,omitempty"` RuleConditions *RuleConditions `xml:"rule-conditions,omitempty"` Tax *Tax `xml:"tax,omitempty"` Gateways *Gateways `xml:"gateways,omitempty"` }
type Meta ¶
type Meta struct { Name string `xml:"name"` Label TranslatableString `xml:"label"` Description TranslatableString `xml:"description,omitempty"` Author string `xml:"author,omitempty"` Copyright string `xml:"copyright,omitempty"` Version string `xml:"version"` Icon string `xml:"icon,omitempty"` License string `xml:"license"` Compatibility string `xml:"compatibility,omitempty"` Privacy string `xml:"privacy,omitempty"` PrivacyPolicyExtensions TranslatableString `xml:"privacyPolicyExtensions,omitempty"` }
type Module ¶
type Module struct { Label TranslatableString `xml:"label"` Source string `xml:"source,attr,omitempty"` Name string `xml:"name,attr"` Parent string `xml:"parent,attr"` Position int `xml:"position,attr,omitempty"` }
type NpmPackage ¶
type Option ¶
type Option struct { Name TranslatableString `xml:"name"` Value string `xml:"value,attr"` }
type OptionCollection ¶
type OptionCollection struct {
Option []Option `xml:"option"`
}
type PaymentMethod ¶
type PaymentMethod struct { Identifier string `xml:"identifier"` Name TranslatableString `xml:"name"` Description TranslatableString `xml:"description,omitempty"` PayURL string `xml:"pay-url,omitempty"` FinalizeURL string `xml:"finalize-url,omitempty"` ValidateURL string `xml:"validate-url,omitempty"` CaptureURL string `xml:"capture-url,omitempty"` RefundURL string `xml:"refund-url,omitempty"` RecurringURL string `xml:"recurring-url,omitempty"` Icon string `xml:"icon,omitempty"` }
type Payments ¶
type Payments struct {
PaymentMethod []PaymentMethod `xml:"payment-method,omitempty"`
}
type Permissions ¶
type PlatformPlugin ¶
type PlatformPlugin struct {
// contains filtered or unexported fields
}
func (PlatformPlugin) GetChangelog ¶
func (p PlatformPlugin) GetChangelog() (*extensionTranslated, error)
func (PlatformPlugin) GetExtensionConfig ¶
func (p PlatformPlugin) GetExtensionConfig() *Config
func (PlatformPlugin) GetLicense ¶
func (p PlatformPlugin) GetLicense() (string, error)
func (PlatformPlugin) GetMetaData ¶
func (p PlatformPlugin) GetMetaData() *extensionMetadata
func (PlatformPlugin) GetName ¶
func (p PlatformPlugin) GetName() (string, error)
func (PlatformPlugin) GetPath ¶
func (p PlatformPlugin) GetPath() string
func (PlatformPlugin) GetResourcesDir ¶
func (p PlatformPlugin) GetResourcesDir() string
GetResourcesDir returns the resources directory of the plugin.
func (PlatformPlugin) GetRootDir ¶
func (p PlatformPlugin) GetRootDir() string
GetRootDir returns the src directory of the plugin.
func (PlatformPlugin) GetShopwareVersionConstraint ¶
func (p PlatformPlugin) GetShopwareVersionConstraint() (*version.Constraints, error)
func (PlatformPlugin) GetType ¶
func (PlatformPlugin) GetType() string
func (PlatformPlugin) GetVersion ¶
func (p PlatformPlugin) GetVersion() (*version.Version, error)
func (PlatformPlugin) Validate ¶
func (p PlatformPlugin) Validate(c context.Context, ctx *ValidationContext)
type RuleCondition ¶
type RuleCondition struct { Identifier string `xml:"identifier"` Name TranslatableString `xml:"name"` Group string `xml:"group"` Script string `xml:"script"` Constraints []CustomFieldList `xml:"constraints"` }
type RuleConditions ¶
type RuleConditions struct {
RuleCondition []RuleCondition `xml:"rule-condition,omitempty"`
}
type ShippingMethod ¶
type ShippingMethod struct { Identifier string `xml:"identifier"` Name TranslatableString `xml:"name"` Description TranslatableString `xml:"description,omitempty"` Active bool `xml:"active,omitempty"` DeliveryTime DeliveryTime `xml:"delivery-time"` Icon string `xml:"icon,omitempty"` Position int `xml:"position,omitempty"` TrackingURL TranslatableString `xml:"tracking-url,omitempty"` }
type ShippingMethods ¶
type ShippingMethods struct {
ShippingMethod []ShippingMethod `xml:"shipping-method,omitempty"`
}
type ShopwareBundle ¶
type ShopwareBundle struct {
// contains filtered or unexported fields
}
func (ShopwareBundle) GetChangelog ¶
func (p ShopwareBundle) GetChangelog() (*extensionTranslated, error)
func (ShopwareBundle) GetExtensionConfig ¶
func (p ShopwareBundle) GetExtensionConfig() *Config
func (ShopwareBundle) GetLicense ¶
func (p ShopwareBundle) GetLicense() (string, error)
func (ShopwareBundle) GetMetaData ¶
func (p ShopwareBundle) GetMetaData() *extensionMetadata
func (ShopwareBundle) GetName ¶
func (p ShopwareBundle) GetName() (string, error)
func (ShopwareBundle) GetPath ¶
func (p ShopwareBundle) GetPath() string
func (ShopwareBundle) GetResourcesDir ¶
func (p ShopwareBundle) GetResourcesDir() string
GetResourcesDir returns the resources directory of the shopware bundle.
func (ShopwareBundle) GetRootDir ¶
func (p ShopwareBundle) GetRootDir() string
GetRootDir returns the src directory of the bundle.
func (ShopwareBundle) GetShopwareVersionConstraint ¶
func (p ShopwareBundle) GetShopwareVersionConstraint() (*version.Constraints, error)
func (ShopwareBundle) GetType ¶
func (ShopwareBundle) GetType() string
func (ShopwareBundle) GetVersion ¶
func (p ShopwareBundle) GetVersion() (*version.Version, error)
func (ShopwareBundle) Validate ¶
func (p ShopwareBundle) Validate(c context.Context, ctx *ValidationContext)
type Storefront ¶
type Storefront struct {
TemplateLoadPriority int `xml:"template-load-priority,omitempty"`
}
type Tax ¶
type Tax struct {
TaxProvider []TaxProvider `xml:"tax-provider,omitempty"`
}
type TaxProvider ¶
type Translatable ¶
type Translatable interface { string | []string | []ConfigStoreFaq }
type TranslatableString ¶
type TranslatableString []struct { Value string `xml:",chardata"` Lang string `xml:"lang,attr,omitempty"` }
func (TranslatableString) GetValueByLanguage ¶
func (t TranslatableString) GetValueByLanguage(lang []string) string
type ValidationContext ¶
type ValidationContext struct { Extension Extension // contains filtered or unexported fields }
func RunValidation ¶
func RunValidation(ctx context.Context, ext Extension) *ValidationContext
func (*ValidationContext) AddError ¶
func (c *ValidationContext) AddError(message string)
func (*ValidationContext) AddWarning ¶
func (c *ValidationContext) AddWarning(message string)
func (*ValidationContext) Errors ¶
func (c *ValidationContext) Errors() []string
func (*ValidationContext) HasErrors ¶
func (c *ValidationContext) HasErrors() bool
func (*ValidationContext) HasWarnings ¶
func (c *ValidationContext) HasWarnings() bool
func (*ValidationContext) Warnings ¶
func (c *ValidationContext) Warnings() []string
Click to show internal directories.
Click to hide internal directories.