config

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColumnSymbol       = "Symbol"
	ColumnPrice        = "Price"
	ColumnChange1hPct  = "%Change(1h)"
	ColumnChange24hPct = "%Change(24h)"
	ColumnSource       = "Source"
	ColumnUpdated      = "Updated"
)

Variables

View Source
var (
	Version string
	Rev     string
	Date    string
)

Will be set by go-build

Functions

func ListExchangesAndExit added in v0.6.0

func ListExchangesAndExit(exchanges []string)

Types

type Config added in v0.6.0

type Config struct {
	Timeout int           `mapstructure:"timeout"`
	Proxy   string        `mapstructure:"proxy"`
	Refresh int           `mapstructure:"refresh"`
	Columns []string      `mapstructure:"show"`
	Debug   bool          `mapstructure:"debug"`
	Queries []*PriceQuery `mapstructure:"exchanges"`
}

func Parse

func Parse() *Config

func (*Config) GroupQueryByExchange added in v0.6.0

func (c *Config) GroupQueryByExchange() map[string]*PriceQuery

type PriceQuery added in v0.6.0

type PriceQuery struct {
	Name   string   `mapstructure:"name"`
	Tokens []string `mapstructure:"tokens"`
	APIKey string   `mapstructure:"api_key"`
}

Jump to

Keyboard shortcuts

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