session

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRemoteSessionOpts

type CreateRemoteSessionOpts struct {
	Remote  value.IValueObject
	Timeout *time.Duration
}

type ISession

type ISession interface {
	Run(command string, stdout bool) error
	CopyToRemote(local string, remote string) error
	CopyToLocal(local string, remote string, isDir bool) error
	Close()
}

type LocalSession

type LocalSession struct{}

func CreateLocalSession

func CreateLocalSession() (*LocalSession, error)

func (*LocalSession) Close

func (session *LocalSession) Close()

func (*LocalSession) CopyToLocal

func (session *LocalSession) CopyToLocal(local string, remote string, isDir bool) error

func (*LocalSession) CopyToRemote

func (session *LocalSession) CopyToRemote(local string, remote string) error

func (*LocalSession) Run

func (session *LocalSession) Run(command string, stdout bool) error

type RemoteSession

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

func CreateRemoteSession

func CreateRemoteSession(opts *CreateRemoteSessionOpts) (*RemoteSession, error)

func (*RemoteSession) Close

func (session *RemoteSession) Close()

func (*RemoteSession) CopyToLocal

func (session *RemoteSession) CopyToLocal(local string, remote string, isDir bool) error

func (*RemoteSession) CopyToRemote

func (session *RemoteSession) CopyToRemote(local string, remote string) error

func (*RemoteSession) Run

func (session *RemoteSession) Run(command string, stdout bool) error

Jump to

Keyboard shortcuts

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