winrmcp

package
v0.0.0-...-c76d91c Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IpFormat

func IpFormat(ip string) string

IpFormat formats the IP correctly, so we don't provide IPv6 address in an IPv4 format during node communication. We return the ip parameter as is if it's an IPv4 address or a hostname.

Types

type Auth

type Auth struct {
	User     string
	Password string
}

type Config

type Config struct {
	Auth                  Auth
	Https                 bool
	Insecure              bool
	TLSServerName         string
	CACertBytes           []byte
	ConnectTimeout        time.Duration
	OperationTimeout      time.Duration
	MaxOperationsPerShell int
	TransportDecorator    func() winrm.Transporter
}

type FileItem

type FileItem struct {
	Name          string
	Path          string
	Mode          string
	LastWriteTime string
	Length        int
}

type Winrmcp

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

func New

func New(addr string, config *Config) (*Winrmcp, error)

func (*Winrmcp) Copy

func (fs *Winrmcp) Copy(fromPath, toPath string) error

func (*Winrmcp) List

func (fs *Winrmcp) List(remotePath string) ([]FileItem, error)

func (*Winrmcp) Write

func (fs *Winrmcp) Write(toPath string, src io.Reader) error

Jump to

Keyboard shortcuts

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