Documentation
¶
Index ¶
- Constants
- Variables
- type AsyncCallParam
- type AsyncCallResult
- type AsyncCallResultList
- type DeleteFileParam
- type DeleteFileResult
- type DownloadFileParam
- type DownloadFileResult
- type GetInstalledPackageListParam
- type GetInstalledPackageListResult
- type GetPackageFileListParam
- type GetPackageFileListResult
- type GetPackageInfoParam
- type GetPackageInfoResult
- type GetPackagesFileListParam
- type GetPackagesFileListResult
- type InstallPackageParam
- type InstallPackageResult
- type PackageInfo
- type RunCommandConfig
- type SSHConfig
- type SystemInfo
Constants ¶
View Source
const ( DefaultDialTimeout = 2 * time.Second DefaultRunCommandFailedCounts = 3 )
Variables ¶
View Source
var DefaultSSHConfig = SSHConfig{
Username: "root",
Password: "",
IPAddress: "",
Port: 22,
}
DefaultSSHConfig 默认SSH配置
Functions ¶
This section is empty.
Types ¶
type AsyncCallParam ¶
type AsyncCallParam struct {
Concurrency int
Operation func(ctx context.Context, item interface{}) (interface{}, error)
Items []interface{}
}
异步调用参数
type AsyncCallResult ¶
type AsyncCallResult struct {
Ret interface{}
Err error
}
type AsyncCallResultList ¶
type AsyncCallResultList struct {
RetList []AsyncCallResult
}
type DeleteFileParam ¶
type DeleteFileParam struct {
FilePath string
}
type DeleteFileResult ¶
type DeleteFileResult struct {
}
type DownloadFileParam ¶
type DownloadFileResult ¶
type DownloadFileResult struct {
FilePath string
}
type GetInstalledPackageListResult ¶
type GetInstalledPackageListResult struct {
PackageList []string
}
获取已经安装的软件包列表出参
type GetPackageFileListParam ¶
type GetPackageFileListParam struct {
PackageName string
}
获取某个软件包的文件列表入参
type GetPackagesFileListParam ¶
获取多个软件包文件列表入参
type GetPackagesFileListResult ¶
type GetPackagesFileListResult struct {
PackageList []GetPackageFileListResult
}
获取多个软件包文件列表出参
type InstallPackageParam ¶
type InstallPackageParam struct {
PackageList []PackageInfo
}
InstallPackageParam 安装软件包入参
type InstallPackageResult ¶
type InstallPackageResult struct {
IgnoredInstallPackageList []PackageInfo `json:"ignored_install_package_list"`
SuccessfullyInstallPackageList []PackageInfo `json:"successfully_install_package_list"`
FailedInstallPackageList []PackageInfo `json:"failed_install_package_list"`
Total int `json:"total"`
}
InstallPackageResult 安装软件包结果
type PackageInfo ¶
type PackageInfo struct {
FullName string `json:"full_name,omitempty"`
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
ReleaseNumber string `json:"release_number,omitempty"`
OS string `json:"os,omitempty"`
Architecture string `json:"architecture,omitempty"`
Description string `json:"description,omitempty"`
Files []string `json:"files,omitempty"`
Requires []string `json:"requires,omitempty"`
Provides []string `json:"provides,omitempty"`
}
PackageInfo 包信息
type RunCommandConfig ¶
RunCommandConfig 用于存储远程运行参数
type SSHConfig ¶
type SSHConfig struct {
Username string `json:"username",omitempty,default:"root"`
Password string `json:"password",omitempty,default:""`
IPAddress string `json:"ip_address",omitempty,default:""`
Port int `json:"port",omitempty,default:22`
}
SSHConfig 用于存储 SSH 配置
type SystemInfo ¶
type SystemInfo struct {
FullName string `json:"full_name,omitempty"`
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
ID string `json:"id,omitempty"`
IDLike string `json:"id_like,omitempty"`
VersionCodename string `json:"version_codename,omitempty"`
VersionID string `json:"version_id,omitempty"`
PrettyName string `json:"pretty_name,omitempty"`
AnsiColor string `json:"ansi_color,omitempty"`
CPEName string `json:"cpe_name,omitempty"`
HomeUrl string `json:"home_url,omitempty"`
BuildID string `json:"build_id,omitempty"`
Variant string `json:"variant,omitempty"`
VariantID string `json:"variant_id,omitempty"`
OSVersion string `json:"os_version,omitempty"`
Architecture string `json:"architecture,omitempty"`
KernelVersion string `json:"kernel_version,omitempty"`
}
SystemInfo 用于存储系统基本信息
Click to show internal directories.
Click to hide internal directories.