cloner

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2024 License: Apache-2.0 Imports: 7 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 New

func New(depth int, stdout io.Writer) Cloner

New returns a new cloner.

func NewDefault

func NewDefault() Cloner

NewDefault returns a cloner with default settings.

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