[sqs] Create request structures to allow passing more parameters
The current SQS API is fairly limiting in that you can set very few request attributes per function call. For example, there is a ReceiveMessage function and a ReceiveMessageWithVisibilityTimeout function, but no way to set, for example, WaitTimeSeconds.
I dealt with this a little bit by adding CreateQueueWithAttributes in #74, but it would be pretty tedious to create WithAttributes variants for every function.
I think a cleaner and more idiomatic approach would be to create request structs for each request and set attributes through a function call on them. This is similar to how net/http works with its client and setting headers by calling Headers().Set(). When it came time to actually make the request, you would do that via a Do method on the request object. The toplevel functions could be reimplemented in terms of these to maintain backward compatibility and a simple API.
This is a little bit different than how the rest of goamz seems to be implemented though. Do other AWS APIs not have as many parameters? Does goamz simply not allow them?
That definitely could be a cleaner approach, but I don't think I know enough about the rest of the APIs to speak correctly about it. I do know that in DynamoDB, most attributes are nested, so it would get messier doing something like that, because you'd have .Set(...).Set(...).Set(...).
However, that might not be the case with many of the other APIs. I'm open to a refactor, and making it more like idiomatic Go. Pull Requests are welcome here :)
I have chickened out on this for now and created a generic ReceiveMessageWithParameters function in #114.
I couldn't find good examples of this in other parts of the goamz code. It seems like either other AWS APIs don't take attribute lists, or goamz doesn't support them. The Java APIs seem to have variants that take a per-API-function request object on which you set the options. Here's an example: http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/sqs/AmazonSQSClient.html#receiveMessage(com.amazonaws.services.sqs.model.ReceiveMessageRequest)
I don't love that either, but it's a little safer but less future-proof than passing in a map[string]string as I am doing.