Documentation ¶
Index ¶
- Constants
- Variables
- func Byte2String(b []byte) string
- func GenSHA1(in io.Reader, objType string) ([]byte, error)
- func GetArgInputFile() (*os.File, error)
- func GetTotalCount(in io.ReadSeeker) (uint, error)
- func InitAt(root string, bare bool) error
- func ReadObjectType(in *os.File) (int, string, error)
- func ReadUint32(in io.Reader) (uint32, error)
- func SplitTwoAndTrim(s string, sep string) (string, string)
- func Unzlib(in io.Reader, out io.Writer) error
- func UnzlibToBuffer(in io.Reader) ([]byte, error)
- func Zlib(in io.Reader, out io.Writer) error
- type ByOffset
- type Commit
- type CommitFields
- type Index
- type IndexEntry
- type IndexHeader
- type Object
- type ObjectType
- type PackIndex
- type PackedObject
- type Person
- type Reference
- type Repository
- func (r *Repository) IsBare() bool
- func (r *Repository) LookupCommit(sha string) (*Commit, error)
- func (r *Repository) LooseObjPath(sha string) string
- func (r *Repository) LooseObjects() ([]string, error)
- func (r *Repository) Path() string
- func (r *Repository) References() ([]Reference, error)
- func (r *Repository) WorkDir() string
- type Tag
- type TagFields
- type Tree
- type TreeItem
Constants ¶
View Source
const ( COMMIT TREE BLOB TAG OFS_DELTA REF_DELTA )
Variables ¶
View Source
var BLOB_DATA = []byte{}/* 114 elements not displayed */
View Source
var COMMIT_DATA = []byte{}/* 232 elements not displayed */
View Source
var COMMIT_DATA_WP = []byte{}/* 328 elements not displayed */
View Source
var PACK_DATA = []byte{}/* 9266 elements not displayed */
View Source
var PACK_IDX_DATA = []byte{}/* 3172 elements not displayed */
View Source
var TAG_DATA = []byte{}/* 232 elements not displayed */
View Source
var TREE_DATA = []byte{}/* 136 elements not displayed */
Functions ¶
func Byte2String ¶
func GetArgInputFile ¶
func GetTotalCount ¶
func GetTotalCount(in io.ReadSeeker) (uint, error)
Types ¶
type CommitFields ¶
func (CommitFields) ToCommit ¶
func (cf CommitFields) ToCommit() *Commit
type Index ¶
type Index struct { Header IndexHeader Entries []IndexEntry }
func ParseIndex ¶
func ParseIndex(in io.ReadSeeker) (Index, error)
type IndexEntry ¶
type IndexEntry struct { CtimeSecs uint32 CtimeNanoSecs uint32 MtimeSecs uint32 MtimeNanoSecs uint32 Dev uint32 Ino uint32 ObjectType int UnixPermission int Uid uint32 Gid uint32 FileSize int Hash []byte Flags []byte AdditionalFlag []byte EntryPathName string Padding []byte }
func (IndexEntry) String ¶
func (e IndexEntry) String() string
type IndexHeader ¶
func (IndexHeader) String ¶
func (hdr IndexHeader) String() string
type ObjectType ¶
type ObjectType int
func (ObjectType) String ¶
func (t ObjectType) String() string
type PackIndex ¶
func GetAllPackedIndex ¶
func GetAllPackedIndex(in io.ReadSeeker) ([]PackIndex, error)
func GetObjectForHash ¶
func GetObjectForHash(hash string, in io.ReadSeeker) (PackIndex, error)
func ReadPackIndexAt ¶
func ReadPackIndexAt(indexAt int, in io.ReadSeeker) (PackIndex, error)
func (PackIndex) CRCAsString ¶
func (PackIndex) HashAsString ¶
type PackedObject ¶
type PackedObject struct { Type ObjectType Data []byte HashOfRef []byte RefOffset int64 Size int64 StartOffset int64 DeltaData []byte ActualType ObjectType Hash []byte RefLevel int BaseHash []byte }
func ReadPackedObjectAtOffset ¶
func ReadPackedObjectAtOffset(offset int64, in io.ReadSeeker, inIndex io.ReadSeeker) (PackedObject, error)
func (PackedObject) String ¶
func (o PackedObject) String() string
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(path string) (*Repository, error)
func (*Repository) IsBare ¶
func (r *Repository) IsBare() bool
func (*Repository) LookupCommit ¶
func (r *Repository) LookupCommit(sha string) (*Commit, error)
func (*Repository) LooseObjPath ¶
func (r *Repository) LooseObjPath(sha string) string
func (*Repository) LooseObjects ¶
func (r *Repository) LooseObjects() ([]string, error)
func (*Repository) Path ¶
func (r *Repository) Path() string
func (*Repository) References ¶
func (r *Repository) References() ([]Reference, error)
func (*Repository) WorkDir ¶
func (r *Repository) WorkDir() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.