Documentation ¶
Overview ¶
Package http implements a HTTP client for go-git.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultClient = NewClient(nil)
DefaultClient is the default HTTP client, which uses `http.DefaultClient`.
Functions ¶
func NewClient ¶
NewClient creates a new client with a custom net/http client. See `InstallProtocol` to install and override default http client. Unless a properly initialized client is given, it will fall back into `http.DefaultClient`.
Note that for HTTP client cannot distinguist between private repositories and unexistent repositories on GitHub. So it returns `ErrAuthorizationRequired` for both.
Types ¶
type AuthMethod ¶
type AuthMethod interface { transport.AuthMethod // contains filtered or unexported methods }
AuthMethod is concrete implementation of common.AuthMethod for HTTP services
type BasicAuth ¶
type BasicAuth struct {
// contains filtered or unexported fields
}
BasicAuth represent a HTTP basic auth
func NewBasicAuth ¶
NewBasicAuth returns a basicAuth base on the given user and password