Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct { List struct { Providers bool } Providers string Coins string Fiats string LiveCoinWatch struct { APIKey string } DuckDB struct { File string Table string Enabled bool } QuestDB struct { Host string Port uint16 Table string Timeout uint16 Enabled bool } SQLite3 struct { File string Table string Enabled bool } Pushover struct { Token string User string IncludeLinks bool Enabled bool } Disable struct { DuckDB bool QuestDB bool SQLite3 bool Pushover bool } Quiet bool CompactOutput bool VeryCompactOutput bool PortfolioValueTop bool PortfolioValueBottom bool }
AppConfig is used to store application configuration.
type ExchangeRate ¶
type ExchangeRate struct { // Provider contains the name of the provider from which the exchange rate was retrieved. Provider string // Market contains the market that was used for retrieving the exchange rate. Market string // ProviderWithMarket is the combination of Provider/Market. ProviderWithMarket string // AsOf contains the information when the exchange rate was retrieved. AsOf time.Time // Coin contains the common symbol of the coin. Coin string // Owned contains the amount of Coin owned. Owned float64 // Fiat contains the common symbol of the fiat. Fiat string // Rate is the exchange rate "1 Coin = Rate Fiat". Rate float64 // Error is used to convey possible errors. Error error }
ExchangeRate represents a single exchange rate.
func (*ExchangeRate) String ¶
func (r *ExchangeRate) String() string
String returns the ExchangeRate in a printable string representation.
func (*ExchangeRate) StringCompact ¶
func (r *ExchangeRate) StringCompact() string
StringCompact is a compact variant of String(), omitting time information.
func (*ExchangeRate) StringVeryCompact ¶
func (r *ExchangeRate) StringVeryCompact() string
StringVeryCompact is a very compact variant of String(), omitting time and provider information.
type ExchangeRates ¶
type ExchangeRates struct { Mutex sync.Mutex Rates []ExchangeRate }
ExchangeRates is a multi-threading-safe list of multiple ExchangeRate objects.
func (*ExchangeRates) Sort ¶
func (r *ExchangeRates) Sort()
Sort sorts the list of ExchangeRate objects by Coin-Fiat-Provider-Market.
Click to show internal directories.
Click to hide internal directories.