scp

package
v0.0.0-...-f465a65 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	NEWLINE = "\n"
	SPACE   = " "
)

Variables

This section is empty.

Functions

func ParseCommand

func ParseCommand(command string) ([]string, error)

Types

type Options

type Options struct {
	SourceMode           bool
	TargetMode           bool
	TargetIsDirectory    bool
	Verbose              bool
	PreserveTimesAndMode bool
	Recursive            bool
	Quiet                bool

	Sources []string
	Target  string
}

func ParseFlags

func ParseFlags(args []string) (*Options, error)

type SecureCopier

type SecureCopier interface {
	Copy() error
}

func New

func New(options *Options, stdin io.Reader, stdout io.Writer, stderr io.Writer, logger lager.Logger) SecureCopier

func NewFromCommand

func NewFromCommand(command string, stdin io.Reader, stdout io.Writer, stderr io.Writer, logger lager.Logger) (SecureCopier, error)

type Session

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

func NewSession

func NewSession(stdin io.Reader, stdout io.Writer, stderr io.Writer, preserveTimesAndMode bool, logger lager.Logger) *Session

type TimeMessage

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

func NewTimeMessage

func NewTimeMessage(fileInfo os.FileInfo) *TimeMessage

func (*TimeMessage) AccessTime

func (tm *TimeMessage) AccessTime() time.Time

func (*TimeMessage) ModificationTime

func (tm *TimeMessage) ModificationTime() time.Time

func (*TimeMessage) Receive

func (tm *TimeMessage) Receive(session *Session) error

func (*TimeMessage) Send

func (tm *TimeMessage) Send(session *Session) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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