Documentation ¶
Overview ¶
Package common contains utils used by the clients
Index ¶
- Constants
- Variables
- type AuthMethod
- type Capabilities
- func (c *Capabilities) Add(capability string, values ...string)
- func (c *Capabilities) Decode(raw string)
- func (c *Capabilities) Get(capability string) *Capability
- func (c *Capabilities) Set(capability string, values ...string)
- func (c *Capabilities) String() string
- func (c *Capabilities) Supports(capability string) bool
- func (c *Capabilities) SymbolicReference(sym string) string
- type Capability
- type Endpoint
- type GitUploadPackInfo
- type GitUploadPackRequest
- type GitUploadPackService
Constants ¶
View Source
const GitUploadPackServiceName = "git-upload-pack"
Variables ¶
View Source
var ( NotFoundErr = errors.New("repository not found") EmptyGitUploadPackErr = errors.New("empty git-upload-pack given") )
Functions ¶
This section is empty.
Types ¶
type AuthMethod ¶
type Capabilities ¶
type Capabilities struct {
// contains filtered or unexported fields
}
Capabilities contains all the server capabilities https://github.com/git/git/blob/master/Documentation/technical/protocol-capabilities.txt
func NewCapabilities ¶
func NewCapabilities() *Capabilities
NewCapabilities returns a new Capabilities struct
func (*Capabilities) Add ¶
func (c *Capabilities) Add(capability string, values ...string)
Add adds a capability, values are optional
func (*Capabilities) Get ¶
func (c *Capabilities) Get(capability string) *Capability
Get returns the values for a capability
func (*Capabilities) Set ¶
func (c *Capabilities) Set(capability string, values ...string)
Set sets a capability removing the values
func (*Capabilities) String ¶
func (c *Capabilities) String() string
func (*Capabilities) Supports ¶
func (c *Capabilities) Supports(capability string) bool
Supports returns true if capability is present
func (*Capabilities) SymbolicReference ¶
func (c *Capabilities) SymbolicReference(sym string) string
SymbolicReference returns the reference for a given symbolic reference
type Capability ¶
Capability represents a server capability
type GitUploadPackInfo ¶
type GitUploadPackInfo struct { Capabilities *Capabilities Head core.Hash Refs map[string]core.Hash }
func NewGitUploadPackInfo ¶
func NewGitUploadPackInfo() *GitUploadPackInfo
func (*GitUploadPackInfo) Bytes ¶
func (r *GitUploadPackInfo) Bytes() []byte
func (*GitUploadPackInfo) String ¶
func (r *GitUploadPackInfo) String() string
type GitUploadPackRequest ¶
func (*GitUploadPackRequest) Have ¶
func (r *GitUploadPackRequest) Have(h ...core.Hash)
func (*GitUploadPackRequest) Reader ¶
func (r *GitUploadPackRequest) Reader() *strings.Reader
func (*GitUploadPackRequest) String ¶
func (r *GitUploadPackRequest) String() string
func (*GitUploadPackRequest) Want ¶
func (r *GitUploadPackRequest) Want(h ...core.Hash)
type GitUploadPackService ¶
type GitUploadPackService interface { Connect(url Endpoint) error ConnectWithAuth(url Endpoint, auth AuthMethod) error Info() (*GitUploadPackInfo, error) Fetch(r *GitUploadPackRequest) (io.ReadCloser, error) }
Click to show internal directories.
Click to hide internal directories.