Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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
var RefreshCredentials = false
Functions ¶
func Klone ¶
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
type NewKlonerFunc ¶
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 )