config

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package config defines configuration used by Nym verifier.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Verifier *Verifier
	Logging  *Logging
	Debug    *Debug
}

Config is the top level Nym verifier configuration.

func LoadBinary

func LoadBinary(b []byte) (*Config, error)

LoadBinary loads, parses and validates the provided buffer b (as a config) and returns the Config.

func LoadFile

func LoadFile(f string) (*Config, error)

LoadFile loads, parses and validates the provided file and returns the Config.

type Debug

type Debug struct {
	// NumJobWorkers specifies the number of worker instances to use for jobpacket processing.
	NumJobWorkers int

	// NumServerWorkers specifies the number of concurrent worker instances
	// to use when processing verification requests.
	NumServerWorkers int
}

Debug is the Nym verifier debug configuration.

type Logging

type Logging struct {
	// Disable disables logging entirely.
	Disable bool

	// File specifies the log file, if omitted stdout will be used.
	File string

	// Level specifies the log level.
	Level string
}

Logging is the Nym verifier logging configuration.

type Verifier

type Verifier struct {
	// Identifier is the human readable identifier for the node.
	Identifier string

	// KeyFile defines path to file containing ECDSA private key of the verifier.
	KeyFile string

	// DataDir specifies path to a .db file holding relevant server-specific persistent data.
	DataDir string

	// MaximumAttributes specifies the maximum number of attributes the system supports.
	MaximumAttributes int

	// BlockchainNodeAddresses specifies addresses of a blockchain nodes
	// to which the issuer should send all relevant requests.
	// Note that only a single request will ever be sent, but multiple addresses are provided in case
	// the particular node was unavailable.
	BlockchainNodeAddresses []string

	// IAAddresses are the IP address:port combinations of all Authority Servers.
	// Only required if IAVerificationKeys is not specified.
	IAAddresses []string

	// IAVerificationKeys specifies files containing Coconut Verification keys of all Issuing Authorities.
	IAVerificationKeys []string

	// Threshold defines the threshold parameter of the system indicating number of keys needed for aggregation.
	Threshold int
}

Verifier is the main Nym verifier configuration.

Jump to

Keyboard shortcuts

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