Update Go AWS SDK to the latest version

This commit is contained in:
Andrey Smirnov
2019-07-13 00:03:55 +03:00
committed by Andrey Smirnov
parent d08be990ef
commit 94a72b23ff
2183 changed files with 885887 additions and 228114 deletions
File diff suppressed because it is too large Load Diff
+34
View File
@@ -0,0 +1,34 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package rdsdataservice provides the client and types for making API
// requests to AWS RDS DataService.
//
// Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora
// Serverless DB cluster. To run these statements, you work with the Data Service
// API.
//
// For more information about the Data Service API, see Using the Data API for
// Aurora Serverless (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html)
// in the Amazon Aurora User Guide.
//
// See https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01 for more information on this service.
//
// See rdsdataservice package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/rdsdataservice/
//
// Using the Client
//
// To contact AWS RDS DataService with the SDK use the New function to create
// a new service client. With that client you can make API requests to the service.
// These clients are safe to use concurrently.
//
// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the AWS RDS DataService client RDSDataService for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/rdsdataservice/#New
package rdsdataservice
+42
View File
@@ -0,0 +1,42 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package rdsdataservice
const (
// ErrCodeBadRequestException for service response error code
// "BadRequestException".
//
// There is an error in the call or in a SQL statement.
ErrCodeBadRequestException = "BadRequestException"
// ErrCodeForbiddenException for service response error code
// "ForbiddenException".
//
// There are insufficient privileges to make the call.
ErrCodeForbiddenException = "ForbiddenException"
// ErrCodeInternalServerErrorException for service response error code
// "InternalServerErrorException".
//
// An internal error occurred.
ErrCodeInternalServerErrorException = "InternalServerErrorException"
// ErrCodeNotFoundException for service response error code
// "NotFoundException".
//
// The resourceArn, secretArn, or transactionId value can't be found.
ErrCodeNotFoundException = "NotFoundException"
// ErrCodeServiceUnavailableError for service response error code
// "ServiceUnavailableError".
//
// The service specified by the resourceArn parameter is not available.
ErrCodeServiceUnavailableError = "ServiceUnavailableError"
// ErrCodeStatementTimeoutException for service response error code
// "StatementTimeoutException".
//
// The execution of the SQL statement timed out.
ErrCodeStatementTimeoutException = "StatementTimeoutException"
)
@@ -0,0 +1,88 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package rdsdataserviceiface provides an interface to enable mocking the AWS RDS DataService service client
// for testing your code.
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters.
package rdsdataserviceiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/rdsdataservice"
)
// RDSDataServiceAPI provides an interface to enable mocking the
// rdsdataservice.RDSDataService service client's API operation,
// paginators, and waiters. This make unit testing your code that calls out
// to the SDK's service client's calls easier.
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // AWS RDS DataService.
// func myFunc(svc rdsdataserviceiface.RDSDataServiceAPI) bool {
// // Make svc.BatchExecuteStatement request
// }
//
// func main() {
// sess := session.New()
// svc := rdsdataservice.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockRDSDataServiceClient struct {
// rdsdataserviceiface.RDSDataServiceAPI
// }
// func (m *mockRDSDataServiceClient) BatchExecuteStatement(input *rdsdataservice.BatchExecuteStatementInput) (*rdsdataservice.BatchExecuteStatementOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockRDSDataServiceClient{}
//
// myfunc(mockSvc)
//
// // Verify myFunc's functionality
// }
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type RDSDataServiceAPI interface {
BatchExecuteStatement(*rdsdataservice.BatchExecuteStatementInput) (*rdsdataservice.BatchExecuteStatementOutput, error)
BatchExecuteStatementWithContext(aws.Context, *rdsdataservice.BatchExecuteStatementInput, ...request.Option) (*rdsdataservice.BatchExecuteStatementOutput, error)
BatchExecuteStatementRequest(*rdsdataservice.BatchExecuteStatementInput) (*request.Request, *rdsdataservice.BatchExecuteStatementOutput)
BeginTransaction(*rdsdataservice.BeginTransactionInput) (*rdsdataservice.BeginTransactionOutput, error)
BeginTransactionWithContext(aws.Context, *rdsdataservice.BeginTransactionInput, ...request.Option) (*rdsdataservice.BeginTransactionOutput, error)
BeginTransactionRequest(*rdsdataservice.BeginTransactionInput) (*request.Request, *rdsdataservice.BeginTransactionOutput)
CommitTransaction(*rdsdataservice.CommitTransactionInput) (*rdsdataservice.CommitTransactionOutput, error)
CommitTransactionWithContext(aws.Context, *rdsdataservice.CommitTransactionInput, ...request.Option) (*rdsdataservice.CommitTransactionOutput, error)
CommitTransactionRequest(*rdsdataservice.CommitTransactionInput) (*request.Request, *rdsdataservice.CommitTransactionOutput)
ExecuteSql(*rdsdataservice.ExecuteSqlInput) (*rdsdataservice.ExecuteSqlOutput, error)
ExecuteSqlWithContext(aws.Context, *rdsdataservice.ExecuteSqlInput, ...request.Option) (*rdsdataservice.ExecuteSqlOutput, error)
ExecuteSqlRequest(*rdsdataservice.ExecuteSqlInput) (*request.Request, *rdsdataservice.ExecuteSqlOutput)
ExecuteStatement(*rdsdataservice.ExecuteStatementInput) (*rdsdataservice.ExecuteStatementOutput, error)
ExecuteStatementWithContext(aws.Context, *rdsdataservice.ExecuteStatementInput, ...request.Option) (*rdsdataservice.ExecuteStatementOutput, error)
ExecuteStatementRequest(*rdsdataservice.ExecuteStatementInput) (*request.Request, *rdsdataservice.ExecuteStatementOutput)
RollbackTransaction(*rdsdataservice.RollbackTransactionInput) (*rdsdataservice.RollbackTransactionOutput, error)
RollbackTransactionWithContext(aws.Context, *rdsdataservice.RollbackTransactionInput, ...request.Option) (*rdsdataservice.RollbackTransactionOutput, error)
RollbackTransactionRequest(*rdsdataservice.RollbackTransactionInput) (*request.Request, *rdsdataservice.RollbackTransactionOutput)
}
var _ RDSDataServiceAPI = (*rdsdataservice.RDSDataService)(nil)
+98
View File
@@ -0,0 +1,98 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package rdsdataservice
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
// RDSDataService provides the API operation methods for making requests to
// AWS RDS DataService. See this package's package overview docs
// for details on the service.
//
// RDSDataService methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type RDSDataService struct {
*client.Client
}
// Used for custom client initialization logic
var initClient func(*client.Client)
// Used for custom request initialization logic
var initRequest func(*request.Request)
// Service information constants
const (
ServiceName = "RDS Data" // Name of service.
EndpointsID = "rds-data" // ID to lookup a service endpoint with.
ServiceID = "RDS Data" // ServiceID is a unique identifer of a specific service.
)
// New creates a new instance of the RDSDataService client with a session.
// If additional configuration is needed for the client instance use the optional
// aws.Config parameter to add your extra config.
//
// Example:
// // Create a RDSDataService client from just a session.
// svc := rdsdataservice.New(mySession)
//
// // Create a RDSDataService client with additional configuration
// svc := rdsdataservice.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *RDSDataService {
c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "rds-data"
}
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *RDSDataService {
svc := &RDSDataService{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2018-08-01",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a RDSDataService operation and runs any
// custom request initialization.
func (c *RDSDataService) newRequest(op *request.Operation, params, data interface{}) *request.Request {
req := c.NewRequest(op, params, data)
// Run custom request initialization if present
if initRequest != nil {
initRequest(req)
}
return req
}