shop

package
v0.0.0-...-d9e1ec2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoComposerFileFound        = errors.New("could not determine Shopware version as no composer.json or composer.lock file was found")
	ErrShopwareDependencyNotFound = errors.New("could not determine Shopware version as no shopware/core dependency was found")
)

Functions

func IsShopwareVersion

func IsShopwareVersion(projectRoot string, requiredVersion string) (bool, error)

func NewShopClient

func NewShopClient(ctx context.Context, config *Config) (*adminSdk.Client, error)

func NewUuid

func NewUuid() string

Types

type Config

type Config struct {
	AdditionalConfigs []string        `yaml:"include,omitempty"`
	URL               string          `yaml:"url"`
	Build             *ConfigBuild    `yaml:"build,omitempty"`
	AdminApi          *ConfigAdminApi `yaml:"admin_api,omitempty"`
	ConfigDump        *ConfigDump     `yaml:"dump,omitempty"`
	Sync              *ConfigSync     `yaml:"sync,omitempty"`
	// contains filtered or unexported fields
}

func ReadConfig

func ReadConfig(fileName string, allowFallback bool) (*Config, error)

func (Config) IsFallback

func (c Config) IsFallback() bool

type ConfigAdminApi

type ConfigAdminApi struct {
	ClientId        string `yaml:"client_id,omitempty"`
	ClientSecret    string `yaml:"client_secret,omitempty"`
	Username        string `yaml:"username,omitempty"`
	Password        string `yaml:"password,omitempty"`
	DisableSSLCheck bool   `yaml:"disable_ssl_check,omitempty"`
}

type ConfigBuild

type ConfigBuild struct {
	DisableAssetCopy      bool     `yaml:"disable_asset_copy,omitempty"`
	RemoveExtensionAssets bool     `yaml:"remove_extension_assets,omitempty"`
	KeepExtensionSource   bool     `yaml:"keep_extension_source,omitempty"`
	KeepSourceMaps        bool     `yaml:"keep_source_maps,omitempty"`
	CleanupPaths          []string `yaml:"cleanup_paths,omitempty"`
	Browserslist          string   `yaml:"browserslist,omitempty"`
	ExcludeExtensions     []string `yaml:"exclude_extensions,omitempty"`
}

type ConfigDump

type ConfigDump struct {
	Rewrite map[string]core.Rewrite `yaml:"rewrite,omitempty"`
	NoData  []string                `yaml:"nodata,omitempty"`
	Ignore  []string                `yaml:"ignore,omitempty"`
	Where   map[string]string       `yaml:"where,omitempty"`
}

type ConfigSync

type ConfigSync struct {
	Config       []ConfigSyncConfig `yaml:"config"`
	Theme        []ThemeConfig      `yaml:"theme"`
	MailTemplate []MailTemplate     `yaml:"mail_template"`
	Entity       []EntitySync       `yaml:"entity"`
}

type ConfigSyncConfig

type ConfigSyncConfig struct {
	SalesChannel *string                `yaml:"sales_channel,omitempty"`
	Settings     map[string]interface{} `yaml:"settings"`
}

type EntitySync

type EntitySync struct {
	Entity  string                 `yaml:"entity"`
	Exists  *[]interface{}         `yaml:"exists"`
	Payload map[string]interface{} `yaml:"payload"`
}

type MailTemplate

type MailTemplate struct {
	Id           string                    `yaml:"id"`
	Translations []MailTemplateTranslation `yaml:"translations"`
}

type MailTemplateTranslation

type MailTemplateTranslation struct {
	Language     string      `yaml:"language"`
	SenderName   string      `yaml:"sender_name"`
	Subject      string      `yaml:"subject"`
	HTML         string      `yaml:"html"`
	Plain        string      `yaml:"plain"`
	CustomFields interface{} `yaml:"custom_fields"`
}

type ThemeConfig

type ThemeConfig struct {
	Name     string                               `yaml:"name"`
	Settings map[string]adminSdk.ThemeConfigValue `yaml:"settings"`
}

Jump to

Keyboard shortcuts

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