feat: surface the cloud tier — balancer, dbaas, monitoring, cloud ssl - #77
Merged
Conversation
Surface the SDK's cloud load-balancer service (client.Balancer, endpoint /balancer) as a top-level `balancer` group: - list — the account's balancers (table + json) - config — order catalog (plans, protocols) + isCreateEnable - create — order a balancer; guarded by the confirm prompt (bills) - edit — reconfigure in place; confirm unless --yes - remove — cancel a balancer; confirm unless --yes (destructive) Servers and rules are supplied as repeatable structured flags (--server ip[,weight[,vpsName]], --rule protoBal:portBal:protoSrv:portSrv), parsed into the SDK's Server/Rule structs. Mutating and destructive commands route through the shared confirm helper. Every command renders through render() keeping the table and json paths in sync. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: sanchpet <petrov@sanch.pet>
Surface the SDK's managed-database service (client.DBaaS, endpoint /dbaas) as a top-level command group, keeping the CLI a thin presentation layer. Reads: 'dbaas list' (clusters) and 'dbaas config' (engine/plan catalog). Lifecycle: 'dbaas create' (bills — plan by id or via the constructor from --cpu/--memory/--storage/--replicas), 'dbaas edit', and the destructive 'dbaas remove' / 'dbaas delete-database'. Mutating and destructive ops confirm via the shared huh helper unless --yes; every command renders through render() with paired table/json paths. First-order plumbing (getFirstOrderInfo/removeFirst/setUpgradeAgree/ validateUsers) is intentionally left unsurfaced — it is the promotional onboarding flow, not part of the core cluster lifecycle. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: sanchpet <petrov@sanch.pet>
Surface the SDK's uptime-monitoring services as a top-level `monitoring`
group. Three SDK services back it: the subscription/tariff (/monitoring),
the checks (/monitoring/checks), and the notification contacts
(/monitoring/contacts).
- monitoring plans/enable/disable/change — the subscription; the billing
toggles confirm unless --yes.
- monitoring check {list,types,show,create,edit,activate,deactivate,
remove,history} — the check CRUD, with create mapping Spec fields to
flags and confirming (it bills the check quota); remove confirms.
- monitoring contact {list,add-email,add-phone,add-telegram,edit,remove,
verify,verify-status} — the contact lifecycle; add-telegram folds in the
verify-code request; remove confirms.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: sanchpet <petrov@sanch.pet>
Surface the SDK's cloud/account SSL-certificate service (client.SSL, endpoint /vps/ssl) as the top-level `ssl` group: list, order-list, download, prolong-info, autoprolong, order and remove. This is a separate SpaceWeb service from the existing `hosting ssl` group (client.VHSSL, endpoint /vh/ssl), which covers shared-hosting certificates. The two panels are distinct accounts, so they get distinct command groups; the group short-description says so. The Go identifier is cloudSSLCmd to avoid the sslCmd used by `hosting ssl`. Mutating/destructive/paid ops confirm via the shared confirm helper unless --yes: `order` states it bills before submitting a paid cert, `remove` warns it is irreversible. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: sanchpet <petrov@sanch.pet>
Register balancer/dbaas/monitoring/ssl as profile-bindable API command groups and add them to the root command-tree assertion. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: sanchpet <petrov@sanch.pet>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Four new top-level command groups surfacing the cloud-tier SDK services that had no CLI presence:
balancer— cloud load balancers (list,config,create,edit,remove); structured repeatable--server/--ruleflags.dbaas— managed-database clusters (list,config,create,edit,remove,delete-database); plan via--planor the--cpu/--memory/--storage/--replicasconfigurator.monitoring— uptime monitoring: subscriptionplans/enable/disable/change, pluscheck(list/types/show/create/edit/activate/deactivate/remove/history) andcontact(list/add-email|phone|telegram/edit/remove/verify) subgroups.ssl— cloud/account SSL certificates (list,order-list,download,prolong-info,autoprolong,order,remove). Distinct from the shared-hostinghosting ssl(parent identifiercloudSSLCmd,Use: "ssl").All four are registered as profile-bindable API command groups.
Why
Before this, VPS was the only cloud-tier service exposed in the CLI;
balancer/dbaas/monitoring/cloud-sslexisted in the SDK (100% coverage) but weren't surfaced. This closes the SDK→CLI gap for the cloud panel.Verification
mise run cigreen — gofmt clean,golangci-lint0 issues, tests pass, build ok.client()+render()(table/json in sync); mutating/destructive/billing ops confirm via the shared helper unless--yes.Built in parallel by isolated worktree agents (one group each), then integrated: cherry-picked onto one branch, profile binding + tree assertion added, full CI re-run.