Documentation
¶
Index ¶
Constants ¶
const DisplayConfigVersion = 1
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶
func DefaultPath() string
Types ¶
type Config ¶
type Config struct {
Current string `json:"current"`
Endpoints map[string]Endpoint `json:"endpoints"`
Display *DisplayConfig `json:"display,omitempty"`
}
func (Config) EffectiveDisplay ¶ added in v0.13.0
EffectiveDisplay returns the ordered aliases that should be visible to a client. A missing display section preserves the pre-display single-current behavior. The synthetic local alias is always valid, even when it has no explicit row in Endpoints.
func (*Config) NormalizeDisplay ¶ added in v0.13.0
NormalizeDisplay validates and canonicalizes an explicitly configured display set. Current remains an independent foreground-connection choice; switching it must never add an alias to Display.
func (*Config) UnmarshalJSON ¶ added in v0.13.0
UnmarshalJSON accepts the preview sidebar field as a read-only migration path. Writes use Config.Display and therefore emit only the public display field.
type DisplayConfig ¶ added in v0.13.0
type DisplayConfig struct {
Version int `json:"version"`
Endpoints []string `json:"endpoints"`
Names map[string]string `json:"names,omitempty"`
}
DisplayConfig is the client-local, ordered set of endpoint aliases shown together by the Desktop. Names only affect presentation; endpoint credentials and route metadata remain in Config.Endpoints.
type Endpoint ¶
type Endpoint struct {
Name string `json:"name"`
URL string `json:"url"`
Token string `json:"token"`
SSH string `json:"ssh,omitempty"`
SSHRemote string `json:"sshRemote,omitempty"`
Type string `json:"type,omitempty"`
HostID string `json:"host_id,omitempty"`
RouteID string `json:"route_id,omitempty"`
ClientID string `json:"client_id,omitempty"`
// RefreshToken and the route fields are persisted by native clients. Keep
// them in the shared Go model so CLI display writes cannot discard metadata
// it does not otherwise interpret.
RefreshToken string `json:"refresh_token,omitempty"`
DirectURL string `json:"direct_url,omitempty"`
RelayURL string `json:"relay_url,omitempty"`
RoutePreference string `json:"route_preference,omitempty"`
}