utils

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ColumnTypeLookup = map[string]string{}/* 165 elements not displayed */

ColumnTypeLookup specifies the type to parse results into

Functions

func CleanFinvizDataFrame added in v1.2.0

func CleanFinvizDataFrame(df *dataframe.DataFrame) *dataframe.DataFrame

CleanFinvizDataFrame attempts to improve the matching of a DataFrame's column type to the corresponding data

func Contains

func Contains(slice, value interface{}) bool

Contains is a semi-generic (string/int) function for checking if an item exists within a list

func Err

func Err(msg interface{})

Err is used for error exits for the cmd util

func ExportCSV

func ExportCSV(df *dataframe.DataFrame, outFileName string) error

ExportCSV generates a csv file of the Finviz screen results

func ExportData added in v1.2.3

func ExportData(df *dataframe.DataFrame, outFile string) error

func ExportJSON

func ExportJSON(df *dataframe.DataFrame, outFileName string) error

ExportJSON generates a json file of the Finviz screen results

func GenerateDocument added in v1.0.7

func GenerateDocument(html interface{}) (doc *goquery.Document, err error)

GenerateDocument is a helper function for Scraping

func GenerateRows

func GenerateRows(headers []string, tickerDataSlice []map[string]interface{}) (rows [][]string, err error)

GenerateRows is a helper function for DataFrame construction

func PrintFullDataFrame

func PrintFullDataFrame(df *dataframe.DataFrame)

PrintFullDataFrame prints an entire dataframe to console Derived from https://github.com/go-gota/gota/blob/master/dataframe/dataframe.go until print method is made public

Types

type DuplicateFilterError

type DuplicateFilterError string

DuplicateFilterError is the error thrown if the same filter is declared more than once

func (DuplicateFilterError) Error

func (err DuplicateFilterError) Error() string

type Enum added in v1.2.3

type Enum struct {
	Allowed []string
	Value   string
}

func NewEnum added in v1.2.3

func NewEnum(allowed []string, d string) *Enum

NewEnum give a list of allowed flag parameters, where the second argument is the default

func (*Enum) Set added in v1.2.3

func (a *Enum) Set(p string) error

func (Enum) String added in v1.2.3

func (a Enum) String() string

func (*Enum) Type added in v1.2.3

func (a *Enum) Type() string

type ErrorSignalNotFound

type ErrorSignalNotFound string

ErrorSignalNotFound is the error thrown if a query string is not found in the SignalLookup dict

func (ErrorSignalNotFound) Error

func (err ErrorSignalNotFound) Error() string

type FilterNotFoundError

type FilterNotFoundError string

FilterNotFoundError is the error thrown if a query string is not found in the FilterLookup dict

func (FilterNotFoundError) Error

func (err FilterNotFoundError) Error() string

type IncompatibleChartTypeTimeFrameError

type IncompatibleChartTypeTimeFrameError string

IncompatibleChartTypeTimeFrameError is the error thrown if a newTimeFrame is not one of valid for the specified chart type

func (IncompatibleChartTypeTimeFrameError) Error

type InvalidChartTypeError

type InvalidChartTypeError string

InvalidChartTypeError is the error thrown if a newChartType is not one of "technical", "line", or "candle"

func (InvalidChartTypeError) Error

func (err InvalidChartTypeError) Error() string

type InvalidTimeFrameError

type InvalidTimeFrameError string

InvalidTimeFrameError is the error thrown if a newTimeFrame is not one of valid for the specified chart type

func (InvalidTimeFrameError) Error

func (err InvalidTimeFrameError) Error() string

type InvalidViewError

type InvalidViewError string

InvalidViewError is the error thrown if a query string is not associated with a labelled ViewType

func (InvalidViewError) Error

func (err InvalidViewError) Error() string

type MethodNotImplementedError

type MethodNotImplementedError string

MethodNotImplementedError is the error given if a method has not been written yet

func (MethodNotImplementedError) Error

func (err MethodNotImplementedError) Error() string

type MultipleValuesError

type MultipleValuesError string

MultipleValuesError is the error thrown if an unsupported filter is initialized with multiple values

func (MultipleValuesError) Error

func (err MultipleValuesError) Error() string

type NoStocksMatchedQueryError

type NoStocksMatchedQueryError string

NoStocksMatchedQueryError is the error given if a screen returns no results

func (NoStocksMatchedQueryError) Error

func (err NoStocksMatchedQueryError) Error() string

type NoValuesError

type NoValuesError string

NoValuesError is the error thrown if a filter is initialized with no values

func (NoValuesError) Error

func (err NoValuesError) Error() string

type SpecificOrderNotFoundError

type SpecificOrderNotFoundError string

SpecificOrderNotFoundError is the error thrown if a query string is not found in the SpecificOrderLookup dict

func (SpecificOrderNotFoundError) Error

func (err SpecificOrderNotFoundError) Error() string

type StatusCodeError

type StatusCodeError string

StatusCodeError is the error given if a request's status code is not 200

func (StatusCodeError) Error

func (err StatusCodeError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL