config

package
v0.0.0-...-ab49fd9 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 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 AlpacaMarkets

type AlpacaMarkets struct {
	BaseURL   string `yaml:"base_url" json:"base_url"`
	APIKey    string ``
	APISecret string `yaml:"api_secret" json:"api_secret"`
}

type Backtests

type Backtests struct {
	MaxConcurrent   int `yaml:"max_concurrent" json:"max_concurrent"`
	PollingInterval int `yaml:"polling_interval" json:"polling_interval"`
}

type Config

type Config struct {
	Hostname  string    `yaml:"hostname" json:"hostname"`
	HTTP      HTTP      `yaml:"http" json:"http"`
	Docker    Docker    `yaml:"docker" json:"docker"`
	Database  Database  `yaml:"database" json:"database"`
	NATS      NATS      `yaml:"nats" json:"nats"`
	Provider  Provider  `yaml:"provider" json:"provider"`
	Backtests Backtests `yaml:"backtests" json:"backtests"`
}

func GetConfig

func GetConfig() (*Config, error)

type Database

type Database struct {
	Netloc   string `yaml:"netloc" json:"netloc"`
	Port     int    `yaml:"port" json:"port"`
	Dbname   string `yaml:"dbname" json:"dbname"`
	User     string `yaml:"user" json:"user"`
	Password string `yaml:"password" json:"password"`
}

func (*Database) URL

func (d *Database) URL() string

type Docker

type Docker struct {
	Network string `yaml:"network" json:"network"`
}

type HTTP

type HTTP struct {
	Port int `yaml:"port" json:"port"`
}

type LemonMarkets

type LemonMarkets struct {
	MarketDataKey   string `yaml:"market_data_key" json:"market_data_key"`
	PaperTradingKey string `yaml:"paper_trading_key" json:"paper_trading_key"`
}

type NATS

type NATS struct {
	Host string `yaml:"host" json:"host"`
	Port int    `yaml:"port" json:"port"`
}

func (*NATS) URL

func (n *NATS) URL() string

type Provider

type Provider struct {
	LemonMarkets LemonMarkets  `yaml:"lemon_markets" json:"lemon_markets"`
	Alpaca       AlpacaMarkets `yaml:"alpaca_markets" json:"alpaca_markets"`
}

Jump to

Keyboard shortcuts

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