Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCmd ¶
AddCmd adds a command, inheriting the parent's Args validator if not explicitly set. Individual commands that need different argument rules can override this by setting their own Args validator.
func RequireOrganizationID ¶ added in v1.47.0
func RequireOrganizationID(opts RootOptions) (string, error)
RequireOrganizationID resolves the flag/environment value and requires an organization scope.
func ValidateOrganizationRole ¶ added in v1.47.0
func ValidateUserID ¶ added in v1.47.0
ValidateUserID matches the public API's toApiPathOrQueryParamNonNegativeInt: user IDs are integers >= 0. Cobra's integer flags reject fractional input. See codesphere-monorepo/packages/public-api-service/common/src/ts/server/apiTypeConverter.ts.
Types ¶
type Client ¶ added in v1.47.0
type Client interface {
UploadSSHPublicKey(publicKey string) error
ListSSHPublicKeys() ([]api.SSHPublicKey, error)
DeleteSSHPublicKey(fingerprint string) error
ChangeOrganizationMemberRole(orgId string, userId int, role string) error
ListOrganizationMembers(orgId string) ([]api.OrganizationMember, error)
RemoveOrganizationMember(orgId string, userId int) error
AddOrganizationMember(orgId, email, role string) error
ListTeams(orgId string) ([]api.Team, error)
ListWorkspaces(teamId int) ([]api.Workspace, error)
ListBaseimages() ([]api.Baseimage, error)
ListOrganizations() ([]api.Organization, error)
CreateOrganization(name string, adminEmail string) (*api.Organization, error)
GetWorkspace(workspaceId int) (api.Workspace, error)
WorkspaceStatus(workspaceId int) (*api.WorkspaceStatus, error)
WaitForWorkspaceRunning(workspace *api.Workspace, timeout time.Duration) error
ScaleWorkspace(wsId int, replicas int) error
ScaleLandscapeServices(wsId int, services map[string]int) error
SetEnvVarOnWorkspace(workspaceId int, vars map[string]string) error
ExecCommand(workspaceId int, command string, workdir string, env map[string]string) (string, string, error)
ListWorkspacePlans() ([]api.WorkspacePlan, error)
DeployWorkspace(args api.DeployWorkspaceArgs) (*api.Workspace, error)
DeleteWorkspace(wsId int) error
StartPipelineStage(wsId int, profile string, stage string) error
StopPipelineStage(wsId int, stage string) error
GetPipelineState(wsId int, stage string) ([]api.PipelineStatus, error)
GitPull(wsId int, remote string, branch string) error
DeployLandscape(wsId int, profile string) error
CreateTeam(orgId string, name string, dcId int) (*api.Team, error)
DeleteTeam(teamId int) error
AddTeamMember(teamId int, email string, role int) error
RemoveTeamMember(teamId int, userId int) error
ListTeamMembers(teamId int) ([]api.TeamMember, error)
}
Client is the common API contract consumed by all CLI commands.
type OutputFormat ¶
type OutputFormat string
const ( OutputFormatTable OutputFormat = "table" OutputFormatJSON OutputFormat = "json" OutputFormatYAML OutputFormat = "yaml" )