Documentation
¶
Index ¶
- func ObjectFind(gitRepo *repo.GitRepository, name, objType string, follow bool) (string, error)
- func ObjectHash(fd io.Reader, objType string, gitRepo *repo.GitRepository) (string, error)
- func ObjectWrite(obj GitObject, gitRepo *repo.GitRepository) (string, error)
- func TreeToMap(gitRepo *repo.GitRepository, ref, prefix string) (map[string]string, error)
- type GitBlob
- type GitCommit
- type GitObject
- type GitTag
- type GitTree
- type GitTreeLeaf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ObjectFind ¶
ObjectFind resolves a name and optionally follows it to the desired object type.
func ObjectHash ¶
ObjectHash hashes an object from a reader.
func ObjectWrite ¶
func ObjectWrite(obj GitObject, gitRepo *repo.GitRepository) (string, error)
ObjectWrite writes a GitObject to the repository.
Types ¶
type GitBlob ¶
type GitBlob struct {
// contains filtered or unexported fields
}
GitBlob represents a blob object.
func (*GitBlob) Deserialize ¶
type GitObject ¶
type GitObject interface {
Serialize() ([]byte, error)
Deserialize(data []byte) error
Type() string
}
GitObject defines the interface for all git objects.
func ObjectRead ¶
func ObjectRead(gitRepo *repo.GitRepository, sha string) (GitObject, error)
ObjectRead reads an object from the repository.
type GitTree ¶
type GitTree struct {
Items []GitTreeLeaf
}
GitTree represents a tree object.
func (*GitTree) Deserialize ¶
type GitTreeLeaf ¶
GitTreeLeaf represents a single entry in a tree object.
Click to show internal directories.
Click to hide internal directories.