pricedb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFile      = "~/.price.db"
	DefaultCloseTime = "22:45:00"
	DateTimeFormat   = "2006/01/02 15:04:05"
)

Variables

View Source
var (
	// overridable for testing
	GetData = ioutil.ReadFile
)

Functions

func GetDedupedSortedTimeSeriesItemWithSymbol

func GetDedupedSortedTimeSeriesItemWithSymbol(lines []string, closeTime string, symbolMap map[string]string, others []*priceutils.TimeSeriesItemWithSymbol) ([]*priceutils.TimeSeriesItemWithSymbol, error)

func GetSortedTimeSeriesItemWithSymbol

func GetSortedTimeSeriesItemWithSymbol(lines []string, closeTime string, symbolMap map[string]string) ([]*priceutils.TimeSeriesItemWithSymbol, error)

func IsWhitespaceOrComment added in v0.2.0

func IsWhitespaceOrComment(s string) bool

func ReadPriceDB added in v0.2.0

func ReadPriceDB(path string) ([]string, error)

Types

type PriceData

type PriceData struct {
	LastPrice    string
	LastCurrency string
}

func (*PriceData) GetLastPrice

func (pd *PriceData) GetLastPrice() string

func (*PriceData) String added in v0.2.0

func (pd *PriceData) String() string

Jump to

Keyboard shortcuts

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