config

package
v0.0.0-...-e707d1a Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callbacks

type Callbacks struct {
	Sanctions string `valid:"optional"`
	AskUser   string `valid:"optional" toml:"ask_user"`
	FetchInfo string `valid:"optional" toml:"fetch_info"`
	TxStatus  string `valid:"optional" toml:"tx_status"`
}

Callbacks contains values of `callbacks` config group

type Config

type Config struct {
	ExternalPort      *int          `valid:"required" toml:"external_port"`
	InternalPort      *int          `valid:"required" toml:"internal_port"`
	LogFormat         string        `valid:"optional" toml:"log_format"`
	NeedsAuth         bool          `valid:"optional" toml:"needs_auth"`
	NetworkPassphrase string        `valid:"required" toml:"network_passphrase"`
	Database          Database      `valid:"required"`
	Keys              Keys          `valid:"required" toml:"keys"`
	Callbacks         Callbacks     `valid:"optional" toml:"callbacks"`
	TLS               *config.TLS   `valid:"optional"`
	TxStatusAuth      *TxStatusAuth `valid:"optional" toml:"tx_status_auth"`
}

Config contains config params of the compliance server

func (*Config) Validate

func (c *Config) Validate() (err error)

Validate validates config and returns error if any of config values is incorrect

type Database

type Database struct {
	Type string `valid:"required"`
	URL  string `valid:"required"`
}

Database contains values of `database` config group

type Keys

type Keys struct {
	SigningSeed string `valid:"required" toml:"signing_seed"`
}

Keys contains values of `keys` config group

type TxStatusAuth

type TxStatusAuth struct {
	Username string `valid:"required" toml:"username"`
	Password string `valid:"required" toml:"password"`
}

Jump to

Keyboard shortcuts

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