Documentation
¶
Index ¶
- Constants
- Variables
- func BuildAssetsForExtensions(ctx context.Context, sources []asset.Source, assetConfig AssetBuildConfig) error
- func BuildModifier(ext Extension, extensionRoot string, config BuildModifierConfig) error
- func ChecksumFile(filePath string) (string, error)
- func CleanupExtensionFolder(path string, additionalPaths []string) error
- func ConfigSchema() []byte
- func ConvertExtensionsToSources(ctx context.Context, extensions []Extension) []asset.Source
- 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 GenerateChecksumJSON(ctx context.Context, baseFolder string, ext Extension) error
- func GetConfiguredGoldMark() goldmark.Markdown
- func GetPhpVersion(ctx context.Context, constraint *version.Constraints) (string, error)
- func GetShopwareProjectConstraint(project string) (*version.Constraints, error)
- func GetShopwareVersions(ctx context.Context) ([]string, error)
- func GitCopyFolder(ctx context.Context, source, target, commitHash string) (string, error)
- func InstallNodeModulesOfConfigs(ctx context.Context, cfgs ExtensionAssetConfig, force bool) ([]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 ResizeExtensionIcon(ctx context.Context, ext Extension) error
- func RunValidation(ctx context.Context, ext Extension, check validation.Check)
- type App
- func (a App) GetChangelog() (*ExtensionChangelog, error)
- func (a App) GetComposerName() (string, error)
- func (a App) GetExtensionConfig() *Config
- func (a App) GetIconPath() string
- 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) GetResourcesDirs() []string
- func (a App) GetRootDir() string
- func (a App) GetShopwareVersionConstraint() (*version.Constraints, error)
- func (a App) GetSourceDirs() []string
- func (App) GetType() string
- func (a App) GetVersion() (*version.Version, error)
- func (a App) UpdateMetaData(metadata *ExtensionMetadata) error
- func (a App) Validate(_ context.Context, check validation.Check)
- type AssetBuildConfig
- type BuildModifierConfig
- type ChecksumJSON
- type Config
- type ConfigBuild
- type ConfigBuildZip
- type ConfigBuildZipAssets
- type ConfigBuildZipAssetsAdditionalCache
- type ConfigBuildZipChecksum
- type ConfigBuildZipComposer
- type ConfigBuildZipPack
- type ConfigBuildZipPackExcludes
- type ConfigExtraBundle
- type ConfigStore
- type ConfigStoreFaq
- type ConfigStoreImage
- type ConfigStoreImageActivate
- type ConfigStoreImagePreview
- type ConfigTranslated
- type ConfigValidation
- type ConfigValidationList
- 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 ExtensionChangelog
- type ExtensionMetadata
- type ExtensionTranslated
- type Manifest
- type Meta
- type PlatformComposerJson
- type PlatformPlugin
- func (p PlatformPlugin) GetChangelog() (*ExtensionChangelog, error)
- func (p PlatformPlugin) GetComposerName() (string, error)
- func (p PlatformPlugin) GetExtensionConfig() *Config
- func (p PlatformPlugin) GetIconPath() string
- 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) GetResourcesDirs() []string
- func (p PlatformPlugin) GetRootDir() string
- func (p PlatformPlugin) GetShopwareVersionConstraint() (*version.Constraints, error)
- func (p PlatformPlugin) GetSourceDirs() []string
- func (PlatformPlugin) GetType() string
- func (p PlatformPlugin) GetVersion() (*version.Version, error)
- func (p PlatformPlugin) UpdateMetaData(metadata *ExtensionMetadata) error
- func (p PlatformPlugin) Validate(c context.Context, check validation.Check)
- type Setup
- type ShopwareBundle
- func (p ShopwareBundle) GetChangelog() (*ExtensionChangelog, error)
- func (p ShopwareBundle) GetComposerName() (string, error)
- func (p ShopwareBundle) GetExtensionConfig() *Config
- func (p ShopwareBundle) GetIconPath() string
- 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) GetResourcesDirs() []string
- func (p ShopwareBundle) GetRootDir() string
- func (p ShopwareBundle) GetShopwareVersionConstraint() (*version.Constraints, error)
- func (p ShopwareBundle) GetSourceDirs() []string
- func (ShopwareBundle) GetType() string
- func (p ShopwareBundle) GetVersion() (*version.Version, error)
- func (p ShopwareBundle) UpdateMetaData(_ *ExtensionMetadata) error
- func (p ShopwareBundle) Validate(c context.Context, check validation.Check)
- type Translatable
- type TranslatableString
Constants ¶
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" )
const ( TypePlatformApp = "app" TypePlatformPlugin = "plugin" TypeShopwareBundle = "shopware-bundle" ComposerTypePlugin = "shopware-platform-plugin" ComposerTypeApp = "shopware-app" ComposerTypeBundle = "shopware-bundle" )
const DevVersionNumber = "6.9.9.9"
Variables ¶
var ErrPlatformInvalidType = errors.New("invalid composer type")
Functions ¶
func BuildModifier ¶
func BuildModifier(ext Extension, extensionRoot string, config BuildModifierConfig) error
func ChecksumFile ¶
ChecksumFile generates a XXH128 checksum for a given file
func CleanupExtensionFolder ¶
func ConfigSchema ¶
func ConfigSchema() []byte
ConfigSchema returns the JSON schema for the .shopware-extension.yml configuration file.
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 GenerateChecksumJSON ¶
GenerateChecksumJSON creates a checksum.json file in the given folder
func GetConfiguredGoldMark ¶
func GetPhpVersion ¶
func GetShopwareProjectConstraint ¶
func GetShopwareProjectConstraint(project string) (*version.Constraints, error)
func GitCopyFolder ¶
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 ¶
func RunValidation ¶
func RunValidation(ctx context.Context, ext Extension, check validation.Check)
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (App) GetChangelog ¶
func (a App) GetChangelog() (*ExtensionChangelog, error)
func (App) GetComposerName ¶
func (App) GetExtensionConfig ¶
func (App) GetIconPath ¶
func (App) GetLicense ¶
func (App) GetMetaData ¶
func (a App) GetMetaData() *ExtensionMetadata
func (App) GetResourcesDir ¶
func (App) GetResourcesDirs ¶
func (App) GetRootDir ¶
func (App) GetShopwareVersionConstraint ¶
func (a App) GetShopwareVersionConstraint() (*version.Constraints, error)
func (App) GetSourceDirs ¶
func (App) UpdateMetaData ¶
func (a App) UpdateMetaData(metadata *ExtensionMetadata) error
type AssetBuildConfig ¶
type AssetBuildConfig struct {
EnableAssetCaching bool
CleanupNodeModules bool
DisableAdminBuild bool
DisableStorefrontBuild bool
ShopwareRoot string
ShopwareVersion *version.Constraints
Browserslist string
SkipExtensionsWithBuildFiles bool
NPMForceInstall bool
ForceExtensionBuild []string
ForceAdminBuild bool
KeepNodeModules []string
}
type BuildModifierConfig ¶
type ChecksumJSON ¶
type Config ¶
type Config struct {
FileName string `yaml:"-" jsonschema:"-"`
// Controls date-based compatibility behavior, formatted as YYYY-MM-DD.
CompatibilityDate string `yaml:"compatibility_date,omitempty" jsonschema:"format=date"`
// Store is the store configuration of the extension.
Store ConfigStore `yaml:"store,omitempty"`
// Build is the build configuration of the extension.
Build ConfigBuild `yaml:"build,omitempty"`
// Changelog is the changelog configuration of the extension.
Changelog changelog.Config `yaml:"changelog,omitempty"`
// Validation is the validation configuration of the extension.
Validation ConfigValidation `yaml:"validation,omitempty"`
}
func (*Config) HasCompatibilityDate ¶
type ConfigBuild ¶
type ConfigBuild struct {
// ExtraBundles can be used to declare additional bundles to be considered for building
ExtraBundles []ConfigExtraBundle `yaml:"extraBundles,omitempty"`
// Override the shopware version constraint for building, can be used to specify the version of the shopware to use for building
ShopwareVersionConstraint string `yaml:"shopwareVersionConstraint,omitempty"`
// Configuration for zipping
Zip ConfigBuildZip `yaml:"zip"`
}
type ConfigBuildZip ¶
type ConfigBuildZip struct {
// Configuration for composer
Composer ConfigBuildZipComposer `yaml:"composer,omitempty"`
// Configuration for assets
Assets ConfigBuildZipAssets `yaml:"assets,omitempty"`
// Configuration for packing
Pack ConfigBuildZipPack `yaml:"pack,omitempty"`
Checksum ConfigBuildZipChecksum `yaml:"checksum,omitempty"`
}
Configuration for zipping.
type ConfigBuildZipAssets ¶
type ConfigBuildZipAssets struct {
// When enabled, the shopware-cli build the assets
Enabled bool `yaml:"enabled"`
// Commands to run before the assets build
BeforeHooks []string `yaml:"before_hooks,omitempty"`
// Commands to run after the assets build
AfterHooks []string `yaml:"after_hooks,omitempty"`
// When enabled, builtin esbuild will be used for the admin assets
EnableESBuildForAdmin bool `yaml:"enable_es_build_for_admin"`
// When enabled, builtin esbuild will be used for the storefront assets
EnableESBuildForStorefront bool `yaml:"enable_es_build_for_storefront"`
// When disabled, builtin sass support will be disabled
DisableSass bool `yaml:"disable_sass"`
// When enabled, npm will install only production dependencies
NpmStrict bool `yaml:"npm_strict"`
// Additional paths to include in asset caching
AdditionalCaches []ConfigBuildZipAssetsAdditionalCache `yaml:"additional_caches,omitempty"`
}
type ConfigBuildZipChecksum ¶
type ConfigBuildZipChecksum struct {
// Following files will be excluded from the checksum calculation
Ignore []string `yaml:"ignore,omitempty"`
}
Configuration for checksum calculation.
type ConfigBuildZipComposer ¶
type ConfigBuildZipComposer struct {
// When enabled, a vendor folder will be created in the zip build
Enabled bool `yaml:"enabled"`
// Commands to run before the composer install
BeforeHooks []string `yaml:"before_hooks,omitempty"`
// Commands to run after the composer install
AfterHooks []string `yaml:"after_hooks,omitempty"`
// Composer packages to be excluded from the zip build
ExcludedPackages []string `yaml:"excluded_packages,omitempty"`
}
type ConfigBuildZipPack ¶
type ConfigBuildZipPack struct {
// Excludes can be used to exclude files from the zip build
Excludes ConfigBuildZipPackExcludes `yaml:"excludes,omitempty"`
// Commands to run before the pack
BeforeHooks []string `yaml:"before_hooks,omitempty"`
}
type ConfigBuildZipPackExcludes ¶
type ConfigBuildZipPackExcludes struct {
// Paths to exclude from the zip build
Paths []string `yaml:"paths,omitempty"`
}
type ConfigExtraBundle ¶
type ConfigExtraBundle struct {
// Path to the bundle, relative from the extension root (src folder)
Path string `yaml:"path"`
// Name of the bundle, if empty the folder name of path will be used
Name string `yaml:"name"`
}
func (ConfigExtraBundle) ResolveName ¶
func (b ConfigExtraBundle) ResolveName() string
ResolveName returns the bundle name, defaulting to the base of the path if not explicitly set.
func (ConfigExtraBundle) ResolvePath ¶
func (b ConfigExtraBundle) ResolvePath(rootDir string) string
ResolvePath returns the resolved path for the extra bundle relative to the given root directory.
type ConfigStore ¶
type ConfigStore struct {
// Specifies the visibility in stores.
Availabilities *[]string `yaml:"availabilities" jsonschema:"enum=German,enum=International"`
// Specifies the default locale.
DefaultLocale *string `yaml:"default_locale" jsonschema:"enum=de_DE,enum=en_GB"`
// Specifies the languages the extension is translated.
Localizations *[]string `` /* 437-byte string literal not displayed */
// Specifies the categories.
Categories *[]string `` /* 835-byte string literal not displayed */
// Specifies the type of the extension.
Type *string `yaml:"type" jsonschema:"enum=extension,enum=theme"`
// Specifies the Path to the icon (256x256 px) for store.
Icon *string `yaml:"icon"`
// Specifies whether the extension should automatically be set compatible with Shopware bugfix versions.
AutomaticBugfixVersionCompatibility *bool `yaml:"automatic_bugfix_version_compatibility"`
// Specifies the meta title of the extension in store.
MetaTitle ConfigTranslated[string] `yaml:"meta_title" jsonschema:"maxLength=50"`
// Specifies the meta description of the extension in store.
MetaDescription ConfigTranslated[string] `yaml:"meta_description" jsonschema:"maxLength=185"`
// Specifies the description of the extension in store.
Description ConfigTranslated[string] `yaml:"description"`
// Installation manual of the extension in store.
InstallationManual ConfigTranslated[string] `yaml:"installation_manual"`
// Specifies the tags of the extension.
Tags ConfigTranslated[[]string] `yaml:"tags,omitempty"`
// Specifies the links of YouTube-Videos to show or describe the extension.
Videos ConfigTranslated[[]string] `yaml:"videos,omitempty"`
// Specifies the highlights of the extension.
Highlights ConfigTranslated[[]string] `yaml:"highlights,omitempty"`
// Specifies the features of the extension.
Features ConfigTranslated[[]string] `yaml:"features"`
// Specifies Frequently Asked Questions for the extension.
Faq ConfigTranslated[[]ConfigStoreFaq] `yaml:"faq"`
// Specifies images for the extension in the store.
Images *[]ConfigStoreImage `yaml:"images,omitempty"`
// Specifies the directory where the images are located.
ImageDirectory *string `yaml:"image_directory,omitempty"`
}
func (*ConfigStore) IsInGermanStore ¶
func (c *ConfigStore) IsInGermanStore() bool
type ConfigStoreFaq ¶
type ConfigStoreImage ¶
type ConfigStoreImage struct {
// File path to image relative from root of the extension
File string `yaml:"file"`
// Specifies whether the image is active in the language.
Activate ConfigStoreImageActivate `yaml:"activate"`
// Specifies whether the image is a preview in the language.
Preview ConfigStoreImagePreview `yaml:"preview"`
// Specifies the order of the image ascending the given priority.
Priority int `yaml:"priority"`
}
type ConfigStoreImagePreview ¶
type ConfigTranslated ¶
type ConfigTranslated[T Translatable] struct { German *T `yaml:"de,omitempty"` English *T `yaml:"en,omitempty"` }
type ConfigValidation ¶
type ConfigValidation struct {
// Ignore items from the validation.
Ignore ConfigValidationList `yaml:"ignore,omitempty"`
StoreCompliance bool `yaml:"store_compliance,omitempty"`
// PhpVersion overrides the PHP version used for linting (e.g. "8.4").
// When set, this takes precedence over the version derived from composer.json or the static Shopware-to-PHP mapping.
PhpVersion string `yaml:"php_version,omitempty"`
}
ConfigValidation is used to configure the extension validation.
type ConfigValidationList ¶
type ConfigValidationList []validation.ToolConfigIgnore
func (*ConfigValidationList) Identifiers ¶
func (c *ConfigValidationList) Identifiers() []string
type Extension ¶
type Extension interface {
GetName() (string, error)
GetComposerName() (string, error)
// Deprecated: use the list variation instead
GetResourcesDir() string
GetResourcesDirs() []string
GetIconPath() string
// GetRootDir Returns the root folder where the code is located plugin -> src, app ->
GetRootDir() string
GetSourceDirs() []string
GetVersion() (*version.Version, error)
GetLicense() (string, error)
GetShopwareVersionConstraint() (*version.Constraints, error)
GetType() string
GetPath() string
GetChangelog() (*ExtensionChangelog, error)
GetMetaData() *ExtensionMetadata
UpdateMetaData(*ExtensionMetadata) error
GetExtensionConfig() *Config
Validate(context.Context, validation.Check)
}
func GetExtensionByFolder ¶
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
AdditionalCaches []ConfigBuildZipAssetsAdditionalCache
// contains filtered or unexported fields
}
func (*ExtensionAssetConfigEntry) GetContentHash ¶
func (e *ExtensionAssetConfigEntry) GetContentHash() (string, error)
GetContentHash returns a cached xxhash of all relevant files in the extension
func (*ExtensionAssetConfigEntry) GetOutputAdminPath ¶
func (e *ExtensionAssetConfigEntry) GetOutputAdminPath() string
func (*ExtensionAssetConfigEntry) GetOutputStorefrontPath ¶
func (e *ExtensionAssetConfigEntry) GetOutputStorefrontPath() string
func (*ExtensionAssetConfigEntry) RequiresBuild ¶
func (e *ExtensionAssetConfigEntry) RequiresBuild() bool
type ExtensionChangelog ¶
type ExtensionMetadata ¶
type ExtensionMetadata struct {
Name string
Label ExtensionTranslated
Description ExtensionTranslated
}
type ExtensionTranslated ¶
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"`
}
type PlatformComposerJson ¶
type PlatformComposerJson struct {
Name string `json:"name"`
Keywords []string `json:"keywords"`
Description string `json:"description"`
Version string `json:"version"`
Type string `json:"type"`
License string `json:"license"`
Authors []struct {
Name string `json:"name"`
Homepage string `json:"homepage"`
} `json:"authors"`
Require map[string]string `json:"require"`
Extra platformComposerJsonExtra `json:"extra"`
Autoload struct {
Psr0 map[string]string `json:"psr-0"`
Psr4 map[string]string `json:"psr-4"`
} `json:"autoload"`
Suggest map[string]string `json:"suggest"`
}
type PlatformPlugin ¶
type PlatformPlugin struct {
Composer PlatformComposerJson
// contains filtered or unexported fields
}
func (PlatformPlugin) GetChangelog ¶
func (p PlatformPlugin) GetChangelog() (*ExtensionChangelog, error)
func (PlatformPlugin) GetComposerName ¶
func (p PlatformPlugin) GetComposerName() (string, error)
func (PlatformPlugin) GetExtensionConfig ¶
func (p PlatformPlugin) GetExtensionConfig() *Config
func (PlatformPlugin) GetIconPath ¶
func (p PlatformPlugin) GetIconPath() string
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) GetResourcesDirs ¶
func (p PlatformPlugin) GetResourcesDirs() []string
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) GetSourceDirs ¶
func (p PlatformPlugin) GetSourceDirs() []string
func (PlatformPlugin) GetType ¶
func (PlatformPlugin) GetType() string
func (PlatformPlugin) GetVersion ¶
func (p PlatformPlugin) GetVersion() (*version.Version, error)
func (PlatformPlugin) UpdateMetaData ¶
func (p PlatformPlugin) UpdateMetaData(metadata *ExtensionMetadata) error
func (PlatformPlugin) Validate ¶
func (p PlatformPlugin) Validate(c context.Context, check validation.Check)
type ShopwareBundle ¶
type ShopwareBundle struct {
Composer shopwareBundleComposerJson
// contains filtered or unexported fields
}
func (ShopwareBundle) GetChangelog ¶
func (p ShopwareBundle) GetChangelog() (*ExtensionChangelog, error)
func (ShopwareBundle) GetComposerName ¶
func (p ShopwareBundle) GetComposerName() (string, error)
func (ShopwareBundle) GetExtensionConfig ¶
func (p ShopwareBundle) GetExtensionConfig() *Config
func (ShopwareBundle) GetIconPath ¶
func (p ShopwareBundle) GetIconPath() string
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) GetResourcesDirs ¶
func (p ShopwareBundle) GetResourcesDirs() []string
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) GetSourceDirs ¶
func (p ShopwareBundle) GetSourceDirs() []string
func (ShopwareBundle) GetType ¶
func (ShopwareBundle) GetType() string
func (ShopwareBundle) GetVersion ¶
func (p ShopwareBundle) GetVersion() (*version.Version, error)
func (ShopwareBundle) UpdateMetaData ¶
func (p ShopwareBundle) UpdateMetaData(_ *ExtensionMetadata) error
func (ShopwareBundle) Validate ¶
func (p ShopwareBundle) Validate(c context.Context, check validation.Check)
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
Source Files
¶
- app.go
- asset.go
- asset_cache.go
- asset_config.go
- asset_platform.go
- build_modifier.go
- bundle.go
- changelog.go
- checksum.go
- cleanup.go
- composer_info.go
- config.go
- config_schema.go
- git.go
- icon.go
- manifest.go
- npm.go
- packagist.go
- platform.go
- project.go
- root.go
- setup.go
- snippet_validator.go
- theme.go
- util.go
- validator.go
- validator_assets.go
- zip.go