Documentation ¶
Index ¶
- func GetLocalTemplateInfo(name string) (*git.RepoInfo, error)
- func ImportTemplate(url string) (*vcsurl.VCS, error)
- func InstallTemplate(name string) error
- func ListCachedRepos() ([]*git.RepoInfo, error)
- func ListTemplates() ([]*git.RepoInfo, error)
- func MakeRegistry() error
- func RemoveTemplate(name string) error
- func SearchRegistry(substring string) ([]*git.RepoInfo, error)
- func SearchTemplates(pattern string) ([]*git.RepoInfo, error)
- func UpdateRegistry() error
- func UpgradeAllTemplates() error
- func UpgradeTemplates(names []string) error
- func WriteRegistry(r *TemplateRegistry) error
- type TemplateInfo
- type TemplateRegistry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLocalTemplateInfo ¶ added in v0.12.0
GetLocalTemplateInfo returns information about a template either from an installed of from a template registry
func ImportTemplate ¶ added in v0.12.0
ImportTemplate imports template from git repository into the cache
func InstallTemplate ¶
InstallTemplate installs template template registry into the cache
func ListCachedRepos ¶ added in v0.16.0
ListTemplates lists all templates in the cache
func ListTemplates ¶
ListTemplates lists all templates in the cache
func MakeRegistry ¶ added in v0.18.5
func MakeRegistry() error
func RemoveTemplate ¶
RemoveTemplate removes template by name from the cache
func SearchRegistry ¶ added in v0.12.0
func SearchTemplates ¶ added in v0.16.2
func UpdateRegistry ¶ added in v0.12.0
func UpdateRegistry() error
UpdateRegistry updates the local template registry The registry is a git repository that contains a list of templates and their versions.
func UpgradeAllTemplates ¶ added in v0.12.0
func UpgradeAllTemplates() error
UpgradeAllTemplates upgrade all templates from remote git repo
func UpgradeTemplates ¶ added in v0.12.0
UpgradeTemplates upgrade templates from remote git repo
func WriteRegistry ¶ added in v0.12.0
func WriteRegistry(r *TemplateRegistry) error
WriteRegistry writes the registry to path
Types ¶
type TemplateInfo ¶
type TemplateInfo struct { Name string `json:"name"` Git string `json:"git"` Commit string `json:"commit"` Path string `json:"path"` InCache bool `json:"inCache"` InRegistry bool `json:"inRegistry"` }
TemplateInfo contains information about a template
type TemplateRegistry ¶ added in v0.12.0
type TemplateRegistry struct { Name string `json:"name"` Description string `json:"description"` Entries []*git.RepoInfo `json:"entries"` }
func ReadRegistry ¶ added in v0.12.0
func ReadRegistry() (*TemplateRegistry, error)
ReadRegistry reads the registry file from path