Documentation ¶
Overview ¶
Package client contains a basic client for the SumDB log.
Index ¶
- Constants
- type Checkpoint
- type Fetcher
- type HTTPFetcher
- type SumDBClient
- func (c *SumDBClient) FullLeavesAtOffset(offset int) ([][]byte, error)
- func (c *SumDBClient) LatestCheckpoint() (*Checkpoint, error)
- func (c *SumDBClient) ParseCheckpointNote(checkpoint []byte) (*Checkpoint, error)
- func (c *SumDBClient) PartialLeavesAtOffset(offset, count int) ([][]byte, error)
- func (c *SumDBClient) TileData(level, offset, partial int) ([]byte, error)
Constants ¶
View Source
const HashLenBytes = 32
HashLenBytes is the number of bytes in the SumDB hashes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checkpoint ¶
Checkpoint is a parsed Checkpoint and the raw bytes that it came from.
type Fetcher ¶
type Fetcher interface { // GetData gets the data at the given path, or returns an error. GetData(path string) ([]byte, error) }
Fetcher gets data paths. This allows impl to be swapped for tests.
type HTTPFetcher ¶
type HTTPFetcher struct {
// contains filtered or unexported fields
}
HTTPFetcher gets the data over HTTP(S).
type SumDBClient ¶
type SumDBClient struct {
// contains filtered or unexported fields
}
SumDBClient provides access to information from the Sum DB.
func (*SumDBClient) FullLeavesAtOffset ¶
func (c *SumDBClient) FullLeavesAtOffset(offset int) ([][]byte, error)
FullLeavesAtOffset gets the Nth chunk of 2**height leaves.
func (*SumDBClient) LatestCheckpoint ¶
func (c *SumDBClient) LatestCheckpoint() (*Checkpoint, error)
LatestCheckpoint gets the freshest Checkpoint.
func (*SumDBClient) ParseCheckpointNote ¶
func (c *SumDBClient) ParseCheckpointNote(checkpoint []byte) (*Checkpoint, error)
ParseCheckpointNote parses a previously acquired raw checkpoint note data.
func (*SumDBClient) PartialLeavesAtOffset ¶
func (c *SumDBClient) PartialLeavesAtOffset(offset, count int) ([][]byte, error)
PartialLeavesAtOffset gets the final tile of incomplete leaves.
Click to show internal directories.
Click to hide internal directories.