Documentation
¶
Index ¶
- Constants
- type ArkWinRMConnection
- func (c *ArkWinRMConnection) Connect(connectionDetails *connectionsmodels.ArkConnectionDetails) error
- func (c *ArkWinRMConnection) Disconnect() error
- func (c *ArkWinRMConnection) IsConnected() bool
- func (c *ArkWinRMConnection) IsSuspended() bool
- func (c *ArkWinRMConnection) RestoreConnection() error
- func (c *ArkWinRMConnection) RunCommand(command *connectionsmodels.ArkConnectionCommand) (*connectionsmodels.ArkConnectionResult, error)
- func (c *ArkWinRMConnection) SuspendConnection() error
Constants ¶
const (
// WinRMHTTPSPort is the default port for WinRM HTTPS connections.
WinRMHTTPSPort = 5986
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArkWinRMConnection ¶
type ArkWinRMConnection struct {
connections.ArkConnection
// contains filtered or unexported fields
}
ArkWinRMConnection is a struct that implements the ArkConnection interface for WinRM connections.
func NewArkWinRMConnection ¶
func NewArkWinRMConnection() *ArkWinRMConnection
NewArkWinRMConnection creates a new instance of ArkWinRMConnection.
func (*ArkWinRMConnection) Connect ¶
func (c *ArkWinRMConnection) Connect(connectionDetails *connectionsmodels.ArkConnectionDetails) error
Connect establishes a WinRM connection using the provided connection details.
func (*ArkWinRMConnection) Disconnect ¶
func (c *ArkWinRMConnection) Disconnect() error
Disconnect closes the WinRM connection.
func (*ArkWinRMConnection) IsConnected ¶
func (c *ArkWinRMConnection) IsConnected() bool
IsConnected checks if the WinRM connection is established.
func (*ArkWinRMConnection) IsSuspended ¶
func (c *ArkWinRMConnection) IsSuspended() bool
IsSuspended checks if the WinRM connection is suspended.
func (*ArkWinRMConnection) RestoreConnection ¶
func (c *ArkWinRMConnection) RestoreConnection() error
RestoreConnection restores the WinRM connection.
func (*ArkWinRMConnection) RunCommand ¶
func (c *ArkWinRMConnection) RunCommand(command *connectionsmodels.ArkConnectionCommand) (*connectionsmodels.ArkConnectionResult, error)
RunCommand executes a command on the remote machine using WinRM. It handles command splitting if the command exceeds the maximum size. It also manages the creation of a temporary file for large commands. The command is executed in PowerShell and the output is returned.
func (*ArkWinRMConnection) SuspendConnection ¶
func (c *ArkWinRMConnection) SuspendConnection() error
SuspendConnection suspends the WinRM connection.