tpl

package
v0.18.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLocalTemplateInfo added in v0.12.0

func GetLocalTemplateInfo(name string) (*git.RepoInfo, error)

GetLocalTemplateInfo returns information about a template either from an installed of from a template registry

func ImportTemplate added in v0.12.0

func ImportTemplate(url string) (*vcsurl.VCS, error)

ImportTemplate imports template from git repository into the cache

func InstallTemplate

func InstallTemplate(name string) error

InstallTemplate installs template template registry into the cache

func ListCachedRepos added in v0.16.0

func ListCachedRepos() ([]*git.RepoInfo, error)

ListTemplates lists all templates in the cache

func ListTemplates

func ListTemplates() ([]*git.RepoInfo, error)

ListTemplates lists all templates in the cache

func RemoveTemplate

func RemoveTemplate(name string) error

RemoveTemplate removes template by name from the cache

func SearchRegistry added in v0.12.0

func SearchRegistry(substring string) ([]*git.RepoInfo, error)

func SearchTemplates added in v0.16.2

func SearchTemplates(pattern string) ([]*git.RepoInfo, error)

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

func UpgradeTemplates(names []string) error

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

Jump to

Keyboard shortcuts

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