local

package
v0.0.0-...-740721f Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Local

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

Local implements a localhost Target

func New

func New(sudopass string) (*Local, error)

New returns a instance of Local

func (*Local) ActiveUser

func (l *Local) ActiveUser() string

ActiveUser returns the currently active user

func (*Local) As

func (l *Local) As(user string)

As sets the active user for local

func (*Local) Close

func (l *Local) Close() error

Close does nothing. It is just there to satisfy the gossh.Target interface.

func (*Local) Get

func (l *Local) Get(filename string) ([]byte, error)

Get implements target.Get

func (*Local) Put

func (l *Local) Put(filename string, data []byte, perm os.FileMode) error

Put implements target.Put

func (*Local) Run

func (l *Local) Run(cmd string, stdin io.Reader) (sh.Result, error)

Run runs cmd

func (*Local) String

func (l *Local) String() string

String implements fmt.Stringer

func (*Local) User

func (l *Local) User() string

User returns the connected user

Jump to

Keyboard shortcuts

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