Documentation ¶
Index ¶
- type Index
- func (index *Index) AddChunk(chunk *objects.Chunk) uint32
- func (index *Index) AddObject(object *objects.Object) uint32
- func (index *Index) ChecksumToId(checksum [32]byte) (uint32, bool)
- func (index *Index) ChunkExists(checksum [32]byte) bool
- func (index *Index) GetObject(checksum [32]byte) *objects.Object
- func (index *Index) IdToChecksum(checksumID uint32) ([32]byte, bool)
- func (index *Index) LinkPathnameToObject(pathnameChecksum [32]byte, object *objects.Object)
- func (index *Index) ListChunks() [][32]byte
- func (index *Index) ListObjects() [][32]byte
- func (index *Index) LookupChunk(checksum [32]byte) *objects.Chunk
- func (index *Index) LookupObject(checksum [32]byte) *objects.Object
- func (index *Index) LookupObjectForPathnameChecksum(pathnameChecksum [32]byte) *objects.Object
- func (index *Index) ObjectExists(checksum [32]byte) bool
- func (index *Index) Serialize() ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct { Checksums map[[32]byte]uint32 PathnameToObject map[uint32]uint32 Objects map[uint32][]uint32 Chunks map[uint32]uint32 // contains filtered or unexported fields }
func NewIndexFromBytes ¶
func (*Index) ChunkExists ¶
func (*Index) LinkPathnameToObject ¶
func (*Index) ListChunks ¶
func (*Index) ListObjects ¶
func (*Index) LookupObjectForPathnameChecksum ¶
func (*Index) ObjectExists ¶
Click to show internal directories.
Click to hide internal directories.