Documentation ¶
Index ¶
- Constants
- func CommittedFiles(sha []byte) ([]*gfs.File, error)
- func ObjectReadCloser(sha []byte) func() (io.ReadCloser, error)
- func ReadHeadBytes(r io.ReadCloser, obj *Object) error
- func WriteCommit(c *Commit) ([]byte, error)
- func WriteObject(header []byte, content []byte, contentFile string, path string) ([]byte, error)
- type Commit
- type Object
- type Tree
- type TreeItem
Constants ¶
View Source
const ( ObjectInvalid objectType = iota ObjectBlob ObjectTree ObjectCommit )
Variables ¶
This section is empty.
Functions ¶
func ObjectReadCloser ¶
func ObjectReadCloser(sha []byte) func() (io.ReadCloser, error)
func ReadHeadBytes ¶
func ReadHeadBytes(r io.ReadCloser, obj *Object) error
func WriteCommit ¶
Types ¶
type Commit ¶
type Commit struct { Sha []byte Tree []byte Parents [][]byte Author string AuthorEmail string AuthoredTime time.Time Committer string CommitterEmail string CommittedTime time.Time Sig []byte Message []byte }
func ReadCommit ¶
type Object ¶
type Object struct { Path string Typ objectType Sha []byte Objects []*Object Length int HeaderLength int ReadCloser func() (io.ReadCloser, error) }
func ReadObject ¶
func ReadObjectTree ¶
ReadObjectTree reads an object from the object store
func WriteBlob ¶
WriteBlob writes a file to the object store as a blob and returns a Blob Object representation.
func (*Object) FlattenTree ¶
FlattenTree turns a TreeObject structure into a flat list of file paths
Click to show internal directories.
Click to hide internal directories.