Documentation
¶
Overview ¶
Package connection selects local and remote transports and reopens read handles. It never retries or replays filesystem mutations.
Index ¶
- func HasLegacyToken(data []byte) bool
- func ProfilePath() string
- func SaveProfiles(name string, profiles []Profile) error
- func UnlockProfiles(data []byte, passphrase string) (*ProfileVault, []Profile, error)
- type Dialer
- type Endpoint
- type File
- type Profile
- func (p Profile) Address() string
- func (p Profile) Endpoint() Endpoint
- func (p Profile) Label() string
- func (p Profile) MarshalJSON() ([]byte, error)
- func (p Profile) Namespace() string
- func (p Profile) Remote() bool
- func (p Profile) SameHost(other Profile) bool
- func (p *Profile) UnmarshalJSON(data []byte) error
- func (p Profile) Validate() error
- func (p Profile) WithoutTokens() Profile
- type ProfileVault
- type Profiles
- type Project
- type RestoredFile
- type RestoredProject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasLegacyToken ¶
HasLegacyToken detects the plaintext field emitted by previous JSON writers.
func ProfilePath ¶
func ProfilePath() string
func SaveProfiles ¶
func UnlockProfiles ¶
func UnlockProfiles(data []byte, passphrase string) (*ProfileVault, []Profile, error)
Types ¶
type File ¶
type File struct {
Path string
Mode protocol.DocumentMode
}
type Profile ¶
type Profile struct {
WebSocket remote.WebSocketTarget `json:"websocket,omitzero"`
TCP remote.TCPTarget `json:"tcp,omitzero"`
Name string `json:"name"`
Directory string `json:"directory,omitempty"`
SSH remote.Target `json:"ssh"`
}
func LoadProfiles ¶
func ReadProfiles ¶
func (Profile) Endpoint ¶
Endpoint identifies a connection without allocating or retaining its token.
func (Profile) MarshalJSON ¶
func (Profile) Namespace ¶
Namespace prevents identical remote and local paths sharing history entries.
func (Profile) SameHost ¶
SameHost excludes display names, directories and credentials from history identity.
func (*Profile) UnmarshalJSON ¶
func (Profile) WithoutTokens ¶
type ProfileVault ¶
type ProfileVault struct {
// contains filtered or unexported fields
}
type RestoredProject ¶
type RestoredProject struct {
Err error
Workspace protocol.Workspace
Files []RestoredFile
}