xml

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

An Encoder provides encoding of the AWS XML protocol. This encoder will will write all content to XML. Only supports body and payload targets.

func NewEncoder

func NewEncoder() *Encoder

NewEncoder creates a new encoder for encoding AWS XML protocol. Only encodes fields into the XML body, and error is returned if target is anything other than Body or Payload.

func (*Encoder) Encode

func (e *Encoder) Encode() (io.ReadSeeker, error)

Encode returns the encoded XMl reader. An error will be returned if one was encountered while building the XML body.

func (*Encoder) SetFields

func (e *Encoder) SetFields(t protocol.Target, k string, m protocol.FieldMarshaler, meta protocol.Metadata)

SetFields sets the nested fields to the XML body.

func (*Encoder) SetList

func (e *Encoder) SetList(t protocol.Target, k string, fn func(le protocol.ListEncoder), meta protocol.Metadata)

SetList creates an XML list and calls the passed in fn callback with a list encoder.

func (*Encoder) SetMap

func (e *Encoder) SetMap(t protocol.Target, k string, fn func(me protocol.MapEncoder), meta protocol.Metadata)

SetMap creates an XML map and calls the passed in fn callback with a map encoder.

func (*Encoder) SetStream

func (e *Encoder) SetStream(t protocol.Target, k string, v protocol.StreamMarshaler, meta protocol.Metadata)

SetStream is not supported for XML protocol marshaling.

func (*Encoder) SetValue

SetValue sets an individual value to the XML body.

type ListEncoder

type ListEncoder struct {
	Base     *Encoder
	Flatten  bool
	ListName string
	// contains filtered or unexported fields
}

A ListEncoder encodes elements within a list for the XML encoder.

func (*ListEncoder) ListAddFields

func (e *ListEncoder) ListAddFields(m protocol.FieldMarshaler)

ListAddFields will set the nested type's fields to the list.

func (*ListEncoder) ListAddList

func (e *ListEncoder) ListAddList(fn func(le protocol.ListEncoder))

ListAddList is not supported for XML encoder.

func (*ListEncoder) ListAddMap

func (e *ListEncoder) ListAddMap(fn func(me protocol.MapEncoder))

ListAddMap is not supported for XML encoder.

func (*ListEncoder) ListAddValue

func (e *ListEncoder) ListAddValue(v protocol.ValueMarshaler)

ListAddValue will add the value to the list.

type MapEncoder

type MapEncoder struct {
	Base      *Encoder
	Flatten   bool
	KeyName   string
	ValueName string
	// contains filtered or unexported fields
}

A MapEncoder encodes key values pair map values for the XML encoder.

func (*MapEncoder) MapSetFields

func (e *MapEncoder) MapSetFields(k string, m protocol.FieldMarshaler)

MapSetFields will set the nested type's fields under the map.

func (*MapEncoder) MapSetList

func (e *MapEncoder) MapSetList(k string, fn func(le protocol.ListEncoder))

MapSetList is not supported.

func (*MapEncoder) MapSetMap

func (e *MapEncoder) MapSetMap(k string, fn func(me protocol.MapEncoder))

MapSetMap is not supported.

func (*MapEncoder) MapSetValue

func (e *MapEncoder) MapSetValue(k string, v protocol.ValueMarshaler)

MapSetValue sets a map value.

Directories

Path Synopsis
Package xmlutil provides XML serialization of AWS requests and responses.
Package xmlutil provides XML serialization of AWS requests and responses.

Jump to

Keyboard shortcuts

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