2022-06-15 23:21:01 +00:00
|
|
|
package cli
|
|
|
|
|
|
|
|
import (
|
2023-03-23 22:42:20 +00:00
|
|
|
"github.com/coder/coder/cli/clibase"
|
2022-06-15 23:21:01 +00:00
|
|
|
)
|
|
|
|
|
2023-03-23 22:42:20 +00:00
|
|
|
func (r *RootCmd) parameters() *clibase.Cmd {
|
|
|
|
cmd := &clibase.Cmd{
|
2022-07-11 16:08:09 +00:00
|
|
|
Short: "List parameters for a given scope",
|
2023-03-23 22:42:20 +00:00
|
|
|
Long: formatExamples(
|
2022-07-11 16:08:09 +00:00
|
|
|
example{
|
|
|
|
Command: "coder parameters list workspace my-workspace",
|
|
|
|
},
|
|
|
|
),
|
|
|
|
Use: "parameters",
|
2022-06-15 23:21:01 +00:00
|
|
|
// Currently hidden as this shows parameter values, not parameter
|
|
|
|
// schemes. Until we have a good way to distinguish the two, it's better
|
|
|
|
// not to add confusion or lock ourselves into a certain api.
|
|
|
|
// This cmd is still valuable debugging tool for devs to avoid
|
|
|
|
// constructing curl requests.
|
|
|
|
Hidden: true,
|
|
|
|
Aliases: []string{"params"},
|
2023-03-23 22:42:20 +00:00
|
|
|
Children: []*clibase.Cmd{
|
|
|
|
r.parameterList(),
|
2022-10-06 20:15:28 +00:00
|
|
|
},
|
2022-06-15 23:21:01 +00:00
|
|
|
}
|
|
|
|
return cmd
|
|
|
|
}
|