schema

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentSchema

type ComponentSchema struct {
	Resources string
	Variables string
	DependsOn []string
	Providers []string
}

type MachComposerPlugin

type MachComposerPlugin interface {
	Identifier() string

	IsEnabled() bool

	Configure(environment string, provider string) error

	GetValidationSchema() (*ValidationSchema, error)

	SetRemoteStateBackend(data map[string]any) error

	SetGlobalConfig(data map[string]any) error

	SetSiteConfig(site string, data map[string]any) error

	SetSiteComponentConfig(site string, component string, data map[string]any) error

	SetSiteEndpointConfig(site string, name string, data map[string]any) error

	SetComponentConfig(component string, data map[string]any) error

	SetComponentEndpointsConfig(component string, data map[string]string) error

	// Render remote state configuration
	RenderTerraformStateBackend(site string) (string, error)

	// Render all required terraform providers
	RenderTerraformProviders(site string) (string, error)

	// Render global resources
	RenderTerraformResources(site string) (string, error)

	// Render component
	RenderTerraformComponent(site string, component string) (*ComponentSchema, error)
}

type PluginSchema

type PluginSchema struct {
	Identifier string

	Configure             func(environment, provider string) error
	IsEnabled             func() bool
	GetValidationSchema   func() (*ValidationSchema, error)
	SetRemoteStateBackend func(data map[string]any) 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, name string, data map[string]any) error
	SetComponentConfig          func(component string, data map[string]any) error
	SetComponentEndpointsConfig func(component string, endpoints map[string]string) error

	RenderTerraformStateBackend func(site string) (string, error)
	RenderTerraformProviders    func(site string) (string, error)
	RenderTerraformResources    func(site string) (string, error)
	RenderTerraformComponent    func(site string, component string) (*ComponentSchema, error)
}

type ValidationSchema added in v0.0.4

type ValidationSchema struct {
	GlobalConfigSchema             map[string]any
	RemoteStateSchema              map[string]any
	SiteConfigSchema               map[string]any
	SiteComponentConfigSchema      map[string]any
	SiteEndpointConfig             map[string]any
	ComponentConfigSchema          map[string]any
	ComponentEndpointsConfigSchema map[string]any
}

func (*ValidationSchema) Validate added in v0.0.5

func (v *ValidationSchema) Validate(schema map[string]any, data map[string]any) error

Jump to

Keyboard shortcuts

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