mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
Adds `coder ai-gateway keys` commands: * `create <name>` creates key with given name * `list` lists existing keys (alias `ls`) * `delete <name | id>` removes key matching by name or key id, name has priority (alias `rm`)
42 lines
919 B
Go
42 lines
919 B
Go
package cli
|
|
|
|
import (
|
|
agplcli "github.com/coder/coder/v2/cli"
|
|
"github.com/coder/serpent"
|
|
)
|
|
|
|
type RootCmd struct {
|
|
agplcli.RootCmd
|
|
}
|
|
|
|
func (r *RootCmd) enterpriseOnly() []*serpent.Command {
|
|
return []*serpent.Command{
|
|
// These commands exist in AGPL, but we use a different implementation
|
|
// in enterprise:
|
|
r.Server(nil),
|
|
r.provisionerDaemons(),
|
|
agplcli.ExperimentalCommand(append(r.AGPLExperimental(), r.enterpriseExperimental()...)),
|
|
|
|
// New commands that don't exist in AGPL:
|
|
r.aiGateway(),
|
|
r.agentFirewall(),
|
|
r.boundaryAlias(),
|
|
r.workspaceProxy(),
|
|
r.features(),
|
|
r.licenses(),
|
|
r.groups(),
|
|
r.prebuilds(),
|
|
r.provisionerd(),
|
|
r.externalWorkspaces(),
|
|
}
|
|
}
|
|
|
|
func (*RootCmd) enterpriseExperimental() []*serpent.Command {
|
|
return []*serpent.Command{}
|
|
}
|
|
|
|
func (r *RootCmd) EnterpriseSubcommands() []*serpent.Command {
|
|
all := append(r.CoreSubcommands(), r.enterpriseOnly()...)
|
|
return all
|
|
}
|