* feat: stubbed out remote and replication commands and subcommands
* refactor: renamed remote.go file to match command
* refactor: combined replication metrics and replication list subcommands into list only
* refactor: removed extra appends to pass lint check
* feat: Bind skip-verify flag to INFLUX_SKIP_VERIFY
This improves the user experience when using the influx tooling in
development environments.
* chore: Update CHANGELOG with skip-verify flag binding
* feat: set logging info for cloud- or oss-only commands
* fix: add cloud-only to BucketSchemasApi
* fix: api-only flagging and %w for return error wrapping
* fix: keep the model assignment
* feat: v1 dbrp commands
* fix: fixed the cloud create command
* chore: cleanup
* fix: updated based on required attrs in swagger
* feat: update to latest openapi rev
* chore: made dbrps plural consistently
* chore: formatting
* fix: standardized Default field name and added comments
* chore: changed file name for command to singular
* 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
I started to see strange behavior where flags would merge across
subcommands. I'm not sure if the bug was in our 'append' usage or
in urfave/cli's handling of flag-slices, but this change seems to
fix the problem either way.
* feat: update generated client to include schema-management APIs
* feat: implement interfaces to decode flags and CSV
* feat: implement decoders for different measurement schema column formats
* feat: extend bucket CLI commands to support schema type property
* feat: add CLI commands to manage measurement schema
* test: add unit tests for bucket schema create, update and list commands
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