api

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package api contains the tiles definitions from the tlog-tiles API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntryBundle

type EntryBundle struct {
	// Entries stores the leaf entries of the log, in order.
	Entries [][]byte
}

EntryBundle represents a sequence of entries in the log. These entries correspond to a leaf tile in the hash tree.

func (*EntryBundle) UnmarshalText

func (t *EntryBundle) UnmarshalText(raw []byte) error

UnmarshalText implements encoding/TextUnmarshaler and reads EntryBundles which are encoded using the tlog-tiles spec.

type HashTile

type HashTile struct {
	// Nodes stores the leaf hash nodes in this tile.
	// Note that only non-ephemeral nodes are stored.
	Nodes [][]byte
}

HashTile represents a tile within the Merkle hash tree. Leaf HashTiles will have a corresponding EntryBundle, where each entry in the EntryBundle slice hashes to the value at the same index in the Nodes slice.

func (HashTile) MarshalText

func (t HashTile) MarshalText() ([]byte, error)

MarshalText implements encoding/TextMarshaller and writes out an HashTile instance as sequences of concatenated hashes as specified by the tlog-tiles spec.

func (*HashTile) UnmarshalText

func (t *HashTile) UnmarshalText(raw []byte) error

UnmarshalText implements encoding/TextUnmarshaler and reads HashTiles which are encoded using the tlog-tiles spec.

Directories

Path Synopsis
Package layout contains routines for specifying the path layout of Tessera logs, which is really to say that it provides functions to calculate paths used by the [tlog-tiles API].
Package layout contains routines for specifying the path layout of Tessera logs, which is really to say that it provides functions to calculate paths used by the [tlog-tiles API].

Jump to

Keyboard shortcuts

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