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
+29
View File
@@ -0,0 +1,29 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package iotevents provides the client and types for making API
// requests to AWS IoT Events.
//
// AWS IoT Events monitors your equipment or device fleets for failures or changes
// in operation, and triggers actions when such events occur.
//
// See https://docs.aws.amazon.com/goto/WebAPI/iotevents-2018-07-27 for more information on this service.
//
// See iotevents package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/iotevents/
//
// Using the Client
//
// To contact AWS IoT Events 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 client IoTEvents for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/iotevents/#New
package iotevents
+60
View File
@@ -0,0 +1,60 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package iotevents
const (
// ErrCodeInternalFailureException for service response error code
// "InternalFailureException".
//
// An internal failure occurred.
ErrCodeInternalFailureException = "InternalFailureException"
// ErrCodeInvalidRequestException for service response error code
// "InvalidRequestException".
//
// The request was invalid.
ErrCodeInvalidRequestException = "InvalidRequestException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// A limit was exceeded.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeResourceAlreadyExistsException for service response error code
// "ResourceAlreadyExistsException".
//
// The resource already exists.
ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException"
// ErrCodeResourceInUseException for service response error code
// "ResourceInUseException".
//
// The resource is in use.
ErrCodeResourceInUseException = "ResourceInUseException"
// 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"
// ErrCodeUnsupportedOperationException for service response error code
// "UnsupportedOperationException".
//
// The requested operation is not supported.
ErrCodeUnsupportedOperationException = "UnsupportedOperationException"
)
@@ -0,0 +1,128 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package ioteventsiface provides an interface to enable mocking the AWS IoT Events 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 ioteventsiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/iotevents"
)
// IoTEventsAPI provides an interface to enable mocking the
// iotevents.IoTEvents 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.
// func myFunc(svc ioteventsiface.IoTEventsAPI) bool {
// // Make svc.CreateDetectorModel request
// }
//
// func main() {
// sess := session.New()
// svc := iotevents.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockIoTEventsClient struct {
// ioteventsiface.IoTEventsAPI
// }
// func (m *mockIoTEventsClient) CreateDetectorModel(input *iotevents.CreateDetectorModelInput) (*iotevents.CreateDetectorModelOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockIoTEventsClient{}
//
// 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 IoTEventsAPI interface {
CreateDetectorModel(*iotevents.CreateDetectorModelInput) (*iotevents.CreateDetectorModelOutput, error)
CreateDetectorModelWithContext(aws.Context, *iotevents.CreateDetectorModelInput, ...request.Option) (*iotevents.CreateDetectorModelOutput, error)
CreateDetectorModelRequest(*iotevents.CreateDetectorModelInput) (*request.Request, *iotevents.CreateDetectorModelOutput)
CreateInput(*iotevents.CreateInputInput) (*iotevents.CreateInputOutput, error)
CreateInputWithContext(aws.Context, *iotevents.CreateInputInput, ...request.Option) (*iotevents.CreateInputOutput, error)
CreateInputRequest(*iotevents.CreateInputInput) (*request.Request, *iotevents.CreateInputOutput)
DeleteDetectorModel(*iotevents.DeleteDetectorModelInput) (*iotevents.DeleteDetectorModelOutput, error)
DeleteDetectorModelWithContext(aws.Context, *iotevents.DeleteDetectorModelInput, ...request.Option) (*iotevents.DeleteDetectorModelOutput, error)
DeleteDetectorModelRequest(*iotevents.DeleteDetectorModelInput) (*request.Request, *iotevents.DeleteDetectorModelOutput)
DeleteInput(*iotevents.DeleteInputInput) (*iotevents.DeleteInputOutput, error)
DeleteInputWithContext(aws.Context, *iotevents.DeleteInputInput, ...request.Option) (*iotevents.DeleteInputOutput, error)
DeleteInputRequest(*iotevents.DeleteInputInput) (*request.Request, *iotevents.DeleteInputOutput)
DescribeDetectorModel(*iotevents.DescribeDetectorModelInput) (*iotevents.DescribeDetectorModelOutput, error)
DescribeDetectorModelWithContext(aws.Context, *iotevents.DescribeDetectorModelInput, ...request.Option) (*iotevents.DescribeDetectorModelOutput, error)
DescribeDetectorModelRequest(*iotevents.DescribeDetectorModelInput) (*request.Request, *iotevents.DescribeDetectorModelOutput)
DescribeInput(*iotevents.DescribeInputInput) (*iotevents.DescribeInputOutput, error)
DescribeInputWithContext(aws.Context, *iotevents.DescribeInputInput, ...request.Option) (*iotevents.DescribeInputOutput, error)
DescribeInputRequest(*iotevents.DescribeInputInput) (*request.Request, *iotevents.DescribeInputOutput)
DescribeLoggingOptions(*iotevents.DescribeLoggingOptionsInput) (*iotevents.DescribeLoggingOptionsOutput, error)
DescribeLoggingOptionsWithContext(aws.Context, *iotevents.DescribeLoggingOptionsInput, ...request.Option) (*iotevents.DescribeLoggingOptionsOutput, error)
DescribeLoggingOptionsRequest(*iotevents.DescribeLoggingOptionsInput) (*request.Request, *iotevents.DescribeLoggingOptionsOutput)
ListDetectorModelVersions(*iotevents.ListDetectorModelVersionsInput) (*iotevents.ListDetectorModelVersionsOutput, error)
ListDetectorModelVersionsWithContext(aws.Context, *iotevents.ListDetectorModelVersionsInput, ...request.Option) (*iotevents.ListDetectorModelVersionsOutput, error)
ListDetectorModelVersionsRequest(*iotevents.ListDetectorModelVersionsInput) (*request.Request, *iotevents.ListDetectorModelVersionsOutput)
ListDetectorModels(*iotevents.ListDetectorModelsInput) (*iotevents.ListDetectorModelsOutput, error)
ListDetectorModelsWithContext(aws.Context, *iotevents.ListDetectorModelsInput, ...request.Option) (*iotevents.ListDetectorModelsOutput, error)
ListDetectorModelsRequest(*iotevents.ListDetectorModelsInput) (*request.Request, *iotevents.ListDetectorModelsOutput)
ListInputs(*iotevents.ListInputsInput) (*iotevents.ListInputsOutput, error)
ListInputsWithContext(aws.Context, *iotevents.ListInputsInput, ...request.Option) (*iotevents.ListInputsOutput, error)
ListInputsRequest(*iotevents.ListInputsInput) (*request.Request, *iotevents.ListInputsOutput)
ListTagsForResource(*iotevents.ListTagsForResourceInput) (*iotevents.ListTagsForResourceOutput, error)
ListTagsForResourceWithContext(aws.Context, *iotevents.ListTagsForResourceInput, ...request.Option) (*iotevents.ListTagsForResourceOutput, error)
ListTagsForResourceRequest(*iotevents.ListTagsForResourceInput) (*request.Request, *iotevents.ListTagsForResourceOutput)
PutLoggingOptions(*iotevents.PutLoggingOptionsInput) (*iotevents.PutLoggingOptionsOutput, error)
PutLoggingOptionsWithContext(aws.Context, *iotevents.PutLoggingOptionsInput, ...request.Option) (*iotevents.PutLoggingOptionsOutput, error)
PutLoggingOptionsRequest(*iotevents.PutLoggingOptionsInput) (*request.Request, *iotevents.PutLoggingOptionsOutput)
TagResource(*iotevents.TagResourceInput) (*iotevents.TagResourceOutput, error)
TagResourceWithContext(aws.Context, *iotevents.TagResourceInput, ...request.Option) (*iotevents.TagResourceOutput, error)
TagResourceRequest(*iotevents.TagResourceInput) (*request.Request, *iotevents.TagResourceOutput)
UntagResource(*iotevents.UntagResourceInput) (*iotevents.UntagResourceOutput, error)
UntagResourceWithContext(aws.Context, *iotevents.UntagResourceInput, ...request.Option) (*iotevents.UntagResourceOutput, error)
UntagResourceRequest(*iotevents.UntagResourceInput) (*request.Request, *iotevents.UntagResourceOutput)
UpdateDetectorModel(*iotevents.UpdateDetectorModelInput) (*iotevents.UpdateDetectorModelOutput, error)
UpdateDetectorModelWithContext(aws.Context, *iotevents.UpdateDetectorModelInput, ...request.Option) (*iotevents.UpdateDetectorModelOutput, error)
UpdateDetectorModelRequest(*iotevents.UpdateDetectorModelInput) (*request.Request, *iotevents.UpdateDetectorModelOutput)
UpdateInput(*iotevents.UpdateInputInput) (*iotevents.UpdateInputOutput, error)
UpdateInputWithContext(aws.Context, *iotevents.UpdateInputInput, ...request.Option) (*iotevents.UpdateInputOutput, error)
UpdateInputRequest(*iotevents.UpdateInputInput) (*request.Request, *iotevents.UpdateInputOutput)
}
var _ IoTEventsAPI = (*iotevents.IoTEvents)(nil)
+98
View File
@@ -0,0 +1,98 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package iotevents
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"
)
// IoTEvents provides the API operation methods for making requests to
// AWS IoT Events. See this package's package overview docs
// for details on the service.
//
// IoTEvents methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type IoTEvents 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" // Name of service.
EndpointsID = "iotevents" // ID to lookup a service endpoint with.
ServiceID = "IoT Events" // ServiceID is a unique identifer of a specific service.
)
// New creates a new instance of the IoTEvents 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 IoTEvents client from just a session.
// svc := iotevents.New(mySession)
//
// // Create a IoTEvents client with additional configuration
// svc := iotevents.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *IoTEvents {
c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "iotevents"
}
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) *IoTEvents {
svc := &IoTEvents{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2018-07-27",
},
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 IoTEvents operation and runs any
// custom request initialization.
func (c *IoTEvents) 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
}