ctl

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Windows = "windows"
	Linux   = "linux"
	Macos   = "darwin"
)

Variables

This section is empty.

Functions

func BuildExec

func BuildExec(path, system, name string)

Types

type ClientConfig

type ClientConfig struct {
	Host     string
	Port     string
	Username string
	Password string

	LastResult string
	// contains filtered or unexported fields
}

func CreateClient

func CreateClient(host string, port string, username, password string, proxyUrl string) *ClientConfig

func (*ClientConfig) Download

func (cf *ClientConfig) Download(srcPath, dstPath string)

func (*ClientConfig) Run

func (cf *ClientConfig) Run(procName string)

func (*ClientConfig) RunShell

func (cf *ClientConfig) RunShell(shell string) string

func (*ClientConfig) Upload

func (cf *ClientConfig) Upload(srcPath, dstPath string)

type ExecShell

type ExecShell struct {
	ProcName string `yaml:"name"`
	Exit     bool   `yaml:"exit"`
}

type FileCtl

type FileCtl struct {
	Src string `yaml:"src"`
	Dst string `yaml:"dst"`
}

type KBar

type KBar struct {
	// contains filtered or unexported fields
}

func (*KBar) Finish

func (bar *KBar) Finish()

func (*KBar) New

func (bar *KBar) New(start, total int64, text string)

func (*KBar) NewWithGraph

func (bar *KBar) NewWithGraph(start, total int64, graph string, text string)

func (*KBar) Play

func (bar *KBar) Play(cur int64)

type ServerAddr

type ServerAddr struct {
	IP       string `yaml:"ip"`
	Port     string `yaml:"port"`
	Account  string `yaml:"account"`
	Password string `yaml:"password"`
	Proxy    string `yarml:"proxy"`
}

type Yaml

type Yaml struct {
	Server        ServerAddr `yaml:"server"`
	UploadFiles   []FileCtl  `yaml:"uploads"`
	DownloadFiles []FileCtl  `yaml:"downloads"`
	Commands      []string   `yaml:"commands"`
	Exec          ExecShell  `yaml:"exec"`
}

func NewYaml

func NewYaml(path string) *Yaml

func (Yaml) Run

func (yal Yaml) Run()

Jump to

Keyboard shortcuts

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