core

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Checkout     string = "checkout"
	Admin        string = "admin"
	PostPurchase string = "post-purchase"
)

Variables

This section is empty.

Functions

func GetSurface added in v0.2.0

func GetSurface(extension *Extension) string

Types

type App

type App map[string]interface{}

type Asset

type Asset struct {
	Name        string `json:"name" yaml:"name"`
	Url         string `json:"url" yaml:"url"`
	LastUpdated int64  `json:"lastUpdated" yaml:"lastUpdated"`
}

type Capabilities added in v0.3.1

type Capabilities struct {
	NetworkAccess bool `json:"networkAccess" yaml:"network_access"`
}

type Config

type Config struct {
	App                appYaml     `yaml:"app"`
	Extensions         []Extension `yaml:"extensions"`
	Port               int
	IntegrationContext `yaml:",inline"`
}

func LoadConfig

func LoadConfig(r io.Reader) (config *Config, err error)

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"`
	UUID            string           `json:"uuid" yaml:"uuid,omitempty"`
	Version         string           `json:"version" yaml:"version,omitempty"`
	Surface         string           `json:"surface" yaml:"-"`
	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) BuildDir added in v0.2.0

func (e Extension) BuildDir() string

func (Extension) NormalizedType added in v0.5.0

func (e Extension) NormalizedType() string

func (Extension) String added in v0.2.0

func (e Extension) String() string

func (Extension) Transformer added in v0.2.0

func (t Extension) Transformer(typ reflect.Type) func(dst, src reflect.Value) error

func (Extension) UsesNext added in v0.5.0

func (e Extension) UsesNext() bool

type ExtensionService

type ExtensionService struct {
	App        App
	Extensions []Extension
	Port       int
	Store      string
	Version    string
	PublicUrl  string
}

func NewExtensionService

func NewExtensionService(config *Config, apiRoot string) *ExtensionService

type Fragment added in v0.3.0

type Fragment map[string]interface{}

type IntegrationContext added in v0.2.0

type IntegrationContext struct {
	PublicUrl string `yaml:"public_url"`
	Store     string `yaml:"store"`
}

type JsonFragment added in v0.3.0

type JsonFragment struct {
	Fragment `json:"-"`
}

type Localization added in v0.3.0

type Localization struct {
	DefaultLocale string                 `json:"defaultLocale" yaml:"default_locale"`
	Translations  map[string]interface{} `json:"translations" yaml:"translations"`
	LastUpdated   int64                  `json:"lastUpdated" yaml:"lastUpdated"`
}

type Metafield

type Metafield struct {
	Namespace string `json:"namespace" yaml:"namespace"`
	Key       string `json:"key" yaml:"key"`
}

type Renderer

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

type Url

type Url struct {
	Url string `json:"url" yaml:"url"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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