config

package
v0.0.0-...-2e1c697 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package config holds code related to configuring witnesses.

Package config holds code related to configuring witnesses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	// VKey is the serialised note-compliant vkey for the log.
	VKey string
	// Verifier is a signature verifier for log checkpoints.
	Verifier note.Verifier
	// Origin is the expected first line of checkpoints from the log.
	Origin string
	// QPD is the expected number of witness requests per day from the log.
	QPD float64
	// Contact is an arbitrary string with contact information for the log operator.
	Contact string
	// URL is the URL of the root of the log.
	URL string
}

Log describes a verifiable log.

func FetchPublicConfig

func FetchPublicConfig(ctx context.Context, opts PublicFetchOpts) ([]Log, error)

func ParsePublicWitnessConfig

func ParsePublicWitnessConfig(r io.Reader) ([]Log, error)

ParsePublicWitnessConfig implements a parser for the public witness config format.

The format is described here: https://github.com/transparency-dev/witness-network/blob/main/log-list-format.md

type PublicFetchOpts

type PublicFetchOpts struct {
	// Client is the HTTP client to be used, if unset uses http.DefaultClient.
	Client *http.Client
	// URL is the URL of the config file.
	URL string
}

PublicFetchOpts holds options to be used when fetching the public witness network config.

Jump to

Keyboard shortcuts

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