cloner

package
v0.0.0-...-c7a3aaa Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: BSD-2-Clause-Patent Imports: 3 Imported by: 0

Documentation

Overview

Package cloner provides support for cloning git repositories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloner

type Cloner interface {
	// Clone a repository.
	Clone(context.Context, Params) error
}

Cloner clones a repository.

func Default

func Default() Cloner

Default returns the default cloner which relies on the os/exec package to clone a repository using the git binary installed on the host.

type Params

type Params struct {
	Repo string
	Ref  string
	Sha  string
	Dir  string // Target clone directory.

	// clone credentials (not yet implemented)
	Username   string
	Password   string
	Privatekey string
}

Params provides clone params.

Jump to

Keyboard shortcuts

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