templates

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(templatesDir string) (map[string]*Template, error)

List embedded and external templates

func ListDir

func ListDir(dir string) (map[string]*Template, error)

func ListEmbedded

func ListEmbedded() map[string]*Template

Types

type Template

type Template struct {
	Description string            `json:"description" yaml:"description"`
	Manifest    types.Manifest    `json:"manifest" yaml:"manifest"`               // manifest to copy
	Check       []string          `json:"check,omitempty" yaml:"check,omitempty"` // check availability
	Files       map[string]string `json:"files" yaml:"files,omitempty"`           //only for embedded
}

func Read

func Read(filename string) (*Template, error)

func (*Template) IsAvailable

func (t *Template) IsAvailable(ctx context.Context) bool

Jump to

Keyboard shortcuts

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