asof

package
Version: v0.0.0-...-b178995 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package asof "as of" implements utils for building "as of"/time travel queries

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValid

func IsValid(asOf string) bool

IsValid returns true if the query looks valid. The only rule for now is not to conain any dots (to prevent issue with editor like vim who create metadata based on the filename).

func ParseAsOf

func ParseAsOf(asOf string) (int64, error)

ParseAsOf returns the parsed query (as a unix nano timestamp) or an error if it could not be parsed. Fow now it supports:

  • negative duration (as parsed by `time.ParseDuration`, e.g. -10h, -30s
  • few date formats from YYYY-MM-DDTHH:MM:SS to YYYY
  • and unix timestamps (second precision)

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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