Documentation
¶
Overview ¶
Package query is the read-only view layer over the manifest + inventory that backs list/view (and feeds audit). It returns structured data only; rendering lives with the caller, so the CLI and the future TUI format it however they like. Provider category powers --type; the host's free-form tags power --tag.
Index ¶
Constants ¶
const ( NoKey = "no-key" NeedsRedeploy = "needs-redeploy" Deployed = "deployed" )
Deployment status values.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeploymentRow ¶
DeploymentRow is one recorded deployment of a key.
type HostDetail ¶
type HostDetail struct {
Profile string
Alias string
Hostname string
User string
Port int
IdentityFile string
KnownHosts string
ProviderLabel string
KeyName string
Status string
Fingerprint *string
ExpiresOn *string
Tags []string
RawOptions manifest.OrderedOptions
Deployments []DeploymentRow
RequiresVPN bool
VPNName *string
VPNURL *string
}
HostDetail is the resolved view of a single host (view <alias>).
type HostRow ¶
type HostRow struct {
Alias string
Hostname string
ProviderLabel string // e.g. "github/vcs" or "server"
KeyName string
Status string // no-key | needs-redeploy | deployed
Tags []string
}
HostRow is one host in a list view.
type ProfileGroup ¶
type ProfileGroup struct {
Name string
Empty bool // the profile has no hosts at all
Rows []HostRow
}
ProfileGroup is a profile and its (possibly filtered) host rows.
type ProfileSummary ¶
ProfileSummary is the resolved view of a whole profile (view <profile>).
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
Query answers read-only questions about the manifest + inventory.
func New ¶
New builds a Query. providersFile is the user's providers.json (may be absent; the embedded default catalog is used as the fallback).