package query

import "github.com/aws/aws-sdk-go-v2/aws/protocol/query"

Index

Types

type Array

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

Array represents the encoding of Query lists and sets. A Query array is a representation of a list of values of a fixed type. A serialized array might look like the following:

ListName.member.1=foo
&ListName.member.2=bar
&Listname.member.3=baz

func (*Array) Value

func (a *Array) Value() Value

Value adds a new element to the Query Array. Returns a Value type used to encode the array element.

type Encoder

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

Encoder is a Query encoder that supports construction of Query body values using methods.

func NewEncoder

func NewEncoder(writer io.Writer) *Encoder

NewEncoder returns a new Query body encoder

func (Encoder) Encode

func (e Encoder) Encode() error

Encode returns the []byte slice representing the current state of the Query encoder.

type Map

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

Map represents the encoding of Query maps. A Query map is a representation of a mapping of arbitrary string keys to arbitrary values of a fixed type. A Map differs from an Object in that the set of keys is not fixed, in that the values must all be of the same type, and that map entries are ordered. A serialized map might look like the following:

MapName.entry.1.key=Foo
&MapName.entry.1.value=spam
&MapName.entry.2.key=Bar
&MapName.entry.2.value=eggs

func (*Map) Key

func (m *Map) Key(name string) Value

Key adds the given named key to the Query map. Returns a Value encoder that should be used to encode a Query value type.

type Object

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

Object represents the encoding of Query structures and unions. A Query object is a representation of a mapping of string keys to arbitrary values where there is a fixed set of keys whose values each have their own known type. A serialized object might look like the following:

ObjectName.Foo=value
&ObjectName.Bar=5

func (*Object) FlatKey

func (o *Object) FlatKey(name string) Value

FlatKey adds the given named key to the Query object. Returns a Value encoder that should be used to encode a Query value type. The value will be flattened if it is a map or array.

func (*Object) Key

func (o *Object) Key(name string) Value

Key adds the given named key to the Query object. Returns a Value encoder that should be used to encode a Query value type.

type Value

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

Value represents a Query Value type.

func (Value) Array

func (qv Value) Array(locationName string) *Array

Array returns a new Array encoder.

func (Value) Base64EncodeBytes

func (qv Value) Base64EncodeBytes(v []byte)

Base64EncodeBytes encodes v as a base64 query string value. This is intended to enable compatibility with the JSON encoder.

func (Value) BigDecimal

func (qv Value) BigDecimal(v *big.Float)

BigDecimal encodes v as a query string value

func (Value) BigInteger

func (qv Value) BigInteger(v *big.Int)

BigInteger encodes v as a query string value

func (Value) Boolean

func (qv Value) Boolean(v bool)

Boolean encodes v as a query string value

func (Value) Byte

func (qv Value) Byte(v int8)

Byte encodes v as a query string value

func (Value) Double

func (qv Value) Double(v float64)

Double encodes v as a query string value

func (Value) Float

func (qv Value) Float(v float32)

Float encodes v as a query string value

func (Value) Integer

func (qv Value) Integer(v int32)

Integer encodes v as a query string value

func (Value) Long

func (qv Value) Long(v int64)

Long encodes v as a query string value

func (Value) Map

func (qv Value) Map(keyLocationName string, valueLocationName string) *Map

Map returns a new Map encoder.

func (Value) Object

func (qv Value) Object() *Object

Object returns a new Object encoder.

func (Value) Short

func (qv Value) Short(v int16)

Short encodes v as a query string value

func (Value) String

func (qv Value) String(v string)

String encodes v as a query string value

Source Files

array.go encoder.go map.go object.go value.go

Version
v0.26.0
Published
Oct 1, 2020
Platform
js/wasm
Imports
6 packages
Last checked
1 hour ago

Tools for package owners.