provider

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProviders

func GetProviders(destCfg *types.DestinationsConfig) map[string]Provider

Types

type LocalProvider

type LocalProvider struct {
	BasePath string
}

func NewLocalProvider

func NewLocalProvider(basePath string) *LocalProvider

func (*LocalProvider) SendFile

func (lp *LocalProvider) SendFile(sourcePath string, destPathSuffix string) error

type Provider

type Provider interface {
	SendFile(sourcePath string, destPathSuffix string) error
}

type SftpProvider

type SftpProvider struct {
	SshClientConfig *ssh.ClientConfig
	SshUrl          string
	BasePath        string
}

func NewSftpProvider

func NewSftpProvider(basePath string, host string, port string, user string, sshKeyPath string) (*SftpProvider, error)

func (*SftpProvider) SendFile

func (sp *SftpProvider) SendFile(sourcePath string, destPathSuffix string) error

Jump to

Keyboard shortcuts

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