sh

package
v0.0.0-...-10408e1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Port           = "SSH_PORT"
	Password       = "SSH_PASSWORD"
	Username       = "SSH_USERNAME"
	PrivateKeyPath = "SSH_PRIVATE_KEY_PATH"
)

Variables

View Source
var SettingsList = []string{
	Port,
	Password,
	Username,
	PrivateKeyPath,
}

Functions

func ConfigureFolder

func ConfigureFolder(prefix string, settings map[string]string) (storage.Folder, error)

func NewFolderError

func NewFolderError(err error, format string, args ...interface{}) storage.Error

Types

type Folder

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

func (*Folder) DeleteObjects

func (folder *Folder) DeleteObjects(objectRelativePaths []string) error

func (*Folder) Exists

func (folder *Folder) Exists(objectRelativePath string) (bool, error)

func (*Folder) GetPath

func (folder *Folder) GetPath() string

func (*Folder) GetSubFolder

func (folder *Folder) GetSubFolder(subFolderRelativePath string) storage.Folder

func (*Folder) ListFolder

func (folder *Folder) ListFolder() (objects []storage.Object, subFolders []storage.Folder, err error)

func (*Folder) PutObject

func (folder *Folder) PutObject(name string, content io.Reader) error

func (*Folder) ReadObject

func (folder *Folder) ReadObject(objectRelativePath string) (io.ReadCloser, error)

type SftpClient

type SftpClient interface {
	Lock()
	Unlock()
	ReadDir(path string) ([]os.FileInfo, error)
	Join(elem ...string) string
	Remove(path string) error
	Stat(p string) (os.FileInfo, error)
	OpenFile(path string) (io.ReadCloser, error)
	CreateFile(path string) (io.Writer, error)
	Mkdir(path string) error
}

Jump to

Keyboard shortcuts

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