service.go 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package dynamodbstreams
  3. import (
  4. "github.com/aws/aws-sdk-go/aws"
  5. "github.com/aws/aws-sdk-go/aws/defaults"
  6. "github.com/aws/aws-sdk-go/aws/request"
  7. "github.com/aws/aws-sdk-go/aws/service"
  8. "github.com/aws/aws-sdk-go/aws/service/serviceinfo"
  9. "github.com/aws/aws-sdk-go/internal/protocol/jsonrpc"
  10. "github.com/aws/aws-sdk-go/internal/signer/v4"
  11. )
  12. // This is the Amazon DynamoDB Streams API Reference. This guide describes the
  13. // low-level API actions for accessing streams and processing stream records.
  14. // For information about application development with DynamoDB Streams, see
  15. // the Amazon DynamoDB Developer Guide (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide//Streams.html).
  16. //
  17. // Note that this document is intended for use with the following DynamoDB
  18. // documentation:
  19. //
  20. // Amazon DynamoDB Developer Guide (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/)
  21. //
  22. // Amazon DynamoDB API Reference (http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/)
  23. //
  24. // The following are short descriptions of each low-level DynamoDB Streams
  25. // API action, organized by function.
  26. //
  27. // DescribeStream - Returns detailed information about a particular stream.
  28. //
  29. // GetRecords - Retrieves the stream records from within a shard.
  30. //
  31. // GetShardIterator - Returns information on how to retrieve the streams
  32. // record from a shard with a given shard ID.
  33. //
  34. // ListStreams - Returns a list of all the streams associated with the current
  35. // AWS account and endpoint.
  36. type DynamoDBStreams struct {
  37. *service.Service
  38. }
  39. // Used for custom service initialization logic
  40. var initService func(*service.Service)
  41. // Used for custom request initialization logic
  42. var initRequest func(*request.Request)
  43. // New returns a new DynamoDBStreams client.
  44. func New(config *aws.Config) *DynamoDBStreams {
  45. service := &service.Service{
  46. ServiceInfo: serviceinfo.ServiceInfo{
  47. Config: defaults.DefaultConfig.Merge(config),
  48. ServiceName: "streams.dynamodb",
  49. SigningName: "dynamodb",
  50. APIVersion: "2012-08-10",
  51. JSONVersion: "1.0",
  52. TargetPrefix: "DynamoDBStreams_20120810",
  53. },
  54. }
  55. service.Initialize()
  56. // Handlers
  57. service.Handlers.Sign.PushBack(v4.Sign)
  58. service.Handlers.Build.PushBack(jsonrpc.Build)
  59. service.Handlers.Unmarshal.PushBack(jsonrpc.Unmarshal)
  60. service.Handlers.UnmarshalMeta.PushBack(jsonrpc.UnmarshalMeta)
  61. service.Handlers.UnmarshalError.PushBack(jsonrpc.UnmarshalError)
  62. // Run custom service initialization if present
  63. if initService != nil {
  64. initService(service)
  65. }
  66. return &DynamoDBStreams{service}
  67. }
  68. // newRequest creates a new request for a DynamoDBStreams operation and runs any
  69. // custom request initialization.
  70. func (c *DynamoDBStreams) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  71. req := c.NewRequest(op, params, data)
  72. // Run custom request initialization if present
  73. if initRequest != nil {
  74. initRequest(req)
  75. }
  76. return req
  77. }