shell

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iface

type Iface interface {
	Host() string
	Exec(ctx context.Context, basedir string, command string) (bytes.Buffer, bytes.Buffer, error)
	Execf(ctx context.Context, basedir string, command string, a ...interface{}) (bytes.Buffer, bytes.Buffer, error)
	Deploy(ctx context.Context, src, dst string) error
}

type LocalClient

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

func NewLocalClient

func NewLocalClient(e exec.Interface) *LocalClient

func (*LocalClient) Deploy

func (c *LocalClient) Deploy(ctx context.Context, src, dst string) error

func (*LocalClient) Exec

func (c *LocalClient) Exec(ctx context.Context, basedir string, command string) (bytes.Buffer, bytes.Buffer, error)

func (*LocalClient) Execf

func (c *LocalClient) Execf(ctx context.Context, basedir string, command string, a ...interface{}) (bytes.Buffer, bytes.Buffer, error)

func (*LocalClient) Host

func (c *LocalClient) Host() string

type SshClient

type SshClient struct {
	*ssh.Client
	// contains filtered or unexported fields
}

func NewSshClient

func NewSshClient(host string, port int, user, password, keyfile string) (*SshClient, error)

func (*SshClient) Deploy

func (c *SshClient) Deploy(ctx context.Context, src, dst string) error

func (*SshClient) Exec

func (c *SshClient) Exec(ctx context.Context, basedir string, command string) (bytes.Buffer, bytes.Buffer, error)

func (*SshClient) Execf

func (c *SshClient) Execf(ctx context.Context, basedir string, cmd string, a ...interface{}) (bytes.Buffer, bytes.Buffer, error)

func (*SshClient) Host

func (c *SshClient) Host() string

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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