Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvSSHServers = "VORTEX_SSH_SERVERS" DefaultSSHPort = 22 DefaultTimeout = 30 )
Variables ¶
This section is empty.
Functions ¶
func LoadServersFromEnv ¶
func LoadServersFromEnv() error
func RegisterServer ¶
func RegisterServer(config *ServerConfig)
func ResetRegistry ¶
func ResetRegistry()
Types ¶
type ServerConfig ¶
type ServerConfig struct {
Name string
Description string
Host string
Port int
User string
Password string
KeyFile string
Timeout int
}
ServerConfig represents a pre-configured SSH server.
func GetServer ¶
func GetServer(name string) (*ServerConfig, error)
func ParseDSN ¶
func ParseDSN(dsn string) (*ServerConfig, error)
ParseDSN parses an SSH DSN string. Format: ssh://[user[:password]@]host[:port]?name=alias[&desc=description][&key=keyfile][&timeout=30]
func ParseServers ¶
func ParseServers(dsnStr string) ([]*ServerConfig, error)
type ServerInfo ¶
type ServerInfo struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Host string `json:"host"`
User string `json:"user"`
}
func ListServers ¶
func ListServers() []ServerInfo
Click to show internal directories.
Click to hide internal directories.