utils

package
v0.0.0-...-274743d Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsciiTitleText

func AsciiTitleText()

ASCII art for the bare "ks" cmd

func AssignUrl

func AssignUrl(t TimeAssignVals, u UrlAssignVals) (url string)

func CheckTickerBadChars

func CheckTickerBadChars(x string) error

CheckTickerBadChars Tests ticker input for special chars, exported for testing

func GetRequest

func GetRequest(key string, secret string, url string) (body []byte, err error)

func GetTickPrice

func GetTickPrice(cfg GetTickerPriceConfig, ticker string, timeVal string, urlType string, ch chan float64)

func IsTickerValid

func IsTickerValid(ticker string) error

IsTickerValid tests ticker input for valid ticker, exported for testing

func SelectRandomTicker

func SelectRandomTicker() (string, string)

func TickerValidation

func TickerValidation(ticker string)

TickerValidation checks user ticker input for special chars and valid ticker

Types

type GetTickerPriceConfig

type GetTickerPriceConfig struct {
	Key    string
	Secret string
	Wg     *sync.WaitGroup
	Cmd    string
}

type TimeAssignVals

type TimeAssignVals struct {
	TimeVal string
	Ticker  string
	Cmd     string
	UrlType string
}

type UrlAssignVals

type UrlAssignVals struct {
	StartTime string
	EndTime   string
	Timeframe string
	Iterator  int
}

func AssignTime

func AssignTime(t TimeAssignVals) (u UrlAssignVals)

Jump to

Keyboard shortcuts

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