winrm_helper

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	RunFireAndForgetScript(ctx context.Context, script *template.Template, args interface{}) error
	RunScriptWithResult(ctx context.Context, script *template.Template, args interface{}, result interface{}) (err error)
	UploadFile(ctx context.Context, filePath string, remoteFilePath string) (resolvedRemoteFilePath string, err error)
	UploadDirectory(ctx context.Context, rootPath string, excludeList []string) (remoteRootPath string, remoteAbsoluteFilePaths []string, err error)
	FileExists(ctx context.Context, remoteFilePath string) (exists bool, err error)
	DirectoryExists(ctx context.Context, remoteDirectoryPath string) (exists bool, err error)
	DeleteFileOrDirectory(ctx context.Context, remotePath string) (err error)
}

type ClientConfig

type ClientConfig struct {
	WinRmClientPool  *pool.ObjectPool
	ElevatedUser     string
	ElevatedPassword string
	Vars             string
}

func (*ClientConfig) DeleteFileOrDirectory added in v1.2.0

func (c *ClientConfig) DeleteFileOrDirectory(ctx context.Context, remotePath string) (err error)

func (*ClientConfig) DirectoryExists added in v1.2.0

func (c *ClientConfig) DirectoryExists(ctx context.Context, remoteDirectoryPath string) (exists bool, err error)

func (*ClientConfig) FileExists added in v1.2.0

func (c *ClientConfig) FileExists(ctx context.Context, remoteFilePath string) (exists bool, err error)

func (*ClientConfig) RunFireAndForgetScript

func (c *ClientConfig) RunFireAndForgetScript(ctx context.Context, script *template.Template, args interface{}) error

func (*ClientConfig) RunScriptWithResult

func (c *ClientConfig) RunScriptWithResult(ctx context.Context, script *template.Template, args interface{}, result interface{}) (err error)

func (*ClientConfig) UploadDirectory added in v1.2.0

func (c *ClientConfig) UploadDirectory(ctx context.Context, rootPath string, excludeList []string) (remoteRootPath string, remoteAbsoluteFilePaths []string, err error)

func (*ClientConfig) UploadFile added in v1.2.0

func (c *ClientConfig) UploadFile(ctx context.Context, filePath string, remoteFilePath string) (string, error)

type Provider

type Provider struct {
	Client Client
}

func New

func New(clientConfig *ClientConfig) (*Provider, error)

Jump to

Keyboard shortcuts

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