config

package
v0.0.0-...-672f35d Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 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 Accounts

type Accounts struct {
	AuthorizingSeed    string `valid:"optional" toml:"authorizing_seed"`
	BaseSeed           string `valid:"optional" toml:"base_seed"`
	IssuingAccountID   string `valid:"optional" toml:"issuing_account_id"`
	ReceivingAccountID string `valid:"optional" toml:"receiving_account_id"`
}

Accounts contains values of `accounts` config group

type Asset

type Asset struct {
	Code   string `valid:"required"`
	Issuer string `valid:"optional"`
}

Asset represents credit asset

type Callbacks

type Callbacks struct {
	Receive string `valid:"optional"`
	Error   string `valid:"optional"`
}

Callbacks contains values of `callbacks` config group

type Config

type Config struct {
	Port              *int      `valid:"required"`
	Horizon           string    `valid:"optional"`
	Compliance        string    `valid:"optional"`
	LogFormat         string    `valid:"optional" toml:"log_format"`
	MACKey            string    `valid:"optional" toml:"mac_key"`
	APIKey            string    `valid:"optional" toml:"api_key"`
	NetworkPassphrase string    `valid:"optional" toml:"network_passphrase"`
	Develop           bool      `valid:"optional"`
	Assets            []Asset   `valid:"optional"`
	Database          *Database `valid:"optional"`
	Accounts          Accounts  `valid:"optional" toml:"accounts"`
	Callbacks         Callbacks `valid:"optional" toml:"callbacks"`
}

Config contains config params of the bridge 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

Jump to

Keyboard shortcuts

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