fetch

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: MIT Imports: 15 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 output example

View Source
var FetchCmd = &cobra.Command{
	Use:                   "fetch --vcs/p PLUGIN_NAME --auth-type/-a AUTH_TYPE [--ssh-key/-k PATH] [--output/-o 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,
}

FetchCmd represents the command for fetch command.

Functions

func Init

func Init(cfg *config.Config)

Init initializes the global configuration variable.

Types

type RunOptionsFetch

type RunOptionsFetch struct {
	VCSPluginName string   `json:"vcs_plugin_name,omitempty"`
	InputFile     string   `json:"input_file,omitempty"`
	AuthType      string   `json:"auth_type,omitempty"`
	SSHKey        string   `json:"ssh_key,omitempty"`
	Branch        string   `json:"branch,omitempty"`
	OutputPath    string   `json:"output_path,omitempty"`
	RmListExts    []string `json:"rm_list_exts"`
	Threads       int      `json:"threads"`
}

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