From 800e4c2cfbb23bce2e224ad30e82c1d2a1d5a1d7 Mon Sep 17 00:00:00 2001 From: William Baker Date: Mon, 21 Jun 2021 16:03:39 -0400 Subject: [PATCH] feat: placeholder for v1 subcommands (#135) * feat: placeholder for v1 subcommands * chore: more usage comments --- cmd/influx/main.go | 1 + cmd/influx/v1_commands.go | 14 ++++++++++++++ cmd/influx/v1_dbrp.go | 19 +++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 cmd/influx/v1_commands.go create mode 100644 cmd/influx/v1_dbrp.go diff --git a/cmd/influx/main.go b/cmd/influx/main.go index 82ba211..3c56d9d 100644 --- a/cmd/influx/main.go +++ b/cmd/influx/main.go @@ -50,6 +50,7 @@ var app = cli.App{ newDashboardsCommand(), newExportCmd(), newSecretCommand(), + newV1SubCommand(), }, } diff --git a/cmd/influx/v1_commands.go b/cmd/influx/v1_commands.go new file mode 100644 index 0000000..72b426f --- /dev/null +++ b/cmd/influx/v1_commands.go @@ -0,0 +1,14 @@ +package main + +import "github.com/urfave/cli/v2" + +func newV1SubCommand() *cli.Command { + return &cli.Command{ + Name: "v1", + Usage: "InfluxDB v1 management commands", + Subcommands: []*cli.Command{ + newV1DBRPCmd(), + // etc + }, + } +} diff --git a/cmd/influx/v1_dbrp.go b/cmd/influx/v1_dbrp.go new file mode 100644 index 0000000..1c20b0f --- /dev/null +++ b/cmd/influx/v1_dbrp.go @@ -0,0 +1,19 @@ +package main + +import "github.com/urfave/cli/v2" + +func newV1DBRPCmd() *cli.Command { + return &cli.Command{ + Name: "dbrp", + Usage: "Commands to manage database and retention policy mappings for v1 APIs", + Subcommands: []*cli.Command{ + // newV1DBRPListCmd(), + // newV1DBRPCreateCmd(), + // newV1DBRPDeleteCmd(), + // newV1DBRPUpdateCmd(), + }, + } +} + +// commands will be implemented below, with business logic residing in their +// respective client package, like "v1_dbrp"