Documentation ¶
Index ¶
Constants ¶
View Source
const ( FileProtocolPrefix = `file://` GitProtocolPrefix = `https://` LocalMountProtocolPrefix = `local://` )
Variables ¶
View Source
var (
ErrUnknownProtocol = errors.New(`unknown protocol`)
)
Functions ¶
func Fetch ¶
Fetch repo from file path , git repo file - file://path/to/repo git repo with basic auth and token - https://{user}:{pass}@github.com/s7techlab/{repo}.git git repo with token - https://{token}@github.com/s7techlab/{repo}.git
Types ¶
type Fetcher ¶
type Fetcher interface { // Fetch code by presented path and returns tar representation Fetch(ctx context.Context, repo, version string) ([]byte, error) }
func Create ¶
Create returns Fetcher instance by repo scheme Scheme file:// returns FileFetcher Scheme https:// returns GitFetcher Scheme local:// returns Local mount fetcher git repo with basic auth and token - https://{user}:{pass}@github.com/s7techlab/{repo}.git git repo with token - https://{token}@github.com/s7techlab/{repo}.git Returns non-fetcher for unrecognized scheme
Click to show internal directories.
Click to hide internal directories.