import_svc

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteWindTermImportSession added in v1.9.0

func DeleteWindTermImportSession(id string)

func DetectSSHConfigPath

func DetectSSHConfigPath() string

DetectSSHConfigPath 检测 SSH Config 默认路径

func NewWindTermImportSession added in v1.9.0

func NewWindTermImportSession(data []byte) (string, error)

func WindTermImportSessionData added in v1.9.0

func WindTermImportSessionData(id string) ([]byte, bool)

Types

type ImportError

type ImportError struct {
	Name   string `json:"name"`
	Reason string `json:"reason"`
}

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

type PreviewGroup struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

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"`
}

Jump to

Keyboard shortcuts

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