Documentation ¶
Index ¶
- Variables
- func GetCoinPrice(ticker, currency string) (price float64, err error)
- func GetFromCache(id string, exp int64, out any) (found bool)
- func IsError(oB []byte) (err error)
- func SaveToCache(id string, in any)
- type Coin
- type CoinData
- type CoinGraph
- type CoinID
- type RPC
- type RPCRequest
- type RPCResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var VerboseRPC bool = os.Getenv("VERBOSE_RPC") != ""
Functions ¶
func GetCoinPrice ¶
func SaveToCache ¶
Types ¶
type Coin ¶
func GetCoinList ¶
type CoinData ¶
type CoinData struct { ID CoinID `json:"id"` Symbol string `json:"symbol"` Name string `json:"name"` BlockTimeInMinutes int `json:"block_time_in_minutes"` Links struct { Homepage []string `json:"homepage"` } `json:"links"` Image struct { Thumb string `json:"thumb"` Small string `json:"small"` Large string `json:"large"` } `json:"image"` MarketData struct { CurrentPrice map[string]float64 `json:"current_price"` } `json:"market_data"` }
func GetCoinData ¶
type CoinGraph ¶
func GetCoinGraph ¶
func (*CoinGraph) PrintPrices ¶
func (g *CoinGraph) PrintPrices()
type RPCRequest ¶
type RPCResponse ¶
Click to show internal directories.
Click to hide internal directories.