ssh

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 11 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHadeSSH

func NewHadeSSH(params ...interface{}) (interface{}, error)

Types

type HadeSSH

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

func (*HadeSSH) Download

func (sh *HadeSSH) Download(src, dist string) error

将远端文件放到本地

func (*HadeSSH) DownloadDir

func (sh *HadeSSH) DownloadDir(src, dist string) error

func (*HadeSSH) Run

func (sh *HadeSSH) Run(shell string) ([]byte, error)

运行shell,并输出结果

func (*HadeSSH) Upload

func (sh *HadeSSH) Upload(src, dist string) error

将本地文件放到远端, 必须确保目录都存在

func (*HadeSSH) UploadDir

func (sh *HadeSSH) UploadDir(src, dist string, clean bool) error

dir 前后都包含分割线

type HadeSSHProvider

type HadeSSHProvider struct {
	Config *contract.SSHConfig
}

HadeSSHProvider provide a App service, it must be singlton, and not delay

func (*HadeSSHProvider) Boot

func (provider *HadeSSHProvider) Boot(c framework.Container) error

Boot will called when the service instantiate

func (*HadeSSHProvider) IsDefer

func (provider *HadeSSHProvider) IsDefer() bool

IsDefer define whether the service instantiate when first make or register

func (*HadeSSHProvider) Name

func (provider *HadeSSHProvider) Name() string

/ Name define the name for this service

func (*HadeSSHProvider) Params

func (provider *HadeSSHProvider) Params() []interface{}

Params define the necessary params for NewInstance

func (*HadeSSHProvider) Register

Register registe a new function for make a service instance

Jump to

Keyboard shortcuts

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