Documentation
¶
Overview ¶
Package config persists saved connections and bookmarks to TOML files under ~/.config/sftpcommander/. Both stores share the same load-modify-save pattern.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBookmark ¶
func AddConnection ¶
func AddConnection(c Connection) error
func DeleteBookmark ¶
func DeleteConnection ¶
func SaveBookmarks ¶
func SaveConnections ¶
func SaveConnections(conns []Connection) error
Types ¶
type Bookmark ¶
type Bookmark struct {
Host string `toml:"host"`
Port string `toml:"port,omitempty"`
User string `toml:"user"`
Path string `toml:"path"`
Label string `toml:"label,omitempty"`
}
func BookmarksForHost ¶
BookmarksForHost returns bookmarks whose host+port+user match. Empty host/user matches everything (useful before a connection is set up). An empty stored port matches any queried port (legacy entries written before port scoping).
func LoadBookmarks ¶
type Connection ¶
type Connection struct {
Name string `toml:"name"`
Host string `toml:"host"`
Port string `toml:"port"`
User string `toml:"user"`
KeyPath string `toml:"key_path,omitempty"`
}
func LoadConnections ¶
func LoadConnections() ([]Connection, error)
Click to show internal directories.
Click to hide internal directories.