Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultConfigFileName() string
- func IsHeyFrameVersion(projectRoot string, requiredVersion string) (bool, error)
- func NewPlatformClient(ctx context.Context, config *Config) (*adminSdk.Client, error)
- func NewUuid() string
- type Config
- type ConfigAdminApi
- type ConfigBuild
- type ConfigBuildExtension
- type ConfigBuildMJML
- type ConfigDeployment
- type ConfigDeploymentOverrides
- type ConfigDump
- type ConfigImageProxy
- type ConfigSync
- type ConfigSyncConfig
- type ConfigValidation
- type ConfigValidationIgnoreExtension
- type ConfigValidationIgnoreItem
- type ConsoleResponse
- type EntitySync
- type EntitySyncFilter
- type MailTemplate
- type MailTemplateTranslation
- type ThemeConfig
Constants ¶
View Source
const ( SyncOptionEntity = "entity" SyncOptionSystemConfig = "system_config" SyncOptionTheme = "theme" )
Variables ¶
View Source
var ( ErrNoComposerFileFound = errors.New("could not determine HeyFrame version as no composer.json or composer.lock file was found") ErrHeyFrameDependencyNotFound = errors.New("could not determine HeyFrame version as no heyframe/core dependency was found") )
Functions ¶
func DefaultConfigFileName ¶
func DefaultConfigFileName() string
func IsHeyFrameVersion ¶
func NewPlatformClient ¶
Types ¶
type Config ¶
type Config struct {
AdditionalConfigs []string `yaml:"include,omitempty"`
// The URL of the HeyFrame instance
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"`
ConfigDeployment *ConfigDeployment `yaml:"deployment,omitempty"`
Validation *ConfigValidation `yaml:"validation,omitempty"`
ImageProxy *ConfigImageProxy `yaml:"image_proxy,omitempty"`
// When enabled, composer scripts will be disabled during CI builds
DisableComposerScripts bool `yaml:"disable_composer_scripts,omitempty"`
// contains filtered or unexported fields
}
func (*Config) IsAdminAPIConfigured ¶
func (Config) IsFallback ¶
type ConfigAdminApi ¶
type ConfigAdminApi struct {
// Client ID of integration
ClientId string `yaml:"client_id,omitempty"`
// Client Secret of integration
ClientSecret string `yaml:"client_secret,omitempty"`
// Username of admin user
Username string `yaml:"username,omitempty"`
// Password of admin user
Password string `yaml:"password,omitempty"`
// Disable SSL certificate check
DisableSSLCheck bool `yaml:"disable_ssl_check,omitempty"`
}
type ConfigBuild ¶
type ConfigBuild struct {
// When enabled, the assets will not be copied to the public folder
DisableAssetCopy bool `yaml:"disable_asset_copy,omitempty"`
// When enabled, the assets of extensions will be removed from the extension public folder. (Requires HeyFrame 6.5.2.0)
RemoveExtensionAssets bool `yaml:"remove_extension_assets,omitempty"`
// When enabled, the extensions source code will be keep in the final build
KeepExtensionSource bool `yaml:"keep_extension_source,omitempty"`
// When enabled, the source maps will not be removed from the final build
KeepSourceMaps bool `yaml:"keep_source_maps,omitempty"`
// Paths to delete for the final build
CleanupPaths []string `yaml:"cleanup_paths,omitempty"`
// Browserslist configuration for the Frontend build
Browserslist string `yaml:"browserslist,omitempty"`
// Extensions to exclude from the build
ExcludeExtensions []string `yaml:"exclude_extensions,omitempty"`
// When enabled, the frontend build will be skipped
DisableFrontendBuild bool `yaml:"disable_frontend_build,omitempty"`
// Extensions to force build for, even if they have compiled files
ForceExtensionBuild []ConfigBuildExtension `yaml:"force_extension_build,omitempty"`
// When enabled, the heyframe admin will be built
ForceAdminBuild bool `yaml:"force_admin_build,omitempty"`
// Keep following node_modules in the final build
KeepNodeModules []string `yaml:"keep_node_modules,omitempty"`
// MJML email template compilation configuration
MJML *ConfigBuildMJML `yaml:"mjml,omitempty"`
}
func (ConfigBuild) IsMjmlEnabled ¶
func (c ConfigBuild) IsMjmlEnabled() bool
type ConfigBuildExtension ¶
type ConfigBuildExtension struct {
// Name of the extension
Name string `yaml:"name" jsonschema:"required"`
}
ConfigBuildExtension defines the configuration for forcing extension builds.
type ConfigBuildMJML ¶
type ConfigBuildMJML struct {
// Whether to enable MJML compilation
Enabled bool `yaml:"enabled,omitempty"`
// Directories to search for MJML files
SearchPaths []string `yaml:"search_paths,omitempty"`
}
ConfigBuildMJML defines the configuration for MJML email template compilation.
func (ConfigBuildMJML) GetPaths ¶
func (c ConfigBuildMJML) GetPaths(projectRoot string) []string
type ConfigDeployment ¶
type ConfigDeployment struct {
Hooks struct {
// The pre hook will be executed before the deployment
Pre string `yaml:"pre"`
// The post hook will be executed after the deployment
Post string `yaml:"post"`
// The pre-install hook will be executed before the installation
PreInstall string `yaml:"pre-install"`
// The post-install hook will be executed after the installation
PostInstall string `yaml:"post-install"`
// The pre-update hook will be executed before the update
PreUpdate string `yaml:"pre-update"`
// The post-update hook will be executed after the update
PostUpdate string `yaml:"post-update"`
} `yaml:"hooks"`
Store struct {
LicenseDomain string `yaml:"license-domain"`
} `yaml:"store"`
Cache struct {
AlwaysClear bool `yaml:"always_clear"`
} `yaml:"cache"`
// The extension management of the deployment
ExtensionManagement struct {
// When enabled, the extensions will be installed, updated, and removed
Enabled bool `yaml:"enabled"`
// Which extensions should not be managed
Exclude []string `yaml:"exclude"`
Overrides ConfigDeploymentOverrides `yaml:"overrides"`
// DEPRECATED, On these extensions, it will be always called plugin:update
ForceUpdatesDeprecated []string `yaml:"force_updates,omitempty" jsonschema:"deprecated=true"`
// On these extensions, it will be always called plugin:update
ForceUpdate []string `yaml:"force-update,omitempty"`
} `yaml:"extension-management"`
OneTimeTasks []struct {
Id string `yaml:"id" jsonschema:"required"`
Script string `yaml:"script" jsonschema:"required"`
} `yaml:"one-time-tasks"`
}
type ConfigDeploymentOverrides ¶
func (ConfigDeploymentOverrides) JSONSchema ¶
func (c ConfigDeploymentOverrides) JSONSchema() *jsonschema.Schema
type ConfigDump ¶
type ConfigDump struct {
// Allows to rewrite single columns, perfect for GDPR compliance
Rewrite map[string]core.Rewrite `yaml:"rewrite,omitempty"`
// Only export the schema of these tables
NoData []string `yaml:"nodata,omitempty"`
// Ignore these tables from export
Ignore []string `yaml:"ignore,omitempty"`
// Add an where condition to that table, schema is table name as key, and where statement as value
Where map[string]string `yaml:"where,omitempty"`
}
type ConfigImageProxy ¶
type ConfigImageProxy struct {
// The URL of the upstream server to proxy requests to when files are not found locally
URL string `yaml:"url,omitempty"`
}
type ConfigSync ¶
type ConfigSync struct {
Enabled *[]string `yaml:"enabled,omitempty" jsonschema:"enum=system_config,enum=mail_template,enum=theme,enum=entity"`
Config []ConfigSyncConfig `yaml:"config,omitempty"`
Theme []ThemeConfig `yaml:"theme,omitempty"`
MailTemplate []MailTemplate `yaml:"mail_template,omitempty"`
Entity []EntitySync `yaml:"entity,omitempty"`
}
type ConfigSyncConfig ¶
type ConfigValidation ¶
type ConfigValidation struct {
// Ignore items from the validation.
Ignore []ConfigValidationIgnoreItem `yaml:"ignore,omitempty"`
IgnoreExtensions []ConfigValidationIgnoreExtension `yaml:"ignore_extensions,omitempty"`
}
ConfigValidation is used to configure the project validation.
type ConfigValidationIgnoreExtension ¶
type ConfigValidationIgnoreExtension struct {
// The name of the extension to ignore.
Name string `yaml:"name"`
}
type ConfigValidationIgnoreItem ¶
type ConfigValidationIgnoreItem struct {
// The identifier of the item to ignore.
Identifier string `yaml:"identifier"`
// The path of the item to ignore.
Path string `yaml:"path,omitempty"`
// The message of the item to ignore.
Message string `yaml:"message,omitempty"`
}
ConfigValidationIgnoreItem is used to ignore items from the validation.
type ConsoleResponse ¶
type ConsoleResponse struct {
Commands []struct {
Name string `json:"name"`
Hidden bool `json:"hidden"`
Definition struct {
Arguments interface{} `json:"arguments"`
Options map[string]struct {
Shortcut string `json:"shortcut"`
} `json:"options"`
} `json:"definition"`
} `json:"commands"`
}
func GetConsoleCompletion ¶
func GetConsoleCompletion(ctx context.Context, projectRoot string) (*ConsoleResponse, error)
func (ConsoleResponse) GetCommandOptions ¶
func (c ConsoleResponse) GetCommandOptions(name string) []string
type EntitySync ¶
type EntitySync struct {
Entity string `yaml:"entity"`
Exists *[]EntitySyncFilter `yaml:"exists,omitempty"`
Payload map[string]interface{} `yaml:"payload"`
}
type EntitySyncFilter ¶
type EntitySyncFilter struct {
// The type of filter
Type string `` /* 155-byte string literal not displayed */
// The field to filter on
Field string `yaml:"field" jsonschema:"required"`
// The actual filter value
Value interface{} `yaml:"value"`
// The operator to use for multiple filters
Operator *string `yaml:"operator,omitempty" jsonschema:"enum=AND,enum=OR,enum=XOR"`
// The filters to apply, when type set to multi
Queries *[]EntitySyncFilter `yaml:"queries,omitempty"`
}
func (EntitySyncFilter) JSONSchema ¶
func (s EntitySyncFilter) JSONSchema() *jsonschema.Schema
type MailTemplate ¶
type MailTemplate struct {
Id string `yaml:"id"`
Translations []MailTemplateTranslation `yaml:"translations"`
}
type MailTemplateTranslation ¶
type ThemeConfig ¶
type ThemeConfig struct {
Name string `yaml:"name"`
Settings map[string]adminSdk.ThemeConfigValue `yaml:"settings"`
}
Click to show internal directories.
Click to hide internal directories.