protov2

package
v0.0.0-...-7a0dbad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = fmt.Errorf("unsupported git operation")

Functions

This section is empty.

Types

type Client

type Client struct {
	Debug bool
	// contains filtered or unexported fields
}

func NewClient

func NewClient(u string) (*Client, error)

func (*Client) Fetch

func (cl *Client) Fetch(storer storage.Storer, opts *FetchOptions) error

func (*Client) HasCap

func (cl *Client) HasCap(cap string) bool

func (*Client) NewRequest

func (cl *Client) NewRequest(v2req v2Req) (*http.Request, error)

func (*Client) ObjectInfo

func (cl *Client) ObjectInfo(ids []plumbing.Hash) (map[plumbing.Hash]uint64, error)

func (*Client) String

func (cl *Client) String() string

type FetchOptions

type FetchOptions struct {
	Progress io.Writer
	Want     []plumbing.Hash
	Depth    int
	Filter   string
}

type FetchRequest

type FetchRequest struct {
	Want           []plumbing.Hash
	Have           []plumbing.Hash
	Shallow        []plumbing.Hash
	Deepen         *int
	DeepenRelative bool
	DeepenNot      plumbing.Hash
	// DeepenSince
	Done         bool
	ThinPack     bool
	NoProgress   bool
	IncludeTag   bool
	OFSDelta     bool
	Filter       string
	WantRef      []string
	SidebandAll  bool
	PackfileURIs []string
	WaitForDone  bool
}

func (*FetchRequest) Encode

func (r *FetchRequest) Encode(w io.Writer) error

type ObjectInfoRequest

type ObjectInfoRequest struct {
	Want string
	OID  []plumbing.Hash
}

func (*ObjectInfoRequest) Encode

func (r *ObjectInfoRequest) Encode(w io.Writer) error

type ObjectInfoResponse

type ObjectInfoResponse struct {
	Sizes []ObjectInfoSize
}

func (*ObjectInfoResponse) Decode

func (rep *ObjectInfoResponse) Decode(r io.Reader) error

type ObjectInfoSize

type ObjectInfoSize struct {
	Hash plumbing.Hash
	Size uint64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL