Vendor aws-sdk-go (dep ensure) (#178)

This commit is contained in:
Onur Filiz
2018-04-27 18:18:36 -07:00
committed by Robbie Zhang
parent 228a1f7a5f
commit 8d67098d06
2785 changed files with 1973570 additions and 25 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package iotjobsdataplane provides the client and types for making API
// requests to AWS IoT Jobs Data Plane.
//
// AWS IoT Jobs is a service that allows you to define a set of jobs — remote
// operations that are sent to and executed on one or more devices connected
// to AWS IoT. For example, you can define a job that instructs a set of devices
// to download and install application or firmware updates, reboot, rotate certificates,
// or perform remote troubleshooting operations.
//
// To create a job, you make a job document which is a description of the remote
// operations to be performed, and you specify a list of targets that should
// perform the operations. The targets can be individual things, thing groups
// or both.
//
// AWS IoT Jobs sends a message to inform the targets that a job is available.
// The target starts the execution of the job by downloading the job document,
// performing the operations it specifies, and reporting its progress to AWS
// IoT. The Jobs service provides commands to track the progress of a job on
// a specific target and for all the targets of the job
//
// See https://docs.aws.amazon.com/goto/WebAPI/iot-jobs-data-2017-09-29 for more information on this service.
//
// See iotjobsdataplane package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/iotjobsdataplane/
//
// Using the Client
//
// To contact AWS IoT Jobs 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 Jobs Data Plane client IoTJobsDataPlane for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/iotjobsdataplane/#New
package iotjobsdataplane

View File

@@ -0,0 +1,53 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package iotjobsdataplane
const (
// ErrCodeCertificateValidationException for service response error code
// "CertificateValidationException".
//
// The certificate is invalid.
ErrCodeCertificateValidationException = "CertificateValidationException"
// ErrCodeInvalidRequestException for service response error code
// "InvalidRequestException".
//
// The contents of the request were invalid. For example, this code is returned
// when an UpdateJobExecution request contains invalid status details. The message
// contains details about the error.
ErrCodeInvalidRequestException = "InvalidRequestException"
// ErrCodeInvalidStateTransitionException for service response error code
// "InvalidStateTransitionException".
//
// An update attempted to change the job execution to a state that is invalid
// because of the job execution's current state (for example, an attempt to
// change a request in state SUCCESS to state IN_PROGRESS). In this case, the
// body of the error message also contains the executionState field.
ErrCodeInvalidStateTransitionException = "InvalidStateTransitionException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// The specified resource does not exist.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeServiceUnavailableException for service response error code
// "ServiceUnavailableException".
//
// The service is temporarily unavailable.
ErrCodeServiceUnavailableException = "ServiceUnavailableException"
// ErrCodeTerminalStateException for service response error code
// "TerminalStateException".
//
// The job is in a terminal state.
ErrCodeTerminalStateException = "TerminalStateException"
// ErrCodeThrottlingException for service response error code
// "ThrottlingException".
//
// The rate exceeds the limit.
ErrCodeThrottlingException = "ThrottlingException"
)

View File

@@ -0,0 +1,80 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package iotjobsdataplaneiface provides an interface to enable mocking the AWS IoT Jobs Data Plane 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 iotjobsdataplaneiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/iotjobsdataplane"
)
// IoTJobsDataPlaneAPI provides an interface to enable mocking the
// iotjobsdataplane.IoTJobsDataPlane 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 Jobs Data Plane.
// func myFunc(svc iotjobsdataplaneiface.IoTJobsDataPlaneAPI) bool {
// // Make svc.DescribeJobExecution request
// }
//
// func main() {
// sess := session.New()
// svc := iotjobsdataplane.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockIoTJobsDataPlaneClient struct {
// iotjobsdataplaneiface.IoTJobsDataPlaneAPI
// }
// func (m *mockIoTJobsDataPlaneClient) DescribeJobExecution(input *iotjobsdataplane.DescribeJobExecutionInput) (*iotjobsdataplane.DescribeJobExecutionOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockIoTJobsDataPlaneClient{}
//
// 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 IoTJobsDataPlaneAPI interface {
DescribeJobExecution(*iotjobsdataplane.DescribeJobExecutionInput) (*iotjobsdataplane.DescribeJobExecutionOutput, error)
DescribeJobExecutionWithContext(aws.Context, *iotjobsdataplane.DescribeJobExecutionInput, ...request.Option) (*iotjobsdataplane.DescribeJobExecutionOutput, error)
DescribeJobExecutionRequest(*iotjobsdataplane.DescribeJobExecutionInput) (*request.Request, *iotjobsdataplane.DescribeJobExecutionOutput)
GetPendingJobExecutions(*iotjobsdataplane.GetPendingJobExecutionsInput) (*iotjobsdataplane.GetPendingJobExecutionsOutput, error)
GetPendingJobExecutionsWithContext(aws.Context, *iotjobsdataplane.GetPendingJobExecutionsInput, ...request.Option) (*iotjobsdataplane.GetPendingJobExecutionsOutput, error)
GetPendingJobExecutionsRequest(*iotjobsdataplane.GetPendingJobExecutionsInput) (*request.Request, *iotjobsdataplane.GetPendingJobExecutionsOutput)
StartNextPendingJobExecution(*iotjobsdataplane.StartNextPendingJobExecutionInput) (*iotjobsdataplane.StartNextPendingJobExecutionOutput, error)
StartNextPendingJobExecutionWithContext(aws.Context, *iotjobsdataplane.StartNextPendingJobExecutionInput, ...request.Option) (*iotjobsdataplane.StartNextPendingJobExecutionOutput, error)
StartNextPendingJobExecutionRequest(*iotjobsdataplane.StartNextPendingJobExecutionInput) (*request.Request, *iotjobsdataplane.StartNextPendingJobExecutionOutput)
UpdateJobExecution(*iotjobsdataplane.UpdateJobExecutionInput) (*iotjobsdataplane.UpdateJobExecutionOutput, error)
UpdateJobExecutionWithContext(aws.Context, *iotjobsdataplane.UpdateJobExecutionInput, ...request.Option) (*iotjobsdataplane.UpdateJobExecutionOutput, error)
UpdateJobExecutionRequest(*iotjobsdataplane.UpdateJobExecutionInput) (*request.Request, *iotjobsdataplane.UpdateJobExecutionOutput)
}
var _ IoTJobsDataPlaneAPI = (*iotjobsdataplane.IoTJobsDataPlane)(nil)

View File

@@ -0,0 +1,96 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package iotjobsdataplane
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"
)
// IoTJobsDataPlane provides the API operation methods for making requests to
// AWS IoT Jobs Data Plane. See this package's package overview docs
// for details on the service.
//
// IoTJobsDataPlane methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type IoTJobsDataPlane 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 = "data.jobs.iot" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
)
// New creates a new instance of the IoTJobsDataPlane 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 IoTJobsDataPlane client from just a session.
// svc := iotjobsdataplane.New(mySession)
//
// // Create a IoTJobsDataPlane client with additional configuration
// svc := iotjobsdataplane.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *IoTJobsDataPlane {
c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "iot-jobs-data"
}
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) *IoTJobsDataPlane {
svc := &IoTJobsDataPlane{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2017-09-29",
},
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 IoTJobsDataPlane operation and runs any
// custom request initialization.
func (c *IoTJobsDataPlane) 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
}