Documentation ¶
Index ¶
- type AlphaVantageEconomicData
- type AlphaVantageEconomicResponse
- type AlphaVantageEconomicService
- func (s AlphaVantageEconomicService) GetAll(reportType data.ReportType) (*[]data.Economic, error)
- func (s AlphaVantageEconomicService) GetIntervalWithPercentChange(ctx context.Context, wg *sync.WaitGroup, ...)
- func (s AlphaVantageEconomicService) GetStats(ctx context.Context, wg *sync.WaitGroup, ...)
- func (s AlphaVantageEconomicService) StartDataSyncTask()
- type AlphaVantageLimiter
- type ClientInterface
- type DataSyncTaskParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlphaVantageEconomicData ¶
type AlphaVantageEconomicData struct { Date time.Time `json:"date"` Value big.Float `json:"value"` }
func (*AlphaVantageEconomicData) UnmarshalJSON ¶
func (l *AlphaVantageEconomicData) UnmarshalJSON(j []byte) error
type AlphaVantageEconomicResponse ¶
type AlphaVantageEconomicResponse struct { Name string `json:"Name"` Interval string `json:"Interval"` Unit string `json:"Unit"` Data []AlphaVantageEconomicData `json:"Data"` }
type AlphaVantageEconomicService ¶
type AlphaVantageEconomicService struct { EconomicRepository data.EconomicRepository ReportRepository data.ReportRepository Client ClientInterface Logger *jsonlog.Logger Limiter AlphaVantageLimiter }
func (AlphaVantageEconomicService) GetAll ¶
func (s AlphaVantageEconomicService) GetAll(reportType data.ReportType) (*[]data.Economic, error)
GetAll Gets all the data for an economic table if no data is found, a request is sent to the API to get the data to populate the DB
func (AlphaVantageEconomicService) GetIntervalWithPercentChange ¶
func (s AlphaVantageEconomicService) GetIntervalWithPercentChange(ctx context.Context, wg *sync.WaitGroup, dataChan chan data.EconomicWithChangeResult, errChan chan error, reportType data.ReportType, years int, paging data.Paging)
func (AlphaVantageEconomicService) GetStats ¶
func (s AlphaVantageEconomicService) GetStats(ctx context.Context, wg *sync.WaitGroup, dataChan chan data.EconomicStatsResult, errChan chan error, reportType data.ReportType, years int, timeBucketDays int, paging data.Paging)
func (AlphaVantageEconomicService) StartDataSyncTask ¶
func (s AlphaVantageEconomicService) StartDataSyncTask()
type AlphaVantageLimiter ¶
type ClientInterface ¶
type ClientInterface interface {
EconomicData(ctx context.Context, reportType alpha.ReportType, opts *alpha.Options) (*alphavantage.EconomicResponse, error)
}
type DataSyncTaskParams ¶
type DataSyncTaskParams struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.