Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorJsonizable ¶
type ErrorJsonizable struct {
// contains filtered or unexported fields
}
ErrorJsonizable is an error that can be JSON-serialized as the Error() string.
func (*ErrorJsonizable) Error ¶
func (e *ErrorJsonizable) Error() string
func (*ErrorJsonizable) MarshalJSON ¶
func (e *ErrorJsonizable) MarshalJSON() ([]byte, error)
func (*ErrorJsonizable) Unwrap ¶
func (e *ErrorJsonizable) Unwrap() error
type Result ¶
type Result struct { Isin string `json:"isin,omitempty"` Source string `json:"source,omitempty"` Instance int `json:"instance"` URL string `json:"url,omitempty"` Price float32 `json:"price,omitempty"` Currency string `json:"currency,omitempty"` Date *time.Time `json:"date,omitempty"` // need a pointer to omit zero date TimeStart time.Time `json:"time_start"` TimeEnd time.Time `json:"time_end"` Err error `json:"error,omitempty"` Status taskengine.EventType `json:"status"` }
Result contains the result informations of the retrieved quote.
Result.Date field is a pointer in order to omit zero dates. see https://stackoverflow.com/questions/32643815/json-omitempty-with-time-time-field
func Get ¶
func Get(availableSources quotegetter.Sources, items []*SourceIsins, mode taskengine.Mode, wProgress io.Writer) ([]*Result, error)
Get retrieves the quotes specified by the SourceIsins object. The mode parameters specified the taskengine mode of execution.
type SourceIsins ¶
type SourceIsins struct { Source string `json:"source,omitempty"` Workers int `json:"workers,omitempty"` Proxy string `json:"proxy,omitempty"` Isins []string `json:"isins,omitempty"` }
SourceIsins struct represents the isins to get from a specific source
Click to show internal directories.
Click to hide internal directories.