Documentation ¶
Overview ¶
Package config implements the configuration for the Katzenpost client.
Index ¶
- type Account
- type Config
- func (c *Config) FixupAndMinimallyValidate() error
- func (c *Config) FixupAndValidate() error
- func (c *Config) NewPKIClient(l *log.Backend, pCfg *proxy.Config) (mpki.Client, error)
- func (c *Config) SaveConfig(fileName string) error
- func (c *Config) UpdateTrust() error
- func (c *Config) UpstreamProxyConfig() *proxy.Config
- type Debug
- type Katzenmint
- type Logging
- type Panda
- type Registration
- type Reunion
- type UpstreamProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { // User is the account user name. User string // Provider is the provider identifier used by this account. Provider string // ProviderKeyPin is the optional pinned provider signing key. ProviderKeyPin *eddsa.PublicKey }
Account is a provider account configuration.
type Config ¶
type Config struct { Logging *Logging UpstreamProxy *UpstreamProxy Debug *Debug Katzenmint *Katzenmint Account *Account Registration *Registration Panda *Panda Reunion *Reunion // contains filtered or unexported fields }
Config is the top level client configuration.
func Load ¶
Load parses and validates the provided buffer b as a config file body and returns the Config.
func (*Config) FixupAndMinimallyValidate ¶
FixupAndMinimallyValidate applies defaults to config entries and validates the all but the Account and Registration configuration sections.
func (*Config) FixupAndValidate ¶
FixupAndValidate applies defaults to config entries and validates the supplied configuration. Most people should call one of the Load variants instead.
func (*Config) NewPKIClient ¶
NewPKIClient returns a katzenmint implementation of pkiclient or error
func (*Config) SaveConfig ¶
func (*Config) UpdateTrust ¶
func (*Config) UpstreamProxyConfig ¶
UpstreamProxyConfig returns the configured upstream proxy, suitable for internal use. Most people should not use this.
type Debug ¶
type Debug struct { DisableDecoyTraffic bool // SessionDialTimeout is the number of seconds that a session dial // is allowed to take until it is canceled. SessionDialTimeout int // InitialMaxPKIRetrievalDelay is the initial maximum number of seconds // we are willing to wait for the retreival of the PKI document. InitialMaxPKIRetrievalDelay int // CaseSensitiveUserIdentifiers disables the forced lower casing of // the Account `User` field. CaseSensitiveUserIdentifiers bool // PollingInterval is the interval in seconds that will be used to // poll the receive queue. By default this is 10 seconds. Reducing // the value too far WILL result in unnecessary Provider load, and // increasing the value too far WILL adversely affect large message // transmit performance. PollingInterval int // PreferedTransports is a list of the transports will be used to make // outgoing network connections, with the most prefered first. PreferedTransports []cpki.Transport }
Debug is the debug configuration.
type Katzenmint ¶
type Katzenmint struct { ChainID string TrustOptions light.TrustOptions PrimaryAddress string WitnessesAddresses []string DatabaseName string DatabaseDir string RPCAddress string }
Katzenmint is a tendermint client 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 logging configuration.
type Panda ¶
type Panda struct { // Receiver is the recipient ID that shall receive the Sphinx packets destined // for this PANDA service. Receiver string // Provider is the Provider on this mix network which is hosting this PANDA service. Provider string // BlobSize is the size of the PANDA blobs that clients will use. BlobSize int }
Panda is the PANDA configuration needed by clients in order to use the PANDA service
type Registration ¶
type Registration struct { Address string Options *registration.Options }
Registration is used for the client's Provider account registration.
type Reunion ¶
type Reunion struct { // Enable indicates that the reunion protocol should be used Enable bool }
Reunion is the Reunion configuration needed by clients in order to use the Reunion service
type UpstreamProxy ¶
type UpstreamProxy struct { // Type is the proxy type (Eg: "none"," socks5"). Type string // Network is the proxy address' network (`unix`, `tcp`). Network string // Address is the proxy's address. Address string // User is the optional proxy username. User string // Password is the optional proxy password. Password string }
UpstreamProxy is the outgoing connection proxy configuration.