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
15168
vendor/github.com/aws/aws-sdk-go/service/swf/api.go
generated
vendored
Normal file
15168
vendor/github.com/aws/aws-sdk-go/service/swf/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
90
vendor/github.com/aws/aws-sdk-go/service/swf/doc.go
generated
vendored
Normal file
90
vendor/github.com/aws/aws-sdk-go/service/swf/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,90 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package swf provides the client and types for making API
|
||||
// requests to Amazon Simple Workflow Service.
|
||||
//
|
||||
// The Amazon Simple Workflow Service (Amazon SWF) makes it easy to build applications
|
||||
// that use Amazon's cloud to coordinate work across distributed components.
|
||||
// In Amazon SWF, a task represents a logical unit of work that is performed
|
||||
// by a component of your workflow. Coordinating tasks in a workflow involves
|
||||
// managing intertask dependencies, scheduling, and concurrency in accordance
|
||||
// with the logical flow of the application.
|
||||
//
|
||||
// Amazon SWF gives you full control over implementing tasks and coordinating
|
||||
// them without worrying about underlying complexities such as tracking their
|
||||
// progress and maintaining their state.
|
||||
//
|
||||
// This documentation serves as reference only. For a broader overview of the
|
||||
// Amazon SWF programming model, see the Amazon SWF Developer Guide (http://docs.aws.amazon.com/amazonswf/latest/developerguide/).
|
||||
//
|
||||
// See swf package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/swf/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Amazon Simple Workflow Service you will first need
|
||||
// to create a new instance of it.
|
||||
//
|
||||
// When creating a client for an AWS service you'll first need to have a Session
|
||||
// already created. The Session provides configuration that can be shared
|
||||
// between multiple service clients. Additional configuration can be applied to
|
||||
// the Session and service's client when they are constructed. The aws package's
|
||||
// Config type contains several fields such as Region for the AWS Region the
|
||||
// client should make API requests too. The optional Config value can be provided
|
||||
// as the variadic argument for Sessions and client creation.
|
||||
//
|
||||
// Once the service's client is created you can use it to make API requests the
|
||||
// AWS service. These clients are safe to use concurrently.
|
||||
//
|
||||
// // Create a session to share configuration, and load external configuration.
|
||||
// sess := session.Must(session.NewSession())
|
||||
//
|
||||
// // Create the service's client with the session.
|
||||
// svc := swf.New(sess)
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use service clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws package's Config type for more information on configuration options.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the Amazon Simple Workflow Service client SWF for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/swf/#New
|
||||
//
|
||||
// Once the client is created you can make an API request to the service.
|
||||
// Each API method takes a input parameter, and returns the service response
|
||||
// and an error.
|
||||
//
|
||||
// The API method will document which error codes the service can be returned
|
||||
// by the operation if the service models the API operation's errors. These
|
||||
// errors will also be available as const strings prefixed with "ErrCode".
|
||||
//
|
||||
// result, err := svc.CountClosedWorkflowExecutions(params)
|
||||
// if err != nil {
|
||||
// // Cast err to awserr.Error to handle specific error codes.
|
||||
// aerr, ok := err.(awserr.Error)
|
||||
// if ok && aerr.Code() == <error code to check for> {
|
||||
// // Specific error code handling
|
||||
// }
|
||||
// return err
|
||||
// }
|
||||
//
|
||||
// fmt.Println("CountClosedWorkflowExecutions result:")
|
||||
// fmt.Println(result)
|
||||
//
|
||||
// Using the Client with Context
|
||||
//
|
||||
// The service's client also provides methods to make API requests with a Context
|
||||
// value. This allows you to control the timeout, and cancellation of pending
|
||||
// requests. These methods also take request Option as variadic parameter to apply
|
||||
// additional configuration to the API request.
|
||||
//
|
||||
// ctx := context.Background()
|
||||
//
|
||||
// result, err := svc.CountClosedWorkflowExecutionsWithContext(ctx, params)
|
||||
//
|
||||
// See the request package documentation for more information on using Context pattern
|
||||
// with the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
|
||||
package swf
|
68
vendor/github.com/aws/aws-sdk-go/service/swf/errors.go
generated
vendored
Normal file
68
vendor/github.com/aws/aws-sdk-go/service/swf/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package swf
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeDefaultUndefinedFault for service response error code
|
||||
// "DefaultUndefinedFault".
|
||||
ErrCodeDefaultUndefinedFault = "DefaultUndefinedFault"
|
||||
|
||||
// ErrCodeDomainAlreadyExistsFault for service response error code
|
||||
// "DomainAlreadyExistsFault".
|
||||
//
|
||||
// Returned if the specified domain already exists. You will get this fault
|
||||
// even if the existing domain is in deprecated status.
|
||||
ErrCodeDomainAlreadyExistsFault = "DomainAlreadyExistsFault"
|
||||
|
||||
// ErrCodeDomainDeprecatedFault for service response error code
|
||||
// "DomainDeprecatedFault".
|
||||
//
|
||||
// Returned when the specified domain has been deprecated.
|
||||
ErrCodeDomainDeprecatedFault = "DomainDeprecatedFault"
|
||||
|
||||
// ErrCodeLimitExceededFault for service response error code
|
||||
// "LimitExceededFault".
|
||||
//
|
||||
// Returned by any operation if a system imposed limitation has been reached.
|
||||
// To address this fault you should either clean up unused resources or increase
|
||||
// the limit by contacting AWS.
|
||||
ErrCodeLimitExceededFault = "LimitExceededFault"
|
||||
|
||||
// ErrCodeOperationNotPermittedFault for service response error code
|
||||
// "OperationNotPermittedFault".
|
||||
//
|
||||
// Returned when the caller does not have sufficient permissions to invoke the
|
||||
// action.
|
||||
ErrCodeOperationNotPermittedFault = "OperationNotPermittedFault"
|
||||
|
||||
// ErrCodeTypeAlreadyExistsFault for service response error code
|
||||
// "TypeAlreadyExistsFault".
|
||||
//
|
||||
// Returned if the type already exists in the specified domain. You will get
|
||||
// this fault even if the existing type is in deprecated status. You can specify
|
||||
// another version if the intent is to create a new distinct version of the
|
||||
// type.
|
||||
ErrCodeTypeAlreadyExistsFault = "TypeAlreadyExistsFault"
|
||||
|
||||
// ErrCodeTypeDeprecatedFault for service response error code
|
||||
// "TypeDeprecatedFault".
|
||||
//
|
||||
// Returned when the specified activity or workflow type was already deprecated.
|
||||
ErrCodeTypeDeprecatedFault = "TypeDeprecatedFault"
|
||||
|
||||
// ErrCodeUnknownResourceFault for service response error code
|
||||
// "UnknownResourceFault".
|
||||
//
|
||||
// Returned when the named resource cannot be found with in the scope of this
|
||||
// operation (region or domain). This could happen if the named resource was
|
||||
// never created or is no longer available for this operation.
|
||||
ErrCodeUnknownResourceFault = "UnknownResourceFault"
|
||||
|
||||
// ErrCodeWorkflowExecutionAlreadyStartedFault for service response error code
|
||||
// "WorkflowExecutionAlreadyStartedFault".
|
||||
//
|
||||
// Returned by StartWorkflowExecution when an open execution with the same workflowId
|
||||
// is already running in the specified domain.
|
||||
ErrCodeWorkflowExecutionAlreadyStartedFault = "WorkflowExecutionAlreadyStartedFault"
|
||||
)
|
962
vendor/github.com/aws/aws-sdk-go/service/swf/examples_test.go
generated
vendored
Normal file
962
vendor/github.com/aws/aws-sdk-go/service/swf/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,962 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package swf_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/swf"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleSWF_CountClosedWorkflowExecutions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.CountClosedWorkflowExecutionsInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
CloseStatusFilter: &swf.CloseStatusFilter{
|
||||
Status: aws.String("CloseStatus"), // Required
|
||||
},
|
||||
CloseTimeFilter: &swf.ExecutionTimeFilter{
|
||||
OldestDate: aws.Time(time.Now()), // Required
|
||||
LatestDate: aws.Time(time.Now()),
|
||||
},
|
||||
ExecutionFilter: &swf.WorkflowExecutionFilter{
|
||||
WorkflowId: aws.String("WorkflowId"), // Required
|
||||
},
|
||||
StartTimeFilter: &swf.ExecutionTimeFilter{
|
||||
OldestDate: aws.Time(time.Now()), // Required
|
||||
LatestDate: aws.Time(time.Now()),
|
||||
},
|
||||
TagFilter: &swf.TagFilter{
|
||||
Tag: aws.String("Tag"), // Required
|
||||
},
|
||||
TypeFilter: &swf.WorkflowTypeFilter{
|
||||
Name: aws.String("Name"), // Required
|
||||
Version: aws.String("VersionOptional"),
|
||||
},
|
||||
}
|
||||
resp, err := svc.CountClosedWorkflowExecutions(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 ExampleSWF_CountOpenWorkflowExecutions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.CountOpenWorkflowExecutionsInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
StartTimeFilter: &swf.ExecutionTimeFilter{ // Required
|
||||
OldestDate: aws.Time(time.Now()), // Required
|
||||
LatestDate: aws.Time(time.Now()),
|
||||
},
|
||||
ExecutionFilter: &swf.WorkflowExecutionFilter{
|
||||
WorkflowId: aws.String("WorkflowId"), // Required
|
||||
},
|
||||
TagFilter: &swf.TagFilter{
|
||||
Tag: aws.String("Tag"), // Required
|
||||
},
|
||||
TypeFilter: &swf.WorkflowTypeFilter{
|
||||
Name: aws.String("Name"), // Required
|
||||
Version: aws.String("VersionOptional"),
|
||||
},
|
||||
}
|
||||
resp, err := svc.CountOpenWorkflowExecutions(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 ExampleSWF_CountPendingActivityTasks() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.CountPendingActivityTasksInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
TaskList: &swf.TaskList{ // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.CountPendingActivityTasks(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 ExampleSWF_CountPendingDecisionTasks() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.CountPendingDecisionTasksInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
TaskList: &swf.TaskList{ // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.CountPendingDecisionTasks(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 ExampleSWF_DeprecateActivityType() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.DeprecateActivityTypeInput{
|
||||
ActivityType: &swf.ActivityType{ // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
Version: aws.String("Version"), // Required
|
||||
},
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DeprecateActivityType(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 ExampleSWF_DeprecateDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.DeprecateDomainInput{
|
||||
Name: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DeprecateDomain(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 ExampleSWF_DeprecateWorkflowType() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.DeprecateWorkflowTypeInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
WorkflowType: &swf.WorkflowType{ // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
Version: aws.String("Version"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.DeprecateWorkflowType(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 ExampleSWF_DescribeActivityType() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.DescribeActivityTypeInput{
|
||||
ActivityType: &swf.ActivityType{ // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
Version: aws.String("Version"), // Required
|
||||
},
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeActivityType(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 ExampleSWF_DescribeDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.DescribeDomainInput{
|
||||
Name: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeDomain(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 ExampleSWF_DescribeWorkflowExecution() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.DescribeWorkflowExecutionInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
Execution: &swf.WorkflowExecution{ // Required
|
||||
RunId: aws.String("RunId"), // Required
|
||||
WorkflowId: aws.String("WorkflowId"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeWorkflowExecution(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 ExampleSWF_DescribeWorkflowType() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.DescribeWorkflowTypeInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
WorkflowType: &swf.WorkflowType{ // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
Version: aws.String("Version"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeWorkflowType(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 ExampleSWF_GetWorkflowExecutionHistory() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.GetWorkflowExecutionHistoryInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
Execution: &swf.WorkflowExecution{ // Required
|
||||
RunId: aws.String("RunId"), // Required
|
||||
WorkflowId: aws.String("WorkflowId"), // Required
|
||||
},
|
||||
MaximumPageSize: aws.Int64(1),
|
||||
NextPageToken: aws.String("PageToken"),
|
||||
ReverseOrder: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.GetWorkflowExecutionHistory(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 ExampleSWF_ListActivityTypes() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.ListActivityTypesInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
RegistrationStatus: aws.String("RegistrationStatus"), // Required
|
||||
MaximumPageSize: aws.Int64(1),
|
||||
Name: aws.String("Name"),
|
||||
NextPageToken: aws.String("PageToken"),
|
||||
ReverseOrder: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.ListActivityTypes(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 ExampleSWF_ListClosedWorkflowExecutions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.ListClosedWorkflowExecutionsInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
CloseStatusFilter: &swf.CloseStatusFilter{
|
||||
Status: aws.String("CloseStatus"), // Required
|
||||
},
|
||||
CloseTimeFilter: &swf.ExecutionTimeFilter{
|
||||
OldestDate: aws.Time(time.Now()), // Required
|
||||
LatestDate: aws.Time(time.Now()),
|
||||
},
|
||||
ExecutionFilter: &swf.WorkflowExecutionFilter{
|
||||
WorkflowId: aws.String("WorkflowId"), // Required
|
||||
},
|
||||
MaximumPageSize: aws.Int64(1),
|
||||
NextPageToken: aws.String("PageToken"),
|
||||
ReverseOrder: aws.Bool(true),
|
||||
StartTimeFilter: &swf.ExecutionTimeFilter{
|
||||
OldestDate: aws.Time(time.Now()), // Required
|
||||
LatestDate: aws.Time(time.Now()),
|
||||
},
|
||||
TagFilter: &swf.TagFilter{
|
||||
Tag: aws.String("Tag"), // Required
|
||||
},
|
||||
TypeFilter: &swf.WorkflowTypeFilter{
|
||||
Name: aws.String("Name"), // Required
|
||||
Version: aws.String("VersionOptional"),
|
||||
},
|
||||
}
|
||||
resp, err := svc.ListClosedWorkflowExecutions(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 ExampleSWF_ListDomains() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.ListDomainsInput{
|
||||
RegistrationStatus: aws.String("RegistrationStatus"), // Required
|
||||
MaximumPageSize: aws.Int64(1),
|
||||
NextPageToken: aws.String("PageToken"),
|
||||
ReverseOrder: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.ListDomains(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 ExampleSWF_ListOpenWorkflowExecutions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.ListOpenWorkflowExecutionsInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
StartTimeFilter: &swf.ExecutionTimeFilter{ // Required
|
||||
OldestDate: aws.Time(time.Now()), // Required
|
||||
LatestDate: aws.Time(time.Now()),
|
||||
},
|
||||
ExecutionFilter: &swf.WorkflowExecutionFilter{
|
||||
WorkflowId: aws.String("WorkflowId"), // Required
|
||||
},
|
||||
MaximumPageSize: aws.Int64(1),
|
||||
NextPageToken: aws.String("PageToken"),
|
||||
ReverseOrder: aws.Bool(true),
|
||||
TagFilter: &swf.TagFilter{
|
||||
Tag: aws.String("Tag"), // Required
|
||||
},
|
||||
TypeFilter: &swf.WorkflowTypeFilter{
|
||||
Name: aws.String("Name"), // Required
|
||||
Version: aws.String("VersionOptional"),
|
||||
},
|
||||
}
|
||||
resp, err := svc.ListOpenWorkflowExecutions(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 ExampleSWF_ListWorkflowTypes() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.ListWorkflowTypesInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
RegistrationStatus: aws.String("RegistrationStatus"), // Required
|
||||
MaximumPageSize: aws.Int64(1),
|
||||
Name: aws.String("Name"),
|
||||
NextPageToken: aws.String("PageToken"),
|
||||
ReverseOrder: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.ListWorkflowTypes(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 ExampleSWF_PollForActivityTask() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.PollForActivityTaskInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
TaskList: &swf.TaskList{ // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
},
|
||||
Identity: aws.String("Identity"),
|
||||
}
|
||||
resp, err := svc.PollForActivityTask(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 ExampleSWF_PollForDecisionTask() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.PollForDecisionTaskInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
TaskList: &swf.TaskList{ // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
},
|
||||
Identity: aws.String("Identity"),
|
||||
MaximumPageSize: aws.Int64(1),
|
||||
NextPageToken: aws.String("PageToken"),
|
||||
ReverseOrder: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.PollForDecisionTask(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 ExampleSWF_RecordActivityTaskHeartbeat() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.RecordActivityTaskHeartbeatInput{
|
||||
TaskToken: aws.String("TaskToken"), // Required
|
||||
Details: aws.String("LimitedData"),
|
||||
}
|
||||
resp, err := svc.RecordActivityTaskHeartbeat(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 ExampleSWF_RegisterActivityType() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.RegisterActivityTypeInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
Version: aws.String("Version"), // Required
|
||||
DefaultTaskHeartbeatTimeout: aws.String("DurationInSecondsOptional"),
|
||||
DefaultTaskList: &swf.TaskList{
|
||||
Name: aws.String("Name"), // Required
|
||||
},
|
||||
DefaultTaskPriority: aws.String("TaskPriority"),
|
||||
DefaultTaskScheduleToCloseTimeout: aws.String("DurationInSecondsOptional"),
|
||||
DefaultTaskScheduleToStartTimeout: aws.String("DurationInSecondsOptional"),
|
||||
DefaultTaskStartToCloseTimeout: aws.String("DurationInSecondsOptional"),
|
||||
Description: aws.String("Description"),
|
||||
}
|
||||
resp, err := svc.RegisterActivityType(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 ExampleSWF_RegisterDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.RegisterDomainInput{
|
||||
Name: aws.String("DomainName"), // Required
|
||||
WorkflowExecutionRetentionPeriodInDays: aws.String("DurationInDays"), // Required
|
||||
Description: aws.String("Description"),
|
||||
}
|
||||
resp, err := svc.RegisterDomain(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 ExampleSWF_RegisterWorkflowType() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.RegisterWorkflowTypeInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
Version: aws.String("Version"), // Required
|
||||
DefaultChildPolicy: aws.String("ChildPolicy"),
|
||||
DefaultExecutionStartToCloseTimeout: aws.String("DurationInSecondsOptional"),
|
||||
DefaultLambdaRole: aws.String("Arn"),
|
||||
DefaultTaskList: &swf.TaskList{
|
||||
Name: aws.String("Name"), // Required
|
||||
},
|
||||
DefaultTaskPriority: aws.String("TaskPriority"),
|
||||
DefaultTaskStartToCloseTimeout: aws.String("DurationInSecondsOptional"),
|
||||
Description: aws.String("Description"),
|
||||
}
|
||||
resp, err := svc.RegisterWorkflowType(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 ExampleSWF_RequestCancelWorkflowExecution() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.RequestCancelWorkflowExecutionInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
WorkflowId: aws.String("WorkflowId"), // Required
|
||||
RunId: aws.String("RunIdOptional"),
|
||||
}
|
||||
resp, err := svc.RequestCancelWorkflowExecution(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 ExampleSWF_RespondActivityTaskCanceled() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.RespondActivityTaskCanceledInput{
|
||||
TaskToken: aws.String("TaskToken"), // Required
|
||||
Details: aws.String("Data"),
|
||||
}
|
||||
resp, err := svc.RespondActivityTaskCanceled(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 ExampleSWF_RespondActivityTaskCompleted() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.RespondActivityTaskCompletedInput{
|
||||
TaskToken: aws.String("TaskToken"), // Required
|
||||
Result: aws.String("Data"),
|
||||
}
|
||||
resp, err := svc.RespondActivityTaskCompleted(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 ExampleSWF_RespondActivityTaskFailed() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.RespondActivityTaskFailedInput{
|
||||
TaskToken: aws.String("TaskToken"), // Required
|
||||
Details: aws.String("Data"),
|
||||
Reason: aws.String("FailureReason"),
|
||||
}
|
||||
resp, err := svc.RespondActivityTaskFailed(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 ExampleSWF_RespondDecisionTaskCompleted() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.RespondDecisionTaskCompletedInput{
|
||||
TaskToken: aws.String("TaskToken"), // Required
|
||||
Decisions: []*swf.Decision{
|
||||
{ // Required
|
||||
DecisionType: aws.String("DecisionType"), // Required
|
||||
CancelTimerDecisionAttributes: &swf.CancelTimerDecisionAttributes{
|
||||
TimerId: aws.String("TimerId"), // Required
|
||||
},
|
||||
CancelWorkflowExecutionDecisionAttributes: &swf.CancelWorkflowExecutionDecisionAttributes{
|
||||
Details: aws.String("Data"),
|
||||
},
|
||||
CompleteWorkflowExecutionDecisionAttributes: &swf.CompleteWorkflowExecutionDecisionAttributes{
|
||||
Result: aws.String("Data"),
|
||||
},
|
||||
ContinueAsNewWorkflowExecutionDecisionAttributes: &swf.ContinueAsNewWorkflowExecutionDecisionAttributes{
|
||||
ChildPolicy: aws.String("ChildPolicy"),
|
||||
ExecutionStartToCloseTimeout: aws.String("DurationInSecondsOptional"),
|
||||
Input: aws.String("Data"),
|
||||
LambdaRole: aws.String("Arn"),
|
||||
TagList: []*string{
|
||||
aws.String("Tag"), // Required
|
||||
// More values...
|
||||
},
|
||||
TaskList: &swf.TaskList{
|
||||
Name: aws.String("Name"), // Required
|
||||
},
|
||||
TaskPriority: aws.String("TaskPriority"),
|
||||
TaskStartToCloseTimeout: aws.String("DurationInSecondsOptional"),
|
||||
WorkflowTypeVersion: aws.String("Version"),
|
||||
},
|
||||
FailWorkflowExecutionDecisionAttributes: &swf.FailWorkflowExecutionDecisionAttributes{
|
||||
Details: aws.String("Data"),
|
||||
Reason: aws.String("FailureReason"),
|
||||
},
|
||||
RecordMarkerDecisionAttributes: &swf.RecordMarkerDecisionAttributes{
|
||||
MarkerName: aws.String("MarkerName"), // Required
|
||||
Details: aws.String("Data"),
|
||||
},
|
||||
RequestCancelActivityTaskDecisionAttributes: &swf.RequestCancelActivityTaskDecisionAttributes{
|
||||
ActivityId: aws.String("ActivityId"), // Required
|
||||
},
|
||||
RequestCancelExternalWorkflowExecutionDecisionAttributes: &swf.RequestCancelExternalWorkflowExecutionDecisionAttributes{
|
||||
WorkflowId: aws.String("WorkflowId"), // Required
|
||||
Control: aws.String("Data"),
|
||||
RunId: aws.String("RunIdOptional"),
|
||||
},
|
||||
ScheduleActivityTaskDecisionAttributes: &swf.ScheduleActivityTaskDecisionAttributes{
|
||||
ActivityId: aws.String("ActivityId"), // Required
|
||||
ActivityType: &swf.ActivityType{ // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
Version: aws.String("Version"), // Required
|
||||
},
|
||||
Control: aws.String("Data"),
|
||||
HeartbeatTimeout: aws.String("DurationInSecondsOptional"),
|
||||
Input: aws.String("Data"),
|
||||
ScheduleToCloseTimeout: aws.String("DurationInSecondsOptional"),
|
||||
ScheduleToStartTimeout: aws.String("DurationInSecondsOptional"),
|
||||
StartToCloseTimeout: aws.String("DurationInSecondsOptional"),
|
||||
TaskList: &swf.TaskList{
|
||||
Name: aws.String("Name"), // Required
|
||||
},
|
||||
TaskPriority: aws.String("TaskPriority"),
|
||||
},
|
||||
ScheduleLambdaFunctionDecisionAttributes: &swf.ScheduleLambdaFunctionDecisionAttributes{
|
||||
Id: aws.String("FunctionId"), // Required
|
||||
Name: aws.String("FunctionName"), // Required
|
||||
Input: aws.String("FunctionInput"),
|
||||
StartToCloseTimeout: aws.String("DurationInSecondsOptional"),
|
||||
},
|
||||
SignalExternalWorkflowExecutionDecisionAttributes: &swf.SignalExternalWorkflowExecutionDecisionAttributes{
|
||||
SignalName: aws.String("SignalName"), // Required
|
||||
WorkflowId: aws.String("WorkflowId"), // Required
|
||||
Control: aws.String("Data"),
|
||||
Input: aws.String("Data"),
|
||||
RunId: aws.String("RunIdOptional"),
|
||||
},
|
||||
StartChildWorkflowExecutionDecisionAttributes: &swf.StartChildWorkflowExecutionDecisionAttributes{
|
||||
WorkflowId: aws.String("WorkflowId"), // Required
|
||||
WorkflowType: &swf.WorkflowType{ // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
Version: aws.String("Version"), // Required
|
||||
},
|
||||
ChildPolicy: aws.String("ChildPolicy"),
|
||||
Control: aws.String("Data"),
|
||||
ExecutionStartToCloseTimeout: aws.String("DurationInSecondsOptional"),
|
||||
Input: aws.String("Data"),
|
||||
LambdaRole: aws.String("Arn"),
|
||||
TagList: []*string{
|
||||
aws.String("Tag"), // Required
|
||||
// More values...
|
||||
},
|
||||
TaskList: &swf.TaskList{
|
||||
Name: aws.String("Name"), // Required
|
||||
},
|
||||
TaskPriority: aws.String("TaskPriority"),
|
||||
TaskStartToCloseTimeout: aws.String("DurationInSecondsOptional"),
|
||||
},
|
||||
StartTimerDecisionAttributes: &swf.StartTimerDecisionAttributes{
|
||||
StartToFireTimeout: aws.String("DurationInSeconds"), // Required
|
||||
TimerId: aws.String("TimerId"), // Required
|
||||
Control: aws.String("Data"),
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ExecutionContext: aws.String("Data"),
|
||||
}
|
||||
resp, err := svc.RespondDecisionTaskCompleted(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 ExampleSWF_SignalWorkflowExecution() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.SignalWorkflowExecutionInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
SignalName: aws.String("SignalName"), // Required
|
||||
WorkflowId: aws.String("WorkflowId"), // Required
|
||||
Input: aws.String("Data"),
|
||||
RunId: aws.String("RunIdOptional"),
|
||||
}
|
||||
resp, err := svc.SignalWorkflowExecution(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 ExampleSWF_StartWorkflowExecution() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.StartWorkflowExecutionInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
WorkflowId: aws.String("WorkflowId"), // Required
|
||||
WorkflowType: &swf.WorkflowType{ // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
Version: aws.String("Version"), // Required
|
||||
},
|
||||
ChildPolicy: aws.String("ChildPolicy"),
|
||||
ExecutionStartToCloseTimeout: aws.String("DurationInSecondsOptional"),
|
||||
Input: aws.String("Data"),
|
||||
LambdaRole: aws.String("Arn"),
|
||||
TagList: []*string{
|
||||
aws.String("Tag"), // Required
|
||||
// More values...
|
||||
},
|
||||
TaskList: &swf.TaskList{
|
||||
Name: aws.String("Name"), // Required
|
||||
},
|
||||
TaskPriority: aws.String("TaskPriority"),
|
||||
TaskStartToCloseTimeout: aws.String("DurationInSecondsOptional"),
|
||||
}
|
||||
resp, err := svc.StartWorkflowExecution(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 ExampleSWF_TerminateWorkflowExecution() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := swf.New(sess)
|
||||
|
||||
params := &swf.TerminateWorkflowExecutionInput{
|
||||
Domain: aws.String("DomainName"), // Required
|
||||
WorkflowId: aws.String("WorkflowId"), // Required
|
||||
ChildPolicy: aws.String("ChildPolicy"),
|
||||
Details: aws.String("Data"),
|
||||
Reason: aws.String("TerminateReason"),
|
||||
RunId: aws.String("RunIdOptional"),
|
||||
}
|
||||
resp, err := svc.TerminateWorkflowExecution(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)
|
||||
}
|
95
vendor/github.com/aws/aws-sdk-go/service/swf/service.go
generated
vendored
Normal file
95
vendor/github.com/aws/aws-sdk-go/service/swf/service.go
generated
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package swf
|
||||
|
||||
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/jsonrpc"
|
||||
)
|
||||
|
||||
// SWF provides the API operation methods for making requests to
|
||||
// Amazon Simple Workflow Service. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// SWF methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type SWF 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 = "swf" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the SWF 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 SWF client from just a session.
|
||||
// svc := swf.New(mySession)
|
||||
//
|
||||
// // Create a SWF client with additional configuration
|
||||
// svc := swf.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *SWF {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
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) *SWF {
|
||||
svc := &SWF{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2012-01-25",
|
||||
JSONVersion: "1.0",
|
||||
TargetPrefix: "SimpleWorkflowService",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a SWF operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *SWF) 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
|
||||
}
|
209
vendor/github.com/aws/aws-sdk-go/service/swf/swfiface/interface.go
generated
vendored
Normal file
209
vendor/github.com/aws/aws-sdk-go/service/swf/swfiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,209 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package swfiface provides an interface to enable mocking the Amazon Simple Workflow 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 swfiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/swf"
|
||||
)
|
||||
|
||||
// SWFAPI provides an interface to enable mocking the
|
||||
// swf.SWF 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 the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // Amazon Simple Workflow Service.
|
||||
// func myFunc(svc swfiface.SWFAPI) bool {
|
||||
// // Make svc.CountClosedWorkflowExecutions request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := swf.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockSWFClient struct {
|
||||
// swfiface.SWFAPI
|
||||
// }
|
||||
// func (m *mockSWFClient) CountClosedWorkflowExecutions(input *swf.CountClosedWorkflowExecutionsInput) (*swf.WorkflowExecutionCount, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockSWFClient{}
|
||||
//
|
||||
// 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 SWFAPI interface {
|
||||
CountClosedWorkflowExecutions(*swf.CountClosedWorkflowExecutionsInput) (*swf.WorkflowExecutionCount, error)
|
||||
CountClosedWorkflowExecutionsWithContext(aws.Context, *swf.CountClosedWorkflowExecutionsInput, ...request.Option) (*swf.WorkflowExecutionCount, error)
|
||||
CountClosedWorkflowExecutionsRequest(*swf.CountClosedWorkflowExecutionsInput) (*request.Request, *swf.WorkflowExecutionCount)
|
||||
|
||||
CountOpenWorkflowExecutions(*swf.CountOpenWorkflowExecutionsInput) (*swf.WorkflowExecutionCount, error)
|
||||
CountOpenWorkflowExecutionsWithContext(aws.Context, *swf.CountOpenWorkflowExecutionsInput, ...request.Option) (*swf.WorkflowExecutionCount, error)
|
||||
CountOpenWorkflowExecutionsRequest(*swf.CountOpenWorkflowExecutionsInput) (*request.Request, *swf.WorkflowExecutionCount)
|
||||
|
||||
CountPendingActivityTasks(*swf.CountPendingActivityTasksInput) (*swf.PendingTaskCount, error)
|
||||
CountPendingActivityTasksWithContext(aws.Context, *swf.CountPendingActivityTasksInput, ...request.Option) (*swf.PendingTaskCount, error)
|
||||
CountPendingActivityTasksRequest(*swf.CountPendingActivityTasksInput) (*request.Request, *swf.PendingTaskCount)
|
||||
|
||||
CountPendingDecisionTasks(*swf.CountPendingDecisionTasksInput) (*swf.PendingTaskCount, error)
|
||||
CountPendingDecisionTasksWithContext(aws.Context, *swf.CountPendingDecisionTasksInput, ...request.Option) (*swf.PendingTaskCount, error)
|
||||
CountPendingDecisionTasksRequest(*swf.CountPendingDecisionTasksInput) (*request.Request, *swf.PendingTaskCount)
|
||||
|
||||
DeprecateActivityType(*swf.DeprecateActivityTypeInput) (*swf.DeprecateActivityTypeOutput, error)
|
||||
DeprecateActivityTypeWithContext(aws.Context, *swf.DeprecateActivityTypeInput, ...request.Option) (*swf.DeprecateActivityTypeOutput, error)
|
||||
DeprecateActivityTypeRequest(*swf.DeprecateActivityTypeInput) (*request.Request, *swf.DeprecateActivityTypeOutput)
|
||||
|
||||
DeprecateDomain(*swf.DeprecateDomainInput) (*swf.DeprecateDomainOutput, error)
|
||||
DeprecateDomainWithContext(aws.Context, *swf.DeprecateDomainInput, ...request.Option) (*swf.DeprecateDomainOutput, error)
|
||||
DeprecateDomainRequest(*swf.DeprecateDomainInput) (*request.Request, *swf.DeprecateDomainOutput)
|
||||
|
||||
DeprecateWorkflowType(*swf.DeprecateWorkflowTypeInput) (*swf.DeprecateWorkflowTypeOutput, error)
|
||||
DeprecateWorkflowTypeWithContext(aws.Context, *swf.DeprecateWorkflowTypeInput, ...request.Option) (*swf.DeprecateWorkflowTypeOutput, error)
|
||||
DeprecateWorkflowTypeRequest(*swf.DeprecateWorkflowTypeInput) (*request.Request, *swf.DeprecateWorkflowTypeOutput)
|
||||
|
||||
DescribeActivityType(*swf.DescribeActivityTypeInput) (*swf.DescribeActivityTypeOutput, error)
|
||||
DescribeActivityTypeWithContext(aws.Context, *swf.DescribeActivityTypeInput, ...request.Option) (*swf.DescribeActivityTypeOutput, error)
|
||||
DescribeActivityTypeRequest(*swf.DescribeActivityTypeInput) (*request.Request, *swf.DescribeActivityTypeOutput)
|
||||
|
||||
DescribeDomain(*swf.DescribeDomainInput) (*swf.DescribeDomainOutput, error)
|
||||
DescribeDomainWithContext(aws.Context, *swf.DescribeDomainInput, ...request.Option) (*swf.DescribeDomainOutput, error)
|
||||
DescribeDomainRequest(*swf.DescribeDomainInput) (*request.Request, *swf.DescribeDomainOutput)
|
||||
|
||||
DescribeWorkflowExecution(*swf.DescribeWorkflowExecutionInput) (*swf.DescribeWorkflowExecutionOutput, error)
|
||||
DescribeWorkflowExecutionWithContext(aws.Context, *swf.DescribeWorkflowExecutionInput, ...request.Option) (*swf.DescribeWorkflowExecutionOutput, error)
|
||||
DescribeWorkflowExecutionRequest(*swf.DescribeWorkflowExecutionInput) (*request.Request, *swf.DescribeWorkflowExecutionOutput)
|
||||
|
||||
DescribeWorkflowType(*swf.DescribeWorkflowTypeInput) (*swf.DescribeWorkflowTypeOutput, error)
|
||||
DescribeWorkflowTypeWithContext(aws.Context, *swf.DescribeWorkflowTypeInput, ...request.Option) (*swf.DescribeWorkflowTypeOutput, error)
|
||||
DescribeWorkflowTypeRequest(*swf.DescribeWorkflowTypeInput) (*request.Request, *swf.DescribeWorkflowTypeOutput)
|
||||
|
||||
GetWorkflowExecutionHistory(*swf.GetWorkflowExecutionHistoryInput) (*swf.GetWorkflowExecutionHistoryOutput, error)
|
||||
GetWorkflowExecutionHistoryWithContext(aws.Context, *swf.GetWorkflowExecutionHistoryInput, ...request.Option) (*swf.GetWorkflowExecutionHistoryOutput, error)
|
||||
GetWorkflowExecutionHistoryRequest(*swf.GetWorkflowExecutionHistoryInput) (*request.Request, *swf.GetWorkflowExecutionHistoryOutput)
|
||||
|
||||
GetWorkflowExecutionHistoryPages(*swf.GetWorkflowExecutionHistoryInput, func(*swf.GetWorkflowExecutionHistoryOutput, bool) bool) error
|
||||
GetWorkflowExecutionHistoryPagesWithContext(aws.Context, *swf.GetWorkflowExecutionHistoryInput, func(*swf.GetWorkflowExecutionHistoryOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListActivityTypes(*swf.ListActivityTypesInput) (*swf.ListActivityTypesOutput, error)
|
||||
ListActivityTypesWithContext(aws.Context, *swf.ListActivityTypesInput, ...request.Option) (*swf.ListActivityTypesOutput, error)
|
||||
ListActivityTypesRequest(*swf.ListActivityTypesInput) (*request.Request, *swf.ListActivityTypesOutput)
|
||||
|
||||
ListActivityTypesPages(*swf.ListActivityTypesInput, func(*swf.ListActivityTypesOutput, bool) bool) error
|
||||
ListActivityTypesPagesWithContext(aws.Context, *swf.ListActivityTypesInput, func(*swf.ListActivityTypesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListClosedWorkflowExecutions(*swf.ListClosedWorkflowExecutionsInput) (*swf.WorkflowExecutionInfos, error)
|
||||
ListClosedWorkflowExecutionsWithContext(aws.Context, *swf.ListClosedWorkflowExecutionsInput, ...request.Option) (*swf.WorkflowExecutionInfos, error)
|
||||
ListClosedWorkflowExecutionsRequest(*swf.ListClosedWorkflowExecutionsInput) (*request.Request, *swf.WorkflowExecutionInfos)
|
||||
|
||||
ListClosedWorkflowExecutionsPages(*swf.ListClosedWorkflowExecutionsInput, func(*swf.WorkflowExecutionInfos, bool) bool) error
|
||||
ListClosedWorkflowExecutionsPagesWithContext(aws.Context, *swf.ListClosedWorkflowExecutionsInput, func(*swf.WorkflowExecutionInfos, bool) bool, ...request.Option) error
|
||||
|
||||
ListDomains(*swf.ListDomainsInput) (*swf.ListDomainsOutput, error)
|
||||
ListDomainsWithContext(aws.Context, *swf.ListDomainsInput, ...request.Option) (*swf.ListDomainsOutput, error)
|
||||
ListDomainsRequest(*swf.ListDomainsInput) (*request.Request, *swf.ListDomainsOutput)
|
||||
|
||||
ListDomainsPages(*swf.ListDomainsInput, func(*swf.ListDomainsOutput, bool) bool) error
|
||||
ListDomainsPagesWithContext(aws.Context, *swf.ListDomainsInput, func(*swf.ListDomainsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListOpenWorkflowExecutions(*swf.ListOpenWorkflowExecutionsInput) (*swf.WorkflowExecutionInfos, error)
|
||||
ListOpenWorkflowExecutionsWithContext(aws.Context, *swf.ListOpenWorkflowExecutionsInput, ...request.Option) (*swf.WorkflowExecutionInfos, error)
|
||||
ListOpenWorkflowExecutionsRequest(*swf.ListOpenWorkflowExecutionsInput) (*request.Request, *swf.WorkflowExecutionInfos)
|
||||
|
||||
ListOpenWorkflowExecutionsPages(*swf.ListOpenWorkflowExecutionsInput, func(*swf.WorkflowExecutionInfos, bool) bool) error
|
||||
ListOpenWorkflowExecutionsPagesWithContext(aws.Context, *swf.ListOpenWorkflowExecutionsInput, func(*swf.WorkflowExecutionInfos, bool) bool, ...request.Option) error
|
||||
|
||||
ListWorkflowTypes(*swf.ListWorkflowTypesInput) (*swf.ListWorkflowTypesOutput, error)
|
||||
ListWorkflowTypesWithContext(aws.Context, *swf.ListWorkflowTypesInput, ...request.Option) (*swf.ListWorkflowTypesOutput, error)
|
||||
ListWorkflowTypesRequest(*swf.ListWorkflowTypesInput) (*request.Request, *swf.ListWorkflowTypesOutput)
|
||||
|
||||
ListWorkflowTypesPages(*swf.ListWorkflowTypesInput, func(*swf.ListWorkflowTypesOutput, bool) bool) error
|
||||
ListWorkflowTypesPagesWithContext(aws.Context, *swf.ListWorkflowTypesInput, func(*swf.ListWorkflowTypesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
PollForActivityTask(*swf.PollForActivityTaskInput) (*swf.PollForActivityTaskOutput, error)
|
||||
PollForActivityTaskWithContext(aws.Context, *swf.PollForActivityTaskInput, ...request.Option) (*swf.PollForActivityTaskOutput, error)
|
||||
PollForActivityTaskRequest(*swf.PollForActivityTaskInput) (*request.Request, *swf.PollForActivityTaskOutput)
|
||||
|
||||
PollForDecisionTask(*swf.PollForDecisionTaskInput) (*swf.PollForDecisionTaskOutput, error)
|
||||
PollForDecisionTaskWithContext(aws.Context, *swf.PollForDecisionTaskInput, ...request.Option) (*swf.PollForDecisionTaskOutput, error)
|
||||
PollForDecisionTaskRequest(*swf.PollForDecisionTaskInput) (*request.Request, *swf.PollForDecisionTaskOutput)
|
||||
|
||||
PollForDecisionTaskPages(*swf.PollForDecisionTaskInput, func(*swf.PollForDecisionTaskOutput, bool) bool) error
|
||||
PollForDecisionTaskPagesWithContext(aws.Context, *swf.PollForDecisionTaskInput, func(*swf.PollForDecisionTaskOutput, bool) bool, ...request.Option) error
|
||||
|
||||
RecordActivityTaskHeartbeat(*swf.RecordActivityTaskHeartbeatInput) (*swf.RecordActivityTaskHeartbeatOutput, error)
|
||||
RecordActivityTaskHeartbeatWithContext(aws.Context, *swf.RecordActivityTaskHeartbeatInput, ...request.Option) (*swf.RecordActivityTaskHeartbeatOutput, error)
|
||||
RecordActivityTaskHeartbeatRequest(*swf.RecordActivityTaskHeartbeatInput) (*request.Request, *swf.RecordActivityTaskHeartbeatOutput)
|
||||
|
||||
RegisterActivityType(*swf.RegisterActivityTypeInput) (*swf.RegisterActivityTypeOutput, error)
|
||||
RegisterActivityTypeWithContext(aws.Context, *swf.RegisterActivityTypeInput, ...request.Option) (*swf.RegisterActivityTypeOutput, error)
|
||||
RegisterActivityTypeRequest(*swf.RegisterActivityTypeInput) (*request.Request, *swf.RegisterActivityTypeOutput)
|
||||
|
||||
RegisterDomain(*swf.RegisterDomainInput) (*swf.RegisterDomainOutput, error)
|
||||
RegisterDomainWithContext(aws.Context, *swf.RegisterDomainInput, ...request.Option) (*swf.RegisterDomainOutput, error)
|
||||
RegisterDomainRequest(*swf.RegisterDomainInput) (*request.Request, *swf.RegisterDomainOutput)
|
||||
|
||||
RegisterWorkflowType(*swf.RegisterWorkflowTypeInput) (*swf.RegisterWorkflowTypeOutput, error)
|
||||
RegisterWorkflowTypeWithContext(aws.Context, *swf.RegisterWorkflowTypeInput, ...request.Option) (*swf.RegisterWorkflowTypeOutput, error)
|
||||
RegisterWorkflowTypeRequest(*swf.RegisterWorkflowTypeInput) (*request.Request, *swf.RegisterWorkflowTypeOutput)
|
||||
|
||||
RequestCancelWorkflowExecution(*swf.RequestCancelWorkflowExecutionInput) (*swf.RequestCancelWorkflowExecutionOutput, error)
|
||||
RequestCancelWorkflowExecutionWithContext(aws.Context, *swf.RequestCancelWorkflowExecutionInput, ...request.Option) (*swf.RequestCancelWorkflowExecutionOutput, error)
|
||||
RequestCancelWorkflowExecutionRequest(*swf.RequestCancelWorkflowExecutionInput) (*request.Request, *swf.RequestCancelWorkflowExecutionOutput)
|
||||
|
||||
RespondActivityTaskCanceled(*swf.RespondActivityTaskCanceledInput) (*swf.RespondActivityTaskCanceledOutput, error)
|
||||
RespondActivityTaskCanceledWithContext(aws.Context, *swf.RespondActivityTaskCanceledInput, ...request.Option) (*swf.RespondActivityTaskCanceledOutput, error)
|
||||
RespondActivityTaskCanceledRequest(*swf.RespondActivityTaskCanceledInput) (*request.Request, *swf.RespondActivityTaskCanceledOutput)
|
||||
|
||||
RespondActivityTaskCompleted(*swf.RespondActivityTaskCompletedInput) (*swf.RespondActivityTaskCompletedOutput, error)
|
||||
RespondActivityTaskCompletedWithContext(aws.Context, *swf.RespondActivityTaskCompletedInput, ...request.Option) (*swf.RespondActivityTaskCompletedOutput, error)
|
||||
RespondActivityTaskCompletedRequest(*swf.RespondActivityTaskCompletedInput) (*request.Request, *swf.RespondActivityTaskCompletedOutput)
|
||||
|
||||
RespondActivityTaskFailed(*swf.RespondActivityTaskFailedInput) (*swf.RespondActivityTaskFailedOutput, error)
|
||||
RespondActivityTaskFailedWithContext(aws.Context, *swf.RespondActivityTaskFailedInput, ...request.Option) (*swf.RespondActivityTaskFailedOutput, error)
|
||||
RespondActivityTaskFailedRequest(*swf.RespondActivityTaskFailedInput) (*request.Request, *swf.RespondActivityTaskFailedOutput)
|
||||
|
||||
RespondDecisionTaskCompleted(*swf.RespondDecisionTaskCompletedInput) (*swf.RespondDecisionTaskCompletedOutput, error)
|
||||
RespondDecisionTaskCompletedWithContext(aws.Context, *swf.RespondDecisionTaskCompletedInput, ...request.Option) (*swf.RespondDecisionTaskCompletedOutput, error)
|
||||
RespondDecisionTaskCompletedRequest(*swf.RespondDecisionTaskCompletedInput) (*request.Request, *swf.RespondDecisionTaskCompletedOutput)
|
||||
|
||||
SignalWorkflowExecution(*swf.SignalWorkflowExecutionInput) (*swf.SignalWorkflowExecutionOutput, error)
|
||||
SignalWorkflowExecutionWithContext(aws.Context, *swf.SignalWorkflowExecutionInput, ...request.Option) (*swf.SignalWorkflowExecutionOutput, error)
|
||||
SignalWorkflowExecutionRequest(*swf.SignalWorkflowExecutionInput) (*request.Request, *swf.SignalWorkflowExecutionOutput)
|
||||
|
||||
StartWorkflowExecution(*swf.StartWorkflowExecutionInput) (*swf.StartWorkflowExecutionOutput, error)
|
||||
StartWorkflowExecutionWithContext(aws.Context, *swf.StartWorkflowExecutionInput, ...request.Option) (*swf.StartWorkflowExecutionOutput, error)
|
||||
StartWorkflowExecutionRequest(*swf.StartWorkflowExecutionInput) (*request.Request, *swf.StartWorkflowExecutionOutput)
|
||||
|
||||
TerminateWorkflowExecution(*swf.TerminateWorkflowExecutionInput) (*swf.TerminateWorkflowExecutionOutput, error)
|
||||
TerminateWorkflowExecutionWithContext(aws.Context, *swf.TerminateWorkflowExecutionInput, ...request.Option) (*swf.TerminateWorkflowExecutionOutput, error)
|
||||
TerminateWorkflowExecutionRequest(*swf.TerminateWorkflowExecutionInput) (*request.Request, *swf.TerminateWorkflowExecutionOutput)
|
||||
}
|
||||
|
||||
var _ SWFAPI = (*swf.SWF)(nil)
|
Loading…
Add table
Add a link
Reference in a new issue