feat: Add bucket schema management commands (#52)
* 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 is contained in:
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"github.com/influxdata/influx-cli/v2/internal"
|
||||
"github.com/influxdata/influx-cli/v2/internal/api"
|
||||
"github.com/influxdata/influx-cli/v2/pkg/cli/middleware"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
@ -44,7 +45,9 @@ func newBucketCmd() *cli.Command {
|
||||
}
|
||||
|
||||
func newBucketCreateCmd() *cli.Command {
|
||||
var params internal.BucketsCreateParams
|
||||
params := internal.BucketsCreateParams{
|
||||
SchemaType: api.SCHEMATYPE_IMPLICIT,
|
||||
}
|
||||
return &cli.Command{
|
||||
Name: "create",
|
||||
Usage: "Create bucket",
|
||||
@ -91,6 +94,12 @@ func newBucketCreateCmd() *cli.Command {
|
||||
EnvVars: []string{"INFLUX_ORG"},
|
||||
Destination: ¶ms.OrgName,
|
||||
},
|
||||
&cli.GenericFlag{
|
||||
Name: "schema-type",
|
||||
Usage: "The schema type (implicit, explicit)",
|
||||
DefaultText: "implicit",
|
||||
Value: ¶ms.SchemaType,
|
||||
},
|
||||
),
|
||||
Action: func(ctx *cli.Context) error {
|
||||
clients := getBucketsClient(ctx)
|
||||
|
||||
Reference in New Issue
Block a user