Documentation ¶
Index ¶
- func ParseModuleAttributes(ctx context.Context, mc model.ClientSet, attributes map[string]any, ...) (attrs map[string]any, variables model.Variables, ...)
- type Configurator
- type InputLoader
- type Options
- type ProviderLoader
- type RunOpts
- type TerraformConfigurator
- func (c *TerraformConfigurator) LoadAll(ctx context.Context, mc model.ClientSet, opts *Options) (map[string]types.ResourceRunConfigData, error)
- func (c *TerraformConfigurator) LoadMain(ctx context.Context, mc model.ClientSet, opts *Options) (types.ResourceRunConfigData, error)
- func (c *TerraformConfigurator) LoadProviders(connectors model.Connectors) (map[string]types.ResourceRunConfigData, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseModuleAttributes ¶
func ParseModuleAttributes( ctx context.Context, mc model.ClientSet, attributes map[string]any, onlyValidated bool, opts RunOpts, ) (attrs map[string]any, variables model.Variables, outputs map[string]types.OutputValue, err error)
ParseModuleAttributes parse module variables and dependencies.
Types ¶
type Configurator ¶
type Configurator interface { InputLoader ProviderLoader }
Configurator is the interface to construct input configs and dependency connectors for the run.
func NewConfigurator ¶
func NewConfigurator(deployerType string) Configurator
NewConfigurator creates a new configurator with the deployer type.
func NewTerraformConfigurator ¶
func NewTerraformConfigurator() Configurator
type InputLoader ¶
type InputLoader interface { // LoadMain loads the main config file of the config options. LoadMain(context.Context, model.ClientSet, *Options) (types.ResourceRunConfigData, error) // LoadAll loads the configs files of the config options. LoadAll(context.Context, model.ClientSet, *Options) (map[string]types.ResourceRunConfigData, error) }
InputLoader is the interface to construct input configs for the run.
type Options ¶
type Options struct { // SecretMountPath of the deployment job. SecretMountPath string ResourceRun *model.ResourceRun Connectors model.Connectors SubjectID object.ID // Walrus Context. Context types.Context SeverULR string Token string }
Options are the options for load a run config files.
type ProviderLoader ¶
type ProviderLoader interface { // LoadProviders loads the providers of the run required, // Some connectors may be required to deploy the service. LoadProviders(model.Connectors) (map[string]types.ResourceRunConfigData, error) }
ProviderLoader is the interface to construct dependency connectors files for the run.
type TerraformConfigurator ¶
type TerraformConfigurator struct {
// contains filtered or unexported fields
}
TerraformConfigurator constructs the terraform config files for the run.
func (*TerraformConfigurator) LoadAll ¶
func (c *TerraformConfigurator) LoadAll( ctx context.Context, mc model.ClientSet, opts *Options, ) (map[string]types.ResourceRunConfigData, error)
func (*TerraformConfigurator) LoadMain ¶
func (c *TerraformConfigurator) LoadMain( ctx context.Context, mc model.ClientSet, opts *Options, ) (types.ResourceRunConfigData, error)
func (*TerraformConfigurator) LoadProviders ¶
func (c *TerraformConfigurator) LoadProviders( connectors model.Connectors, ) (map[string]types.ResourceRunConfigData, error)
Click to show internal directories.
Click to hide internal directories.