Documentation ¶
Index ¶
- Constants
- func ReadGitVLQ(in io.Reader) (int64, error)
- func ReadSimple7bitsInt(in io.Reader) (int64, error)
- type CheckFlag
- type EntityFile
- func (inst *EntityFile) Check(flags CheckFlag) error
- func (inst *EntityFile) GetPackID() git.PackID
- func (inst *EntityFile) Init(file *File) error
- func (inst *EntityFile) Load() error
- func (inst *EntityFile) OpenObjectReader(item *git.PackIndexItem, pool afs.ReaderPool) (*git.PackedObjectHeaderEx, io.ReadCloser, error)
- func (inst *EntityFile) ReadObjectHeader(item *git.PackIndexItem, pool afs.ReaderPool) (*git.PackedObjectHeaderEx, error)
- func (inst *EntityFile) Reload() error
- type File
- type FileType
- type Idx
- type Pack
Constants ¶
View Source
const (
MagicNumberIdxV2 = 0xff744f63 // aka `\xfftOc`
)
定义魔数
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EntityFile ¶
type EntityFile struct {
// contains filtered or unexported fields
}
EntityFile ...
func (*EntityFile) OpenObjectReader ¶
func (inst *EntityFile) OpenObjectReader(item *git.PackIndexItem, pool afs.ReaderPool) (*git.PackedObjectHeaderEx, io.ReadCloser, error)
OpenObjectReader ...
func (*EntityFile) ReadObjectHeader ¶
func (inst *EntityFile) ReadObjectHeader(item *git.PackIndexItem, pool afs.ReaderPool) (*git.PackedObjectHeaderEx, error)
ReadObjectHeader ...
type File ¶
type File struct { Digest git.Digest Compression git.Compression Pool afs.ReaderPool Path afs.Path Type FileType }
File ...
type Idx ¶
type Idx interface { Load() error Reload() error Check(flags CheckFlag) error GetPackID() git.PackID Find(oid git.ObjectID) (*git.PackIndexItem, error) Count() int64 GetItem(index int64) (*git.PackIndexItem, error) GetItems(index int64, limit int) ([]*git.PackIndexItem, error) }
Idx 表示一个 pack-*.idx 文件
type Pack ¶
type Pack interface { Load() error Reload() error Check(flags CheckFlag) error GetPackID() git.PackID // 如果 pool 参数为 nil, 则使用内部的 pool 提供数据来源 OpenObjectReader(item *git.PackIndexItem, pool afs.ReaderPool) (*git.PackedObjectHeaderEx, io.ReadCloser, error) // 如果 pool 参数为 nil, 则使用内部的 pool 提供数据来源 ReadObjectHeader(item *git.PackIndexItem, pool afs.ReaderPool) (*git.PackedObjectHeaderEx, error) }
Pack 表示一个 pack-*.pack 文件
Click to show internal directories.
Click to hide internal directories.