Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host struct {
Alias []string `yaml:"alias,omitempty"`
Address string `yaml:"address"` // IP 或 域名
Port uint16 `yaml:"port"`
}
Host 定义网络连接信息
type Identity ¶
type Identity struct {
User string `yaml:"user"`
KeyPath string `yaml:"key_path,omitempty"`
Passphrase string `yaml:"passphrase,omitempty"` // 私钥密码
Password string `yaml:"password,omitempty"` // 登录密码
AuthType string `yaml:"auth_type"` // "key", "password", "agent"
}
Identity 定义认证信息
type Node ¶
type Node struct {
Alias []string `yaml:"alias,omitempty"`
Tags []string `yaml:"tags,omitempty"` // 用于分组
// 引用解耦
HostRef string `yaml:"host_ref"`
IdentityRef string `yaml:"identity_ref"`
// 高级网络配置
ProxyJump string `yaml:"proxy_jump,omitempty"` // 指向另一个 Node 的 Name
// 提权配置
SudoMode string `yaml:"sudo_mode"` // "none", "sudo", "sudoer", "su", "root"(已是root), "auto"(自动探测)
SuPwd string `yaml:"su_pwd,omitempty"`
}
Node 是用户操作的最小单元,聚合了 Host 和 Identity
type NodeFilter ¶
NodeFilter 用于批量操作时筛选节点
Click to show internal directories.
Click to hide internal directories.