deploy

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SshLoginFailed    = errors.New("SSH Login Failed")
	NoLoginType       = errors.New("No Login Type")
	SshEmptyOperation = errors.New("SSH Empty Operation")
)

Functions

func BaseexecuteCMD

func BaseexecuteCMD(cmdStr string, timeout int) ([]byte, error)

cmd命令执行

func Doclient

func Doclient()

Types

type Auth

type Auth struct {
	Username   string
	Password   string
	PublicKey  string
	PrivateKey string
	// contains filtered or unexported fields
}

func (*Auth) Error

func (auth *Auth) Error() error

type CmdType

type CmdType int
const (
	SSH_CHECK_LOGIN CmdType = iota
)

type DeployFile

type DeployFile interface {
	Source() string
	TargetPath() string
	TarName() string
	MainFileName() string
}

type Mutual

type Mutual struct{}

type SshLoginType

type SshLoginType int
const (
	LOGIN_NONE SshLoginType = iota
	LOGIN_PASSWORD
	LOGIN_MUTUAL
)

type TargetWithAuth

type TargetWithAuth struct {
	Auth
	Host      string
	LoginType SshLoginType
	Mutualed  bool
	// contains filtered or unexported fields
}

func NewTargetWithAuth

func NewTargetWithAuth(username, password, host string) *TargetWithAuth

func (*TargetWithAuth) CheckSshLogin

func (twa *TargetWithAuth) CheckSshLogin() (string, error)

func (*TargetWithAuth) ClearAuthorizedOnRemote

func (twa *TargetWithAuth) ClearAuthorizedOnRemote() error

func (*TargetWithAuth) ExecuteCmd

func (twa *TargetWithAuth) ExecuteCmd(cmds []string, timeout int) (string, error)

func (*TargetWithAuth) KillProcess

func (twa *TargetWithAuth) KillProcess(process string) (string, error)

func (*TargetWithAuth) MakeCommand

func (twa *TargetWithAuth) MakeCommand(ct CmdType) (string, error)

func (*TargetWithAuth) WithForceMutual

func (twa *TargetWithAuth) WithForceMutual() *TargetWithAuth

func (*TargetWithAuth) WithHost

func (twa *TargetWithAuth) WithHost(host string) *TargetWithAuth

func (*TargetWithAuth) WithLoginType

func (twa *TargetWithAuth) WithLoginType(lt SshLoginType) *TargetWithAuth

func (*TargetWithAuth) WithPublicKey

func (twa *TargetWithAuth) WithPublicKey(publicKey string) *TargetWithAuth

Jump to

Keyboard shortcuts

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