template

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(t *FulfilledTemplate, targetPath string) error

Types

type Argument

type Argument struct {
	Name  string
	Type  ParameterType
	Value string
}

type FulfilledTemplate

type FulfilledTemplate struct {
	Spec      *Spec
	Arguments []Argument
}

type Parameter

type Parameter struct {
	Name        string        `yaml:"name"`
	Description string        `yaml:"description"`
	Type        ParameterType `yaml:"type"`
}

type ParameterType

type ParameterType string
var (
	StringType ParameterType = "string"
	IntType    ParameterType = "string"
)

type Spec

type Spec struct {
	Name         string      `yaml:"name"`
	Description  string      `yaml:"description"`
	SkeletonPath string      `yaml:"skeletonPath"`
	Parameters   []Parameter `yaml:"parameters"`
	// contains filtered or unexported fields
}

func FindByName

func FindByName(templatesPath string, name string) (*Spec, error)

func List

func List(templatesPath string) ([]Spec, error)

func (*Spec) IsValid

func (t *Spec) IsValid() bool

Jump to

Keyboard shortcuts

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