mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-31 04:30:44 +00:00
Update Go AWS SDK to the latest version
This commit is contained in:
committed by
Andrey Smirnov
parent
d08be990ef
commit
94a72b23ff
+2222
File diff suppressed because it is too large
Load Diff
+30
@@ -0,0 +1,30 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package iot1clickdevicesservice provides the client and types for making API
|
||||
// requests to AWS IoT 1-Click Devices Service.
|
||||
//
|
||||
// Describes all of the AWS IoT 1-Click device-related API operations for the
|
||||
// service. Also provides sample requests, responses, and errors for the supported
|
||||
// web services protocols.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14 for more information on this service.
|
||||
//
|
||||
// See iot1clickdevicesservice package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/iot1clickdevicesservice/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To contact AWS IoT 1-Click Devices Service 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 1-Click Devices Service client IoT1ClickDevicesService for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/iot1clickdevicesservice/#New
|
||||
package iot1clickdevicesservice
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package iot1clickdevicesservice
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeForbiddenException for service response error code
|
||||
// "ForbiddenException".
|
||||
ErrCodeForbiddenException = "ForbiddenException"
|
||||
|
||||
// ErrCodeInternalFailureException for service response error code
|
||||
// "InternalFailureException".
|
||||
ErrCodeInternalFailureException = "InternalFailureException"
|
||||
|
||||
// ErrCodeInvalidRequestException for service response error code
|
||||
// "InvalidRequestException".
|
||||
ErrCodeInvalidRequestException = "InvalidRequestException"
|
||||
|
||||
// ErrCodePreconditionFailedException for service response error code
|
||||
// "PreconditionFailedException".
|
||||
ErrCodePreconditionFailedException = "PreconditionFailedException"
|
||||
|
||||
// ErrCodeRangeNotSatisfiableException for service response error code
|
||||
// "RangeNotSatisfiableException".
|
||||
ErrCodeRangeNotSatisfiableException = "RangeNotSatisfiableException"
|
||||
|
||||
// ErrCodeResourceConflictException for service response error code
|
||||
// "ResourceConflictException".
|
||||
ErrCodeResourceConflictException = "ResourceConflictException"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFoundException".
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
|
||||
)
|
||||
Generated
Vendored
+116
@@ -0,0 +1,116 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package iot1clickdevicesserviceiface provides an interface to enable mocking the AWS IoT 1-Click Devices Service 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 iot1clickdevicesserviceiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/iot1clickdevicesservice"
|
||||
)
|
||||
|
||||
// IoT1ClickDevicesServiceAPI provides an interface to enable mocking the
|
||||
// iot1clickdevicesservice.IoT1ClickDevicesService 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 1-Click Devices Service.
|
||||
// func myFunc(svc iot1clickdevicesserviceiface.IoT1ClickDevicesServiceAPI) bool {
|
||||
// // Make svc.ClaimDevicesByClaimCode request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := iot1clickdevicesservice.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockIoT1ClickDevicesServiceClient struct {
|
||||
// iot1clickdevicesserviceiface.IoT1ClickDevicesServiceAPI
|
||||
// }
|
||||
// func (m *mockIoT1ClickDevicesServiceClient) ClaimDevicesByClaimCode(input *iot1clickdevicesservice.ClaimDevicesByClaimCodeInput) (*iot1clickdevicesservice.ClaimDevicesByClaimCodeOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockIoT1ClickDevicesServiceClient{}
|
||||
//
|
||||
// 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 IoT1ClickDevicesServiceAPI interface {
|
||||
ClaimDevicesByClaimCode(*iot1clickdevicesservice.ClaimDevicesByClaimCodeInput) (*iot1clickdevicesservice.ClaimDevicesByClaimCodeOutput, error)
|
||||
ClaimDevicesByClaimCodeWithContext(aws.Context, *iot1clickdevicesservice.ClaimDevicesByClaimCodeInput, ...request.Option) (*iot1clickdevicesservice.ClaimDevicesByClaimCodeOutput, error)
|
||||
ClaimDevicesByClaimCodeRequest(*iot1clickdevicesservice.ClaimDevicesByClaimCodeInput) (*request.Request, *iot1clickdevicesservice.ClaimDevicesByClaimCodeOutput)
|
||||
|
||||
DescribeDevice(*iot1clickdevicesservice.DescribeDeviceInput) (*iot1clickdevicesservice.DescribeDeviceOutput, error)
|
||||
DescribeDeviceWithContext(aws.Context, *iot1clickdevicesservice.DescribeDeviceInput, ...request.Option) (*iot1clickdevicesservice.DescribeDeviceOutput, error)
|
||||
DescribeDeviceRequest(*iot1clickdevicesservice.DescribeDeviceInput) (*request.Request, *iot1clickdevicesservice.DescribeDeviceOutput)
|
||||
|
||||
FinalizeDeviceClaim(*iot1clickdevicesservice.FinalizeDeviceClaimInput) (*iot1clickdevicesservice.FinalizeDeviceClaimOutput, error)
|
||||
FinalizeDeviceClaimWithContext(aws.Context, *iot1clickdevicesservice.FinalizeDeviceClaimInput, ...request.Option) (*iot1clickdevicesservice.FinalizeDeviceClaimOutput, error)
|
||||
FinalizeDeviceClaimRequest(*iot1clickdevicesservice.FinalizeDeviceClaimInput) (*request.Request, *iot1clickdevicesservice.FinalizeDeviceClaimOutput)
|
||||
|
||||
GetDeviceMethods(*iot1clickdevicesservice.GetDeviceMethodsInput) (*iot1clickdevicesservice.GetDeviceMethodsOutput, error)
|
||||
GetDeviceMethodsWithContext(aws.Context, *iot1clickdevicesservice.GetDeviceMethodsInput, ...request.Option) (*iot1clickdevicesservice.GetDeviceMethodsOutput, error)
|
||||
GetDeviceMethodsRequest(*iot1clickdevicesservice.GetDeviceMethodsInput) (*request.Request, *iot1clickdevicesservice.GetDeviceMethodsOutput)
|
||||
|
||||
InitiateDeviceClaim(*iot1clickdevicesservice.InitiateDeviceClaimInput) (*iot1clickdevicesservice.InitiateDeviceClaimOutput, error)
|
||||
InitiateDeviceClaimWithContext(aws.Context, *iot1clickdevicesservice.InitiateDeviceClaimInput, ...request.Option) (*iot1clickdevicesservice.InitiateDeviceClaimOutput, error)
|
||||
InitiateDeviceClaimRequest(*iot1clickdevicesservice.InitiateDeviceClaimInput) (*request.Request, *iot1clickdevicesservice.InitiateDeviceClaimOutput)
|
||||
|
||||
InvokeDeviceMethod(*iot1clickdevicesservice.InvokeDeviceMethodInput) (*iot1clickdevicesservice.InvokeDeviceMethodOutput, error)
|
||||
InvokeDeviceMethodWithContext(aws.Context, *iot1clickdevicesservice.InvokeDeviceMethodInput, ...request.Option) (*iot1clickdevicesservice.InvokeDeviceMethodOutput, error)
|
||||
InvokeDeviceMethodRequest(*iot1clickdevicesservice.InvokeDeviceMethodInput) (*request.Request, *iot1clickdevicesservice.InvokeDeviceMethodOutput)
|
||||
|
||||
ListDeviceEvents(*iot1clickdevicesservice.ListDeviceEventsInput) (*iot1clickdevicesservice.ListDeviceEventsOutput, error)
|
||||
ListDeviceEventsWithContext(aws.Context, *iot1clickdevicesservice.ListDeviceEventsInput, ...request.Option) (*iot1clickdevicesservice.ListDeviceEventsOutput, error)
|
||||
ListDeviceEventsRequest(*iot1clickdevicesservice.ListDeviceEventsInput) (*request.Request, *iot1clickdevicesservice.ListDeviceEventsOutput)
|
||||
|
||||
ListDevices(*iot1clickdevicesservice.ListDevicesInput) (*iot1clickdevicesservice.ListDevicesOutput, error)
|
||||
ListDevicesWithContext(aws.Context, *iot1clickdevicesservice.ListDevicesInput, ...request.Option) (*iot1clickdevicesservice.ListDevicesOutput, error)
|
||||
ListDevicesRequest(*iot1clickdevicesservice.ListDevicesInput) (*request.Request, *iot1clickdevicesservice.ListDevicesOutput)
|
||||
|
||||
ListTagsForResource(*iot1clickdevicesservice.ListTagsForResourceInput) (*iot1clickdevicesservice.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceWithContext(aws.Context, *iot1clickdevicesservice.ListTagsForResourceInput, ...request.Option) (*iot1clickdevicesservice.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceRequest(*iot1clickdevicesservice.ListTagsForResourceInput) (*request.Request, *iot1clickdevicesservice.ListTagsForResourceOutput)
|
||||
|
||||
TagResource(*iot1clickdevicesservice.TagResourceInput) (*iot1clickdevicesservice.TagResourceOutput, error)
|
||||
TagResourceWithContext(aws.Context, *iot1clickdevicesservice.TagResourceInput, ...request.Option) (*iot1clickdevicesservice.TagResourceOutput, error)
|
||||
TagResourceRequest(*iot1clickdevicesservice.TagResourceInput) (*request.Request, *iot1clickdevicesservice.TagResourceOutput)
|
||||
|
||||
UnclaimDevice(*iot1clickdevicesservice.UnclaimDeviceInput) (*iot1clickdevicesservice.UnclaimDeviceOutput, error)
|
||||
UnclaimDeviceWithContext(aws.Context, *iot1clickdevicesservice.UnclaimDeviceInput, ...request.Option) (*iot1clickdevicesservice.UnclaimDeviceOutput, error)
|
||||
UnclaimDeviceRequest(*iot1clickdevicesservice.UnclaimDeviceInput) (*request.Request, *iot1clickdevicesservice.UnclaimDeviceOutput)
|
||||
|
||||
UntagResource(*iot1clickdevicesservice.UntagResourceInput) (*iot1clickdevicesservice.UntagResourceOutput, error)
|
||||
UntagResourceWithContext(aws.Context, *iot1clickdevicesservice.UntagResourceInput, ...request.Option) (*iot1clickdevicesservice.UntagResourceOutput, error)
|
||||
UntagResourceRequest(*iot1clickdevicesservice.UntagResourceInput) (*request.Request, *iot1clickdevicesservice.UntagResourceOutput)
|
||||
|
||||
UpdateDeviceState(*iot1clickdevicesservice.UpdateDeviceStateInput) (*iot1clickdevicesservice.UpdateDeviceStateOutput, error)
|
||||
UpdateDeviceStateWithContext(aws.Context, *iot1clickdevicesservice.UpdateDeviceStateInput, ...request.Option) (*iot1clickdevicesservice.UpdateDeviceStateOutput, error)
|
||||
UpdateDeviceStateRequest(*iot1clickdevicesservice.UpdateDeviceStateInput) (*request.Request, *iot1clickdevicesservice.UpdateDeviceStateOutput)
|
||||
}
|
||||
|
||||
var _ IoT1ClickDevicesServiceAPI = (*iot1clickdevicesservice.IoT1ClickDevicesService)(nil)
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package iot1clickdevicesservice
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// IoT1ClickDevicesService provides the API operation methods for making requests to
|
||||
// AWS IoT 1-Click Devices Service. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// IoT1ClickDevicesService methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type IoT1ClickDevicesService 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 = "devices.iot1click" // Name of service.
|
||||
EndpointsID = ServiceName // ID to lookup a service endpoint with.
|
||||
ServiceID = "IoT 1Click Devices Service" // ServiceID is a unique identifer of a specific service.
|
||||
)
|
||||
|
||||
// New creates a new instance of the IoT1ClickDevicesService 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 IoT1ClickDevicesService client from just a session.
|
||||
// svc := iot1clickdevicesservice.New(mySession)
|
||||
//
|
||||
// // Create a IoT1ClickDevicesService client with additional configuration
|
||||
// svc := iot1clickdevicesservice.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *IoT1ClickDevicesService {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
if c.SigningNameDerived || len(c.SigningName) == 0 {
|
||||
c.SigningName = "iot1click"
|
||||
}
|
||||
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) *IoT1ClickDevicesService {
|
||||
svc := &IoT1ClickDevicesService{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2018-05-14",
|
||||
},
|
||||
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 IoT1ClickDevicesService operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *IoT1ClickDevicesService) 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
|
||||
}
|
||||
Reference in New Issue
Block a user