Documentation ¶
Index ¶
- 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) IsEmpty() bool
- func (c *Capabilities) Set(capability string, values ...string)
- func (c *Capabilities) Sort()
- func (c *Capabilities) String() string
- func (c *Capabilities) Supports(capability string) bool
- func (c *Capabilities) SymbolicReference(sym string) string
- type Capability
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) IsEmpty ¶
func (c *Capabilities) IsEmpty() bool
func (*Capabilities) Set ¶
func (c *Capabilities) Set(capability string, values ...string)
Set sets a capability removing the values
func (*Capabilities) Sort ¶
func (c *Capabilities) Sort()
Sorts capabilities in increasing order of their name
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
Directories ¶
Path | Synopsis |
---|---|
Package advrefs implements encoding and decoding advertised-refs messages from a git-upload-pack command.
|
Package advrefs implements encoding and decoding advertised-refs messages from a git-upload-pack command. |
Package pktline implements reading payloads form pkt-lines and encoding pkt-lines from payloads.
|
Package pktline implements reading payloads form pkt-lines and encoding pkt-lines from payloads. |
Package ulreq implements encoding and decoding upload-request messages from a git-upload-pack command.
|
Package ulreq implements encoding and decoding upload-request messages from a git-upload-pack command. |
Click to show internal directories.
Click to hide internal directories.