Documentation
¶
Index ¶
- func DeleteWindTermImportSession(id string)
- func DetectSSHConfigPath() string
- func NewWindTermImportSession(data []byte) (string, error)
- func WindTermImportSessionData(id string) ([]byte, bool)
- type ImportError
- type ImportOptions
- type ImportResult
- func ImportSSHConfigSelected(ctx context.Context, data []byte, selectedIndexes []int, opts ImportOptions) (*ImportResult, error)
- func ImportTabbySelected(ctx context.Context, data []byte, selectedIndexes []int, opts ImportOptions) (*ImportResult, error)
- func ImportWindTermSelected(ctx context.Context, data []byte, selectedIndexes []int, opts ImportOptions) (*ImportResult, error)
- type PreviewGroup
- type PreviewItem
- type PreviewResult
- type WindTermPreviewResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteWindTermImportSession ¶ added in v1.9.0
func DeleteWindTermImportSession(id string)
func NewWindTermImportSession ¶ added in v1.9.0
func WindTermImportSessionData ¶ added in v1.9.0
Types ¶
type ImportError ¶
ImportError 单条导入错误
type ImportOptions ¶
type ImportOptions struct {
Passphrase string `json:"passphrase"` // Tabby vault 密码
Overwrite bool `json:"overwrite"` // 覆盖已存在的资产
}
ImportOptions 导入选项
type ImportResult ¶
type ImportResult struct {
Total int `json:"total"`
Success int `json:"success"`
Skipped int `json:"skipped"`
Failed int `json:"failed"`
Errors []ImportError `json:"errors"`
}
ImportResult 导入结果
func ImportSSHConfigSelected ¶
func ImportSSHConfigSelected(ctx context.Context, data []byte, selectedIndexes []int, opts ImportOptions) (*ImportResult, error)
ImportSSHConfigSelected 导入用户选中的 SSH Config 连接
func ImportTabbySelected ¶
func ImportTabbySelected(ctx context.Context, data []byte, selectedIndexes []int, opts ImportOptions) (*ImportResult, error)
ImportTabbySelected 导入用户选中的 Tabby 连接
func ImportWindTermSelected ¶ added in v1.9.0
func ImportWindTermSelected(ctx context.Context, data []byte, selectedIndexes []int, opts ImportOptions) (*ImportResult, error)
type PreviewGroup ¶
PreviewGroup 预览分组
type PreviewItem ¶
type PreviewItem struct {
Index int `json:"index"` // 在原始列表中的索引
Name string `json:"name"`
Host string `json:"host"`
Port int `json:"port"`
Username string `json:"username"`
AuthType string `json:"authType"`
GroupID string `json:"groupId"` // Tabby 分组 UUID
Exists bool `json:"exists"` // 是否已存在
HasPassword bool `json:"hasPassword"` // vault 中是否有密码
}
PreviewItem 预览条目
type PreviewResult ¶
type PreviewResult struct {
Groups []PreviewGroup `json:"groups"`
Items []PreviewItem `json:"items"`
HasVault bool `json:"hasVault"` // 是否有加密 vault
}
PreviewResult 预览结果
func PreviewSSHConfig ¶
func PreviewSSHConfig(ctx context.Context, data []byte) (*PreviewResult, error)
PreviewSSHConfig 解析 SSH Config 文件,返回预览(不写数据库)
func PreviewTabbyConfig ¶
func PreviewTabbyConfig(ctx context.Context, data []byte) (*PreviewResult, error)
PreviewTabbyConfig 解析 Tabby 配置,返回预览数据(不写数据库)
func PreviewWindTermConfig ¶ added in v1.9.0
func PreviewWindTermConfig(ctx context.Context, data []byte) (*PreviewResult, error)
type WindTermPreviewResult ¶ added in v1.9.0
type WindTermPreviewResult struct {
Preview *PreviewResult `json:"preview"`
SourceID string `json:"sourceId"`
}
Click to show internal directories.
Click to hide internal directories.