Documentation
¶
Index ¶
- Variables
- func Execute() error
- func HumanText(text string) string
- func LastCommandName() string
- func SupportedManifestPlatforms() []string
- func WasJSONRequested() bool
- type AccessExplainBackendAuthAssumption
- type AccessExplainExternalPolicyUnknown
- type AccessExplainKnown
- type AccessExplainLocalEnforcement
- type AccessExplainPeople
- type AccessExplainPublicExposure
- type AccessExplainResult
- type AccessExplainTargetClassification
- type AddDryRunResult
- type AddParams
- type AddResult
- type CLIManifest
- type CommandInfo
- type CompactCLIManifest
- type ConfigGetResult
- type ConfigItem
- type ConfigListResult
- type ConfigSetResult
- type CredentialSource
- type CredentialSources
- type DaemonInstalled
- type DoctorCounts
- type DoctorDaemon
- type DoctorFinding
- type DoctorPaths
- type DoctorResult
- type DoctorTailscaleSSH
- type ErrorCodeInfo
- type FlagInfo
- type HealthSetResult
- type HealthSettingsView
- type HighRiskOperation
- type InstallResult
- type InviteMutationResult
- type InviteResendResult
- type InviteRevokeResult
- type JSONResultFieldInfo
- type ListResult
- type ListServiceSummary
- type LoginBootstrapResult
- type LoginResult
- type LogoutResult
- type LogsResult
- type MCPLogsResult
- type PeopleAppAccess
- type PeopleGrantView
- type PeopleInviteView
- type PeopleListResult
- type PeopleRemoveResult
- type PeopleResult
- type PeopleView
- type PlatformInfo
- type RecipeResult
- type RegistryCheckIssue
- type RegistryCheckResult
- type RegistrySchemaInfo
- type RemoveResult
- type RequestDecisionResult
- type RequestListResult
- type ServeResult
- type ShareResult
- type StatusCredentialSlot
- type StatusCredentials
- type StatusPendingLogin
- type StatusResult
- type StatusRuntimeSnapshotResult
- type StatusServiceState
- type StatusServiceView
- type StatusURLsResult
- type StopResult
- type Supervision
- type TagsAddResult
- type TagsDeleteResult
- type TagsListResult
- type TagsPullResult
- type TagsServiceEntry
- type TagsSetDefaultResult
- type TagsSetResult
- type TailnetDeviceView
- type TailnetListResult
- type TemplateApplyResult
- type TemplateListResult
- type TemplatePlanItem
- type TemplateShowResult
- type TemplateSummary
- type ToolchainInfo
- type URLResult
- type UninstallResult
- type VersionResult
Constants ¶
This section is empty.
Variables ¶
var Commit string
Commit is the VCS commit SHA, set by main before Execute() is called. It is empty for `go build`/dev builds and embedded via -ldflags on release builds.
var Version string
Version is set by main before Execute() is called.
Functions ¶
func HumanText ¶ added in v0.1.2
HumanText adapts human-only output from the program entry point. It must not be applied to JSON payloads or command metadata.
func LastCommandName ¶
func LastCommandName() string
func SupportedManifestPlatforms ¶
func SupportedManifestPlatforms() []string
SupportedManifestPlatforms returns a sorted copy of the GOOS set accepted by manifest platform qualifiers. The full manifest and in-repository validators derive from this authority so widening Product support cannot leave a silent stale platform list behind.
func WasJSONRequested ¶
func WasJSONRequested() bool
WasJSONRequested returns true if --json was passed on the command line. Safe to call after rootCmd.Execute() returns.
Types ¶
type AccessExplainKnown ¶
type AccessExplainKnown struct {
PreserveHost bool `json:"preserve_host"`
ServiceType string `json:"service_type"`
Endpoint inspect.EndpointView `json:"endpoint"`
Exposure inspect.ExposureView `json:"exposure"`
Tags inspect.SummaryView `json:"tags"`
Allow inspect.SummaryView `json:"allow"`
Backend inspect.BackendView `json:"backend"`
Warnings []inspect.WarningView `json:"warnings,omitempty"`
TargetLoopbackClassification AccessExplainTargetClassification `json:"target_loopback_classification"`
}
type AccessExplainLocalEnforcement ¶
type AccessExplainLocalEnforcement struct {
Kind string `json:"kind"`
Applies bool `json:"applies"`
Summary string `json:"summary"`
AllowList inspect.SummaryView `json:"allow_list"`
FailureMode string `json:"failure_mode,omitempty"`
PublicExposure AccessExplainPublicExposure `json:"public_exposure"`
Notes []string `json:"notes"`
People *AccessExplainPeople `json:"people,omitempty"`
}
type AccessExplainPeople ¶
type AccessExplainResult ¶
type AccessExplainResult struct {
Reasons []accesslog.Count `json:"reasons,omitempty"`
SchemaVersion int `json:"schema_version"`
Service string `json:"service"`
Summary string `json:"summary"`
TSLinkKnown AccessExplainKnown `json:"tslink_known"`
TSLinkLocalEnforcement AccessExplainLocalEnforcement `json:"tslink_local_enforcement"`
ExternalPolicyUnknown AccessExplainExternalPolicyUnknown `json:"external_policy_unknown"`
BackendAuthAssumption AccessExplainBackendAuthAssumption `json:"backend_auth_assumption"`
}
type AddDryRunResult ¶
type AddParams ¶
type AddParams struct {
AccessTool string
For *string
Until *string
AckNever bool
PrintLinks bool
ExplicitFields map[string]bool
Remote string
PortalOnly bool
PortalPort int
Health *registry.HealthConfig
RequestLimits *registry.RequestLimits
Name string
Proxy string
PreserveHost bool
Requestable bool
Dir string
TCP string
Ephemeral bool
Tags string
Allow string
Funnel bool
FunnelTTL string
FunnelTTLSet bool
Now time.Time
Public bool
NoAutoProvision bool
NoDaemonInstall bool
ControlURL string
}
AddParams holds parsed flags for the add command.
type AddResult ¶
type AddResult struct {
Access []PeopleResult `json:"access,omitempty"`
RequestLimits *registry.EffectiveRequestLimits `json:"request_limits,omitempty"`
Name string `json:"name"`
Type string `json:"type"`
Created bool `json:"created"`
PreserveHost bool `json:"preserve_host"`
Requestable bool `json:"requestable"`
// ReplacedFields names the registry.json fields an add of an existing
// service changed or dropped; empty when the add created the service.
ReplacedFields fieldList `json:"replaced_fields"`
FunnelExpiresAt *time.Time `json:"funnel_expires_at,omitempty"`
FunnelRearmed bool `json:"funnel_rearmed"`
URL *string `json:"url"`
URLPending bool `json:"url_pending"`
Endpoint inspect.EndpointView `json:"endpoint"`
Exposure inspect.ExposureView `json:"exposure"`
Warnings []inspect.WarningView `json:"warnings,omitempty"`
DaemonRunning bool `json:"daemon_running"`
AuthURL string `json:"auth_url,omitempty"`
Next []string `json:"next,omitempty"`
}
AddResult is the JSON data for the add command.
type CLIManifest ¶
type CLIManifest struct {
SchemaVersion int `json:"schema_version"`
Platform PlatformInfo `json:"platform"`
SupportedPlatforms []string `json:"supported_platforms"`
RegistrySchemaVersion int `json:"registry_schema_version"`
Toolchain ToolchainInfo `json:"toolchain"`
ExitCodes map[string]int `json:"exit_codes"`
RegistrySchema RegistrySchemaInfo `json:"registry_schema"`
CredentialSources CredentialSources `json:"credential_sources"`
HighRiskOperations []HighRiskOperation `json:"high_risk_operations"`
RemoteSideEffectPlans []security.RemoteSideEffectPlan `json:"remote_side_effect_plans"`
Commands []CommandInfo `json:"commands"`
Capabilities security.CapabilityManifest `json:"capabilities"`
ErrorCodes map[string]ErrorCodeInfo `json:"error_codes"`
}
CLIManifest is the single machine-readable source of truth for the shipped command surface. It is generated from the live Cobra tree plus the output exit codes, registry schema version, and security capability manifest, so the documentation site can parity-check the exported fixture instead of hand-maintaining a second copy of these facts.
func Manifest ¶
func Manifest() CLIManifest
Manifest walks the root command and assembles the CLI manifest. It is pure and side-effect free; it never executes a command.
type CommandInfo ¶
type CommandInfo struct {
Path string `json:"path"`
Short string `json:"short"`
Flags []FlagInfo `json:"flags,omitempty"`
JSONResultFields map[string]JSONResultFieldInfo `json:"json_result_fields,omitempty"`
}
CommandInfo describes one command in the tree.
type CompactCLIManifest ¶
type CompactCLIManifest struct {
SchemaVersion int `json:"schema_version"`
Platform PlatformInfo `json:"platform"`
Flags []string `json:"flags"`
Commands map[string][]string `json:"commands"`
ErrorCodes map[string]int `json:"error_codes"`
}
CompactCLIManifest is a live, platform-specific command summary. It carries the full manifest's schema version for envelope evolution, but Commands holds flag names only and deliberately has no entry-qualifier shape. Because the running binary supplies Platform and only its live command tree, absence of a platforms qualifier in this compact form has no full-manifest semantics.
func CompactManifest ¶
func CompactManifest() CompactCLIManifest
type ConfigGetResult ¶
type ConfigGetResult struct {
Key string `json:"key"`
Value string `json:"value"`
IsSet bool `json:"is_set"`
}
ConfigGetResult is the JSON payload for config get.
type ConfigItem ¶
type ConfigItem struct {
Key string `json:"key"`
Value string `json:"value"`
IsSet bool `json:"is_set"`
}
ConfigItem represents a single config key-value pair.
type ConfigListResult ¶
type ConfigListResult struct {
Items []ConfigItem `json:"items"`
}
ConfigListResult is the JSON payload for config list.
type ConfigSetResult ¶
type ConfigSetResult struct {
Key string `json:"key"`
Value string `json:"value"`
Cleared bool `json:"cleared"`
}
ConfigSetResult is the JSON payload for config set.
type CredentialSource ¶
type CredentialSources ¶
type CredentialSources struct {
Recommended []CredentialSource `json:"recommended"`
Automation []CredentialSource `json:"automation"`
Avoid []CredentialSource `json:"avoid"`
Storage []CredentialSource `json:"storage"`
}
type DaemonInstalled ¶
type DaemonInstalled struct {
Manager string `json:"manager"`
Path string `json:"path"`
Undo string `json:"undo"`
}
DaemonInstalled records a background service a call installed: the supervisor, the definition it wrote, and the command that undoes it.
type DoctorCounts ¶
type DoctorDaemon ¶
type DoctorDaemon struct {
IdentityUnverified bool `json:"identity_unverified,omitempty"`
Running bool `json:"running"`
PID int `json:"pid,omitempty"`
// BuildVersion, Executable, and BuildSkew are reporting-only: they never
// factor into IdentityUnverified, Running, or health_status/exit code
// beyond the daemon_build_skew warning itself. See
// diagnoseDaemonBuildSkew and daemon.ProcessBuildIdentity.
BuildVersion string `json:"build_version,omitempty"`
Executable string `json:"executable,omitempty"`
BuildSkew bool `json:"build_skew,omitempty"`
}
type DoctorFinding ¶
type DoctorPaths ¶
type DoctorResult ¶
type DoctorResult struct {
AccessLog accesslog.Health `json:"access_log"`
Portal tsruntime.PortalState `json:"portal"`
GuestLinks []registry.GuestView `json:"guest_links"`
NodeKeys map[string]health.Expiry `json:"node_keys"`
Credentials StatusCredentials `json:"credentials"`
Alerts health.AlertsView `json:"alerts"`
Supervision Supervision `json:"supervision"`
SchemaVersion int `json:"schema_version"`
ExecutionStatus string `json:"execution_status"`
Status string `json:"status"`
HealthStatus string `json:"health_status"`
HealthExitCode int `json:"health_exit_code"`
Counts DoctorCounts `json:"counts"`
Paths DoctorPaths `json:"paths"`
CredentialMode string `json:"credential_mode"`
CredentialTier string `json:"credential_tier"`
Daemon DoctorDaemon `json:"daemon"`
RuntimeSnapshot StatusRuntimeSnapshotResult `json:"runtime_snapshot"`
TailscaleSSH DoctorTailscaleSSH `json:"tailscale_ssh"`
Findings []DoctorFinding `json:"findings"`
// contains filtered or unexported fields
}
type DoctorTailscaleSSH ¶
type DoctorTailscaleSSH struct {
State string `json:"state"`
// ACLRuleRequired records the second half of the requirement, which no
// local read can observe. `tailscale set --ssh` alone is not enough; the
// tailnet policy file also needs an ssh rule admitting the caller.
ACLRuleRequired bool `json:"acl_rule_required"`
}
DoctorTailscaleSSH reports whether tailscaled on this node runs a Tailscale SSH server. It is discoverability data for the zero-code remote path (`tailscale ssh <host> tslink <command>`), not a TSLink capability: TSLink neither enables nor requires it, and this report never affects health.
type ErrorCodeInfo ¶
type FlagInfo ¶
type FlagInfo struct {
Name string `json:"name"`
Shorthand string `json:"shorthand,omitempty"`
Type string `json:"type"`
Default string `json:"default,omitempty"`
Scope string `json:"scope,omitempty"`
Usage string `json:"usage"`
OneOf []string `json:"one_of,omitempty"`
Requires []string `json:"requires,omitempty"`
Conflicts []string `json:"conflicts,omitempty"`
Platforms []string `json:"platforms,omitempty"`
}
FlagInfo describes one command-local flag.
type HealthSetResult ¶ added in v0.2.0
type HealthSetResult struct {
App string `json:"app"`
Type string `json:"type"`
// Changed is false when the stored settings already matched; nothing was written.
Changed bool `json:"changed"`
// Defaults is true when the service stores no health settings.
Defaults bool `json:"defaults"`
Health HealthSettingsView `json:"health"`
}
type HealthSettingsView ¶ added in v0.2.0
type HealthSettingsView struct {
Path string `json:"path,omitempty"`
StatusMin int `json:"status_min,omitempty"`
StatusMax int `json:"status_max,omitempty"`
BodyCheck bool `json:"body_check,omitempty"`
Timeout string `json:"timeout"`
Interval string `json:"interval"`
}
HealthSettingsView is a service's effective health check. Like the other diagnostic views it reports whether a body check exists, never its text.
type HighRiskOperation ¶
type InstallResult ¶
type InviteMutationResult ¶
type InviteMutationResult struct {
tailapi.Invite
RemoteSideEffectPlan security.RemoteSideEffectPlan `json:"remote_side_effect_plan"`
}
type InviteResendResult ¶
type InviteResendResult struct {
Kind string `json:"kind"`
ID string `json:"id"`
Recipient string `json:"recipient,omitempty"`
Email string `json:"email"`
Emailed bool `json:"emailed"`
Service string `json:"service,omitempty"`
RemoteSideEffectPlan security.RemoteSideEffectPlan `json:"remote_side_effect_plan"`
}
type InviteRevokeResult ¶
type JSONResultFieldInfo ¶
type JSONResultFieldInfo struct {
Type string `json:"type"`
Description string `json:"description"`
Values []string `json:"values,omitempty"`
Platforms []string `json:"platforms,omitempty"`
}
JSONResultFieldInfo documents command-specific fields inside the shared --json result envelope's data object.
type ListResult ¶
type ListResult struct {
Portal tsruntime.PortalState `json:"portal"`
SchemaVersion int `json:"schema_version"`
Services any `json:"services"`
Count int `json:"count"`
}
ListResult holds the result for JSON output.
type ListServiceSummary ¶
type ListServiceSummary struct {
RequestLimits *registry.EffectiveRequestLimits `json:"request_limits,omitempty"`
Warnings []inspect.WarningView `json:"warnings,omitempty"`
Health health.State `json:"health"`
NodeKey health.Expiry `json:"node_key"`
Name string `json:"name"`
Type string `json:"type"`
URL *string `json:"url"`
URLPending bool `json:"url_pending"`
State string `json:"state"`
PreserveHost bool `json:"preserve_host"`
FunnelRequested bool `json:"funnel_requested"`
FunnelActive bool `json:"funnel_active"`
FunnelState string `json:"funnel_state"`
FunnelExpiresAt *time.Time `json:"funnel_expires_at,omitempty"`
FunnelRemaining *string `json:"funnel_remaining,omitempty"`
Error *tsruntime.ServiceError `json:"error,omitempty"`
}
ListServiceSummary is the token-efficient default service representation. URL is null until runtime.json contains exact evidence for the current daemon and registry fingerprint.
type LoginBootstrapResult ¶
type LoginBootstrapResult struct {
Page string `json:"page"`
URL string `json:"url"`
Opened bool `json:"opened"`
Next []string `json:"next"`
}
LoginBootstrapResult is the JSON output of the standalone --open-keys-page / --open-oauth-page helpers. It never contains a credential.
type LoginResult ¶
type LoginResult struct {
Method string `json:"method"`
CredentialBackend credentials.CredentialBackend `json:"credential_backend"`
CredentialKind string `json:"credential_kind"`
Fingerprint string `json:"fingerprint"`
StoredAt *time.Time `json:"stored_at,omitempty"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
ExpiresAtSource string `json:"expires_at_source,omitempty"`
Rotated bool `json:"rotated"`
PreviousFingerprint string `json:"previous_fingerprint,omitempty"`
RetiredCredential string `json:"retired_credential,omitempty"`
LoginName string `json:"login_name,omitempty"`
TagCreated string `json:"tag_created,omitempty"`
Degraded bool `json:"degraded"`
TagEnsureError string `json:"tag_ensure_error,omitempty"`
ACLMutationSkipped bool `json:"acl_mutation_skipped"`
RemoteSideEffectPlan *security.RemoteSideEffectPlan `json:"remote_side_effect_plan,omitempty"`
}
LoginResult represents the JSON output of a successful login.
type LogoutResult ¶
type LogoutResult struct {
WasLoggedIn bool `json:"was_logged_in"`
// Kind is the selected credential slot for a selective logout; empty for
// the full logout.
Kind string `json:"kind,omitempty"`
// DeletedCredentials lists the credential slots removed by this invocation.
DeletedCredentials []string `json:"deleted_credentials"`
}
LogoutResult holds the result for JSON output.
type LogsResult ¶
type LogsResult struct {
Lines []string `json:"lines"`
Count int `json:"count"`
File string `json:"file"`
}
LogsResult is the JSON payload for the logs command.
type MCPLogsResult ¶
type MCPLogsResult struct {
Source string `json:"source"`
File string `json:"file"`
Level string `json:"level,omitempty"`
// Since is the requested window as a duration; SinceAt is the resulting
// absolute cutoff, so a caller never has to recompute it against a clock
// that may not be the daemon's.
Since string `json:"since"`
SinceAt time.Time `json:"since_at"`
Lines []string `json:"lines"`
Count int `json:"count"`
// Truncated says the answer is not the whole of what matched, and
// TruncatedReason says which bound cut it. Both are always present rather
// than omitted when false: a client must be able to distinguish "complete"
// from "this field was not populated".
Truncated bool `json:"truncated"`
TruncatedReason string `json:"truncated_reason,omitempty"`
// Matched is how many lines passed the level and time filters before any
// bound was applied, so a caller can tell a quiet window from a truncated
// one and decide whether to narrow the query.
Matched int `json:"matched"`
// Redacted is constant true. It is emitted so a consumer of these lines
// knows they are not byte-identical to the file on disk, and does not treat
// a "[redacted]" token as something the daemon logged.
Redacted bool `json:"redacted"`
}
MCPLogsResult is the logs tool payload.
type PeopleAppAccess ¶ added in v0.3.0
type PeopleGrantView ¶
type PeopleGrantView struct {
registry.PersonGrant
Active bool `json:"active"`
URL string `json:"url,omitempty"`
}
type PeopleInviteView ¶
type PeopleInviteView struct {
TargetKind string `json:"target_kind,omitempty"`
App string `json:"app"`
ID string `json:"id,omitempty"`
InviteURL string `json:"invite_url,omitempty"`
Code string `json:"code,omitempty"`
RemoteSideEffectPlan *security.RemoteSideEffectPlan `json:"remote_side_effect_plan,omitempty"`
State string `json:"state,omitempty"`
ReconcileIDs []string `json:"reconcile_ids,omitempty"`
}
type PeopleListResult ¶
type PeopleListResult struct {
People []PeopleView `json:"people"`
}
type PeopleRemoveResult ¶
type PeopleRemoveResult struct {
Login string `json:"login"`
Removed bool `json:"removed"`
Revoked bool `json:"revoked"`
Complete bool `json:"complete"`
Cleanup []PeopleInviteView `json:"cleanup"`
}
type PeopleResult ¶
type PeopleResult struct {
Access []PeopleAppAccess `json:"access"`
Membership tailapi.Membership `json:"membership,omitempty"`
Person PeopleView `json:"person"`
Invites []PeopleInviteView `json:"invites"`
Complete bool `json:"complete"`
Portal tsruntime.PortalState `json:"portal"`
Message string `json:"message"`
InviteRequirement string `json:"invite_requirement"`
QRPayload string `json:"qr_payload,omitempty"`
QRTerminal bool `json:"-"`
QRWarning string `json:"qr_warning,omitempty"`
Warnings []string `json:"warnings,omitempty"`
Guide []string `json:"guide"`
GuideZH []string `json:"guide_zh"`
}
type PeopleView ¶
type PeopleView struct {
Login string `json:"login"`
Revoked bool `json:"revoked"`
Grants []PeopleGrantView `json:"grants"`
Invites []registry.PersonInvite `json:"invites,omitempty"`
}
type PlatformInfo ¶
PlatformInfo identifies the build target whose live Cobra tree was walked. Platform-specific command registrations make the manifest authoritative for its GOOS. GOARCH records validated generation provenance but does not identify authority within that GOOS because the command tree must be architecture-neutral.
type RecipeResult ¶
type RecipeResult struct {
SchemaVersion int `json:"schema_version"`
CatalogVersion int `json:"catalog_version"`
Recipe recipes.Recipe `json:"recipe"`
Service inspect.ServiceView `json:"service"`
Requested inspect.ServiceView `json:"requested"`
Action string `json:"action"`
DryRun bool `json:"dry_run"`
Applied bool `json:"applied"`
Warnings []string `json:"warnings"`
Next []string `json:"next"`
}
type RegistryCheckIssue ¶
type RegistryCheckResult ¶
type RegistryCheckResult struct {
Path string `json:"path"`
SchemaVersion int `json:"schema_version"`
ValidServices int `json:"valid_services"`
TotalServices int `json:"total_services"`
Issues []RegistryCheckIssue `json:"issues"`
}
type RegistrySchemaInfo ¶
type RemoveResult ¶
type RemoveResult struct {
Name string `json:"name"`
Removed bool `json:"removed"`
DeviceCleaned bool `json:"device_cleaned"`
DeviceCleanupSkipped bool `json:"device_cleanup_skipped"`
DeviceSkipReason string `json:"device_skip_reason,omitempty"`
DeviceWarning string `json:"device_warning,omitempty"`
// NodeStateKeptReason explains a local tsnet state directory this command
// left in place, and only for the cause that reaches no other field here.
// A protected hostname or a skipped cleanup are already stated by
// device_cleanup_skipped and device_skip_reason; partial resolution --
// some of the service's recorded nodes deleted and some unaccounted for --
// was previously a silent decision.
NodeStateKeptReason string `json:"node_state_kept_reason,omitempty"`
}
RemoveResult is the JSON payload for the remove command.
type RequestDecisionResult ¶
type RequestDecisionResult struct {
Access *PeopleResult `json:"access,omitempty"`
Request registry.AccessRequest `json:"request"`
Changed bool `json:"changed"`
}
type RequestListResult ¶
type RequestListResult struct {
Requests []registry.AccessRequest `json:"requests"`
}
type ServeResult ¶
type ServeResult struct {
Daemon bool `json:"daemon"`
PID int `json:"pid"`
CredentialMigrated bool `json:"credential_migrated,omitempty"`
}
ServeResult is the JSON payload for the serve command.
type ShareResult ¶
type ShareResult struct {
// A reused share keeps its own, which can be sooner than the one asked
// for, so it is reported rather than implied by the request.
FunnelExpiresAt *time.Time `json:"funnel_expires_at,omitempty"`
// deadline of the share it reused.
FunnelRearmed bool `json:"funnel_rearmed,omitempty"`
// tailnet-only (kind tailnet or tailnet_allow) from public until a
// deadline (public_funnel with funnel_expires_at) from public with no
// deadline (public_funnel without it).
Exposure inspect.ExposureView `json:"exposure"`
// of the whole home directory.
Warnings []inspect.WarningView `json:"warnings,omitempty"`
// contains filtered or unexported fields
}
type StatusCredentialSlot ¶
type StatusCredentialSlot struct {
Present bool `json:"present"`
Fingerprint string `json:"fingerprint,omitempty"`
StoredAt *time.Time `json:"stored_at,omitempty"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
ExpiresAtSource string `json:"expires_at_source,omitempty"`
DaysLeft *int `json:"days_left,omitempty"`
ExpiryState string `json:"expiry_state"`
LastVerifiedAt *time.Time `json:"last_verified_at,omitempty"`
LastVerifiedResult string `json:"last_verified_result,omitempty"`
EarlyWarning health.Expiry `json:"early_warning"`
}
StatusCredentialSlot describes one credential slot.
type StatusCredentials ¶
type StatusCredentials struct {
APIKey StatusCredentialSlot `json:"api_key"`
ClientSecret StatusCredentialSlot `json:"client_secret"`
// MetadataError is set when credential-meta.json exists but is unreadable;
// present slots then report expiry_state=unknown.
MetadataError string `json:"metadata_error,omitempty"`
}
StatusCredentials is the value-free per-slot credential report. It carries fingerprints and timestamps, never credential material.
type StatusPendingLogin ¶
type StatusPendingLogin struct {
Node string `json:"node"`
AuthURL string `json:"auth_url"`
ExpiresAt time.Time `json:"expires_at"`
}
StatusPendingLogin identifies a pending node enrollment.
type StatusResult ¶
type StatusResult struct {
GuestLinks []registry.GuestView `json:"guest_links"`
AccessLog accesslog.Health `json:"access_log"`
Portal tsruntime.PortalState `json:"portal"`
MCPBindings []mcpBindingView `json:"mcp_bindings,omitempty"`
Alerts health.AlertsView `json:"alerts"`
Supervision Supervision `json:"supervision"`
DaemonRunning bool `json:"daemon_running"`
DaemonState string `json:"daemon_state"`
DaemonPID int `json:"daemon_pid"`
OwnershipProofAvailable bool `json:"ownership_proof_available"`
Authenticated bool `json:"authenticated"`
CredentialStored bool `json:"credential_stored"`
Credentials StatusCredentials `json:"credentials"`
CredentialExpiryState string `json:"credential_expiry_state"`
NodeAuthorized bool `json:"node_authorized"`
AuthorizedServiceCount int `json:"authorized_service_count"`
AuthStatus string `json:"auth_status"`
PendingLogins []StatusPendingLogin `json:"pending_logins,omitempty"`
AuthURL string `json:"auth_url,omitempty"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
Next []string `json:"next,omitempty"`
GlobalError *tsruntime.ServiceError `json:"global_error,omitempty"`
ServiceCount int `json:"service_count"`
Services []StatusServiceState `json:"services"`
}
StatusResult holds the status information for display.
type StatusRuntimeSnapshotResult ¶
type StatusRuntimeSnapshotResult struct {
Status string `json:"status"`
Code string `json:"code,omitempty"`
Exact bool `json:"exact"`
Message string `json:"message,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
DaemonPID int `json:"daemon_pid,omitempty"`
RegistryFingerprint string `json:"registry_fingerprint,omitempty"`
}
type StatusServiceState ¶
type StatusServiceState struct {
PortalOnly bool `json:"portal_only,omitempty"`
PortalURL string `json:"portal_url,omitempty"`
RequestLimits *registry.EffectiveRequestLimits `json:"request_limits,omitempty"`
Warnings []inspect.WarningView `json:"warnings,omitempty"`
Health health.State `json:"health"`
NodeKey health.Expiry `json:"node_key"`
Name string `json:"name"`
Status string `json:"status"`
OwnershipProof bool `json:"ownership_proof"`
PreserveHost *bool `json:"preserve_host,omitempty"`
FunnelRequested bool `json:"funnel_requested"`
FunnelActive bool `json:"funnel_active"`
FunnelState string `json:"funnel_state"`
FunnelExpiresAt *time.Time `json:"funnel_expires_at,omitempty"`
FunnelRemaining *string `json:"funnel_remaining,omitempty"`
Error *tsruntime.ServiceError `json:"error,omitempty"`
}
type StatusServiceView ¶
type StatusServiceView struct {
PortalOnly bool `json:"portal_only,omitempty"`
PortalURL string `json:"portal_url,omitempty"`
RequestLimits *registry.EffectiveRequestLimits `json:"request_limits,omitempty"`
Health health.State `json:"health"`
NodeKey health.Expiry `json:"node_key"`
Name string `json:"name"`
Type string `json:"type"`
RuntimeState string `json:"runtime_state"`
OwnershipProof bool `json:"ownership_proof"`
Endpoint inspect.EndpointView `json:"endpoint"`
Exposure inspect.ExposureView `json:"exposure"`
PreserveHost bool `json:"preserve_host"`
FunnelRequested bool `json:"funnel_requested"`
FunnelActive bool `json:"funnel_active"`
FunnelState string `json:"funnel_state"`
FunnelExpiresAt *time.Time `json:"funnel_expires_at,omitempty"`
FunnelRemaining *string `json:"funnel_remaining,omitempty"`
Error *tsruntime.ServiceError `json:"error,omitempty"`
Allow inspect.SummaryView `json:"allow"`
Tags inspect.SummaryView `json:"tags"`
Backend inspect.BackendView `json:"backend"`
Warnings []inspect.WarningView `json:"warnings,omitempty"`
}
type StatusURLsResult ¶
type StatusURLsResult struct {
GuestLinks []registry.GuestView `json:"guest_links"`
AccessLog accesslog.Health `json:"access_log"`
Portal tsruntime.PortalState `json:"portal"`
MCPBindings []mcpBindingView `json:"mcp_bindings,omitempty"`
Alerts health.AlertsView `json:"alerts"`
Supervision Supervision `json:"supervision"`
SchemaVersion int `json:"schema_version"`
DaemonRunning bool `json:"daemon_running"`
DaemonState string `json:"daemon_state"`
DaemonPID int `json:"daemon_pid"`
OwnershipProofAvailable bool `json:"ownership_proof_available"`
Authenticated bool `json:"authenticated"`
CredentialStored bool `json:"credential_stored"`
Credentials StatusCredentials `json:"credentials"`
CredentialExpiryState string `json:"credential_expiry_state"`
NodeAuthorized bool `json:"node_authorized"`
AuthorizedServiceCount int `json:"authorized_service_count"`
AuthStatus string `json:"auth_status"`
PendingLogins []StatusPendingLogin `json:"pending_logins,omitempty"`
AuthURL string `json:"auth_url,omitempty"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
Next []string `json:"next,omitempty"`
GlobalError *tsruntime.ServiceError `json:"global_error,omitempty"`
ServiceCount int `json:"service_count"`
RuntimeSnapshot StatusRuntimeSnapshotResult `json:"runtime_snapshot"`
Services []StatusServiceView `json:"services"`
}
type StopResult ¶
StopResult holds the result for JSON output.
type Supervision ¶
type Supervision struct {
Manager string `json:"manager"`
Installed bool `json:"installed"`
Autostart bool `json:"autostart"`
// AutostartScope answers the question Autostart alone cannot: "boot" comes
// back with the machine while nobody is logged in, "login" only comes back
// once this user has a session. Every supervisor this tool installs is a
// per-user one, so the difference is the whole of what "will it still be
// there after a reboot" means on a headless host. It is empty whenever
// autostart itself is unverified.
AutostartScope string `json:"autostart_scope,omitempty"`
RestartOnExit bool `json:"restart_on_exit"`
Path string `json:"path,omitempty"`
Detail string `json:"detail"`
SupervisorPID int `json:"supervisor_pid,omitempty"`
RuntimeState string `json:"runtime_state,omitempty"`
FailureReason string `json:"failure_reason,omitempty"`
}
Supervision separates current liveness from verified restart configuration. Unknown ownership falls back to manual/none, with a diagnostic, never a promise that this process will survive a reboot.
type TagsAddResult ¶
type TagsDeleteResult ¶
type TagsDeleteResult struct {
Tag string `json:"tag"`
RemoteACLTagOwnerRuleRemoved bool `json:"remote_acl_tag_owner_rule_removed"`
Message string `json:"message"`
RemoteSideEffectPlan security.RemoteSideEffectPlan `json:"remote_side_effect_plan"`
}
type TagsListResult ¶
type TagsListResult struct {
Services []TagsServiceEntry `json:"services"`
}
type TagsPullResult ¶
type TagsServiceEntry ¶
type TagsSetDefaultResult ¶
type TagsSetDefaultResult struct {
Tag string `json:"tag"`
}
type TagsSetResult ¶
type TailnetDeviceView ¶
type TailnetDeviceView struct {
Hostname string `json:"hostname"`
Name string `json:"name,omitempty"`
LocallyRegistered bool `json:"locally_registered"`
Origin string `json:"origin"`
LocalService string `json:"local_service,omitempty"`
Tags []string `json:"tags"`
OS string `json:"os,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
LastSeenAt *time.Time `json:"last_seen_at,omitempty"`
ConnectedToControl bool `json:"connected_to_control"`
Authorized bool `json:"authorized"`
}
TailnetDeviceView is one row of `tslink list --tailnet`. It carries no node identity value: tailapi.TailnetDevice already drops NodeID, matching the rest of TSLink's output surface where NodeIDs are never emitted.
type TailnetListResult ¶
type TailnetListResult struct {
SchemaVersion int `json:"schema_version"`
Devices []TailnetDeviceView `json:"devices"`
Count int `json:"count"`
RegisteredCount int `json:"registered_count"`
UnregisteredCount int `json:"unregistered_count"`
CleanupAuthority string `json:"cleanup_authority"`
}
TailnetListResult is the `tslink list --tailnet` payload. It is a separate type from ListResult on purpose: the default list reports this machine's registered services, this one reports tailnet devices, and collapsing them would make "count" mean two different things.
type TemplateApplyResult ¶
type TemplateListResult ¶
type TemplateListResult struct {
SchemaVersion int `json:"schema_version"`
Templates []TemplateSummary `json:"templates"`
Count int `json:"count"`
}
type TemplatePlanItem ¶
type TemplatePlanItem struct {
Name string `json:"name"`
Action string `json:"action"`
Message string `json:"message,omitempty"`
Service inspect.ServiceView `json:"service"`
}
type TemplateShowResult ¶
type TemplateSummary ¶
type ToolchainInfo ¶
type ToolchainInfo struct {
MinimumGoVersion string `json:"minimum_go_version"`
}
ToolchainInfo describes the source the binary was built from. Release tooling and distribution channels are facts about the world, which a binary cannot keep true after it ships, so they are not here.
type URLResult ¶
type URLResult struct {
PortalURL string `json:"portal_url,omitempty"`
Name string `json:"name"`
URL string `json:"url"`
State string `json:"state"`
}
URLResult is the minimal exact endpoint payload for agent consumers.
type UninstallResult ¶
type VersionResult ¶
Source Files
¶
- access.go
- access_log.go
- access_log_config.go
- add.go
- apps.go
- apps_mcp.go
- audit_failure.go
- auth_handoff.go
- auth_handoff_read_unix.go
- build_identity.go
- cleanup.go
- config.go
- daemon_setup.go
- doctor.go
- extend.go
- gateway_invites.go
- guest.go
- guest_status.go
- health.go
- health_set.go
- human_output.go
- install_conflict_unix.go
- install_linux.go
- invite.go
- json.go
- list.go
- login.go
- logout.go
- logs.go
- manager_command_unix.go
- manifest.go
- mcp.go
- mcp_durations.go
- mcp_events.go
- mcp_gateway.go
- mcp_guests.go
- mcp_http.go
- mcp_logs.go
- mcp_people.go
- mcp_portal.go
- mcp_request_limits.go
- mcp_requests.go
- mcp_scopes.go
- mcp_titles.go
- people.go
- people_invites.go
- people_qr.go
- portal.go
- portal_gateway.go
- registry.go
- remove.go
- request_limits.go
- requests.go
- root.go
- serve.go
- serve_log_rotation.go
- serve_shutdown_other.go
- share.go
- status.go
- stop.go
- supervision_linux.go
- supervision_unix.go
- supervisor_lock_unix.go
- tags.go
- template.go
- uninstall_linux.go
- url.go
- windows_task.go