diff options
author | Santiago M. Mola <santi@mola.io> | 2016-11-23 15:30:34 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-11-23 15:38:12 +0100 |
commit | 08e08d771ef03df80248c80d81475fe7c5ea6fe7 (patch) | |
tree | d12e9befa22409e8cf50c5bbc4895e69fd8a5f48 /plumbing/transport/http/send_pack.go | |
parent | 844169a739fb8bf1f252d416f10d8c7034db9fe2 (diff) | |
download | go-git-08e08d771ef03df80248c80d81475fe7c5ea6fe7.tar.gz |
transport: create Client interface (#132)
* plumbing: move plumbing/client package to plumbing/transport.
* transport: create Client interface.
* A Client can instantiate any client transport service.
* InstallProtocol installs a Client for a given protocol,
instead of just a UploadPackService.
* A Client can open a session for fetch-pack or send-pack
for a specific Endpoint.
* Adapt ssh and http clients to the new client interface.
* updated doc
Diffstat (limited to 'plumbing/transport/http/send_pack.go')
-rw-r--r-- | plumbing/transport/http/send_pack.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/plumbing/transport/http/send_pack.go b/plumbing/transport/http/send_pack.go new file mode 100644 index 0000000..39be95c --- /dev/null +++ b/plumbing/transport/http/send_pack.go @@ -0,0 +1,29 @@ +package http + +import ( + "errors" + "io" + "net/http" + + "gopkg.in/src-d/go-git.v4/plumbing/transport" +) + +var errSendPackNotSupported = errors.New("send-pack not supported yet") + +type sendPackSession struct{ + *session +} + +func newSendPackSession(c *http.Client, ep transport.Endpoint) transport.SendPackSession { + return &sendPackSession{&session{}} +} + +func (s *sendPackSession) AdvertisedReferences() (*transport.UploadPackInfo, + error) { + + return nil, errSendPackNotSupported +} + +func (s *sendPackSession) SendPack() (io.WriteCloser, error) { + return nil, errSendPackNotSupported +} |