config

package
v0.0.0-...-b5aa0b6 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2017 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package config contains JSON structs for encoding information about Roughtime servers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain struct {
	Links []Link `json:"links"`
}

Chain represents a history of Roughtime queries where each provably follows the previous one.

type Link struct {
	// PublicKeyType specifies the type of public key contained in
	// |PublicKey|. See the same field in |Server| for details.
	PublicKeyType string `json:"publicKeyType"`
	PublicKey     []byte `json:"serverPublicKey"`
	// NonceOrBlind contains either the full nonce (only for the first
	// |Link| in a |Chain|) or else contains a blind value that is combined
	// with the previous reply to make the next nonce. In either case, the
	// value is 64 bytes long.
	NonceOrBlind []byte `json:"nonceOrBlind"`
	// Reply contains the reply from the server.
	Reply []byte `json:"reply"`
}

Link represents an entry in a Chain.

type Server

type Server struct {
	Name string `json:"name"`
	// PublicKeyType specifies the type of the public key contained in
	// |PublicKey|. Normally this will be "ed25519" but implementations
	// should ignore entries with unknown key types.
	PublicKeyType string          `json:"publicKeyType"`
	PublicKey     []byte          `json:"publicKey"`
	Addresses     []ServerAddress `json:"addresses"`
}

Server represents a Roughtime server in a JSON configuration.

type ServerAddress

type ServerAddress struct {
	Protocol string `json:"protocol"`
	// Address contains a protocol specific address. For the protocol
	// "udp", the address has the form "host:port" where host is either a
	// DNS name, an IPv4 literal, or an IPv6 literal in square brackets.
	Address string `json:"address"`
}

ServerAddress represents the address of a Roughtime server in a JSON configuration.

type ServersJSON

type ServersJSON struct {
	Servers []Server `json:"servers"`
}

ServersJSON represents a JSON format for distributing information about Roughtime servers.

Jump to

Keyboard shortcuts

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