Documentation ¶
Index ¶
- type CTenor1Avg
- type CTenor2Avg
- type CTenor3Avg
- type CeffectiveDateAvg
- type Channel
- type CinsertTimestampAvg
- type Content
- type CrateOperationAvg
- type CsafrRatesFindItemAvg
- type CsafrRatesSecondaryFindByDateResponseAvg
- type EstrData
- type Header
- type Item
- type ItemInd
- type Rate
- type RateInd
- type RateScraper
- func (s *RateScraper) Channel() chan *models.InterestRate
- func (s *RateScraper) Close() error
- func (s *RateScraper) Update(rateType string) error
- func (s *RateScraper) UpdateESTER() error
- func (s *RateScraper) UpdateSAFR() error
- func (s *RateScraper) UpdateSAFRAvgs() error
- func (s *RateScraper) UpdateSOFR() error
- func (s *RateScraper) UpdateSonia() (err error)
- type Results
- type RssBody
- type RssESTER
- type RssSAFR
- type RssSOFR
- type SONIA
- type SONIAHistorical
- type Statistics
- type StatisticsInd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CTenor1Avg ¶
type CTenor2Avg ¶
type CTenor3Avg ¶
type CeffectiveDateAvg ¶
type CinsertTimestampAvg ¶
type Content ¶
type Content struct {
EstrData EstrData `xml:"EURO-SHORT-TERM-RATE_MID_PUBLICATION_MESSAGE"`
}
type CrateOperationAvg ¶
type CrateOperationAvg struct { XMLName xml.Name `xml:"rateOperation,omitempty" json:"rateOperation,omitempty"` CeffectiveDateAvg *CeffectiveDateAvg `xml:"effectiveDate,omitempty" json:"effectiveDate,omitempty"` CinsertTimestampAvg *CinsertTimestampAvg `xml:"insertTimestamp,omitempty" json:"insertTimestamp,omitempty"` CTenor1Avg *CTenor1Avg `xml:"tenor1,omitempty" json:"tenor1,omitempty"` CTenor2Avg *CTenor2Avg `xml:"tenor2,omitempty" json:"tenor2,omitempty"` CTenor3Avg *CTenor3Avg `xml:"tenor3,omitempty" json:"tenor3,omitempty"` }
type CsafrRatesFindItemAvg ¶
type CsafrRatesFindItemAvg struct { XMLName xml.Name `xml:"safrRatesFindItem,omitempty" json:"safrRatesFindItem,omitempty"` CrateOperationAvg *CrateOperationAvg `xml:"rateOperation,omitempty" json:"rateOperation,omitempty"` }
type CsafrRatesSecondaryFindByDateResponseAvg ¶
type CsafrRatesSecondaryFindByDateResponseAvg struct { XMLName xml.Name `xml:"safrRatesSecondaryFindByDateResponse,omitempty" json:"safrRatesSecondaryFindByDateResponse,omitempty"` CsafrRatesFindItemAvg []*CsafrRatesFindItemAvg `xml:"safrRatesFindItem,omitempty" json:"safrRatesFindItem,omitempty"` }
type Item ¶
type Item struct { Title string `xml:"title"` Link string `xml:"link"` Description string `xml:"description"` Date string `xml:"date"` Statistics Statistics `xml:"statistics"` }
type ItemInd ¶
type ItemInd struct { DescriptionInd string `xml:"description"` DateInd string `xml:"date"` StatisticsInd StatisticsInd `xml:"statistics"` }
type RateScraper ¶
type RateScraper struct {
// contains filtered or unexported fields
}
func SpawnRateScraper ¶
func SpawnRateScraper(datastore models.Datastore, rateType string) *RateScraper
SpawnRateScraper returns a new RateScraper initialized with default values. The instance is asynchronously scraping as soon as it is created.
func (*RateScraper) Channel ¶
func (s *RateScraper) Channel() chan *models.InterestRate
Channel returns a channel that can be used to receive rate information
func (*RateScraper) Close ¶
func (s *RateScraper) Close() error
Close closes any existing API connections
func (*RateScraper) Update ¶
func (s *RateScraper) Update(rateType string) error
Update calls the appropriate function corresponding to the rate type.
func (*RateScraper) UpdateESTER ¶
func (s *RateScraper) UpdateESTER() error
UpdateESTER makes a GET request from an rss feed and sends updated value through Channel s.chanInterestRate
func (*RateScraper) UpdateSAFR ¶
func (s *RateScraper) UpdateSAFR() error
UpdateSAFR makes a GET request from an rss feed and sends updated value through Channel s.chanInterestRate
func (*RateScraper) UpdateSAFRAvgs ¶
func (s *RateScraper) UpdateSAFRAvgs() error
UpdateSAFRAvgs makes a GET request from an rss feed and sends updated value through Channel s.chanInterestRate
func (*RateScraper) UpdateSOFR ¶
func (s *RateScraper) UpdateSOFR() error
UpdateSOFR makes a GET request from an rss feed and sends updated value through Channel s.chanInterestRate
func (*RateScraper) UpdateSonia ¶
func (s *RateScraper) UpdateSonia() (err error)
type RssSAFR ¶
type RssSAFR struct {
ItemInd ItemInd `xml:"item"`
}
Define the fields associated with the rss document.
type SONIAHistorical ¶
type SONIAHistorical []SONIA
type Statistics ¶
type StatisticsInd ¶
type StatisticsInd struct {
RateInd RateInd `xml:"interestRate"`
}