Categorygithub.com/golain-io/go-fluxbuilder
repositorypackage
0.1.4
Repository: https://github.com/golain-io/go-fluxbuilder.git
Documentation: pkg.go.dev

# README

gofluxbuilder

A package to build and generate flux queries with ease!

Usage

The current features include:

  • From
  • Range
  • Filter

The package is as easy to use as:

result, error := gofluxbuilder.NewGoFluxQueryBuilder()
                 .From(gofluxbuilder.FromBuilder{Bucket: "birdy"})
                 .Range(gofluxbuilder.RangeBuilder{Start: "-4y"})
                 .Filter(gofluxbuilder.NewFilterBuilder().
			Equal("_measurement", "migration"))
                 .Query(context.Background(), &cl)

Currently the following are supported in Filters:

  • and
  • or
  • ==
  • >
  • <
  • >=
  • <=