config

package
v0.0.0-...-58dd970 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// General configuration
	PreviewOrder bool `yaml:"preview_order"`

	// Account configuration
	Brokerage string         `yaml:"brokerage"`
	Tradier   *TradierConfig `yaml:"tradier,omitempty"`
}

Config holds the merged configuration from the config file, environment variables, and flags

func New

func New(v *viper.Viper) *Config

New creates a new config from Viper object

func (*Config) CheckConfig

func (c *Config) CheckConfig() error

CheckConfig checks for the validity of the cofiguration

func (*Config) Copy

func (c *Config) Copy() *Config

Copy returns a copy of the configuration

type TradierConfig

type TradierConfig struct {
	AccountID   string `yaml:"account,omitempty"`
	AccessToken string `yaml:"access_token,omitempty"`
}

TradierConfig holds the configuration for Tradier brokerage

Jump to

Keyboard shortcuts

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