config

package
v0.0.0-...-cc8f6e5 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {
	DB DB `yaml:"db"`
}

Broker broker config.

type Client

type Client struct {
	Token string `yaml:"token"`
}

Client telegram client config.

type Config

type Config struct {
	Exchange Exchange `yaml:"exchange"`
	Broker   Broker   `yaml:"broker"`
	Client   Client   `yaml:"client"`
}

Config main config.

func Load

func Load() (Config, error)

Load loads configs from a file.

type DB

type DB struct {
	Host     string `yaml:"host"`
	Port     int32  `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	DBName   string `yaml:"db_name"`
	TimeZone string `yaml:"time_zone"`
}

DB Postgres config.

type Exchange

type Exchange struct {
	Tickers  []string      `yaml:"tickers"`
	Interval time.Duration `yaml:"interval"`
}

Exchange stock exchange service config.

Jump to

Keyboard shortcuts

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