config

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadValuesFile

func LoadValuesFile(path string) (map[string]cty.Value, hcl.Diagnostics)

LoadValuesFile reads the file at the given path and parses it as a "values file" (flat key.value HCL config) for later use in the `EvalContext`.

Adapted from https://github.com/hashicorp/terraform/blob/d4ac68423c4998279f33404db46809d27a5c2362/configs/parser_values.go#L8-L23

Types

type Config

type Config struct {
	RootConfig  *RootConfig
	EvalContext *hcl.EvalContext
}

func LoadConfig

func LoadConfig(lokocfgPath, lokocfgVarsPath string) (*Config, hcl.Diagnostics)

func (*Config) LoadComponentConfigBody

func (c *Config) LoadComponentConfigBody(componentName string) *hcl.Body

LoadComponentConfigBody returns nil if no component with the given name is found in the configuration

type RootConfig

type RootConfig struct {
	Cluster    *cluster    `hcl:"cluster,block"`
	Backend    *backend    `hcl:"backend,block"`
	Components []component `hcl:"component,block"`
	Variables  []variable  `hcl:"variable,block"`
}

Jump to

Keyboard shortcuts

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