consts

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

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 DownloadFileParam struct {
	URL      string
	DirPath  string
	FileName string
}

type DownloadFileResult

type DownloadFileResult struct {
	FilePath string
}

type GetInstalledPackageListParam

type GetInstalledPackageListParam struct {
}

获取已经安装的软件包列表入参

type GetInstalledPackageListResult

type GetInstalledPackageListResult struct {
	PackageList []string
}

获取已经安装的软件包列表出参

type GetPackageFileListParam

type GetPackageFileListParam struct {
	PackageName string
}

获取某个软件包的文件列表入参

type GetPackageFileListResult

type GetPackageFileListResult struct {
	PackageInfo
}

获取某个软件包的文件列表出参

type GetPackageInfoParam

type GetPackageInfoParam struct {
	PackageName string
}

获取某个软件包的详细信息入参

type GetPackageInfoResult

type GetPackageInfoResult struct {
	PackageInfo
}

获取某个软件包的详细信息出参

type GetPackagesFileListParam

type GetPackagesFileListParam struct {
	PackageList []string
	Async       bool
}

获取多个软件包文件列表入参

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

type RunCommandConfig struct {
	Command                string
	RunCommandFailedCounts int
}

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 用于存储系统基本信息

Jump to

Keyboard shortcuts

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