Documentation ¶
Index ¶
Constants ¶
View Source
const File = "stack.yaml"
Variables ¶
View Source
var ( ErrNotStackDirectory = errors.New("path must be a stack directory") ErrStackNotUnique = errors.New("the stack obtained is not unique") )
Functions ¶
func FindStackPath ¶
FindStackPath locates the closest stack from the current working directory, or an error if not found.
func FindStackPathFrom ¶
FindStackPathFrom locates the closest stack from the given path, searching "upwards" in the directory hierarchy. If no stack is found, an empty path is returned.
func IsStackFile ¶
IsStackFile determine whether the given path is Stack file
Types ¶
type Configuration ¶
type Configuration struct { Name string `json:"name" yaml:"name"` // Stack name KubeConfig string `json:"kubeConfig" yaml:"kubeConfig"` // KubeConfig file path for this stack }
Configuration is the stack configuration
func ParseStackConfiguration ¶
func ParseStackConfiguration(path string) (*Configuration, error)
ParseStackConfiguration parse the stack configuration by the given directory
type Stack ¶
type Stack struct { Configuration `json:",inline" yaml:",inline"` Path string `json:"path,omitempty" yaml:"path,omitempty"` // Absolute path to the stack directory }
func FindAllStacks ¶
FindAllStacks find all stacks from the current working directory
func FindAllStacksFrom ¶
FindAllStacksFrom find all stacks from the given path
func GetStackFrom ¶
GetStackFrom get stack from the given path
func NewStack ¶
func NewStack(config *Configuration, path string) *Stack
NewStack creates a new stack
func (*Stack) TableReport ¶
TableReport returns the report string of table format
Click to show internal directories.
Click to hide internal directories.