utils

package
v0.0.0-...-4ca6365 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDataPath

func GetDataPath() (string, error)

Return complete path where data is stored

func LoadConfig

func LoadConfig() error

Load configuration file

func LoadFromFile

func LoadFromFile(filename string) []byte

Load json data from file

func OutputResult

func OutputResult(data interface{}) error

Print json structures

func WriteToFile

func WriteToFile(filename string, content interface{}) error

Write json data to file

Types

type DateRange

type DateRange struct {
	StartDate int64
	EndDate   int64
}

func GetDateRanges

func GetDateRanges(maxHistory int, timeRange int) []DateRange

Returns a list of Unix timestamps range to fetch a certain amount in time of historical data

Jump to

Keyboard shortcuts

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