impl

package
v0.0.0-...-f9def7f Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package impl is the implementation of the witness server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogIDFromPubKey

func LogIDFromPubKey(pk string) (string, error)

LogIDFromPubKey builds the logID given the base64-encoded public key.

func Main

func Main(ctx context.Context, opts ServerOpts) error

Main sets up and runs the witness given the options.

Types

type LogConfig

type LogConfig struct {
	Logs []LogInfo `yaml:"Logs"`
}

LogConfig contains a list of LogInfo (configuration options for a log).

type LogInfo

type LogInfo struct {
	PubKey string `yaml:"PubKey"`
}

LogInfo contains the configuration options for a log, which is just its public key.

type ServerOpts

type ServerOpts struct {
	// Where to listen for requests.
	ListenAddr string
	// The file for sqlite3 storage.
	DBFile string
	// The signing key for the witness.
	PrivKey string
	// The log configuration information.
	Config LogConfig
}

ServerOpts provides the options for a server (specified in main.go).

Jump to

Keyboard shortcuts

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