Documentation
¶
Index ¶
- Constants
- func DecodeCommit(hash plumbing.Hash, content []byte) (*object.Commit, error)
- func DecodeTag(hash plumbing.Hash, content []byte) (*object.Tag, error)
- func DecodeTree(hash plumbing.Hash, content []byte) (*object.Tree, error)
- func EncodeSortedTree(entries []entities.FileEntry) ([]byte, error)
- func EncodeTree(entries []entities.FileEntry) ([]byte, error)
- func EncodedObjectHeader(encoded plumbing.EncodedObject) string
- type Commit
- type DeepTreeObject
- type GitBaseObject
- type GitObject
- type Hash
- type ObjectType
- type SymRefObject
- type Tag
- type Tree
Constants ¶
View Source
const (
GitDirName = ".git"
)
Variables ¶
This section is empty.
Functions ¶
func EncodeTree ¶
EncodeTree encodes a list of file entries into ABFS tree format.
func EncodedObjectHeader ¶
func EncodedObjectHeader(encoded plumbing.EncodedObject) string
Types ¶
type Commit ¶
type Commit struct {
GitBaseObject
// contains filtered or unexported fields
}
func (*Commit) MarshalJSON ¶
type DeepTreeObject ¶
type DeepTreeObject struct {
GitBaseObject
entities.DeepTree
}
func (*DeepTreeObject) Encode ¶
func (t *DeepTreeObject) Encode() error
func (*DeepTreeObject) Links ¶
func (t *DeepTreeObject) Links() []Hash
func (*DeepTreeObject) MarshalJSON ¶
func (t *DeepTreeObject) MarshalJSON() ([]byte, error)
type GitBaseObject ¶
func (*GitBaseObject) Base ¶
func (o *GitBaseObject) Base() *GitBaseObject
func (*GitBaseObject) GetEncoded ¶
func (o *GitBaseObject) GetEncoded() []byte
func (*GitBaseObject) GetHash ¶
func (o *GitBaseObject) GetHash() Hash
type GitObject ¶
type GitObject interface {
objects.Object
// JsonMarshal will return the JSON encoded bytes of the object. The object must already
// be decoded, but Encode() does not need to be called first. This exists because directly
// calling json.Marshal on the go-git types does not provide types friendly for JSON consumption
// e.g. plumbing.Hash is a byte array.
MarshalJSON() ([]byte, error)
}
type ObjectType ¶
type ObjectType = entities.ObjectType
const ObjectTypeCommit ObjectType = "commit"
const ObjectTypeDeepTree ObjectType = "deeptree"
const ObjectTypeDir ObjectType = "tree"
const ObjectTypeSymRef ObjectType = "symref"
const ObjectTypeTag ObjectType = "tag"
type SymRefObject ¶
type SymRefObject struct {
GitBaseObject
Content string
}
func (*SymRefObject) Encode ¶
func (t *SymRefObject) Encode() error
func (*SymRefObject) Links ¶
func (t *SymRefObject) Links() []Hash
func (*SymRefObject) MarshalJSON ¶
func (t *SymRefObject) MarshalJSON() ([]byte, error)
type Tag ¶
type Tag struct {
GitBaseObject
// contains filtered or unexported fields
}
func (*Tag) MarshalJSON ¶
type Tree ¶
type Tree struct {
GitBaseObject
// contains filtered or unexported fields
}
func (*Tree) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.