stack

package
v1.55.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllStackFiles

func GetAllStackFiles(fs afero.Fs) ([]string, error)

GetAllStackFiles returns a list of all stack files in the current directory

func GetAllStackNames

func GetAllStackNames(fs afero.Fs) ([]string, error)

GetAllStackNames returns a list of all stack names in the current directory

func GetAllStacks

func GetAllStacks[T any](fs afero.Fs) (map[string]*StackConfig[T], error)

GetAllStacks returns a map of all stack configurations in the current directory, keyed by stack name

func GetStackNameFromFileName

func GetStackNameFromFileName(fileName string) (string, error)

GetStackNameFromFileName returns the stack name from a given stack file name e.g. nitric.aws.yaml -> aws

func IsValidFileName

func IsValidFileName(stackName string) bool

func NewStackFile

func NewStackFile(fs afero.Fs, providerName string, stackName string, dir string) (string, error)

func StackFileName

func StackFileName(stackName string) string

StackFileName returns the stack file name for a given stack name

Types

type StackConfig

type StackConfig[T any] struct {
	Name     string `yaml:-`
	Provider string `yaml:"provider"`
	Config   T      `yaml:",inline"`
}

func ConfigFromName

func ConfigFromName[T any](fs afero.Fs, stackName string) (*StackConfig[T], error)

ConfigFromName returns a stack configuration from a given stack name

Jump to

Keyboard shortcuts

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