Documentation ¶
Overview ¶
********************************************************************
- Copyright (c) Intel Corporation 2024
- SPDX-License-Identifier: Apache-2.0 *********************************************************************
Index ¶
- Constants
- type AuthChallenge
- type Message
- type Parameters
- type Target
- func (t *Target) CloseConnection() error
- func (t *Target) Connect() error
- func (t *Target) GetServerCertificate() (*tls.Certificate, error)
- func (t *Target) IsAuthenticated() bool
- func (t *Target) Post(msg string) (response []byte, err error)
- func (t *Target) ProxyURL(proxyStr string) (err error)
- func (t *Target) Receive() ([]byte, error)
- func (t *Target) Send(data []byte) error
- type WSMan
- type WsTransport
Constants ¶
View Source
const ( ContentType = "application/soap+xml; charset=utf-8" NSWSMAN = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" NSWSMID = "http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd" TLSPort = "16993" NonTLSPort = "16992" RedirectionTLSPort = "16995" RedirectionNonTLSPort = "16994" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthChallenge ¶ added in v2.2.0
type AuthChallenge struct { Username string Password string Realm string CSRFToken string Domain string Nonce string Opaque string Stale string Algorithm string Qop string CNonce string NonceCount int }
func (*AuthChallenge) ComputeDigestHash ¶ added in v2.4.0
func (c *AuthChallenge) ComputeDigestHash(method, uri, nonceData string) string
func (*AuthChallenge) GetFormattedNonceData ¶ added in v2.4.0
func (c *AuthChallenge) GetFormattedNonceData(nonceData string) string
func (*AuthChallenge) HashCredentials ¶ added in v2.2.0
func (c *AuthChallenge) HashCredentials() string
type Parameters ¶
type Parameters struct { Target string Username string Password string UseDigest bool UseTLS bool SelfSignedAllowed bool LogAMTMessages bool Transport http.RoundTripper IsRedirection bool PinnedCert string }
Parameters struct defines the connection settings for wsman client.
type Target ¶
type Target struct { http.Client UseTLS bool InsecureSkipVerify bool PinnedCert string // contains filtered or unexported fields }
Target is a thin wrapper around http.Target.
func NewWsman ¶
func NewWsman(cp Parameters) *Target
func NewWsmanTCP ¶ added in v2.4.0
func NewWsmanTCP(cp Parameters) *Target
func (*Target) CloseConnection ¶ added in v2.4.0
CloseConnection cleanly closes the TCP connection.
func (*Target) Connect ¶ added in v2.4.0
Connect establishes a TCP connection to the endpoint specified in the Target struct.
func (*Target) GetServerCertificate ¶ added in v2.13.0
func (t *Target) GetServerCertificate() (*tls.Certificate, error)
func (*Target) IsAuthenticated ¶ added in v2.11.0
func (*Target) ProxyURL ¶ added in v2.5.2
ProxyURL sets proxy address for the underlying Transport if supported.
type WSMan ¶
type WSMan interface { // HTTP Methods Post(msg string) (response []byte, err error) // TCP Methods Connect() error Send(data []byte) error Receive() ([]byte, error) CloseConnection() error IsAuthenticated() bool GetServerCertificate() (*tls.Certificate, error) }
WSMan is an interface for the wsman.Client.
type WsTransport ¶
type WsTransport struct {
// contains filtered or unexported fields
}
WsTransport is an implementation of http.Transport which uses websocket relay.
Click to show internal directories.
Click to hide internal directories.