Documentation
¶
Overview ¶
Package gitremote lists the refs of repositories on github.com with `git ls-remote`, for the resolution of actions (ports.GitRemote). It sends no credentials, never prompts, and bounds the time and the output of git.
Index ¶
Constants ¶
View Source
const ( // DefaultTimeout is how long one ls-remote may take. DefaultTimeout = 20 * time.Second // DefaultMaxOutput is the most bytes of ls-remote output read: a repository // with 100,000 tags lists about 8 MB. More is refused as unavailable. DefaultMaxOutput = 16 << 20 // DefaultBaseURL is where the repositories are. DefaultBaseURL = "https://github.com" )
Defaults of the bounds.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Bin is the git executable. Required.
Bin string
// Path is the PATH given to git, which it uses to find its helpers.
Path string
// Home is the HOME of git; it should be an empty directory the process
// owns, so that no user configuration or credential is read.
Home string
// BaseURL, Timeout and MaxOutput default to the constants above; tests
// replace them.
BaseURL string
Timeout time.Duration
MaxOutput int
// AllowedProtocols is GIT_ALLOW_PROTOCOL: "https" by default.
AllowedProtocols string
// Proxy is the proxy environment forwarded to git, as NAME=value pairs: see
// ProxyEnv. Nothing else of the environment of ermite reaches git.
Proxy []string
}
Config configures a Remote.
Click to show internal directories.
Click to hide internal directories.