advanced

package
v0.0.0-...-94d9944 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package advanced hosts `olares-cli settings advanced` (the SPA's Developer/ folder, surfaced as "Advanced" in the docs). Backed by user-service's terminusd.controller.ts. All terminusd routes are `returnSucceed(response.data.data)` from the daemon, so the CLI sees a uniform BFL envelope on the wire.

Caveats:

  • The daemon side is JWS-signed for write paths. user-service's getXSignatureByRequest falls back to X-Authorization for read paths, so the CLI's bearer token works for `status`, `registries list`, and `images list`. Daemon write / restart verbs require real JWS signing and stay out of scope until that lands.
  • This is the profile-based settings surface. Hardware/cluster verbs that don't go through user-service live under the existing top-level `olares-cli` subtrees.

Package advanced implements the `olares-cli settings advanced` subtree — the docs call it "Advanced", the SPA's Vue page directory is "Developer/". Backed by user-service's terminusd.controller.ts (containerd, hosts-file, upgrade) + bfl/env.controller.ts (system / user env). The hardware/restart-class verbs (reboot, shutdown, ssh-password) and the OS upgrade flow are owner-only and require JWS-signed bodies; they are out of scope until a JWS-key sourcing path exists.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdvancedCommand

func NewAdvancedCommand(f *cmdutil.Factory) *cobra.Command

NewAdvancedCommand returns the `settings advanced` parent: containerd registries / images inspection and system / user env management. JWS-gated writes (registries mutations, OS upgrade, reboot / shutdown) stay out of scope until a JWS-key sourcing path exists.

func NewEnvCommand

func NewEnvCommand(f *cmdutil.Factory) *cobra.Command

func NewImagesCommand

func NewImagesCommand(f *cmdutil.Factory) *cobra.Command

`olares-cli settings advanced images ...`

Backed by /api/containerd/images?registry=<name>. The body is a BFL envelope around an array of RegistryImage:

{ "id": "sha256:...", "size": <int>, "repo_tags": ["..."] }

The SPA passes `registry` as a query string, so we expose it as `--registry`. The default (no --registry) aggregates across all registries.

func NewRegistriesCommand

func NewRegistriesCommand(f *cmdutil.Factory) *cobra.Command

`olares-cli settings advanced registries ...`

Backed by /api/containerd/registries (terminusd proxy). The body is a BFL envelope around an array of RegistryMirror:

{ "name": "...", "image_count": <int>, "image_size": <int>,
  "endpoints": ["..."] | null }

func NewStatusCommand

func NewStatusCommand(f *cmdutil.Factory) *cobra.Command

`olares-cli settings advanced status`

Backed by /api/system/status. The body is a BFL envelope around the TerminusStatus struct (terminusState, terminusdState, os_*, device_*, memory, disk, cpu_info, gpu_info, ...). The schema is large + tracks the daemon, so the table view shows the headline fields and points at --output json for the rest.

The `terminusState` enum has friendly labels documented in the SPA's services/abstractions/mdns/service.ts; here we just print the raw state code (and let users `grep` it). The CLI is for tooling, not UI — friendly labels would drift away from upstream over time.

Types

type Doer

type Doer interface {
	DoJSON(ctx context.Context, method, path string, body, out interface{}) error
}

type Format

type Format string
const (
	FormatTable Format = "table"
	FormatJSON  Format = "json"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL