mirror of
https://github.com/beclab/Olares
synced 2026-04-21 13:37:46 +00:00
* cli, daemon: add `olares-cli status` backed by olaresd /system/status
Adds a new top-level `olares-cli status` command that calls the local
olaresd daemon's `/system/status` HTTP endpoint and prints either a
grouped, annotated human-readable report or raw JSON.
To avoid duplicating the response schema, the daemon's `state` struct
and related enums are extracted into a new shared package
`cli/pkg/daemon/state`. The daemon now type-aliases those types so all
existing daemon call sites keep compiling unchanged.
Made-with: Cursor
* cli: drop unused state.APIResponse envelope type
The HTTP client in cli/pkg/daemon/api/client.go intentionally uses an
inline anonymous envelope with json.RawMessage for the data field so
that --json mode can passthrough the bytes verbatim, so the public
APIResponse{Data State} type defined here had zero references. Remove
it; if a strongly-typed consumer ever shows up, re-add then.
Addresses Cursor Bugbot feedback on PR #2917.
Made-with: Cursor
|
||
|---|---|---|
| .. | ||
| backups-backup.md | ||
| backups-download.md | ||
| backups-region.md | ||
| backups-restore.md | ||
| backups-snapshots.md | ||
| backups.md | ||
| change-ip.md | ||
| disk.md | ||
| download.md | ||
| gpu.md | ||
| info.md | ||
| install.md | ||
| logs.md | ||
| node.md | ||
| olares-cli.md | ||
| osinfo.md | ||
| precheck.md | ||
| prepare.md | ||
| release.md | ||
| start.md | ||
| status.md | ||
| stop.md | ||
| uninstall.md | ||
| upgrade.md | ||
| user-activate.md | ||
| user-create.md | ||
| user-delete.md | ||
| user-get.md | ||
| user-list.md | ||
| user-reset-password.md | ||
| user.md | ||