diff options
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) { |