blockmap

package module
v0.0.0-...-2739c2c Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const OutputName string = ".link"

OutputName stores the default file name archive metadata

Variables

This section is empty.

Functions

func Equal

func Equal(a, b *BlockMap) bool

Equal returns an evaluation of the equality of two blockmaps

Types

type BlockMap

type BlockMap struct {
	Archive  archivemap.ArchiveMap `json:"archive"`
	RootHash []byte                `json:"rootHash"`
	Root     string                `json:"root"`
}

BlockMap is a ad-hoc Merkle tree-map

func New

func New(root string) *BlockMap

New returns a new BlockMap initialized at the provided root

func (*BlockMap) Generate

func (b *BlockMap) Generate() error

Generate creates an archive of the provided archives root filesystem

func (*BlockMap) Load

func (b *BlockMap) Load(path string) error

Load reads the blockmap from the default OutputFile

func (BlockMap) PrintBlockMap

func (b BlockMap) PrintBlockMap()

PrintBlockMap prints an existing block map and returns an error if not configured

func (BlockMap) Save

func (b BlockMap) Save(path string) error

Save will store a byte file of the blockmap in the default OutputFile

func (BlockMap) SaveNamed

func (b BlockMap) SaveNamed(path, name string) error

SaveNamed will store a byte file of the blockmap in the named OutputFile

Jump to

Keyboard shortcuts

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