Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentSchema ¶
type MachComposerPlugin ¶
type MachComposerPlugin interface {
// Identifier returns the identifier of the plugin
Identifier() string
// Configure is called when the plugin is loaded
Configure(environment string, provider string) error
// GetValidationSchema returns the validation schema for the plugin
GetValidationSchema() (*ValidationSchema, error)
// SetGlobalConfig is called when the global config is set
SetGlobalConfig(data map[string]any) error
// SetSiteConfig is called when the site config is set
SetSiteConfig(site string, data map[string]any) error
// SetSiteComponentConfig is called when the site component config is set
SetSiteComponentConfig(site string, component string, data map[string]any) error
// SetSiteEndpointConfig is called when the site endpoint config is set
//
// Deprecated: move endpoints to the terraform module instead
SetSiteEndpointConfig(site string, name string, data map[string]any) error
// SetComponentConfig is called when the component config is set
SetComponentConfig(component, version string, data map[string]any) error
// SetComponentEndpointsConfig is called when the component endpoints config is set
//
// Deprecated: move endpoints to the terraform module instead
SetComponentEndpointsConfig(component string, data map[string]string) error
// RenderTerraformProviders returns the terraform providers for the site
RenderTerraformProviders(site string) (string, error)
// RenderTerraformResources returns the terraform resources for the site
RenderTerraformResources(site string) (string, error)
// RenderTerraformComponent returns the terraform component for the site
RenderTerraformComponent(site string, component string) (*ComponentSchema, error)
}
MachComposerPlugin is the interface that plugins must implement. Note that in combination with PluginSchema you can omit functions that you don't need
type PluginSchema ¶
type PluginSchema struct {
Identifier string
Configure func(environment, provider string) error
GetValidationSchema func() (*ValidationSchema, error)
SetGlobalConfig func(data map[string]any) error
SetSiteConfig func(site string, data map[string]any) error
SetSiteComponentConfig func(site string, component string, data map[string]any) error
SetSiteEndpointConfig func(site string, endpoint string, data map[string]any) error
SetComponentConfig func(component, version string, data map[string]any) error
SetComponentEndpointsConfig func(component string, endpoints map[string]string) error
RenderTerraformProviders func(site string) (string, error)
RenderTerraformResources func(site string) (string, error)
RenderTerraformComponent func(site string, component string) (*ComponentSchema, error)
}
PluginSchema is the schema implementation for a plugin. Together with protocol.Adapter this allows for the selective implementation of methods
type ValidationSchema ¶
Click to show internal directories.
Click to hide internal directories.