scp

package
v0.0.0-...-57e3cb4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2019 License: MIT Imports: 11 Imported by: 0

README

Scp protocol remote handler

Any similarities between this and OpenSSH's scp are not coincidental

Initially written and released into public domain by Vasily Kolobkov

Documentation

Index

Constants

View Source
const (
	S_IWUSR = 00200
	S_IRWXU = 00700
	S_ISUID = 04000
	S_ISGID = 02000

	MaxErrLen        = 1024
	DirScanBatchSize = 256
)

Variables

This section is empty.

Functions

func CapReader

func CapReader(r io.Reader, st *BwStats) io.Reader

func CapWriter

func CapWriter(w io.Writer, st *BwStats) io.Writer

func Main

func Main(osArgs []string, vfs vfs.VFS)

Types

type AccError

type AccError struct {
	Errors []error
}

func (AccError) Error

func (e AccError) Error() string

type BwCapReader

type BwCapReader struct {
	Base  io.Reader
	Stats *BwStats
}

func (*BwCapReader) Read

func (r *BwCapReader) Read(p []byte) (int, error)

type BwCapWriter

type BwCapWriter struct {
	Base  io.Writer
	Stats *BwStats
}

func (*BwCapWriter) Write

func (w *BwCapWriter) Write(p []byte) (int, error)

type BwStats

type BwStats struct {
	Last   time.Time /* time of last observed event */
	Wnd    uint      /* unmetered bytes */
	Thresh uint      /* delay after at least this much bytes */
	Rate   uint      /* bandwidth limit in bits/second */
}

func NewBwStats

func NewBwStats(rate uint) *BwStats

type ConstReader

type ConstReader byte

func (ConstReader) Read

func (c ConstReader) Read(b []byte) (int, error)

type FatalError

type FatalError string

func (FatalError) Error

func (e FatalError) Error() string

type FileTimes

type FileTimes struct {
	Atime unix.Timeval
	Mtime unix.Timeval
}

Jump to

Keyboard shortcuts

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