mirror of
https://github.com/coder/coder.git
synced 2026-06-03 21:18:24 +00:00
9b14fd3adc
Source code changes: - Added a wrapper for the boundary subcommand that checks feature entitlement before executing the underlying command. - Added a helper that returns the Boundary version using the runtime/debug package, which reads this information from the go.mod file. - Added FeatureBoundary to the corresponding enum. - Move boundary command from AGPL to enterprise. `NOTE`: From now on, the Boundary version will be specified in go.mod instead of being defined in AI modules.
41 lines
892 B
Go
41 lines
892 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.boundary(),
|
|
r.workspaceProxy(),
|
|
r.features(),
|
|
r.licenses(),
|
|
r.groups(),
|
|
r.prebuilds(),
|
|
r.provisionerd(),
|
|
r.externalWorkspaces(),
|
|
r.aibridge(),
|
|
}
|
|
}
|
|
|
|
func (*RootCmd) enterpriseExperimental() []*serpent.Command {
|
|
return []*serpent.Command{}
|
|
}
|
|
|
|
func (r *RootCmd) EnterpriseSubcommands() []*serpent.Command {
|
|
all := append(r.CoreSubcommands(), r.enterpriseOnly()...)
|
|
return all
|
|
}
|