Documentation
¶
Overview ¶
Package desktop owns application-lifetime sharing and its authenticated local control endpoint.
Index ¶
- Constants
- type AccountInput
- type AccountOperation
- type AccountView
- type Application
- type Completion
- type CreationBlock
- type CreationBlockingReason
- type Endpoint
- type Failure
- type Host
- type Message
- type Observation
- type Outcome
- type RecoveryAction
- type Request
- type SelectedRoot
- type Selection
- type SetupInput
- type SetupResult
- type SetupView
- type Share
- type ShareState
- type Snapshot
- type StopReason
Constants ¶
const ProtocolVersion = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountInput ¶
type AccountInput struct {
Action string `json:"action"`
AccountID string `json:"account_id,omitempty"`
Nickname string `json:"nickname,omitempty"`
Challenge string `json:"challenge,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Email string `json:"email,omitempty"`
Code string `json:"code,omitempty"`
Credential string `json:"credential,omitempty"`
}
type AccountOperation ¶ added in v0.1.4
type AccountView ¶
type AccountView struct {
ResetLocal string `json:"reset_local"`
NicknameChangeLocal string `json:"nickname_change_local,omitempty"`
Account account.Snapshot `json:"status"`
Operation *AccountOperation `json:"operation,omitempty"`
}
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application owns intents independently of connections, navigation and startup. Only committed state is observed; slow admission and setup never hold mu.
type Completion ¶
type Completion struct {
Outcome Outcome `json:"outcome"`
StopReason StopReason `json:"stop_reason"`
Error string `json:"error,omitempty"`
CleanupError string `json:"cleanup_error,omitempty"`
}
type CreationBlock ¶
type CreationBlock struct {
Reason CreationBlockingReason `json:"reason"`
Recovery RecoveryAction `json:"recovery"`
RetryAtMS int64 `json:"retry_at_ms,omitempty"`
}
type CreationBlockingReason ¶
type CreationBlockingReason string
type Host ¶
type Host struct {
Endpoint Endpoint
// contains filtered or unexported fields
}
Host owns exactly one engine. Endpoint readiness only proves that control is listening; create/query report configuration and share startup separately.
type Message ¶
type Message struct {
Version int `json:"version"`
ID string `json:"id,omitempty"`
Snapshot *Snapshot `json:"snapshot,omitempty"`
Error *Failure `json:"error,omitempty"`
Observation *Observation `json:"observation,omitempty"`
}
type Observation ¶
type RecoveryAction ¶
type RecoveryAction string
const ( RetryCreation RecoveryAction = "retry" ConfigureCreation RecoveryAction = "configure" RepairSettings RecoveryAction = "repair_settings" RepairTrustState RecoveryAction = "repair_trust_state" ReplaceBuild RecoveryAction = "replace_build" )
type Request ¶
type Request struct {
ID string `json:"id"`
Command string `json:"command"`
SourceOperationID string `json:"source_operation_id,omitempty"`
OperationID string `json:"operation_id,omitempty"`
TaskID string `json:"task_id,omitempty"`
Relays []string `json:"relays,omitempty"`
RelayURL string `json:"relay_url,omitempty"`
Paths []string `json:"paths,omitempty"`
Setup *SetupInput `json:"setup,omitempty"`
SetupID string `json:"setup_id,omitempty"`
Account *AccountInput `json:"account,omitempty"`
AccountViewVisible *bool `json:"account_view_visible,omitempty"`
}
type SelectedRoot ¶
type Selection ¶
type Selection struct {
Count uint64 `json:"count"`
Root *SelectedRoot `json:"root,omitempty"`
}
type SetupInput ¶
type SetupInput struct {
ID string `json:"id"`
RelayURL string `json:"relay_url"`
FrontURL string `json:"front_url"`
AccessKey string `json:"access_key,omitempty"`
RelayOperation relaysetup.Operation `json:"relay_operation,omitempty"`
Preference *relayconfig.PreferenceEdit `json:"preference,omitempty"`
}
type SetupResult ¶
type SetupView ¶
type SetupView struct {
State string `json:"state"`
ID string `json:"id,omitempty"`
OperationID string `json:"operation_id,omitempty"`
RelayURL string `json:"relay_url,omitempty"`
RelayOperation relaysetup.Operation `json:"relay_operation,omitempty"`
Stage string `json:"stage,omitempty"`
VerificationURL string `json:"verification_url,omitempty"`
ServiceLogin *relaysetup.ServiceLogin `json:"service_login,omitempty"`
UserCode string `json:"user_code,omitempty"`
FrontendSaved bool `json:"frontend_saved"`
RelaySaved bool `json:"relay_saved"`
Recovery relaysetup.RecoveryAction `json:"recovery,omitempty"`
Error *Failure `json:"error,omitempty"`
}
type ShareState ¶
type ShareState string
const ( AwaitingConfiguration ShareState = "awaiting_configuration" AwaitingAuthorization ShareState = "awaiting_authorization" AwaitingNetwork ShareState = "awaiting_network" Admitting ShareState = "admitting" Preparing ShareState = "preparing" Sharing ShareState = "sharing" Stopping ShareState = "stopping" Finished ShareState = "finished" )
type Snapshot ¶
type Snapshot struct {
SessionID string `json:"session_id"`
Revision uint64 `json:"revision"`
Preferences relayconfig.Preferences `json:"preferences"`
Setup SetupView `json:"setup"`
Account *AccountView `json:"account,omitempty"`
}
type StopReason ¶
type StopReason string
const ( NoStopReason StopReason = "none" Cancelled StopReason = "cancelled" ApplicationClosed StopReason = "application_closed" )