service

package
v0.0.0-...-4cafcdf Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckHost

func CheckHost(host string) bool

Check host parameter

func KillProcess

func KillProcess(processname string) error

KillProcess func

func ProcessStatus

func ProcessStatus(processname string) error

Types

type Cli

type Cli struct {
	USER       string       `json:"user"`
	PWD        string       `json:"pwd"`
	IP         string       `json:"ip"`
	PORT       string       `json:"port"`
	TRANSFER   string       `json:"transfer"`
	ENV        string       `json:"enviroment"`
	EFLAG      int          `json:"eflag"`
	SOURCEFILE string       `json:"sourcefile"`
	SSHCLIENT  *ssh.Client  `json:"sshclient"`
	SFTPCLIENT *sftp.Client `json:"sftpclient"`
}

func (*Cli) ChangeEnv

func (c *Cli) ChangeEnv(envparam string, pwdparam string, cli *cli.Context) error

ChangeEnv

func (*Cli) Connect

func (c *Cli) Connect() error

Connect

func (*Cli) Run

func (c *Cli) Run(cmd string, cli *cli.Context) error

func (*Cli) Server

func (c *Cli) Server(cli *cli.Context) error

Run server

func (*Cli) UploadFile

func (c *Cli) UploadFile(localFile string, remoteFile string, cli *cli.Context) error

type SShell

type SShell struct {
	PATH string `json:"path"`
	CMD  string `json:"cmd"`
}

func (*SShell) CheckParam

func (s *SShell) CheckParam(c *cli.Context) bool

func (*SShell) StartUp

func (s *SShell) StartUp(c *cli.Context) error

Jump to

Keyboard shortcuts

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