klone

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LanguageToKloner = map[string]NewKlonerFunc{
	"":   simple.NewKloner,
	"go": gogit.NewKloner,
}

LanguageToKloner maps languages to kloners All language keys should be lower case, and they are cast as such before assertion

View Source
var RefreshCredentials = false

Functions

func Klone

func Klone(name string) error

Klone is the main entry point for a klone routine. This is the procedural logic for "kloning" a git repository. This will attempt to look up relevant repository information and set a kloning "style" for the klone

func NewGithubProvider

func NewGithubProvider() provider.KloneProvider

Types

type Kloneable

type Kloneable struct {
	// contains filtered or unexported fields
}

Kloneable is a data structure that holds all relevant data to klone a repository

func (*Kloneable) Klone

func (k *Kloneable) Klone() (string, error)

Klone is the only exported method, and is the only way to take action on a Kloneable data structure

type NewKlonerFunc

type NewKlonerFunc func(server provider.GitServer) kloners.Kloner

NewKlonerFunc defines the type of function we expect for new kloners

type QueryInformation

type QueryInformation struct {
	// contains filtered or unexported fields
}

func ParseQuery

func ParseQuery(query string) (bool, *QueryInformation)

ParseQuery will take an arbitrary string and attempt to reason about what the user would like to happen for a klone. ParseQuery will return QueryInformation which is the information we could abstract out of their query and a few hits to the Git server API

type Style

type Style int
const (
	StyleOwner         Style = 1 // The user is the owner, and the repository is not a fork
	StyleAlreadyForked Style = 2 // The user is the owner, and the repository was forked from somewhere
	StyleNeedsFork     Style = 3 // The user is NOT the owner, and the user does NOT have a fork already
	StyleTryingFork    Style = 4 // The user is NOT the owner, and the repository is already forked
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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