Documentation
¶
Index ¶
- Constants
- func GetSpcfctnCd(db *sql.DB, companyName string, ticker string) string
- func ListCompanies(db *sql.DB) (names []string, err error)
- func ListCompaniesProfits(db *sql.DB, rate float32) error
- func ListSector(db *sql.DB, company, yamlFile string) (err error)
- func ListTickers(db *sql.DB, companyName string) (names []string, err error)
- func ReportToStdout(parms map[string]interface{}) error
- func ReportToXlsx(parms map[string]interface{}) error
- type AccountValue
- type CompanyInfo
- type Excel
- type FIITerminal
- type FIITerminalOptions
- type Logger
- func (l *Logger) Debug(format string, v ...interface{})
- func (l *Logger) Error(format string, v ...interface{})
- func (l *Logger) Info(format string, v ...interface{})
- func (l *Logger) Nok()
- func (l *Logger) Ok()
- func (l *Logger) Printf(format string, v ...interface{})
- func (l *Logger) Run(format string, v ...interface{})
- func (l *Logger) SetOut(out io.Writer)
- func (l *Logger) Trace(format string, v ...interface{})
- func (l *Logger) Warn(format string, v ...interface{})
- type Report
- type Sheet
- type TickerInfo
Constants ¶
const ( DEFAULT = iota + 1 // Number format GENERAL NUMBER INDEX PERCENT EMPTY // Text position LEFT RIGHT CENTER )
Used by style
const ( Rtable = iota + 1 Rcsv Rcsvrend )
Type of report output
Variables ¶
This section is empty.
Functions ¶
func GetSpcfctnCd ¶ added in v1.1.0
ListTickers returns SpcfctnCd of a ticker
func ListCompanies ¶
ListCompanies shows all available companies
func ListCompaniesProfits ¶ added in v0.9.0
ListCompaniesProfits lists companies by net profit: more sustainable growth listed first
func ListSector ¶ added in v0.8.1
ListSector shows all companies from the same sector as 'company'
func ListTickers ¶ added in v1.1.0
ListTickers shows all available tickers for a companie name
func ReportToStdout ¶ added in v1.1.0
ReportToStdout reports company financial data from DB to Stdout.
func ReportToXlsx ¶ added in v1.1.0
ReportToXlsx reports company financial data from DB to Excel.
Types ¶
type AccountValue ¶ added in v1.1.0
type AccountValue struct {
// contains filtered or unexported fields
}
type CompanyInfo ¶ added in v0.9.0
type CompanyInfo struct {
// contains filtered or unexported fields
}
CompanyInfo contains the company name and CNPJ
type Excel ¶
type Excel struct {
// contains filtered or unexported fields
}
Excel instance reachable data
type FIITerminal ¶ added in v1.0.0
type FIITerminal struct {
// contains filtered or unexported fields
}
FIITerminal implements reports related to FII funds on the terminal.
func NewFIITerminal ¶ added in v1.0.0
func NewFIITerminal(db *sql.DB, opts FIITerminalOptions) (*FIITerminal, error)
NewFIITerminal creates a new instace of a FIITerminal
func (FIITerminal) Dividends ¶ added in v1.0.0
func (t FIITerminal) Dividends(codes []string, n int) error
Dividends prints the dividends report on terminal.
func (FIITerminal) Monthly ¶ added in v1.1.0
func (t FIITerminal) Monthly(codes []string, n int) error
func (*FIITerminal) SetParms ¶ added in v1.0.0
func (t *FIITerminal) SetParms(parms map[string]string)
SetParms set the terminal reports parameters.
type FIITerminalOptions ¶ added in v1.1.0
type FIITerminalOptions struct {
APIKey, DataDir string
}
type Logger ¶ added in v1.0.0
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) Nok ¶ added in v1.0.0
func (l *Logger) Nok()
Nok prints a x mark after a unsuccessful Run()
func (*Logger) Ok ¶ added in v1.0.0
func (l *Logger) Ok()
Ok prints a checkmark after a successful Run()
type Report ¶
type Report struct {
// contains filtered or unexported fields
}
Report parameters used in most functions
func (Report) LastYearRange ¶ added in v1.1.0
LastYearRange returns the 1st and last day from last year stored on the DB for this company id. Return dates in unix epoch format.
func (Report) RawAccounts ¶ added in v1.1.0
func (r Report) RawAccounts(cid, year int) ([]AccountValue, error)
type TickerInfo ¶ added in v1.1.0
type TickerInfo struct { SpcfctnCd string // contains filtered or unexported fields }
TickerInfo contains the ticker name and SpcfctnCd