Documentation
¶
Index ¶
- Constants
- func FindBody(dec *xml.Decoder) ([]byte, error)
- type Date
- type DateInterval
- type DayRates
- type Double
- type MNB
- func (req MNB) GetCentralBankBaseRateXML(start, end time.Time) string
- func (req MNB) GetCurrencyUnitsXML(currencies ...string) string
- func (req MNB) GetExchangeRatesXML(start, end time.Time, currencies ...string) string
- func (req MNB) StreamGetCentralBankBaseRateXML(qw422016 *qt422016.Writer, start, end time.Time)
- func (req MNB) StreamGetCurrencyUnitsXML(qw422016 *qt422016.Writer, currencies ...string)
- func (req MNB) StreamGetExchangeRatesXML(qw422016 *qt422016.Writer, start, end time.Time, currencies ...string)
- func (req MNB) WriteGetCentralBankBaseRateXML(qq422016 qtio422016.Writer, start, end time.Time)
- func (req MNB) WriteGetCurrencyUnitsXML(qq422016 qtio422016.Writer, currencies ...string)
- func (req MNB) WriteGetExchangeRatesXML(qq422016 qtio422016.Writer, start, end time.Time, currencies ...string)
- type MNBAlapkamatService
- func (m MNBAlapkamatService) GetBaseRates(ctx context.Context, start, end time.Time) ([]MNBBaseRate, error)
- func (m MNBAlapkamatService) GetCentralBankBaseRate(ctx context.Context, start, end time.Time) ([]MNBBaseRate, error)
- func (m MNBAlapkamatService) GetCurrentBaseRate(ctx context.Context) (MNBBaseRate, error)
- func (m MNBAlapkamatService) GetCurrentCentralBankBaseRate(ctx context.Context) (MNBBaseRate, error)
- type MNBArfolyamService
- func (m MNBArfolyamService) GetCurrencies(ctx context.Context) ([]string, error)
- func (m MNBArfolyamService) GetCurrencyUnits(ctx context.Context, currency string) ([]Unit, error)
- func (m MNBArfolyamService) GetCurrentExchangeRates(ctx context.Context) (DayRates, error)
- func (m MNBArfolyamService) GetDateIntervalResponse(ctx context.Context) (DateInterval, error)
- func (m MNBArfolyamService) GetExchangeRates(ctx context.Context, start, end time.Time, currencies ...string) ([]DayRates, error)
- func (m MNBArfolyamService) GetInfo(ctx context.Context) (MNBExchangeRatesQueryValues, error)
- type MNBBaseRate
- type MNBCentralBankBaseRates
- type MNBCurrencies
- type MNBCurrencyUnits
- type MNBCurrentCentralBankBaseRate
- type MNBCurrentExchangeRates
- type MNBExchangeRates
- type MNBExchangeRatesQueryValues
- type MNBStoredInterval
- type Rate
- type Unit
Constants ¶
const ( ArfolyamokURL = "http://www.mnb.hu/arfolyamok.asmx" AlapkamatURL = "http://www.mnb.hu/alapkamat.asmx" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DateInterval ¶
type Double ¶
type Double struct {
*apd.Decimal
}
func NewDoubleFromString ¶
func (Double) MarshalText ¶
func (*Double) UnmarshalText ¶
type MNB ¶
func (MNB) GetCentralBankBaseRateXML ¶
func (MNB) GetCurrencyUnitsXML ¶
func (MNB) GetExchangeRatesXML ¶
func (MNB) StreamGetCentralBankBaseRateXML ¶
func (MNB) StreamGetCurrencyUnitsXML ¶
func (MNB) StreamGetExchangeRatesXML ¶
func (MNB) WriteGetCentralBankBaseRateXML ¶
func (req MNB) WriteGetCentralBankBaseRateXML(qq422016 qtio422016.Writer, start, end time.Time)
func (MNB) WriteGetCurrencyUnitsXML ¶
func (req MNB) WriteGetCurrencyUnitsXML(qq422016 qtio422016.Writer, currencies ...string)
func (MNB) WriteGetExchangeRatesXML ¶
type MNBAlapkamatService ¶
type MNBAlapkamatService struct {
MNB
}
func NewMNBAlapkamatService ¶
func (MNBAlapkamatService) GetBaseRates ¶
func (m MNBAlapkamatService) GetBaseRates(ctx context.Context, start, end time.Time) ([]MNBBaseRate, error)
func (MNBAlapkamatService) GetCentralBankBaseRate ¶
func (m MNBAlapkamatService) GetCentralBankBaseRate(ctx context.Context, start, end time.Time) ([]MNBBaseRate, error)
func (MNBAlapkamatService) GetCurrentBaseRate ¶
func (m MNBAlapkamatService) GetCurrentBaseRate(ctx context.Context) (MNBBaseRate, error)
func (MNBAlapkamatService) GetCurrentCentralBankBaseRate ¶
func (m MNBAlapkamatService) GetCurrentCentralBankBaseRate(ctx context.Context) (MNBBaseRate, error)
type MNBArfolyamService ¶
type MNBArfolyamService struct {
MNB
}
func NewMNBArfolyamService ¶
func (MNBArfolyamService) GetCurrencies ¶
func (m MNBArfolyamService) GetCurrencies(ctx context.Context) ([]string, error)
func (MNBArfolyamService) GetCurrencyUnits ¶
func (MNBArfolyamService) GetCurrentExchangeRates ¶
func (m MNBArfolyamService) GetCurrentExchangeRates(ctx context.Context) (DayRates, error)
func (MNBArfolyamService) GetDateIntervalResponse ¶
func (m MNBArfolyamService) GetDateIntervalResponse(ctx context.Context) (DateInterval, error)
func (MNBArfolyamService) GetExchangeRates ¶
func (MNBArfolyamService) GetInfo ¶
func (m MNBArfolyamService) GetInfo(ctx context.Context) (MNBExchangeRatesQueryValues, error)
type MNBBaseRate ¶
type MNBCentralBankBaseRates ¶
type MNBCentralBankBaseRates struct { XMLName xml.Name `xml:"MNBCentralBankBaseRates" json:"-"` BaseRates []MNBBaseRate `xml:"BaseRate"` }
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body> <GetCentralBankBaseRateResponse xmlns="http://www.mnb.hu/webservices/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <GetCentralBankBaseRateResult><![CDATA[<MNBCentralBankBaseRates><BaseRate publicationDate="2020-07-21">0,60</BaseRate><BaseRate publicationDate="2020-06-23">0,75</BaseRate></MNBCentralBankBaseRates>]]></GetCentralBankBaseRateResult> </GetCentralBankBaseRateResponse> </s:Body>
</s:Envelope>
<MNBCentralBankBaseRates><BaseRate publicationDate="2015-07-22">1,35</BaseRate><BaseRate publicationDate="2015-06-24">1,50</BaseRate><BaseRate publicationDate="2015-05-27">1,65</BaseRate><BaseRate publicationDate="2015-04-22">1,80</BaseRate><BaseRate publicationDate="2015-03-25">1,95</BaseRate></MNBCentralBankBaseRates>
type MNBCurrencies ¶
type MNBCurrencies struct {
Currencies []string `xml:"Currencies>Curr"`
}
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body> <GetCurrenciesResponse xmlns="http://www.mnb.hu/webservices/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <GetCurrenciesResult><![CDATA[<MNBCurrencies><Currencies><Curr>HUF</Curr><Curr>EUR</Curr><Curr>AUD</Curr><Curr>BGN</Curr><Curr>BRL</Curr><Curr>CAD</Curr><Curr>CHF</Curr><Curr>CNY</Curr><Curr>CZK</Curr><Curr>DKK</Curr><Curr>GBP</Curr><Curr>HKD</Curr><Curr>HRK</Curr><Curr>IDR</Curr><Curr>ILS</Curr><Curr>INR</Curr><Curr>ISK</Curr><Curr>JPY</Curr><Curr>KRW</Curr><Curr>MXN</Curr><Curr>MYR</Curr><Curr>NOK</Curr><Curr>NZD</Curr><Curr>PHP</Curr><Curr>PLN</Curr><Curr>RON</Curr><Curr>RSD</Curr><Curr>RUB</Curr><Curr>SEK</Curr><Curr>SGD</Curr><Curr>THB</Curr><Curr>TRY</Curr><Curr>UAH</Curr><Curr>USD</Curr><Curr>ZAR</Curr><Curr>ATS</Curr><Curr>AUP</Curr><Curr>BEF</Curr><Curr>BGL</Curr><Curr>CSD</Curr><Curr>CSK</Curr><Curr>DDM</Curr><Curr>DEM</Curr><Curr>EEK</Curr><Curr>EGP</Curr><Curr>ESP</Curr><Curr>FIM</Curr><Curr>FRF</Curr><Curr>GHP</Curr><Curr>GRD</Curr><Curr>IEP</Curr><Curr>ITL</Curr><Curr>KPW</Curr><Curr>KWD</Curr><Curr>LBP</Curr><Curr>LTL</Curr><Curr>LUF</Curr><Curr>LVL</Curr><Curr>MNT</Curr><Curr>NLG</Curr><Curr>OAL</Curr><Curr>OBL</Curr><Curr>OFR</Curr><Curr>ORB</Curr><Curr>PKR</Curr><Curr>PTE</Curr><Curr>ROL</Curr><Curr>SDP</Curr><Curr>SIT</Curr><Curr>SKK</Curr><Curr>SUR</Curr><Curr>VND</Curr><Curr>XEU</Curr><Curr>XTR</Curr><Curr>YUD</Curr></Currencies></MNBCurrencies>]]></GetCurrenciesResult> </GetCurrenciesResponse> </s:Body>
</s:Envelope>
type MNBCurrencyUnits ¶
type MNBCurrencyUnits struct {
Units []Unit `xml:"Units>Unit"`
}
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body> <GetCurrencyUnitsResponse xmlns="http://www.mnb.hu/webservices/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <GetCurrencyUnitsResult><![CDATA[<MNBCurrencyUnits><Units><Unit curr="HUF">1</Unit></Units></MNBCurrencyUnits>]]></GetCurrencyUnitsResult> </GetCurrencyUnitsResponse> </s:Body>
</s:Envelope>
type MNBCurrentCentralBankBaseRate ¶
type MNBCurrentCentralBankBaseRate struct {
BaseRate MNBBaseRate
}
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body> <GetCurrentCentralBankBaseRateResponse xmlns="http://www.mnb.hu/webservices/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <GetCurrentCentralBankBaseRateResult><MNBCurrentCentralBankBaseRate><BaseRate publicationDate="2020-07-21">0,60</BaseRate></MNBCurrentCentralBankBaseRate></GetCurrentCentralBankBaseRateResult> </GetCurrentCentralBankBaseRateResponse> </s:Body>
</s:Envelope>
<MNBCurrentCentralBankBaseRate><BaseRate publicationDate="2015-06-24">1,5000</BaseRate></MNBCurrentCentralBankBaseRate>
type MNBCurrentExchangeRates ¶
type MNBCurrentExchangeRates struct {
Day DayRates
}
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body> <GetCurrentExchangeRatesResponse xmlns="http://www.mnb.hu/webservices/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <GetCurrentExchangeRatesResult><![CDATA[<MNBCurrentExchangeRates><Day date="2020-08-14"><Rate unit="1" curr="AUD">209,44</Rate><Rate unit="1" curr="BGN">177,03</Rate><Rate unit="1" curr="BRL">54,58</Rate><Rate unit="1" curr="CAD">221,22</Rate><Rate unit="1" curr="CHF">321,99</Rate><Rate unit="1" curr="CNY">42,16</Rate><Rate unit="1" curr="CZK">13,26</Rate><Rate unit="1" curr="DKK">46,48</Rate><Rate unit="1" curr="EUR">346,25</Rate><Rate unit="1" curr="GBP">383,23</Rate><Rate unit="1" curr="HKD">37,81</Rate><Rate unit="1" curr="HRK">45,96</Rate><Rate unit="100" curr="IDR">1,98</Rate><Rate unit="1" curr="ILS">86,1</Rate><Rate unit="1" curr="INR">3,91</Rate><Rate unit="1" curr="ISK">2,15</Rate><Rate unit="100" curr="JPY">274,56</Rate><Rate unit="100" curr="KRW">24,7</Rate><Rate unit="1" curr="MXN">13,2</Rate><Rate unit="1" curr="MYR">69,87</Rate><Rate unit="1" curr="NOK">32,86</Rate><Rate unit="1" curr="NZD">191,57</Rate><Rate unit="1" curr="PHP">6,02</Rate><Rate unit="1" curr="PLN">78,69</Rate><Rate unit="1" curr="RON">71,59</Rate><Rate unit="1" curr="RSD">2,94</Rate><Rate unit="1" curr="RUB">3,99</Rate><Rate unit="1" curr="SEK">33,63</Rate><Rate unit="1" curr="SGD">213,53</Rate><Rate unit="1" curr="THB">9,42</Rate><Rate unit="1" curr="TRY">39,76</Rate><Rate unit="1" curr="UAH">10,71</Rate><Rate unit="1" curr="USD">293,01</Rate><Rate unit="1" curr="ZAR">16,77</Rate></Day></MNBCurrentExchangeRates>]]></GetCurrentExchangeRatesResult> </GetCurrentExchangeRatesResponse> </s:Body>
</s:Envelope>
type MNBExchangeRates ¶
type MNBExchangeRates struct {
Days []DayRates `xml:"Day"`
}
type MNBStoredInterval ¶
type MNBStoredInterval struct {
Interval DateInterval `xml:"DateInterva"`
}