lake

package
v0.0.0-...-d75ed61 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: Unlicense Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigBlockTypeName = "config"
	StoreBlockTypeName  = "store"
	TargetBlockTypeName = "target"
)
View Source
var (
	LakeFilename = "Lakefile"
)

Functions

func PrintDiagnostics

func PrintDiagnostics(files map[string]*hcl.File, diags hcl.Diagnostics) error

PrintDiagnostics is an opinionated use of hcl.NewDiagnosticTextWriter that fetches the terminal width, determines if the output should contain color and prints to stderr

func TmpLoadLakeImport

func TmpLoadLakeImport(name string) (values map[string]Value, diags hcl.Diagnostics)

Types

type File

type File struct {
	// contains filtered or unexported fields
}

type ImportFunction

type ImportFunction func(name string) (values map[string]Value, diags hcl.Diagnostics)

type Package

type Package struct {
	// contains filtered or unexported fields
}

func ParseDirectory

func ParseDirectory(path string, importFunc ImportFunction) (values map[string]Value, pkg Package, diags hcl.Diagnostics)

ParseDirectory takes a directory and searches it for Lakefiles. Those files are parsed and the resulting data is returned.

func (Package) FileMap

func (pkg Package) FileMap() map[string]*hcl.File

type Recipe

type Recipe struct {
	Env     map[string]string `hcl:"env,optional" json:",omitempty"`
	Inputs  []string          `hcl:"inputs,optional" json:",omitempty"`
	IsStore bool
	Name    string   `hcl:"name,label"`
	Network bool     `hcl:"network,optional" json:",omitempty"`
	Script  string   `hcl:"script,optional" json:",omitempty"`
	Shell   []string `hcl:"shell,optional" json:",omitempty"`
}

func (Recipe) Hash

func (recipe Recipe) Hash() string

func (Recipe) JSON

func (recipe Recipe) JSON() string

type Value

type Value struct {
	// contains filtered or unexported fields
}

func ValueFromCTY

func ValueFromCTY(v cty.Value) Value

func ValueFromRecipe

func ValueFromRecipe(r Recipe) Value

func (Value) MarshalJSON

func (v Value) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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