stack

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStackName added in v0.2.1

func GetStackName(ctx context.Context) string

func SetComponent added in v0.2.1

func SetComponent(ctx context.Context, component Component) context.Context

func SetComponentConfig added in v0.2.1

func SetComponentConfig(ctx context.Context, config *ConfigWithMetadata) context.Context

func SetStackName added in v0.2.1

func SetStackName(ctx context.Context, stackName string) context.Context

Types

type Component added in v0.2.1

type Component struct {
	Type string
	Name string
}

func GetComponent added in v0.2.1

func GetComponent(ctx context.Context) Component

type ComponentConfigMap

type ComponentConfigMap map[string]ConfigWithMetadata

type ConfigWithMetadata added in v0.1.2

type ConfigWithMetadata struct {
	Command                *string           `yaml:"command,omitempty" json:"command,omitempty" mapstructure:"command,omitempty"`
	Component              string            `yaml:"component,omitempty" json:"component,omitempty" mapstructure:"component,omitempty"`
	Vars                   map[string]any    `yaml:"vars,omitempty" json:"vars,omitempty"  mapstructure:"vars,omitempty"`
	Envs                   map[string]string `yaml:"env,omitempty" json:"env,omitempty"  mapstructure:"env,omitempty"`
	BackendType            *string           `yaml:"backend_type,omitempty" json:"backend_type,omitempty"  mapstructure:"backend_type,omitempty"`
	Backend                map[string]any    `yaml:"backend,omitempty" json:"backend,omitempty"  mapstructure:"backend,omitempty"`
	RemoteStateBackendType *string           `` /* 137-byte string literal not displayed */
	RemoteStateBackend     map[string]any    `yaml:"remote_state_backend,omitempty" json:"remote_state_backend,omitempty" mapstructure:"remote_state_backend,omitempty"`
	Settings               map[string]any    `yaml:"settings,omitempty" json:"settings,omitempty" mapstructure:"settings,omitempty"`
	Metadata               *schema.Metadata  `yaml:"metadata,omitempty" json:"metadata,omitempty" mapstructure:"metadata,omitempty"`
}

func GetComponentConfig added in v0.2.1

func GetComponentConfig(ctx context.Context) *ConfigWithMetadata

type GetStackOptions added in v0.3.1

type GetStackOptions struct {
	ComponentTypes []string
	Components     []string
}

type LoadStackOptions

type LoadStackOptions struct {
	Stack     string
	Component *Component
}

type Stack

type Stack struct {
	Id         string
	Name       string
	Components map[string]ComponentConfigMap
	Vars       map[string]any
}

func LoadStack

func LoadStack(ctx context.Context, options LoadStackOptions) (*Stack, error)

type StackProcessor

type StackProcessor interface {
	GetStackNames() ([]string, error)
	GetStack(name string, options GetStackOptions) (*Stack, error)
	GetStacks(names []string, options GetStackOptions) ([]*Stack, error)
}

func NewStackProcessor

func NewStackProcessor(source afero.Fs, includePaths []string, excludePaths []string, stackNamePattern string) StackProcessor

func NewStackProcessorFromConfig

func NewStackProcessorFromConfig(conf *v1.ConfigSpec) (StackProcessor, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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