forked from owenthereal/ccat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
transport.go
31 lines (24 loc) · 789 Bytes
/
transport.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package git
import "io"
const (
ServiceReceivePack = "receive-pack"
ServiceUploadPack = "upload-pack"
)
type GitTransporter interface {
GitTransport(repoPath string) (GitTransport, error)
}
// GitTransport represents a git repository with all the functions to
// support the "smart" transfer protocol.
type GitTransport interface {
// InfoRefs writes the output of git-info-refs to w.
InfoRefs(w io.Writer, service string) error
// ReceivePack writes the output of git-receive-pack to w, reading
// from r.
ReceivePack(w io.Writer, r io.Reader, opt GitTransportOpt) error
// UploadPack writes the output of git-upload-pack to w, reading
// from r.
UploadPack(w io.Writer, r io.Reader, opt GitTransportOpt) error
}
type GitTransportOpt struct {
ContentEncoding string
}