Documentation ¶
Index ¶
Constants ¶
View Source
const ( APInone = iota APIalphavantage APIyahoo )
API providers
View Source
const MAX_N = 200
Variables ¶
View Source
var ( // ErrFileNotFound error ErrFileNotFound = errors.New("file not found") // ErrItemNotFound for string not found on []string ErrItemNotFound = errors.New("item not found") )
Functions ¶
Types ¶
type FII ¶
type FII struct {
// contains filtered or unexported fields
}
FII holds the infrastructure data.
func (*FII) Details ¶
func (fii *FII) Details(fiiCode string) (*rapina.FIIDetails, error)
Details returns the FII Details from DB. If not found: fetches from server, stores it in the DB and returns the Details.
type HTTPFetch ¶
type HTTPFetch struct {
// contains filtered or unexported fields
}
HTTPFetch implements a generic HTTP fetcher.
type Report ¶
type Report struct {
Data []docID `json:"data"`
}
Report holds the result of all documents filtered by a criteria defined by a http.Get on the B3 server.
type Stock ¶ added in v1.1.0
type Stock struct {
// contains filtered or unexported fields
}
Stock implements a fetcher for stock info.
func (*Stock) Quote ¶ added in v1.1.0
Quote returns the quote for 'code' on 'date'. Date format: YYYY-MM-DD.
func (*Stock) UpdateStockCodes ¶ added in v1.1.0
UpdateStockCodes get the most recent file from B3.com.br with the stock trading code and saves them on the storage.
type WriteCounter ¶
type WriteCounter struct {
Total uint64
}
WriteCounter counts the number of bytes written the io.Writer. source: https://golangcode.com/download-a-file-with-progress/
Click to show internal directories.
Click to hide internal directories.