Documentation ¶
Index ¶
- func GetCachePath() string
- func GetLocalPath() string
- type Template
- func (temp Template) CachedPath() string
- func (temp Template) CheckIfCoreRemote() bool
- func (temp Template) CheckIfGithubRemote() bool
- func (temp Template) EnsureTemplateIsFetched() error
- func (temp Template) Expand(values interface{})
- func (temp Template) GetLocalPathByRemote() string
- func (temp Template) GetSafeRemote() string
- func (temp Template) IsTemplateAvailableLocally() bool
- func (temp Template) IsTemplateAvailableRemotely(remote string) bool
- func (temp Template) LoadManifest() Template
- func (temp Template) LoadRemoteTemplateIntoMemory() (*git.Repository, error)
- type TemplateManifest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCachePath ¶
func GetCachePath() string
GetCachePath returns the path of the local cache of fetched remote templates.
Types ¶
type Template ¶
type Template struct { From string Directory fs.Directory TemplateDirectory fs.Directory Manifest TemplateManifest }
Template holds information related to the template being rendered.
func (Template) CachedPath ¶
CachedPath returns the path to the locally cached template.
func (Template) CheckIfCoreRemote ¶
CheckIfCoreRemote checks if the remote provided is a Lavra repository remote.
func (Template) CheckIfGithubRemote ¶
CheckIfGithubRemote checks if the remoote provided is a Github repository remote.
func (Template) EnsureTemplateIsFetched ¶
EnsureTemplateIsFetched fetches the remote template, ensuring that the fetched version is the latest.
func (Template) GetLocalPathByRemote ¶
GetLocalPathByRemote returns the local path of the remote provided.
func (Template) GetSafeRemote ¶
GetSafeRemote returns a string with the full Git URL for Lavra-owned projects as well Github-hosted projects, and finally the given remote string.
func (Template) IsTemplateAvailableLocally ¶
IsTemplateAvailableLocally checks whether or not a local template exists by the specific name.
func (Template) IsTemplateAvailableRemotely ¶
IsTemplateAvailableRemotely returns a boolean stating whether the the remote template is available.
func (Template) LoadManifest ¶
LoadManifest loads the template.yml into the Manifest of the Template.
func (Template) LoadRemoteTemplateIntoMemory ¶
LoadRemoteTemplateIntoMemory loads the remote template into memory for