Documentation ¶
Index ¶
- Constants
- func CreateAssetsEntries(extension *Extension) map[string]Asset
- func GetSurface(extension *Extension) string
- func NewBoolPointer(boolState bool) *bool
- func NewStringPointer(value string) *string
- type App
- type Asset
- type Capabilities
- type Config
- type Development
- type Extension
- type ExtensionService
- type Fragment
- type JsonFragment
- type Localization
- type Metafield
- type Renderer
- type Url
Constants ¶
View Source
const ( Checkout string = "checkout" Admin string = "admin" PostPurchase string = "post-purchase" POS string = "pos" )
Variables ¶
This section is empty.
Functions ¶
func CreateAssetsEntries ¶ added in v0.17.1
func GetSurface ¶ added in v0.2.0
func NewBoolPointer ¶ added in v0.17.1
func NewStringPointer ¶ added in v0.19.0
Types ¶
type Capabilities ¶ added in v0.3.1
type Capabilities struct {
NetworkAccess *bool `json:"networkAccess" yaml:"network_access"`
}
type Config ¶
type Development ¶
type Development struct { Build commandConfig `json:"-" yaml:"build,omitempty"` BuildDir string `json:"-" yaml:"build_dir,omitempty"` Develop commandConfig `json:"-" yaml:"develop,omitempty"` Entries map[string]string `json:"-" yaml:"entries,omitempty"` Resource Url `json:"resource" yaml:"resource,omitempty"` Renderer Renderer `json:"-" yaml:"renderer,omitempty"` Root Url `json:"root" yaml:"root,omitempty"` RootDir string `json:"-" yaml:"root_dir,omitempty"` Hidden *bool `json:"hidden" yaml:"-"` Status string `json:"status" yaml:"-"` LocalizationStatus string `json:"localizationStatus" yaml:"-"` Template string `json:"-" yaml:"template,omitempty"` }
func (Development) UsesReact ¶ added in v0.3.0
func (d Development) UsesReact() bool
func (Development) UsesTypeScript ¶ added in v0.3.0
func (d Development) UsesTypeScript() bool
type Extension ¶
type Extension struct { Assets map[string]Asset `json:"assets" yaml:"-"` Capabilities Capabilities `json:"capabilities" yaml:"capabilities,omitempty"` Development Development `json:"development" yaml:"development,omitempty"` ExtensionPoints []string `json:"extensionPoints" yaml:"extension_points,omitempty"` Localization *Localization `json:"localization" yaml:"-"` Metafields []Metafield `json:"metafields" yaml:"metafields,omitempty"` Type string `json:"type" yaml:"type,omitempty"` ExternalType string `json:"externalType" yaml:"external_type"` UUID string `json:"uuid" yaml:"uuid,omitempty"` Version string `json:"version" yaml:"version,omitempty"` Surface string `json:"surface" yaml:"surface"` Title string `json:"title,omitempty" yaml:"title,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` NodeExecutable string `json:"-" yaml:"node_executable,omitempty"` }
func (Extension) NormalizedType ¶ added in v0.5.0
func (Extension) Transformer ¶ added in v0.2.0
*
- A custom transformer for mergo with the following rules: *
- 1. Allow booleans with false values to override true values. There is a weird quirk in the library where false is treated as empty.
- We need to use a custom transformer to fix this issue because universally allowing
- overwriting with empty values leads to unexpected results overriding arrays and maps
- see here for more info: https://github.com/imdario/mergo/issues/89#issuecomment-562954181 *
- 2. Allow overwriting Localization data completely if it has been set
type ExtensionService ¶
type ExtensionService struct { App App Extensions []Extension Port int Store string Version string ApiRootUrl string ApiRoot string `json:"-" yaml:"-"` DevConsolePath string `json:"-" yaml:"-"` }
func NewExtensionService ¶
func NewExtensionService(config *Config) *ExtensionService
type JsonFragment ¶ added in v0.3.0
type JsonFragment struct {
Fragment `json:"-"`
}
type Localization ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.