provider

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 4 Imported by: 0

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

func NewGitProvider(url, path, output string, depth int) Provider

NewGitProvider will return a new provider from a git repository

func NewLocalProvider

func NewLocalProvider(in, path string) Provider

NewLocalProvider will return a new provider to a local filesystem path

func NewProviderFromPath

func NewProviderFromPath(in, path, output string, depth int) Provider

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

Jump to

Keyboard shortcuts

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