sumdb

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package sumdb contains a client for the Go checksum database

Index

Constants

View Source
const (
	TileSize       = 8
	RecordsPerTile = 1 << TileSize
)

Variables

This section is empty.

Functions

func DownloadRecords

func DownloadRecords(ctx context.Context, address string, begin, end uint64, recordsOut chan<- *Record) error

Types

type Record

type Record struct {
	Module       string
	Version      string
	SourceSHA256 []byte
	GomodSHA256  []byte
}

func ParseRecord

func ParseRecord(input []byte) (*Record, error)

func (*Record) Format

func (record *Record) Format() []byte

func (*Record) Hash

func (record *Record) Hash() merkletree.Hash

type STH

type STH struct {
	TreeSize  uint64
	RootHash  merkletree.Hash
	Signature []byte
}

func DownloadAndAuthenticateSTH

func DownloadAndAuthenticateSTH(ctx context.Context, address string, key []byte) (*STH, error)

func ParseAndAuthenticateSTH

func ParseAndAuthenticateSTH(input []byte, address string, key []byte) (*STH, error)

func ParseSTH

func ParseSTH(input []byte, address string) (*STH, error)

func (*STH) Authenticate

func (sth *STH) Authenticate(key []byte) error

func (*STH) Format

func (sth *STH) Format(address string) string

Jump to

Keyboard shortcuts

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