utils

package
v4.2.151+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEndTimeIdxFromColumns added in v0.3.8

func GetEndTimeIdxFromColumns(columns []string) int

GetTimeIdxFromColumns get index of end_time column

func GetSampleInstance

func GetSampleInstance(timeObj, endTimeObj *time.Time, numVal string) *datahub_v1alpha1.Sample

GetSampleInstance get Sample instance

func GetTimeIdxFromColumns

func GetTimeIdxFromColumns(columns []string) int

GetTimeIdxFromColumns get index of time column

func NanoSecondToSecond

func NanoSecondToSecond(nanosecond int64) int64

NanoSecondToSecond translate nano seconds to seconds

func ParseTime

func ParseTime(timeStr string) (time.Time, error)

func ReadCSV added in v0.3.8

func ReadCSV(file string) (map[string][]string, error)

func StringToFloat64 added in v0.3.0

func StringToFloat64(str string) (float64, error)

StringToFloat64 parse str to float64

func StringToInt64

func StringToInt64(str string) (int64, error)

StringToInt64 parse str to int64

func TimeStampToNanoSecond

func TimeStampToNanoSecond(timestamp *timestamp.Timestamp) int64

TimeStampToNanoSecond get nano seconds from timestamp object

Types

type StringStringMap

type StringStringMap map[string]string

func (StringStringMap) ReplaceKeys

func (m StringStringMap) ReplaceKeys(old, new []string) StringStringMap

Jump to

Keyboard shortcuts

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