forked from TrueCloudLab/rclone
Switch to using the dep tool and update all the dependencies
This commit is contained in:
parent
5135ff73cb
commit
98c2d2c41b
5321 changed files with 4483201 additions and 5922 deletions
103
vendor/github.com/aws/aws-sdk-go/service/iotdataplane/examples_test.go
generated
vendored
Normal file
103
vendor/github.com/aws/aws-sdk-go/service/iotdataplane/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,103 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. 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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue