Skip to content

Commit 0143dbc

Browse files
authored
Release v0.6.0 (2018-12-03) (#241)
Services --- * Synced the V2 SDK with latests AWS service API definitions. * Fixes [#240](#240) SDK Bugs --- * Updates the SDK's release tagging scheme to use `v0` until the v2 SDK reaches * General Availability (GA). This allows the SDK to be used with Go 1.11 modules. Post GA, v2 SDK's release tagging version will most likely follow a `v1.<x>.<y>` patter. * Fixes [#221](#221)
1 parent f3c53b5 commit 0143dbc

File tree

602 files changed

+259689
-25388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

602 files changed

+259689
-25388
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Release v0.6.0 (2018-12-03)
2+
===
3+
4+
### Services
5+
* Synced the V2 SDK with latests AWS service API definitions.
6+
7+
### SDK Bugs
8+
* Updates the SDK's release tagging scheme to use `v0` until the v2 SDK reaches
9+
* General Availability (GA). This allows the SDK to be used with Go 1.11 modules. Post GA, v2 SDK's release tagging version will most likely follow a `v1.<x>.<y>` patter.
10+
* Fixes [#221](https://github.com/aws/aws-sdk-go-v2/issues/221)
11+
112
Release v2.0.0-preview.5 (2018-09-19)
213
===
314

aws/config.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ type Config struct {
8080
//
8181
// TODO need better way of representing support for this concept. Not on Config.
8282
DisableRestProtocolURICleaning bool
83+
84+
// DisableEndpointHostPrefix will disable the SDK's behavior of prefixing
85+
// request endpoint hosts with modeled information.
86+
//
87+
// Disabling this feature is useful when you want to use local endpoints
88+
// for testing that do not support the modeled host prefix pattern.
89+
DisableEndpointHostPrefix bool
8390
}
8491

8592
// NewConfig returns a new Config pointer that can be chained with builder

aws/endpoints/decode.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,20 @@ func custAddS3DualStack(p *partition) {
9494
return
9595
}
9696

97-
s, ok := p.Services["s3"]
97+
custAddDualstack(p, "s3")
98+
custAddDualstack(p, "s3-control")
99+
}
100+
101+
func custAddDualstack(p *partition, svcName string) {
102+
s, ok := p.Services[svcName]
98103
if !ok {
99104
return
100105
}
101106

102107
s.Defaults.HasDualStack = boxedTrue
103108
s.Defaults.DualStackHostname = "{service}.dualstack.{region}.{dnsSuffix}"
104109

105-
p.Services["s3"] = s
110+
p.Services[svcName] = s
106111
}
107112

108113
func custAddEC2Metadata(p *partition) {

aws/validation.go

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ const (
1717
ParamMinValueErrCode = "ParamMinValueError"
1818
// ParamMinLenErrCode is the error code for fields without enough elements.
1919
ParamMinLenErrCode = "ParamMinLenError"
20+
// ParamMaxLenErrCode is the error code for value being too long.
21+
ParamMaxLenErrCode = "ParamMaxLenError"
22+
23+
// ParamFormatErrCode is the error code for a field with invalid
24+
// format or characters.
25+
ParamFormatErrCode = "ParamFormatInvalidError"
2026
)
2127

2228
// Validator provides a way for types to perform validation logic on their
@@ -232,3 +238,49 @@ func NewErrParamMinLen(field string, min int) *ErrParamMinLen {
232238
func (e *ErrParamMinLen) MinLen() int {
233239
return e.min
234240
}
241+
242+
// An ErrParamMaxLen represents a maximum length parameter error.
243+
type ErrParamMaxLen struct {
244+
errInvalidParam
245+
max int
246+
}
247+
248+
// NewErrParamMaxLen creates a new maximum length parameter error.
249+
func NewErrParamMaxLen(field string, max int, value string) *ErrParamMaxLen {
250+
return &ErrParamMaxLen{
251+
errInvalidParam: errInvalidParam{
252+
code: ParamMaxLenErrCode,
253+
field: field,
254+
msg: fmt.Sprintf("maximum size of %v, %v", max, value),
255+
},
256+
max: max,
257+
}
258+
}
259+
260+
// MaxLen returns the field's required minimum length.
261+
func (e *ErrParamMaxLen) MaxLen() int {
262+
return e.max
263+
}
264+
265+
// An ErrParamFormat represents a invalid format parameter error.
266+
type ErrParamFormat struct {
267+
errInvalidParam
268+
format string
269+
}
270+
271+
// NewErrParamFormat creates a new invalid format parameter error.
272+
func NewErrParamFormat(field string, format, value string) *ErrParamFormat {
273+
return &ErrParamFormat{
274+
errInvalidParam: errInvalidParam{
275+
code: ParamFormatErrCode,
276+
field: field,
277+
msg: fmt.Sprintf("format %v, %v", format, value),
278+
},
279+
format: format,
280+
}
281+
}
282+
283+
// Format returns the field's required format.
284+
func (e *ErrParamFormat) Format() string {
285+
return e.format
286+
}

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require (
44
github.com/davecgh/go-spew v1.1.1 // indirect
55
github.com/go-ini/ini v1.25.4
66
github.com/go-sql-driver/mysql v1.4.0
7-
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7 // indirect
7+
github.com/golang/lint v0.0.0-20181026193005-c67002cb31c3 // indirect
88
github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c // indirect
99
github.com/gucumber/gucumber v0.0.0-20180127021336-7d5c79e832a2
1010
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8
@@ -13,11 +13,11 @@ require (
1313
github.com/pmezard/go-difflib v1.0.0 // indirect
1414
github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 // indirect
1515
github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf // indirect
16-
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect
16+
github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c // indirect
1717
github.com/stretchr/objx v0.1.1 // indirect
1818
github.com/stretchr/testify v1.2.2
1919
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7 // indirect
20-
golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3
20+
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc
2121
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e // indirect
2222
google.golang.org/appengine v1.2.0 // indirect
2323
)

go.sum

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3I
55
github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk=
66
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
77
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
8+
github.com/golang/lint v0.0.0-20181026193005-c67002cb31c3 h1:I4BOK3PBMjhWfQM2zPJKK7lOBGsrsvOB7kBELP33hiE=
9+
github.com/golang/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
810
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
911
github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c h1:16eHWuMGvCjSfgRJKqIzapE78onvvTbdi1rMkU00lZw=
1012
github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
@@ -24,14 +26,22 @@ github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf h1:6V1qxN
2426
github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
2527
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo=
2628
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
29+
github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c h1:Ho+uVpkel/udgjbwB5Lktg9BtvJSh2DT0Hi6LPSyI2w=
30+
github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
31+
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
2732
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
2833
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
2934
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
35+
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7 h1:00BeQWmeaGazuOrq8Q5K5d3/cHaGuFrZzpaHBXfrsUA=
3036
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
3137
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
3238
golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3 h1:czFLhve3vsQetD6JOJ8NZZvGQIXlnN3/yXxbT6/awxI=
3339
golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
40+
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsqD5/3mLDhx2NcNqyW+0=
41+
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
42+
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
3443
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
44+
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e h1:FDhOuMEY4JVRztM/gsbk+IKUQ8kj74bxZrgw87eMMVc=
3545
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
3646
google.golang.org/appengine v1.2.0 h1:S0iUepdCWODXRvtE+gcRDd15L+k+k1AiHlMiMjefH24=
3747
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=

internal/awstesting/assert.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ import (
1515
// Match is a testing helper to test for testing error by comparing expected
1616
// with a regular expression.
1717
func Match(t *testing.T, regex, expected string) {
18+
t.Helper()
19+
1820
if !regexp.MustCompile(regex).Match([]byte(expected)) {
1921
t.Errorf("%q\n\tdoes not match /%s/", expected, regex)
2022
}
2123
}
2224

2325
// AssertURL verifies the expected URL is matches the actual.
2426
func AssertURL(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool {
27+
t.Helper()
28+
2529
expectURL, err := url.Parse(expect)
2630
if err != nil {
2731
t.Errorf(errMsg("unable to parse expected URL", err, msgAndArgs))
@@ -44,6 +48,8 @@ var queryMapKey = regexp.MustCompile("(.*?)\\.[0-9]+\\.key")
4448

4549
// AssertQuery verifies the expect HTTP query string matches the actual.
4650
func AssertQuery(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool {
51+
t.Helper()
52+
4753
expectQ, err := url.ParseQuery(expect)
4854
if err != nil {
4955
t.Errorf(errMsg("unable to parse expected Query", err, msgAndArgs))
@@ -96,6 +102,8 @@ func AssertQuery(t *testing.T, expect, actual string, msgAndArgs ...interface{})
96102

97103
// AssertJSON verifies that the expect json string matches the actual.
98104
func AssertJSON(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool {
105+
t.Helper()
106+
99107
expectVal := map[string]interface{}{}
100108
if err := json.Unmarshal([]byte(expect), &expectVal); err != nil {
101109
t.Errorf(errMsg("unable to parse expected JSON", err, msgAndArgs...))
@@ -164,6 +172,8 @@ func objectsAreEqual(expected, actual interface{}) bool {
164172
// Based on github.com/stretchr/testify/assert.Equal
165173
// Copied locally to prevent non-test build dependencies on testify
166174
func equal(t *testing.T, expected, actual interface{}, msgAndArgs ...interface{}) bool {
175+
t.Helper()
176+
167177
if !objectsAreEqual(expected, actual) {
168178
t.Errorf("%s\n%s", messageFromMsgAndArgs(msgAndArgs),
169179
SprintExpectActual(expected, actual))

0 commit comments

Comments
 (0)