timeseries

package
v0.0.0-...-ffba611 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiffDays

func DiffDays(dateA, dateB string) (days int)

func FromTSToDate

func FromTSToDate(ts int64) (date string)

func ToDate

func ToDate(t time.Time) (date string)

func ToTime

func ToTime(date string) time.Time

Types

type Series

type Series []ValueAt

func FromTuples

func FromTuples(tuples [][]interface{}) Series

func (Series) At

func (ts Series) At(t time.Time) (v ValueAt, found bool)

func (Series) AtDate

func (ts Series) AtDate(date string) (v ValueAt, found bool)

func (Series) Print

func (ts Series) Print()

func (Series) PrintSample

func (ts Series) PrintSample(size int)

type ValueAt

type ValueAt struct {
	TS int64   `json:"ts"`
	V  float64 `json:"v"`
}

func (ValueAt) Date

func (v ValueAt) Date() string

func (ValueAt) Time

func (v ValueAt) Time() time.Time

Jump to

Keyboard shortcuts

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