sdk

package
v0.16.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(templatePath, templateName, outputFilepath string, context TemplateContext, leftDelim, rightDelim string) error

func LoadShuttleYaml

func LoadShuttleYaml(projectPath string) ([]byte, error)

func ResolveTemplatePath

func ResolveTemplatePath(project ShuttleContext, templateName string) (string, error)

Types

type ShuttleContext

type ShuttleContext struct {
	Variables                 config.DynamicYaml `yaml:"vars"` //temporarily include a dynamic representation of the variables here so the go-based plans can use this for templating so we're backwards compatible with the existing templates (for the time being)
	ProjectPath               string             `yaml:"-"`
	LocalPlanPath             string             `yaml:"-"`
	LocalShuttleDirectoryPath string             `yaml:"-"`
	TempDirectoryPath         string             `yaml:"-"`
}

func LoadShuttleContext

func LoadShuttleContext(projectPath, localPlanPath string) (ShuttleContext, error)

type TemplateContext

type TemplateContext struct {
	Vars        interface{}
	Args        map[string]string
	PlanPath    string
	ProjectPath string
}

Jump to

Keyboard shortcuts

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