Commit Graph

12 Commits

Author SHA1 Message Date
fb2d19c884 feat: port table-printers from influxdb (#145) 2021-06-24 11:31:19 -04:00
8972d23024 feat: port jsonnet decoder from influxdb (#143) 2021-06-23 13:37:46 -04:00
a3408e031a chore: refactor password code for StdIO (#139) 2021-06-22 15:34:38 -05:00
23e73e9146 feat: reimplement influx secret CLI command (#125)
* refactor: rename `getPassword` to `getSecret`
2021-06-21 13:33:51 -05:00
581daaa5ba build: run tests natively on ARM, Mac, and Windows in CI (#111) 2021-06-14 10:36:35 -04:00
b1ba53bae2 refactor: move request-compression out of codegen, avoid some buffering (#118) 2021-06-11 16:01:34 -04:00
1c2f61f5ca feat(write): warn about standalone CR characters in header lines (#109)
* feat(write): warn about standalone CR characters in header lines

* feat(write): add test for Windows CRLF line endings

* chore: improve warning message

Co-authored-by: Daniel Moran <danxmoran@gmail.com>

* chore: update test with a new warning message

Co-authored-by: Daniel Moran <danxmoran@gmail.com>
2021-06-07 14:59:57 +02:00
9747d05ae1 refactor: expose generated code and client business logic to share with Kapacitor (#103)
* refactor: take clients out of internal

* refactor: move stdio to pkg

* Move internal/api to api

* refactor: final changes for Kapacitor to access shared functionality

* chore: regenerate mocks

* fix: bad automated refactor

* chore: extra formatting not caught by make fmt
2021-05-25 10:05:01 -04:00
6a9f17d100 feat: add formatted output to influx query (#87) 2021-05-13 10:54:45 -04:00
3414e1a983 refactor: Move from global state to functions (#53)
This commit represents a few experiments of features I've used in Cobra

1. Uses cli.GenericFlag to encapsulate parsing and validation of flag
   values at parse time. This removes the burden from the individual
   CLI commands to parse and validate args and options.

2. Add influxid.ID that may be used by any flag that requires an
   Influx ID. influxid.ID parses and validates string value is a valid
   ID, removing this burden from individual commands and ensuring valid
   values before the command actions begins.

3. Binds cli.Flags directly to params structures to directly capture
   the values when parsing flags.

4. Moves from global state to local builder functions for the majority
   of the commands. This allows the commands to bind to flag variables
   reducing the repeated ctx.String(), ctx.Int(), etc

5. Leverages the BeforeFunc to create middleware and inject the CLI and
   API client into commands, saving the repeated boilerplate across
   all of the instantiated commands. This is extensible, so additional
   middleware can be appends using the middleware.WithBeforeFns
2021-05-03 09:31:45 -04:00
7d6ea73c33 feat: use signal-wrapped contexts in CLI commands (#38) 2021-04-26 09:51:15 -04:00
f2d10e34f9 feat: port csv2lp from influxdb (#37)
Co-authored-by: William Baker <55118525+wbaker85@users.noreply.github.com>
2021-04-26 09:12:29 -04:00