config

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL