Versions in this module Expand all Collapse all v5 v5.4.3 Mar 19, 2022 Changes in this version + var ErrInvalidType = errors.New("invalid object type") + var ErrObjectNotFound = errors.New("object not found") + var ErrReferenceNotFound = errors.New("reference not found") + var RefRevParseRules = []string + func HashesSort(a []Hash) + func IsHash(s string) bool + type DeltaObject interface + ActualHash func() Hash + ActualSize func() int64 + BaseHash func() Hash + type EncodedObject interface + Hash func() Hash + Reader func() (io.ReadCloser, error) + SetSize func(int64) + SetType func(ObjectType) + Size func() int64 + Type func() ObjectType + Writer func() (io.WriteCloser, error) + type Hash [20]byte + var ZeroHash Hash + func ComputeHash(t ObjectType, content []byte) Hash + func NewHash(s string) Hash + func (h Hash) IsZero() bool + func (h Hash) String() string + type HashSlice []Hash + func (p HashSlice) Len() int + func (p HashSlice) Less(i, j int) bool + func (p HashSlice) Swap(i, j int) + type Hasher struct + func NewHasher(t ObjectType, size int64) Hasher + func (h Hasher) Sum() (hash Hash) + type MemoryObject struct + func (o *MemoryObject) Close() error + func (o *MemoryObject) Hash() Hash + func (o *MemoryObject) Reader() (io.ReadCloser, error) + func (o *MemoryObject) SetSize(s int64) + func (o *MemoryObject) SetType(t ObjectType) + func (o *MemoryObject) Size() int64 + func (o *MemoryObject) Type() ObjectType + func (o *MemoryObject) Write(p []byte) (n int, err error) + func (o *MemoryObject) Writer() (io.WriteCloser, error) + type ObjectType int8 + const AnyObject + const BlobObject + const CommitObject + const InvalidObject + const OFSDeltaObject + const REFDeltaObject + const TagObject + const TreeObject + func ParseObjectType(value string) (typ ObjectType, err error) + func (t ObjectType) Bytes() []byte + func (t ObjectType) IsDelta() bool + func (t ObjectType) String() string + func (t ObjectType) Valid() bool + type PermanentError struct + Err error + func NewPermanentError(err error) *PermanentError + func (e *PermanentError) Error() string + type Reference struct + func NewHashReference(n ReferenceName, h Hash) *Reference + func NewReferenceFromStrings(name, target string) *Reference + func NewSymbolicReference(n, target ReferenceName) *Reference + func (r *Reference) Hash() Hash + func (r *Reference) Name() ReferenceName + func (r *Reference) String() string + func (r *Reference) Strings() [2]string + func (r *Reference) Target() ReferenceName + func (r *Reference) Type() ReferenceType + type ReferenceName string + const HEAD + const Master + func NewBranchReferenceName(name string) ReferenceName + func NewNoteReferenceName(name string) ReferenceName + func NewRemoteHEADReferenceName(remote string) ReferenceName + func NewRemoteReferenceName(remote, name string) ReferenceName + func NewTagReferenceName(name string) ReferenceName + func (r ReferenceName) IsBranch() bool + func (r ReferenceName) IsNote() bool + func (r ReferenceName) IsRemote() bool + func (r ReferenceName) IsTag() bool + func (r ReferenceName) Short() string + func (r ReferenceName) String() string + type ReferenceType int8 + const HashReference + const InvalidReference + const SymbolicReference + func (r ReferenceType) String() string + type Revision string + func (r Revision) String() string + type UnexpectedError struct + Err error + func NewUnexpectedError(err error) *UnexpectedError + func (e *UnexpectedError) Error() string Other modules containing this package github.com/smallcase/go-git