Documentation ¶
Index ¶
- Constants
- func ReadObjectFile(path string) (data []byte, err error)
- type Blob
- type Commit
- type Index
- type Object
- type ObjectType
- type Oid
- type Reference
- type Repository
- func (repos *Repository) GetBranch() string
- func (repos *Repository) GetCommit() (*Commit, error)
- func (repos *Repository) GetOrigin() string
- func (repos *Repository) LookupBlob(oid *Oid) (*Blob, error)
- func (repos *Repository) LookupCommit(oid *Oid) (*Commit, error)
- func (repos *Repository) LookupReference(name string) (*Reference, error)
- func (repos *Repository) LookupTag(oid *Oid) (*Tag, error)
- func (repos *Repository) LookupTree(oid *Oid) (*Tree, error)
- type Signature
- type Tag
- type TagType
- type Tree
- type TreeEntry
- type TreeWalkCallback
Constants ¶
View Source
const ( GT = '>' LT = '<' SP = ' ' NL = '\n' )
View Source
const ( FileModeBlob = 0100644 FileModeBlobExec = 0100755 FileModeSymlink = 0120000 FileModeCommit = 0160000 FileModeTree = 0040000 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Blob ¶
type Blob struct {
// contains filtered or unexported fields
}
type Commit ¶
type Index ¶ added in v0.0.4
type Index struct {
// contains filtered or unexported fields
}
type Object ¶
type Object struct { Type ObjectType Oid *Oid }
type ObjectType ¶
type ObjectType int
const ( ObjectCommit ObjectType = 0x10 ObjectTree ObjectType = 0x20 ObjectBlob ObjectType = 0x30 ObjectTag ObjectType = 0x40 )
func (ObjectType) String ¶
func (t ObjectType) String() string
type Reference ¶
type Repository ¶
type Repository struct { Path string // contains filtered or unexported fields }
func OpenRepository ¶
func OpenRepository(path string) (*Repository, error)
func (*Repository) GetBranch ¶ added in v0.0.2
func (repos *Repository) GetBranch() string
func (*Repository) GetCommit ¶ added in v0.0.2
func (repos *Repository) GetCommit() (*Commit, error)
func (*Repository) GetOrigin ¶ added in v0.0.2
func (repos *Repository) GetOrigin() string
func (*Repository) LookupBlob ¶
func (repos *Repository) LookupBlob(oid *Oid) (*Blob, error)
func (*Repository) LookupCommit ¶
func (repos *Repository) LookupCommit(oid *Oid) (*Commit, error)
func (*Repository) LookupReference ¶
func (repos *Repository) LookupReference(name string) (*Reference, error)
func (*Repository) LookupTag ¶
func (repos *Repository) LookupTag(oid *Oid) (*Tag, error)
func (*Repository) LookupTree ¶
func (repos *Repository) LookupTree(oid *Oid) (*Tree, error)
type Tag ¶
type Tree ¶
type Tree struct { Oid *Oid // contains filtered or unexported fields }
func (*Tree) Walk ¶
func (tree *Tree) Walk(callback TreeWalkCallback) error
type TreeEntry ¶
type TreeEntry struct { Filemode int Name string Type ObjectType Oid *Oid }
Click to show internal directories.
Click to hide internal directories.