Documentation ¶
Index ¶
- func Http_post(client *Client, request *soap.SoapMessage) (response string, err error)
- func NewDeleteShellRequest(uri string, shellId string, params *Parameters) (message *soap.SoapMessage)
- func NewExecuteCommandRequest(uri string, shellId string, command string, params *Parameters) (message *soap.SoapMessage)
- func NewGetOutputRequest(uri string, shellId string, commandId string, streams string, ...) (message *soap.SoapMessage)
- func NewOpenShellRequest(uri string, params *Parameters) (message *soap.SoapMessage)
- func NewSendInputRequest(uri string, shellId string, commandId string, input []byte, params *Parameters) (message *soap.SoapMessage)
- func NewSignalRequest(uri string, shellId string, commandId string, params *Parameters) (message *soap.SoapMessage)
- func ParseExecuteCommandResponse(response string) (commandId string, err error)
- func ParseOpenShellResponse(response string) (shellId string, err error)
- func ParseSlurpOutputErrResponse(response string, stdout io.Writer, stderr io.Writer) (finished bool, exitCode int, err error)
- func ParseSlurpOutputResponse(response string, stream io.Writer, streamType string) (finished bool, exitCode int, err error)
- func Powershell(psCmd string) string
- type Client
- type Command
- type HttpPost
- type Parameters
- type Shell
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Http_post ¶
func Http_post(client *Client, request *soap.SoapMessage) (response string, err error)
func NewDeleteShellRequest ¶
func NewDeleteShellRequest(uri string, shellId string, params *Parameters) (message *soap.SoapMessage)
func NewExecuteCommandRequest ¶
func NewExecuteCommandRequest(uri string, shellId string, command string, params *Parameters) (message *soap.SoapMessage)
func NewGetOutputRequest ¶
func NewGetOutputRequest(uri string, shellId string, commandId string, streams string, params *Parameters) (message *soap.SoapMessage)
func NewOpenShellRequest ¶
func NewOpenShellRequest(uri string, params *Parameters) (message *soap.SoapMessage)
func NewSendInputRequest ¶
func NewSendInputRequest(uri string, shellId string, commandId string, input []byte, params *Parameters) (message *soap.SoapMessage)
func NewSignalRequest ¶
func NewSignalRequest(uri string, shellId string, commandId string, params *Parameters) (message *soap.SoapMessage)
func ParseOpenShellResponse ¶
func Powershell ¶
Wraps a PowerShell script and prepares it for execution by the winrm client
Types ¶
type Client ¶
type Client struct { Parameters // contains filtered or unexported fields }
func NewClient ¶
NewClient will create a new remote client on url, connecting with user and password This function doesn't connect (connection happens only when CreateShell is called)
func NewClientWithParameters ¶
func NewClientWithParameters(host string, user string, password string, params *Parameters) (client *Client)
NewClient will create a new remote client on url, connecting with user and password This function doesn't connect (connection happens only when CreateShell is called)
func (*Client) CreateShell ¶
CreateShell will create a WinRM Shell, which is required before running commands.
type Command ¶
Command represents a given command running on a Shell. This structure allows to get access to the various stdout, stderr and stdin pipes.
type Parameters ¶
type Parameters struct { Timeout string Locale string EnvelopeSize int // contains filtered or unexported fields }
func DefaultParameters ¶
func DefaultParameters() *Parameters
func NewParameters ¶
func NewParameters(timeout string, locale string, envelopeSize int) *Parameters
Source Files ¶
Click to show internal directories.
Click to hide internal directories.