Documentation
¶
Index ¶
- Constants
- func AddRepo(name string, url string, ty RepoType) error
- func AddTemplateSource(lang string, url string, branch string, commit string) error
- func Create(lang string, name string, force bool, noCache bool) error
- func DiscoverTemplates(repo RepoEntry) (map[string]TemplateEntry, error)
- func Update(override bool) error
- func Upgrade(name string) error
- func UpgradeAll() error
- type Lockfile
- type RepoEntry
- type RepoType
- type TemplateEntry
Constants ¶
View Source
const BUONOTTI_ENDPOINT string = "https://api.github.com/orgs/buonotti/repos"
BUONOTTI_ENDPOINT is the official repo
Variables ¶
This section is empty.
Functions ¶
func AddTemplateSource ¶
AddTemplateSource adds a language with a custom git repo to the lockfile
func DiscoverTemplates ¶
func DiscoverTemplates(repo RepoEntry) (map[string]TemplateEntry, error)
DiscoverTemplates loads all templates from a repo
func UpgradeAll ¶
func UpgradeAll() error
Types ¶
type Lockfile ¶
type Lockfile struct {
LastUpdate util.ApisenseTime `json:"lastUpdate"` // LastUpdate is when the last update was run
Repos map[string]RepoEntry `json:"repos"` // Repos are the remote repos to look for new templates
Templates map[string]TemplateEntry `json:"templates"` // Templates are the available templates
}
type RepoType ¶
type RepoType string
RepoType is the type of the remote repo
const (
GitHub RepoType = "github" // GitHub defines the remote is a github profile/org
)
type TemplateEntry ¶
type TemplateEntry struct {
Repo string `json:"repo"`
Branch string `json:"branch"`
Commit string `json:"commit"`
}
TemplateEntry holds the information for a single template
Click to show internal directories.
Click to hide internal directories.