Documentation ¶
Index ¶
- Constants
- Variables
- func ReadInputOIDs(r io.Reader) ([]plumbing.Hash, error)
- func ReadInputPaths(r io.Reader) ([]string, error)
- func WriteBatchObjectsHeader(w io.Writer) error
- func WriteObjectsItem(w io.Writer, r io.Reader, oid string, size int64) error
- func WriteSingleObjectsHeader(w io.Writer, contentLength, compressedSize int64) error
- type BatchRequest
- type BatchResponse
- type BatchSharedsRequest
- type BatchSharedsResponse
- type Branch
- type ErrorCode
- type HaveObject
- type Operation
- type Packer
- func (p *Packer) Close() error
- func (p *Packer) Done() (err error)
- func (p *Packer) WriteAny(ctx context.Context, e object.Encoder, oid string) error
- func (p *Packer) WriteDeduplication(ctx context.Context, e object.Encoder, oid plumbing.Hash) error
- func (p *Packer) WriteDeepenMetadata(ctx context.Context, current *object.Commit, deepenFrom, have plumbing.Hash, ...) error
- func (p *Packer) WriteDeepenSparseMetadata(ctx context.Context, current *object.Commit, deepenFrom, have plumbing.Hash, ...) error
- func (p *Packer) WriteSparseTree(ctx context.Context, oid plumbing.Hash, m SparseMatcher, depth int) error
- func (p *Packer) WriteTree(ctx context.Context, oid plumbing.Hash, depth int) error
- type PayloadHeader
- type Range
- type Reference
- type Representation
- type SASHandeshake
- type SASPayload
- type SparseMatcher
- type Tag
- type WantObject
Constants ¶
View Source
const ( PROTOCOL_Z1 = "Z1" PROTOCOL_VERSION uint32 = 1 // references prefix REF_PREFIX = "refs/" BRANCH_PREFIX = "refs/heads/" // branch prefix TAG_PREFIX = "refs/tags/" // tag prefix HEAD = "HEAD" // MIME ZETA_MIME_MD = "application/x-zeta-metadata" ZETA_MIME_COMPRESS_MD = "application/x-zeta-compress-metadata" // other MAX_BATCH_BLOB_SIZE = math.MaxUint32 - 64 )
Variables ¶
View Source
var ( // ErrNoOverlap is returned by ParseRange if first-byte-pos of // all of the byte-range-spec values is greater than the content size. ErrNoOverlap = errors.New("invalid range: failed to overlap") // ErrInvalid is returned by ParseRange on invalid input. ErrInvalid = errors.New("invalid range") )
Functions ¶
func WriteBatchObjectsHeader ¶
func WriteObjectsItem ¶
Types ¶
type BatchRequest ¶
type BatchRequest struct {
Objects []*HaveObject `json:"objects"`
}
type BatchResponse ¶
type BatchResponse struct {
Objects []*HaveObject `json:"objects"`
}
type BatchSharedsRequest ¶
type BatchSharedsRequest struct {
}type BatchSharedsResponse ¶
type BatchSharedsResponse struct {
}type Branch ¶
type Branch struct { Remote string `json:"remote"` Branch string `json:"branch"` Hash string `json:"hash"` Version int `json:"version"` Agent string `json:"agent"` HashAlgo string `json:"hash-algo"` DefaultBranch string `json:"default-branch"` CompressionAlgo string `json:"compression-algo"` Capabilities []string `json:"capabilities"` }
type ErrorCode ¶
type HaveObject ¶
type Packer ¶
func NewHttpPacker ¶
func NewPipePacker ¶
NewPipePacker: SSH protocol
func (*Packer) WriteDeduplication ¶
func (*Packer) WriteDeepenMetadata ¶
func (*Packer) WriteDeepenSparseMetadata ¶
func (*Packer) WriteSparseTree ¶
type PayloadHeader ¶
type PayloadHeader struct {
Authorization string `json:"authorization"`
}
type Range ¶
Range specifies the byte range to be sent to the client.
func ParseRange ¶
ParseRange parses a Range header string as per RFC 7233. ErrNoOverlap is returned if none of the ranges overlap. ErrInvalid is returned if s is invalid range.
func (Range) ContentRange ¶
ContentRange returns Content-Range header value.
type Reference ¶
type Reference struct { Remote string `json:"remote"` Name string `json:"name"` Hash string `json:"hash"` Peeled string `json:"peeled,omitempty"` HEAD string `json:"head"` Version int `json:"version"` Agent string `json:"agent"` HashAlgo string `json:"hash-algo"` CompressionAlgo string `json:"compression-algo"` Capabilities []string `json:"capabilities"` }
type Representation ¶
type SASHandeshake ¶
type SASPayload ¶
type SASPayload struct { Header PayloadHeader `json:"header"` Notice string `json:"notice,omitempty"` ExpiresAt time.Time `json:"expires_at,omitempty"` }
type SparseMatcher ¶
type SparseMatcher interface { Len() int Match(name string) (SparseMatcher, bool) }
func NewSparseTreeMatcher ¶
func NewSparseTreeMatcher(dirs []string) SparseMatcher
type WantObject ¶
Click to show internal directories.
Click to hide internal directories.