index

package
v0.4.19-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: ISC Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION string = "0.1.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index struct {
	// contains filtered or unexported fields
}

func FromBytes

func FromBytes(data []byte) (*Index, error)

func NewIndex

func NewIndex() (*Index, error)

func (*Index) AddChunk

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

func (*Index) AddObject

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

func (*Index) Checksum

func (i *Index) Checksum() []byte

func (*Index) ChunkExists

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

func (*Index) Close

func (index *Index) Close() error

func (*Index) GetChunkLength

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

func (*Index) LinkPathnameToObject

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

func (*Index) ListChunks

func (index *Index) ListChunks() <-chan [32]byte

func (*Index) ListObjects

func (index *Index) ListObjects() <-chan [32]byte

func (*Index) LookupChunk

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

func (*Index) LookupObject

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

func (*Index) LookupObjectForPathnameChecksum

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

func (*Index) ObjectExists

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

func (*Index) Serialize

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

Jump to

Keyboard shortcuts

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