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