types

package
v0.0.0-...-add61a3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Currency

type Currency string

func NewCurrency

func NewCurrency(ticker, network string) Currency

func (Currency) IsValid

func (c Currency) IsValid() bool

func (Currency) Network

func (c Currency) Network() string

func (Currency) Ticker

func (c Currency) Ticker() string

func (Currency) ToString

func (c Currency) ToString() string

type CurrencyInfo

type CurrencyInfo struct {
	Currency

	// Network is the human readable name of the currency
	Name string `json:"name"`
	// Scale...
	// TODO(uh): Description of scale
	Scale uint `json:"scale"`
	// Precision...
	// TODO(uh): Description of precision, Probably not needed.
	Precision uint `json:"precision"`
}

type Rate

type Rate struct {
	SourceCurrency Currency        `json:"source_currency"`
	TargetCurrency Currency        `json:"target_currency"`
	Rate           decimal.Decimal `json:"rate"`
	Provider       string          `json:"provider"`
	ExpiresAt      time.Time       `json:"expires_at"`
}

Jump to

Keyboard shortcuts

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