mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-08 22:30:41 +00:00
Upgrade AWS SDK to the latest version
This commit is contained in:
+37
-62
@@ -1,6 +1,5 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package iotdataplane provides a client for AWS IoT Data Plane.
|
||||
package iotdataplane
|
||||
|
||||
import (
|
||||
@@ -15,19 +14,18 @@ const opDeleteThingShadow = "DeleteThingShadow"
|
||||
|
||||
// DeleteThingShadowRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the DeleteThingShadow operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See DeleteThingShadow for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the DeleteThingShadow method directly
|
||||
// instead.
|
||||
// See DeleteThingShadow for more information on using the DeleteThingShadow
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the DeleteThingShadowRequest method.
|
||||
// req, resp := client.DeleteThingShadowRequest(params)
|
||||
@@ -36,8 +34,6 @@ const opDeleteThingShadow = "DeleteThingShadow"
|
||||
// if err == nil { // resp is now filled
|
||||
// fmt.Println(resp)
|
||||
// }
|
||||
//
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/DeleteThingShadow
|
||||
func (c *IoTDataPlane) DeleteThingShadowRequest(input *DeleteThingShadowInput) (req *request.Request, output *DeleteThingShadowOutput) {
|
||||
op := &request.Operation{
|
||||
Name: opDeleteThingShadow,
|
||||
@@ -93,7 +89,6 @@ func (c *IoTDataPlane) DeleteThingShadowRequest(input *DeleteThingShadowInput) (
|
||||
// * ErrCodeUnsupportedDocumentEncodingException "UnsupportedDocumentEncodingException"
|
||||
// The document encoding is not supported.
|
||||
//
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/DeleteThingShadow
|
||||
func (c *IoTDataPlane) DeleteThingShadow(input *DeleteThingShadowInput) (*DeleteThingShadowOutput, error) {
|
||||
req, out := c.DeleteThingShadowRequest(input)
|
||||
return out, req.Send()
|
||||
@@ -119,19 +114,18 @@ const opGetThingShadow = "GetThingShadow"
|
||||
|
||||
// GetThingShadowRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the GetThingShadow operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See GetThingShadow for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the GetThingShadow method directly
|
||||
// instead.
|
||||
// See GetThingShadow for more information on using the GetThingShadow
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the GetThingShadowRequest method.
|
||||
// req, resp := client.GetThingShadowRequest(params)
|
||||
@@ -140,8 +134,6 @@ const opGetThingShadow = "GetThingShadow"
|
||||
// if err == nil { // resp is now filled
|
||||
// fmt.Println(resp)
|
||||
// }
|
||||
//
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/GetThingShadow
|
||||
func (c *IoTDataPlane) GetThingShadowRequest(input *GetThingShadowInput) (req *request.Request, output *GetThingShadowOutput) {
|
||||
op := &request.Operation{
|
||||
Name: opGetThingShadow,
|
||||
@@ -197,7 +189,6 @@ func (c *IoTDataPlane) GetThingShadowRequest(input *GetThingShadowInput) (req *r
|
||||
// * ErrCodeUnsupportedDocumentEncodingException "UnsupportedDocumentEncodingException"
|
||||
// The document encoding is not supported.
|
||||
//
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/GetThingShadow
|
||||
func (c *IoTDataPlane) GetThingShadow(input *GetThingShadowInput) (*GetThingShadowOutput, error) {
|
||||
req, out := c.GetThingShadowRequest(input)
|
||||
return out, req.Send()
|
||||
@@ -223,19 +214,18 @@ const opPublish = "Publish"
|
||||
|
||||
// PublishRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the Publish operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See Publish for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the Publish method directly
|
||||
// instead.
|
||||
// See Publish for more information on using the Publish
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the PublishRequest method.
|
||||
// req, resp := client.PublishRequest(params)
|
||||
@@ -244,8 +234,6 @@ const opPublish = "Publish"
|
||||
// if err == nil { // resp is now filled
|
||||
// fmt.Println(resp)
|
||||
// }
|
||||
//
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/Publish
|
||||
func (c *IoTDataPlane) PublishRequest(input *PublishInput) (req *request.Request, output *PublishOutput) {
|
||||
op := &request.Operation{
|
||||
Name: opPublish,
|
||||
@@ -291,7 +279,6 @@ func (c *IoTDataPlane) PublishRequest(input *PublishInput) (req *request.Request
|
||||
// * ErrCodeMethodNotAllowedException "MethodNotAllowedException"
|
||||
// The specified combination of HTTP verb and URI is not supported.
|
||||
//
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/Publish
|
||||
func (c *IoTDataPlane) Publish(input *PublishInput) (*PublishOutput, error) {
|
||||
req, out := c.PublishRequest(input)
|
||||
return out, req.Send()
|
||||
@@ -317,19 +304,18 @@ const opUpdateThingShadow = "UpdateThingShadow"
|
||||
|
||||
// UpdateThingShadowRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the UpdateThingShadow operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See UpdateThingShadow for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the UpdateThingShadow method directly
|
||||
// instead.
|
||||
// See UpdateThingShadow for more information on using the UpdateThingShadow
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the UpdateThingShadowRequest method.
|
||||
// req, resp := client.UpdateThingShadowRequest(params)
|
||||
@@ -338,8 +324,6 @@ const opUpdateThingShadow = "UpdateThingShadow"
|
||||
// if err == nil { // resp is now filled
|
||||
// fmt.Println(resp)
|
||||
// }
|
||||
//
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/UpdateThingShadow
|
||||
func (c *IoTDataPlane) UpdateThingShadowRequest(input *UpdateThingShadowInput) (req *request.Request, output *UpdateThingShadowOutput) {
|
||||
op := &request.Operation{
|
||||
Name: opUpdateThingShadow,
|
||||
@@ -398,7 +382,6 @@ func (c *IoTDataPlane) UpdateThingShadowRequest(input *UpdateThingShadowInput) (
|
||||
// * ErrCodeUnsupportedDocumentEncodingException "UnsupportedDocumentEncodingException"
|
||||
// The document encoding is not supported.
|
||||
//
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/UpdateThingShadow
|
||||
func (c *IoTDataPlane) UpdateThingShadow(input *UpdateThingShadowInput) (*UpdateThingShadowOutput, error) {
|
||||
req, out := c.UpdateThingShadowRequest(input)
|
||||
return out, req.Send()
|
||||
@@ -421,7 +404,6 @@ func (c *IoTDataPlane) UpdateThingShadowWithContext(ctx aws.Context, input *Upda
|
||||
}
|
||||
|
||||
// The input for the DeleteThingShadow operation.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/DeleteThingShadowRequest
|
||||
type DeleteThingShadowInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -464,7 +446,6 @@ func (s *DeleteThingShadowInput) SetThingName(v string) *DeleteThingShadowInput
|
||||
}
|
||||
|
||||
// The output from the DeleteThingShadow operation.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/DeleteThingShadowResponse
|
||||
type DeleteThingShadowOutput struct {
|
||||
_ struct{} `type:"structure" payload:"Payload"`
|
||||
|
||||
@@ -491,7 +472,6 @@ func (s *DeleteThingShadowOutput) SetPayload(v []byte) *DeleteThingShadowOutput
|
||||
}
|
||||
|
||||
// The input for the GetThingShadow operation.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/GetThingShadowRequest
|
||||
type GetThingShadowInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -534,7 +514,6 @@ func (s *GetThingShadowInput) SetThingName(v string) *GetThingShadowInput {
|
||||
}
|
||||
|
||||
// The output from the GetThingShadow operation.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/GetThingShadowResponse
|
||||
type GetThingShadowOutput struct {
|
||||
_ struct{} `type:"structure" payload:"Payload"`
|
||||
|
||||
@@ -559,7 +538,6 @@ func (s *GetThingShadowOutput) SetPayload(v []byte) *GetThingShadowOutput {
|
||||
}
|
||||
|
||||
// The input for the Publish operation.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/PublishRequest
|
||||
type PublishInput struct {
|
||||
_ struct{} `type:"structure" payload:"Payload"`
|
||||
|
||||
@@ -616,7 +594,6 @@ func (s *PublishInput) SetTopic(v string) *PublishInput {
|
||||
return s
|
||||
}
|
||||
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/PublishOutput
|
||||
type PublishOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
}
|
||||
@@ -632,7 +609,6 @@ func (s PublishOutput) GoString() string {
|
||||
}
|
||||
|
||||
// The input for the UpdateThingShadow operation.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/UpdateThingShadowRequest
|
||||
type UpdateThingShadowInput struct {
|
||||
_ struct{} `type:"structure" payload:"Payload"`
|
||||
|
||||
@@ -689,7 +665,6 @@ func (s *UpdateThingShadowInput) SetThingName(v string) *UpdateThingShadowInput
|
||||
}
|
||||
|
||||
// The output from the UpdateThingShadow operation.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/UpdateThingShadowResponse
|
||||
type UpdateThingShadowOutput struct {
|
||||
_ struct{} `type:"structure" payload:"Payload"`
|
||||
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package iotdataplane provides the client and types for making API
|
||||
// requests to AWS IoT Data Plane.
|
||||
//
|
||||
// AWS IoT-Data enables secure, bi-directional communication between Internet-connected
|
||||
// things (such as sensors, actuators, embedded devices, or smart appliances)
|
||||
// and the AWS cloud. It implements a broker for applications and things to
|
||||
// publish messages over HTTP (Publish) and retrieve, update, and delete thing
|
||||
// shadows. A thing shadow is a persistent representation of your things and
|
||||
// their state in the AWS cloud.
|
||||
//
|
||||
// See iotdataplane package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/iotdataplane/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To AWS IoT Data Plane 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 Data Plane client IoTDataPlane for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/iotdataplane/#New
|
||||
package iotdataplane
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package iotdataplane
|
||||
|
||||
|
||||
-103
@@ -1,103 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package iotdataplane_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/iotdataplane"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleIoTDataPlane_DeleteThingShadow() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := iotdataplane.New(sess)
|
||||
|
||||
params := &iotdataplane.DeleteThingShadowInput{
|
||||
ThingName: aws.String("ThingName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteThingShadow(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleIoTDataPlane_GetThingShadow() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := iotdataplane.New(sess)
|
||||
|
||||
params := &iotdataplane.GetThingShadowInput{
|
||||
ThingName: aws.String("ThingName"), // Required
|
||||
}
|
||||
resp, err := svc.GetThingShadow(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleIoTDataPlane_Publish() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := iotdataplane.New(sess)
|
||||
|
||||
params := &iotdataplane.PublishInput{
|
||||
Topic: aws.String("Topic"), // Required
|
||||
Payload: []byte("PAYLOAD"),
|
||||
Qos: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.Publish(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleIoTDataPlane_UpdateThingShadow() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := iotdataplane.New(sess)
|
||||
|
||||
params := &iotdataplane.UpdateThingShadowInput{
|
||||
Payload: []byte("PAYLOAD"), // Required
|
||||
ThingName: aws.String("ThingName"), // Required
|
||||
}
|
||||
resp, err := svc.UpdateThingShadow(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
Generated
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package iotdataplaneiface provides an interface to enable mocking the AWS IoT Data Plane service client
|
||||
// for testing your code.
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
//
|
||||
// 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 the SDK's request pipeline.
|
||||
// to inject custom request handlers into the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // AWS IoT Data Plane.
|
||||
|
||||
+7
-10
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package iotdataplane
|
||||
|
||||
@@ -11,15 +11,12 @@ import (
|
||||
"github.com/aws/aws-sdk-go/private/protocol/restjson"
|
||||
)
|
||||
|
||||
// AWS IoT-Data enables secure, bi-directional communication between Internet-connected
|
||||
// things (such as sensors, actuators, embedded devices, or smart appliances)
|
||||
// and the AWS cloud. It implements a broker for applications and things to
|
||||
// publish messages over HTTP (Publish) and retrieve, update, and delete thing
|
||||
// shadows. A thing shadow is a persistent representation of your things and
|
||||
// their state in the AWS cloud.
|
||||
// The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28
|
||||
// IoTDataPlane provides the API operation methods for making requests to
|
||||
// AWS IoT Data Plane. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// IoTDataPlane methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type IoTDataPlane struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user