Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FindObjectResult ¶
type IndexFile ¶
type IndexFile struct {
ObjectCount int
ObjectMap []map[Hash]int
ObjectCRCs []uint32
ObjectOffsets []int64
PackChecksum Hash
IndexChecksum Hash
}
IndexFile holds the parsed data from a .idx file
func NewIndexFile ¶
func NewIndexFile() *IndexFile
func ParseIndex ¶
func ParseIndexFile ¶
func (*IndexFile) FindObject ¶
func (idx *IndexFile) FindObject(oid Hash) (result FindObjectResult, found bool)
type ObjectType ¶
type ObjectType uint8
const ( ObjectCommit ObjectType = 1 ObjectTree ObjectType = 2 ObjectBlob ObjectType = 3 ObjectTag ObjectType = 4 ObjectOfsDelta ObjectType = 6 ObjectRefDelta ObjectType = 7 )
func (ObjectType) String ¶
func (t ObjectType) String() string
type Pack ¶
type Pack struct {
// contains filtered or unexported fields
}
func (*Pack) OpenObject ¶
func (p *Pack) OpenObject(oid Hash) (io.ReadCloser, error)
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func Open ¶
func Open(repoPath string) (*Repository, error)
func (*Repository) Close ¶
func (r *Repository) Close() error
func (*Repository) OpenObject ¶
func (r *Repository) OpenObject(oid Hash) (io.ReadCloser, error)
type ResolvedObject ¶
type ResolvedObject struct {
Type ObjectType
Data []byte
}
Click to show internal directories.
Click to hide internal directories.