Documentation ¶
Overview ¶
Package connection provides a Go library for handling connections to Windows-based systems using WinRM and SSH protocols.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CMDResult ¶
CMDResult represents the result of executing a command, including stdout and stderr.
type Config ¶
type Config struct { WinRM *WinRMConfig SSH *SSHConfig }
Config contains configuration details for creating a Connection object.
type Connection ¶
Connection represents a connection object that can be used to interact with a Windows system.
func NewConnection ¶
func NewConnection(conf *Config) (*Connection, error)
NewConnection returns a Connection object based on the provided configuration. The returned Connection object may contain either a WinRM or SSH connection.
func (*Connection) Close ¶
func (c *Connection) Close() error
Close closes any open connection, whether it's WinRM or SSH.
type ConnectionInterface ¶
type ConnectionInterface interface { Run(ctx context.Context, cmd string) (CMDResult, error) Close() error }
ConnectionInterface defines the interface for a connection, specifying methods like Run and Close.
type KerberosConfig ¶
KerberosConfig represents the configuration details for Kerberos authentication.