tpl

package
v0.15.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImportTemplate added in v0.12.0

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

func InstallTemplate

func InstallTemplate(name string) error

func RemoveTemplate

func RemoveTemplate(name string) error

func SearchRegistry added in v0.12.0

func SearchRegistry(pattern string) ([]*git.RemoteInfo, 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

Types

type TemplateInfo

type TemplateInfo struct {
	Name       string
	Git        string
	Commit     string
	Path       string
	InCache    bool
	InRegistry bool
}

func GetLocalTemplateInfo added in v0.12.0

func GetLocalTemplateInfo(name string) (TemplateInfo, error)

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

func ListTemplates

func ListTemplates() ([]TemplateInfo, error)

type TemplateRegistry added in v0.12.0

type TemplateRegistry struct {
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Entries     []*git.RemoteInfo `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