module

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSpecRootName = "modules"
View Source
const SpecFilename = "module.yaml"

Variables

This section is empty.

Functions

func DefaultPaths

func DefaultPaths() []string

Types

type Instance

type Instance interface {
	Run(workDir string, overrides []string) ([]byte, error)
}

type Kind

type Kind interface {
	NewInstance(runner *Runner, path string, specFilename string) (Instance, error)
}

type Runner

type Runner struct {
	Kinds map[string]Kind
	Paths []string // lookup paths
}

func (*Runner) GetSpecHeader

func (mr *Runner) GetSpecHeader(moduleYamlPath string) (*SpecHeader, error)

func (*Runner) InfoByName

func (mr *Runner) InfoByName(name string) ([]*struct {
	Path string
	Kind string
}, error)

func (*Runner) NewInstance

func (mr *Runner) NewInstance(name string, specFilename string) (Instance, error)

just return the first successful

type SpecHeader

type SpecHeader struct {
	ApiVersion string `json:"apiVersion" yaml:"apiVersion"` // some version
	Kind       string // goTemplate, starlark, etc

	Metadata struct {
		Name string // module name
	}
}

func GetSpecHeader

func GetSpecHeader(buf []byte) (*SpecHeader, error)

type SpecUnstructured

type SpecUnstructured struct {
	SpecHeader `yaml:",inline"`
	Spec       *map[string]interface{} `json:",omitempty" yaml:",omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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