message

package
v2.16.5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseActionsEnumerate = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate"
	BaseActionsPull      = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull"
	BaseActionsGet       = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Get"
	BaseActionsPut       = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Put"
	BaseActionsCreate    = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Create"
	BaseActionsDelete    = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete"
	DeleteBody           = "<Body></Body>"
	EnumerateBody        = "<Body><Enumerate xmlns=\"http://schemas.xmlsoap.org/ws/2004/09/enumeration\" /></Body>"
	GetBody              = "<Body></Body>"
	AMTSchema            = "http://intel.com/wbem/wscim/1/amt-schema/1/"
	CIMSchema            = "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/"
	IPSSchema            = "http://intel.com/wbem/wscim/1/ips-schema/1/"
	XMLBodySpace         = "http://www.w3.org/2003/05/soap-envelope"
	XMLPullResponseSpace = "http://schemas.xmlsoap.org/ws/2004/09/enumeration"
)

Variables

This section is empty.

Functions

func IsSlice

func IsSlice(v interface{}) bool

Types

type Action

type Action struct {
	XMLName        xml.Name `xml:"Action"`
	MustUnderstand string   `xml:"mustUnderstand,attr"`
	Value          string   `xml:",chardata"`
}

type Base

type Base struct {
	WSManMessageCreator *WSManMessageCreator
	// contains filtered or unexported fields
}

func NewBase

func NewBase(wsmanMessageCreator *WSManMessageCreator, className string) Base

func NewBaseWithClient

func NewBaseWithClient(wsmanMessageCreator *WSManMessageCreator, className string, client client.WSMan) Base

func (*Base) Create

func (b *Base) Create(data interface{}, selector *Selector) string

Creates a new instance of this class.

func (*Base) Delete

func (b *Base) Delete(selector Selector) string

Delete removes a the specified instance.

func (*Base) Enumerate

func (b *Base) Enumerate() string

Enumerate returns an enumeration context which is used in a subsequent Pull call.

func (*Base) Execute

func (b *Base) Execute(message *client.Message) error

func (*Base) Get

func (b *Base) Get(selector *Selector) string

Get retrieves the representation of the instance.

func (*Base) Pull

func (b *Base) Pull(enumerationContext string) string

Pull returns the instances of this class. An enumeration context provided by the Enumerate call is used as input.

func (*Base) Put

func (b *Base) Put(data interface{}, useHeaderSelector bool, customSelector *Selector) string

Put will change properties of the selected instance.

func (*Base) RequestStateChange

func (b *Base) RequestStateChange(actionName string, requestedState int) string

RequestStateChange requests that the state of the element be changed to the value specified in the RequestedState parameter . . .

type Header struct {
	XMLName     xml.Name `xml:"Header"`
	To          string   `xml:"To"`
	RelatesTo   int      `xml:"RelatesTo"`
	Action      Action   `xml:"Action"`
	MessageID   string   `xml:"MessageID"`
	ResourceURI string   `xml:"ResourceURI"`
}

type ReturnValue

type ReturnValue struct {
	XMLName        xml.Name `xml:"RequestStateChange_OUTPUT,omitempty"`
	ReturnValue    int      `xml:"ReturnValue,omitempty"`
	ReturnValueStr string   `xml:"ReturnValueStr,omitempty"`
}

type Selector

type Selector struct {
	XMLName xml.Name `xml:"Selector,omitempty"`
	Name    string   `xml:"Name,attr"`
	Value   string   `xml:",chardata"`
}

type SelectorSet

type SelectorSet struct {
	XMLName  xml.Name `xml:"SelectorSet"`
	Selector Selector
}

type Selector_OUTPUT

type Selector_OUTPUT struct {
	XMLName xml.Name `xml:"Selector,omitempty"`
	Name    string   `xml:"Name,attr"`
	Value   string   `xml:",chardata"`
}

type WSManErrors

type WSManErrors string
const (
	HEADER                             WSManErrors = "missing header"
	BODY                               WSManErrors = "missing body"
	ACTION                             WSManErrors = "missing action"
	MESSAGE_ID                         WSManErrors = "missing messageId"
	RESOURCE_URI                       WSManErrors = "missing resourceUri"
	ENUMERATION_CONTEXT                WSManErrors = "missing enumerationContext"
	UNSUPPORTED_METHOD                 WSManErrors = "unsupported method"
	INPUT                              WSManErrors = "missing input"
	REQUESTED_STATE                    WSManErrors = "missing requestedState"
	SELECTOR                           WSManErrors = "missing selector"
	ROLE                               WSManErrors = "missing role"
	REQUESTED_POWER_STATE_CHANGE       WSManErrors = "missing powerState"
	ADMIN_PASS_ENCRYPTION_TYPE         WSManErrors = "missing adminPassEncryptionType"
	ADMIN_PASSWORD                     WSManErrors = "missing adminPassword"
	ETHERNET_PORT_OBJECT               WSManErrors = "missing ethernetPortObject"
	ENVIRONMENT_DETECTION_SETTING_DATA WSManErrors = "missing environmentDetectionSettingData"
	CERTIFICATE_BLOB                   WSManErrors = "missing certificateBlob"
	MP_SERVER                          WSManErrors = "missing mpServer"
	REMOTE_ACCESS_POLICY_RULE          WSManErrors = "missing remoteAccessPolicyRule"
	BOOT_SETTING_DATA                  WSManErrors = "missing bootSettingData"
	ADD_ALARM_DATA                     WSManErrors = "missing alarmClockOccurrence"
	IEEE8021X_SETTINGS                 WSManErrors = "missing ieee8021xSettings"
	OPT_IN_SERVICE_RESPONSE            WSManErrors = "missing OptInServiceResponse"
	OPT_IN_CODE                        WSManErrors = "missing OptInCode"
	KEY_PAIR                           WSManErrors = "missing KeyAlgorithm and/or KeyLength"
	DATA                               WSManErrors = "missing data"
	NONCE                              WSManErrors = "missing nonce"
	SIGNING_ALGORITHM                  WSManErrors = "missing signingAlgorithm"
	DIGITAL_SIGNATURE                  WSManErrors = "missing digitalSignature"
	IS_LEAF                            WSManErrors = "missing isLeaf"
	IS_ROOT                            WSManErrors = "missing isRoot"
	TLS_CREDENTIAL_CONTEXT             WSManErrors = "missing tlsCredentialContext"
	GENERAL_SETTINGS                   WSManErrors = "missing generalSettings"
	PASSWORD                           WSManErrors = "missing password"
	PKCS10_REQUEST                     WSManErrors = "missing PKCS10Request"
	USERNAME                           WSManErrors = "missing username"
	DIGEST_PASSWORD                    WSManErrors = "missing digestPassword"
	INSTANCE_ID                        WSManErrors = "missing InstanceID"
	MISSING_USER_ACL_ENTRY_INFORMATION WSManErrors = "Digest username and password or Kerberos SID is required"
	USERNAME_TOO_LONG                  WSManErrors = "Username is too long"
)

type WSManMessageCreator

type WSManMessageCreator struct {
	MessageID        int
	XMLCommonPrefix  string
	XMLCommonEnd     string
	AnonymousAddress string
	DefaultTimeout   string
	ResourceURIBase  string
}

func NewWSManMessageCreator

func NewWSManMessageCreator(resourceURIBase string) *WSManMessageCreator

func (WSManMessageCreator) CreateBody

func (w WSManMessageCreator) CreateBody(method, wsmanClass string, data interface{}) string

func (*WSManMessageCreator) CreateHeader

func (w *WSManMessageCreator) CreateHeader(action, wsmanClass string, selector *Selector, address, timeout string) string

func (*WSManMessageCreator) CreateSelectorObjectForBody

func (w *WSManMessageCreator) CreateSelectorObjectForBody(selector Selector) map[string]interface{}

createSelectorObjectForBody creates an object for the body using the given selector.

func (WSManMessageCreator) CreateXML

func (w WSManMessageCreator) CreateXML(header, body string) string

Jump to

Keyboard shortcuts

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