Struct: query.Array

import "../ibm-cos-sdk-go-v2/aws/protocol/query"

Overview

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

Implemented Interfaces

types.AnalyticsFilter, v4.HTTPPresigner, s3.HTTPPresignerV4, types.MetricsFilter, s3.PresignPost, arn.S3ObjectLambdaARN, types.SelectObjectContentEventStream

Method Summary collapse

Method Details

func (a *Array) Value() Value

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



50
51
52
53
54
55
56
57
58
59
60
// File 'aws/protocol/query/array.go', line 50

func (a *Array) Value() Value { if a.size == 0 { delete(a.values, a.emptyValue.key) } // Query lists start a 1, so adjust the size first a.size++ // Lists can't have flat members // This uses string concatenation in place of fmt.Sprintf as fmt.Sprintf has a much higher resource overhead return newValue(a.values, a.prefix+keySeparator+strconv.FormatInt(int64(a.size), 10), false) }