fetch

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeSingleURL = "single-url"
	ModeInputFile = "input-file"
)

Mode constants

View Source
const (
	AuthTypeHTTP     = "http"
	AuthTypeSSHKey   = "ssh-key"
	AuthTypeSSHAgent = "ssh-agent"
)

Variables

View Source
var (
	AppConfig *config.Config
)

Global variables for configuration and command arguments TODO: add PR example for github

View Source
var FetchCmd = &cobra.Command{
	Use:                   "fetch --vcs/p PLUGIN_NAME --auth-type/-a AUTH_TYPE [--ssh-key/-k PATH] [--rm-ext LIST_OF_EXTENTIONS][-j THREADS_NUMBER, default=1] {--input-file/-i PATH | [-b BRANCH/HASH] URL}",
	SilenceUsage:          true,
	DisableFlagsInUseLine: true,
	Example:               exampleFetchUsage,
	Short:                 "Fetches repository code using the specified VCS plugin with consistency support",
	RunE:                  runFetchCommand,
}

Functions

func Init

func Init(cfg *config.Config)

Init initializes the global configuration variable.

Types

type RunOptionsFetch

type RunOptionsFetch struct {
	VCSPluginName string
	InputFile     string
	AuthType      string
	SSHKey        string
	Branch        string
	RmListExts    []string
	Threads       int
}

RunOptionsFetch holds the arguments for the fetch command.

Jump to

Keyboard shortcuts

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