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
+31
View File
@@ -0,0 +1,31 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package ioteventsdata provides the client and types for making API
// requests to AWS IoT Events Data.
//
// AWS IoT Events monitors your equipment or device fleets for failures or changes
// in operation, and triggers actions when such events occur. AWS IoT Events
// Data API commands enable you to send inputs to detectors, list detectors,
// and view or update a detector's status.
//
// See https://docs.aws.amazon.com/goto/WebAPI/iotevents-data-2018-10-23 for more information on this service.
//
// See ioteventsdata package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/ioteventsdata/
//
// Using the Client
//
// To contact AWS IoT Events Data 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 IoT Events Data client IoTEventsData for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/ioteventsdata/#New
package ioteventsdata
+36
View File
@@ -0,0 +1,36 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ioteventsdata
const (
// ErrCodeInternalFailureException for service response error code
// "InternalFailureException".
//
// An internal failure occured.
ErrCodeInternalFailureException = "InternalFailureException"
// ErrCodeInvalidRequestException for service response error code
// "InvalidRequestException".
//
// The request was invalid.
ErrCodeInvalidRequestException = "InvalidRequestException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// The resource was not found.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeServiceUnavailableException for service response error code
// "ServiceUnavailableException".
//
// The service is currently unavailable.
ErrCodeServiceUnavailableException = "ServiceUnavailableException"
// ErrCodeThrottlingException for service response error code
// "ThrottlingException".
//
// The request could not be completed due to throttling.
ErrCodeThrottlingException = "ThrottlingException"
)
@@ -0,0 +1,80 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package ioteventsdataiface provides an interface to enable mocking the AWS IoT Events Data 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 ioteventsdataiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/ioteventsdata"
)
// IoTEventsDataAPI provides an interface to enable mocking the
// ioteventsdata.IoTEventsData 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 IoT Events Data.
// func myFunc(svc ioteventsdataiface.IoTEventsDataAPI) bool {
// // Make svc.BatchPutMessage request
// }
//
// func main() {
// sess := session.New()
// svc := ioteventsdata.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockIoTEventsDataClient struct {
// ioteventsdataiface.IoTEventsDataAPI
// }
// func (m *mockIoTEventsDataClient) BatchPutMessage(input *ioteventsdata.BatchPutMessageInput) (*ioteventsdata.BatchPutMessageOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockIoTEventsDataClient{}
//
// 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 IoTEventsDataAPI interface {
BatchPutMessage(*ioteventsdata.BatchPutMessageInput) (*ioteventsdata.BatchPutMessageOutput, error)
BatchPutMessageWithContext(aws.Context, *ioteventsdata.BatchPutMessageInput, ...request.Option) (*ioteventsdata.BatchPutMessageOutput, error)
BatchPutMessageRequest(*ioteventsdata.BatchPutMessageInput) (*request.Request, *ioteventsdata.BatchPutMessageOutput)
BatchUpdateDetector(*ioteventsdata.BatchUpdateDetectorInput) (*ioteventsdata.BatchUpdateDetectorOutput, error)
BatchUpdateDetectorWithContext(aws.Context, *ioteventsdata.BatchUpdateDetectorInput, ...request.Option) (*ioteventsdata.BatchUpdateDetectorOutput, error)
BatchUpdateDetectorRequest(*ioteventsdata.BatchUpdateDetectorInput) (*request.Request, *ioteventsdata.BatchUpdateDetectorOutput)
DescribeDetector(*ioteventsdata.DescribeDetectorInput) (*ioteventsdata.DescribeDetectorOutput, error)
DescribeDetectorWithContext(aws.Context, *ioteventsdata.DescribeDetectorInput, ...request.Option) (*ioteventsdata.DescribeDetectorOutput, error)
DescribeDetectorRequest(*ioteventsdata.DescribeDetectorInput) (*request.Request, *ioteventsdata.DescribeDetectorOutput)
ListDetectors(*ioteventsdata.ListDetectorsInput) (*ioteventsdata.ListDetectorsOutput, error)
ListDetectorsWithContext(aws.Context, *ioteventsdata.ListDetectorsInput, ...request.Option) (*ioteventsdata.ListDetectorsOutput, error)
ListDetectorsRequest(*ioteventsdata.ListDetectorsInput) (*request.Request, *ioteventsdata.ListDetectorsOutput)
}
var _ IoTEventsDataAPI = (*ioteventsdata.IoTEventsData)(nil)
+98
View File
@@ -0,0 +1,98 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ioteventsdata
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"
)
// IoTEventsData provides the API operation methods for making requests to
// AWS IoT Events Data. See this package's package overview docs
// for details on the service.
//
// IoTEventsData methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type IoTEventsData 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 = "IoT Events Data" // Name of service.
EndpointsID = "data.iotevents" // ID to lookup a service endpoint with.
ServiceID = "IoT Events Data" // ServiceID is a unique identifer of a specific service.
)
// New creates a new instance of the IoTEventsData 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 IoTEventsData client from just a session.
// svc := ioteventsdata.New(mySession)
//
// // Create a IoTEventsData client with additional configuration
// svc := ioteventsdata.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *IoTEventsData {
c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "ioteventsdata"
}
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) *IoTEventsData {
svc := &IoTEventsData{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2018-10-23",
},
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 IoTEventsData operation and runs any
// custom request initialization.
func (c *IoTEventsData) 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
}