diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2015-11-05 19:08:20 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2015-11-05 20:55:46 +0100 |
commit | 6be0bc1233b1a31e749354f1d54104b49d5bf19b (patch) | |
tree | a9fd259944a42322050247ed6b5393150f2c4cb8 /clients/common | |
parent | a80d56b21142096f458758405736f3d567c175f5 (diff) | |
download | go-git-6be0bc1233b1a31e749354f1d54104b49d5bf19b.tar.gz |
clients: new AuthMethod and ConnectWithAuth
Diffstat (limited to 'clients/common')
-rw-r--r-- | clients/common/common.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clients/common/common.go b/clients/common/common.go index 44d8e6a..8756cfd 100644 --- a/clients/common/common.go +++ b/clients/common/common.go @@ -3,6 +3,7 @@ package common import ( "errors" "fmt" + "io" "io/ioutil" "strings" @@ -19,6 +20,18 @@ var ( const GitUploadPackServiceName = "git-upload-pack" +type GitUploadPackService interface { + Connect(url Endpoint) error + ConnectWithAuth(url Endpoint, auth AuthMethod) error + Info() (*GitUploadPackInfo, error) + Fetch(r *GitUploadPackRequest) (io.ReadCloser, error) +} + +type AuthMethod interface { + Name() string + String() string +} + type Endpoint string func NewEndpoint(url string) (Endpoint, error) { |