index

package
v0.4.16-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2023 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION string = "0.0.1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index struct {
	PathnameToObjectList  []uint32
	PathnamesChecksumList [][32]byte

	ObjectsList         [][]uint32
	ObjectsChecksumList [][32]byte

	ChunksList         []uint32
	ChunksChecksumList [][32]byte
	// contains filtered or unexported fields
}

func NewIndex

func NewIndex() *Index

func NewIndexFromBytes

func NewIndexFromBytes(serialized []byte) (*Index, error)

func (*Index) AddChunk

func (index *Index) AddChunk(chunk *objects.Chunk)

Public

func (*Index) AddObject

func (index *Index) AddObject(object *objects.Object)

func (*Index) ChunkExists

func (index *Index) ChunkExists(checksum [32]byte) bool

func (*Index) GetChunkLength

func (index *Index) GetChunkLength(checksum [32]byte) (uint32, bool)

func (*Index) LinkPathnameToObject

func (index *Index) LinkPathnameToObject(pathnameChecksum [32]byte, object *objects.Object)

func (*Index) ListChunks

func (index *Index) ListChunks() [][32]byte

func (*Index) ListObjects

func (index *Index) ListObjects() [][32]byte

func (*Index) LookupChunk

func (index *Index) LookupChunk(checksum [32]byte) *objects.Chunk

func (*Index) LookupObject

func (index *Index) LookupObject(checksum [32]byte) *objects.Object

func (*Index) LookupObjectForPathnameChecksum

func (index *Index) LookupObjectForPathnameChecksum(pathnameChecksum [32]byte) *objects.Object

func (*Index) ObjectExists

func (index *Index) ObjectExists(checksum [32]byte) bool

func (*Index) Serialize

func (index *Index) Serialize() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL