Skip to content

Commit

Permalink
doc: document --config flag on connectors (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
raulb authored Sep 29, 2021
1 parent d37a7db commit 15dd779
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 13 deletions.
7 changes: 0 additions & 7 deletions cmd/meroxa/global/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ const (
func RegisterGlobalFlags(cmd *cobra.Command) {
cmd.PersistentFlags().BoolVar(&flagJSON, "json", false, "output json")

// It stays around until we update our acceptance tests
cmd.PersistentFlags().StringVar(&flagCLIConfigFile, "config", "", "meroxa configuration file")

cmd.PersistentFlags().StringVar(&flagCLIConfigFile, "cli-config-file", "", "meroxa configuration file")
cmd.PersistentFlags().StringVar(&flagAPIURL, "api-url", "", "API url")
cmd.PersistentFlags().BoolVar(&flagDebug, "debug", false, "display any debugging information")
Expand All @@ -64,10 +61,6 @@ func RegisterGlobalFlags(cmd *cobra.Command) {
if err := cmd.PersistentFlags().MarkHidden("api-url"); err != nil {
panic(fmt.Sprintf("could not mark flag as hidden: %v", err))
}

if err := cmd.PersistentFlags().MarkHidden("config"); err != nil {
panic(fmt.Sprintf("could not mark flag as hidden: %v", err))
}
}

func PersistentPreRunE(cmd *cobra.Command) error {
Expand Down
1 change: 1 addition & 0 deletions docs/cmd/md/meroxa_connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ meroxa connect --from RESOURCE-NAME --to RESOURCE-NAME [flags]
### Options

```
-c, --config string connector configuration
--from string source resource name
-h, --help help for connect
--input string command delimited list of input streams
Expand Down
1 change: 1 addition & 0 deletions docs/cmd/md/meroxa_connectors_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ meroxa connectors create [NAME] --to pg2redshift --input orders --pipeline my-pi
### Options

```
-c, --config string connector configuration
--from string resource name to use as source
-h, --help help for create
--input string command delimited list of input streams
Expand Down
7 changes: 4 additions & 3 deletions docs/cmd/md/meroxa_connectors_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ meroxa connector update connector-name --config '{"table.name.format":"public.co
### Options

```
-h, --help help for update
--name string new connector name
--state string new connector state
-c, --config string new connector configuration
-h, --help help for update
--name string new connector name
--state string new connector state
```

### Options inherited from parent commands
Expand Down
1 change: 1 addition & 0 deletions docs/cmd/www/meroxa-connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ meroxa connect --from RESOURCE-NAME --to RESOURCE-NAME [flags]
### Options

```
-c, --config string connector configuration
--from string source resource name
-h, --help help for connect
--input string command delimited list of input streams
Expand Down
1 change: 1 addition & 0 deletions docs/cmd/www/meroxa-connectors-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ meroxa connectors create [NAME] --to pg2redshift --input orders --pipeline my-pi
### Options

```
-c, --config string connector configuration
--from string resource name to use as source
-h, --help help for create
--input string command delimited list of input streams
Expand Down
7 changes: 4 additions & 3 deletions docs/cmd/www/meroxa-connectors-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ meroxa connector update connector-name --config '{"table.name.format":"public.co
### Options

```
-h, --help help for update
--name string new connector name
--state string new connector state
-c, --config string new connector configuration
-h, --help help for update
--name string new connector name
--state string new connector state
```

### Options inherited from parent commands
Expand Down
9 changes: 9 additions & 0 deletions etc/completion/meroxa.completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,9 @@ _meroxa_connect()
flags_with_completion=()
flags_completion=()

flags+=("--config=")
two_word_flags+=("--config")
two_word_flags+=("-c")
flags+=("--from=")
two_word_flags+=("--from")
flags+=("--help")
Expand Down Expand Up @@ -722,6 +725,9 @@ _meroxa_connectors_create()
flags_with_completion=()
flags_completion=()

flags+=("--config=")
two_word_flags+=("--config")
two_word_flags+=("-c")
flags+=("--from=")
two_word_flags+=("--from")
flags+=("--help")
Expand Down Expand Up @@ -903,6 +909,9 @@ _meroxa_connectors_update()
flags_with_completion=()
flags_completion=()

flags+=("--config=")
two_word_flags+=("--config")
two_word_flags+=("-c")
flags+=("--help")
flags+=("-h")
flags+=("--name=")
Expand Down
4 changes: 4 additions & 0 deletions etc/man/man1/meroxa-connect.1
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ meroxa connector create \-\-to redshift \-\-input orders \-\-pipeline my\-pipeli


.SH OPTIONS
.PP
\fB\-c\fP, \fB\-\-config\fP=""
connector configuration

.PP
\fB\-\-from\fP=""
source resource name
Expand Down
4 changes: 4 additions & 0 deletions etc/man/man1/meroxa-connectors-create.1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Use \fB\fCconnectors create\fR to create a connector from a source (\-\-from) or


.SH OPTIONS
.PP
\fB\-c\fP, \fB\-\-config\fP=""
connector configuration

.PP
\fB\-\-from\fP=""
resource name to use as source
Expand Down
4 changes: 4 additions & 0 deletions etc/man/man1/meroxa-connectors-update.1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Update connector name, configuration or state


.SH OPTIONS
.PP
\fB\-c\fP, \fB\-\-config\fP=""
new connector configuration

.PP
\fB\-h\fP, \fB\-\-help\fP[=false]
help for update
Expand Down

0 comments on commit 15dd779

Please sign in to comment.