Documentation
¶
Index ¶
- func InstNameFromImageURL(locator, imageArch string) string
- func InstNameFromURL(urlStr string) (string, error)
- func InstNameFromYAMLPath(yamlPath string) (string, error)
- func SeemsFilePath(arg string) bool
- func SeemsFileURL(arg string) bool
- func SeemsHTTPURL(arg string) bool
- func SeemsTemplateURL(arg string) (bool, *url.URL)
- func SeemsYAMLPath(arg string) bool
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstNameFromImageURL ¶ added in v1.1.0
func InstNameFromURL ¶
func InstNameFromYAMLPath ¶
func SeemsFilePath ¶ added in v1.1.0
SeemsFilePath returns true if arg either contains a path separator or has a file extension that does not start with a digit. `my.yaml` is a file path, `ubuntu-20.10` is not.
func SeemsFileURL ¶
func SeemsHTTPURL ¶
func SeemsYAMLPath ¶
Types ¶
type Template ¶
type Template struct {
Locator string // template locator (absolute path or URL)
Bytes []byte // file contents
// The following fields are only used when the template represents a YAML config file.
Name string // instance name, may be inferred from locator
Config *limayaml.LimaYAML
// contains filtered or unexported fields
}
func (*Template) ClearOnError ¶ added in v1.1.0
func (*Template) Embed ¶ added in v1.1.0
Embed will recursively resolve all "base" dependencies and update the template with the merged result. It also inlines all external provisioning and probe scripts.
func (*Template) Unmarshal ¶ added in v1.1.0
Unmarshal makes sure the tmpl.Config field is set. Any operation that modified tmpl.Bytes is expected to set tmpl.Config back to nil.
func (*Template) UseAbsLocators ¶ added in v1.1.0
UseAbsLocators will replace all relative template locators with absolute ones, so this template can be stored anywhere and still reference the same base templates and files.
Click to show internal directories.
Click to hide internal directories.