Decrease number of flags shown for daemon/search (#4312)
* Decrease number of flags shown for daemon/search * Update changelog --------- Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com> Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
This commit is contained in:
7 files changed
+99
-11
No files matched your search
@@ -46,7 +46,46 @@ Usage: boundary daemon add-token [options]
|
||||
}
|
||||
|
||||
func (c *AddTokenCommand) Flags() *base.FlagSets {
|
||||
set := c.FlagSet(base.FlagSetClient | base.FlagSetOutputFormat)
|
||||
set := c.FlagSet(base.FlagSetOutputFormat)
|
||||
f := set.NewFlagSet("Connection Options")
|
||||
|
||||
f.StringVar(&base.StringVar{
|
||||
Name: base.FlagNameAddr,
|
||||
Target: &c.FlagAddr,
|
||||
EnvVar: api.EnvBoundaryAddr,
|
||||
Completion: complete.PredictAnything,
|
||||
Usage: "Addr of the Boundary controller, as a complete URL (e.g. https://boundary.example.com:9200).",
|
||||
})
|
||||
|
||||
f = set.NewFlagSet("Client Options")
|
||||
|
||||
f.StringVar(&base.StringVar{
|
||||
Name: "token-name",
|
||||
Target: &c.FlagTokenName,
|
||||
EnvVar: base.EnvTokenName,
|
||||
Usage: `If specified, the given value will be used as the name when storing the token in the system credential store. This can allow switching user identities for different commands.`,
|
||||
})
|
||||
|
||||
f.StringVar(&base.StringVar{
|
||||
Name: "keyring-type",
|
||||
Target: &c.FlagKeyringType,
|
||||
Default: "auto",
|
||||
EnvVar: base.EnvKeyringType,
|
||||
Usage: `The type of keyring to use. Defaults to "auto" which will use the Windows credential manager, OSX keychain, or cross-platform password store depending on platform. Set to "none" to disable keyring functionality. Available types, depending on platform, are: "wincred", "keychain", "pass", and "secret-service".`,
|
||||
})
|
||||
|
||||
f.StringVar(&base.StringVar{
|
||||
Name: "token",
|
||||
Target: &c.FlagToken,
|
||||
Usage: `A URL pointing to a file on disk (file://) from which a token will be read or an env var (env://) from which the token will be read. Overrides the "token-name" parameter.`,
|
||||
})
|
||||
|
||||
f.BoolVar(&base.BoolVar{
|
||||
Name: "output-curl-string",
|
||||
Target: &c.FlagOutputCurlString,
|
||||
Usage: "Instead of executing the request, print an equivalent cURL command string and exit.",
|
||||
})
|
||||
|
||||
return set
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ Usage: boundary daemon start [options]
|
||||
}
|
||||
|
||||
func (c *StartCommand) Flags() *base.FlagSets {
|
||||
set := c.FlagSet(base.FlagSetHTTP | base.FlagSetClient)
|
||||
set := c.FlagSet(base.FlagSetNone)
|
||||
|
||||
f := set.NewFlagSet("Command Options")
|
||||
f.StringVar(&base.StringVar{
|
||||
@@ -82,6 +82,7 @@ func (c *StartCommand) Flags() *base.FlagSets {
|
||||
Completion: complete.PredictSet("trace", "debug", "info", "warn", "err"),
|
||||
Usage: "Log verbosity level, mostly as a fallback for events. Supported values (in order of more detail to less) are " +
|
||||
"\"trace\", \"debug\", \"info\", \"warn\", and \"err\".",
|
||||
Hidden: true,
|
||||
})
|
||||
f.StringVar(&base.StringVar{
|
||||
Name: "log-format",
|
||||
@@ -93,6 +94,7 @@ func (c *StartCommand) Flags() *base.FlagSets {
|
||||
Name: "database-url",
|
||||
Target: &c.flagDatabaseUrl,
|
||||
Usage: `If set, specifies the URL used to connect to the sqlite database (store) for caching. This can refer to a file on disk (file://) from which a URL will be read; an env var (env://) from which the URL will be read; or a direct database URL.`,
|
||||
Hidden: true,
|
||||
})
|
||||
f.DurationVar(&base.DurationVar{
|
||||
Name: "refresh-interval",
|
||||
|
||||
@@ -52,7 +52,15 @@ Usage: boundary daemon status [options]
|
||||
}
|
||||
|
||||
func (c *StatusCommand) Flags() *base.FlagSets {
|
||||
set := c.FlagSet(base.FlagSetClient | base.FlagSetOutputFormat)
|
||||
set := c.FlagSet(base.FlagSetOutputFormat)
|
||||
f := set.NewFlagSet("Client Options")
|
||||
|
||||
f.BoolVar(&base.BoolVar{
|
||||
Name: "output-curl-string",
|
||||
Target: &c.FlagOutputCurlString,
|
||||
Usage: "Instead of executing the request, print an equivalent cURL command string and exit.",
|
||||
})
|
||||
|
||||
return set
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ Usage: boundary daemon stop
|
||||
}
|
||||
|
||||
func (c *StopCommand) Flags() *base.FlagSets {
|
||||
set := c.FlagSet(base.FlagSetHTTP | base.FlagSetClient)
|
||||
set := c.FlagSet(base.FlagSetNone)
|
||||
return set
|
||||
}
|
||||
|
||||
|
||||
@@ -62,13 +62,42 @@ Usage: boundary search [options]
|
||||
}
|
||||
|
||||
func (c *SearchCommand) Flags() *base.FlagSets {
|
||||
set := c.FlagSet(base.FlagSetClient | base.FlagSetOutputFormat)
|
||||
set := c.FlagSet(base.FlagSetOutputFormat)
|
||||
|
||||
f := set.NewFlagSet("Command Options")
|
||||
f := set.NewFlagSet("Client Options")
|
||||
|
||||
f.StringVar(&base.StringVar{
|
||||
Name: "token-name",
|
||||
Target: &c.FlagTokenName,
|
||||
EnvVar: base.EnvTokenName,
|
||||
Usage: `If specified, the given value will be used as the name when storing the token in the system credential store. This can allow switching user identities for different commands.`,
|
||||
})
|
||||
|
||||
f.StringVar(&base.StringVar{
|
||||
Name: "keyring-type",
|
||||
Target: &c.FlagKeyringType,
|
||||
Default: "auto",
|
||||
EnvVar: base.EnvKeyringType,
|
||||
Usage: `The type of keyring to use. Defaults to "auto" which will use the Windows credential manager, OSX keychain, or cross-platform password store depending on platform. Set to "none" to disable keyring functionality. Available types, depending on platform, are: "wincred", "keychain", "pass", and "secret-service".`,
|
||||
})
|
||||
|
||||
f.StringVar(&base.StringVar{
|
||||
Name: "token",
|
||||
Target: &c.FlagToken,
|
||||
Usage: `A URL pointing to a file on disk (file://) from which a token will be read or an env var (env://) from which the token will be read. Overrides the "token-name" parameter.`,
|
||||
})
|
||||
|
||||
f.BoolVar(&base.BoolVar{
|
||||
Name: "output-curl-string",
|
||||
Target: &c.FlagOutputCurlString,
|
||||
Usage: "Instead of executing the request, print an equivalent cURL command string and exit.",
|
||||
})
|
||||
|
||||
f = set.NewFlagSet("Command Options")
|
||||
f.StringVar(&base.StringVar{
|
||||
Name: "query",
|
||||
Target: &c.flagQuery,
|
||||
Usage: `If set, specifies the resource search query`,
|
||||
Usage: `If set, specifies the resource search query. See https://www.boundaryproject.io/docs/commands/search for more information.`,
|
||||
})
|
||||
f.StringVar(&base.StringVar{
|
||||
Name: "filter",
|
||||
|
||||
Reference in new issue
Block a user