-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3: REST-XML prototype unmarshaler deligates to Legacy Unmarshaler (GetObject operation) #470
S3: REST-XML prototype unmarshaler deligates to Legacy Unmarshaler (GetObject operation) #470
Conversation
skotambkar
commented
Jan 7, 2020
- PR serves as a first step towards our new unmarshaler design.
- unmarshal.go outlines our unmarshaler type and associated unmarshaling methods that currently delegate to legacy unmarshaler of the SDK.
fcd3346
to
12cf8dc
Compare
98e6f7a
to
68ec8bf
Compare
1cd370a
to
875184f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will want to check the rebasing of this PR, has a few extra changes from the feature branch that probably are not intended. (json and rest encoders)
6c8641e
to
590df65
Compare
875184f
to
2550cb3
Compare
590df65
to
db24dfb
Compare
service/s3/unmarshal.go
Outdated
func unmarshalErrorPrototype(r *aws.Request, d *xml.Decoder, startToken xml.Token) error { | ||
// protoXMLErrorResponse is error response struct for xml errors. | ||
var respErr = protoXMLErrorResponse{} | ||
|
||
// Delegate to reflection based decoding utils | ||
if start, ok := startToken.(xml.StartElement); ok { | ||
err := d.DecodeElement(&respErr, &start) | ||
if err != nil && err != io.EOF { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be great for this to take a StartElement
type instead of Token
. The caller should be responsible for getting the first StartElement. This is helpful because the first Token might be something like the XML preamble.
service
: prototype GetObject op to use unmarshaler type, that delegates to legacy unmarshaler