Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider interface {
Fetch() (string, error) // Fetch the template and return the path where it's stored on the local filesystem
Name() string // For example, git provider should return "git provider detected"
UsesTmp() bool // Defines if the provider uses a temporary file/directory that can be safely deleted at the end
}
Provider is the main interface. A provider defines a way to retrieve a template and the way said provider should behave once fetched
func NewGitProvider ¶
NewGitProvider will return a new provider from a git repository
func NewLocalProvider ¶
NewLocalProvider will return a new provider to a local filesystem path
func NewProviderFromPath ¶
NewProviderFromPath will return a new Provider according to the given string as it will try to detect git repositories, http scheme and fallback to local directory otherwise
Click to show internal directories.
Click to hide internal directories.