Documentation
¶
Index ¶
- Constants
- Variables
- func EncodePointer(writer io.Writer, pointer *Pointer) (int, error)
- func EncodeSimple(oid string, size int64) string
- func IsBadPointerKeyError(err error) bool
- func IsNewNotAPointerError(err error) bool
- func NewBadPointerKeyError(message string) error
- func NewNotAPointerError(message string) error
- type ByPriority
- type Pointer
- func Decode(buf []byte) (*Pointer, error)
- func DecodeFrom(reader io.Reader) (*Pointer, io.Reader, error)
- func DecodePointer(reader io.Reader) (*Pointer, error)
- func DecodePointerFromBlob(b *gitobj.Blob) (*Pointer, error)
- func EmptyPointer() *Pointer
- func NewPointer(oid string, size int64, exts []*PointerExtension) *Pointer
- type PointerExtension
Constants ¶
View Source
const (
PointerMIME = "text/vnd.git-lfs"
)
Variables ¶
View Source
var (
EmptyObjectSHA256 = hex.EncodeToString(sha256.New().Sum(nil))
)
Functions ¶
func EncodeSimple ¶
func IsBadPointerKeyError ¶
func IsNewNotAPointerError ¶
func NewBadPointerKeyError ¶
func NewNotAPointerError ¶
Types ¶
type ByPriority ¶
type ByPriority []*PointerExtension
func (ByPriority) Len ¶
func (p ByPriority) Len() int
func (ByPriority) Less ¶
func (p ByPriority) Less(i, j int) bool
func (ByPriority) Swap ¶
func (p ByPriority) Swap(i, j int)
type Pointer ¶
type Pointer struct {
Version string
Oid string
Size int64
OidType string
Extensions []*PointerExtension
Canonical bool
}
func DecodeFrom ¶
DecodeFrom decodes an *lfs.Pointer from the given io.Reader, "reader". If the pointer encoded in the reader could successfully be read and decoded, it will be returned with a nil error.
If the pointer could not be decoded, an io.Reader containing the entire blob's data will be returned, along with a parse error.
func EmptyPointer ¶
func EmptyPointer() *Pointer
func NewPointer ¶
func NewPointer(oid string, size int64, exts []*PointerExtension) *Pointer
type PointerExtension ¶
A PointerExtension is parsed from the Git LFS Pointer file.
func NewPointerExtension ¶
func NewPointerExtension(name string, priority int, oid string) *PointerExtension
Click to show internal directories.
Click to hide internal directories.