Documentation ¶
Overview ¶
This is the source of exchange rates from the Central European Bank. This is the implementation of methods to retrieve data by http in xml, csv format and conversion to gocy format
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExchangeRate ¶
type ExchangeRate struct {
// contains filtered or unexported fields
}
func (ExchangeRate) From ¶
func (e ExchangeRate) From() label.Currency
func (ExchangeRate) Rate ¶
func (e ExchangeRate) Rate() float64
func (ExchangeRate) Time ¶
func (e ExchangeRate) Time() time.Time
func (ExchangeRate) To ¶
func (e ExchangeRate) To() label.Currency
type XMLAttrTime ¶
func (*XMLAttrTime) UnmarshalXMLAttr ¶
func (x *XMLAttrTime) UnmarshalXMLAttr(attr xml.Attr) error
type XMLCurrencyAttr ¶
type XMLCurrencyAttr string
func (*XMLCurrencyAttr) UnmarshalXMLAttr ¶
func (i *XMLCurrencyAttr) UnmarshalXMLAttr(attr xml.Attr) error
type XMLNode ¶
type XMLNode struct { Time XMLAttrTime `xml:"time,attr"` Rates []struct { Currency XMLCurrencyAttr `xml:"currency,attr"` Rate XMLRateAttr `xml:"rate,attr"` } `xml:"Cube"` }
type XMLRateAttr ¶
type XMLRateAttr float64
func (*XMLRateAttr) Float64 ¶
func (i *XMLRateAttr) Float64() float64
func (*XMLRateAttr) UnmarshalXMLAttr ¶
func (i *XMLRateAttr) UnmarshalXMLAttr(attr xml.Attr) error
Click to show internal directories.
Click to hide internal directories.