mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-30 04:20:53 +00:00
Update Go AWS SDK to the latest version
This commit is contained in:
committed by
Andrey Smirnov
parent
d08be990ef
commit
94a72b23ff
+1092
-122
File diff suppressed because it is too large
Load Diff
+46
-3
@@ -18,12 +18,33 @@ const (
|
||||
// again.
|
||||
ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
|
||||
|
||||
// ErrCodeInvalidS3BucketException for service response error code
|
||||
// "InvalidS3BucketException".
|
||||
//
|
||||
// The provided Amazon S3 bucket name is invalid. Please check your input with
|
||||
// S3 bucket naming requirements and try again.
|
||||
ErrCodeInvalidS3BucketException = "InvalidS3BucketException"
|
||||
|
||||
// ErrCodeInvalidS3KeyException for service response error code
|
||||
// "InvalidS3KeyException".
|
||||
//
|
||||
// The provided Amazon S3 key prefix is invalid. Please provide a valid S3 object
|
||||
// key name.
|
||||
ErrCodeInvalidS3KeyException = "InvalidS3KeyException"
|
||||
|
||||
// ErrCodeInvalidSampleRateException for service response error code
|
||||
// "InvalidSampleRateException".
|
||||
//
|
||||
// The specified sample rate is not valid.
|
||||
ErrCodeInvalidSampleRateException = "InvalidSampleRateException"
|
||||
|
||||
// ErrCodeInvalidSnsTopicArnException for service response error code
|
||||
// "InvalidSnsTopicArnException".
|
||||
//
|
||||
// The provided SNS topic ARN is invalid. Please provide a valid SNS topic ARN
|
||||
// and try again.
|
||||
ErrCodeInvalidSnsTopicArnException = "InvalidSnsTopicArnException"
|
||||
|
||||
// ErrCodeInvalidSsmlException for service response error code
|
||||
// "InvalidSsmlException".
|
||||
//
|
||||
@@ -31,6 +52,20 @@ const (
|
||||
// and values, and then try again.
|
||||
ErrCodeInvalidSsmlException = "InvalidSsmlException"
|
||||
|
||||
// ErrCodeInvalidTaskIdException for service response error code
|
||||
// "InvalidTaskIdException".
|
||||
//
|
||||
// The provided Task ID is not valid. Please provide a valid Task ID and try
|
||||
// again.
|
||||
ErrCodeInvalidTaskIdException = "InvalidTaskIdException"
|
||||
|
||||
// ErrCodeLanguageNotSupportedException for service response error code
|
||||
// "LanguageNotSupportedException".
|
||||
//
|
||||
// The language specified is not currently supported by Amazon Polly in this
|
||||
// capacity.
|
||||
ErrCodeLanguageNotSupportedException = "LanguageNotSupportedException"
|
||||
|
||||
// ErrCodeLexiconNotFoundException for service response error code
|
||||
// "LexiconNotFoundException".
|
||||
//
|
||||
@@ -79,12 +114,20 @@ const (
|
||||
// SSML speech marks are not supported for plain text-type input.
|
||||
ErrCodeSsmlMarksNotSupportedForTextTypeException = "SsmlMarksNotSupportedForTextTypeException"
|
||||
|
||||
// ErrCodeSynthesisTaskNotFoundException for service response error code
|
||||
// "SynthesisTaskNotFoundException".
|
||||
//
|
||||
// The Speech Synthesis task with requested Task ID cannot be found.
|
||||
ErrCodeSynthesisTaskNotFoundException = "SynthesisTaskNotFoundException"
|
||||
|
||||
// ErrCodeTextLengthExceededException for service response error code
|
||||
// "TextLengthExceededException".
|
||||
//
|
||||
// The value of the "Text" parameter is longer than the accepted limits. The
|
||||
// limit for input text is a maximum of 3000 characters total, of which no more
|
||||
// than 1500 can be billed characters. SSML tags are not counted as billed characters.
|
||||
// The value of the "Text" parameter is longer than the accepted limits. For
|
||||
// the SynthesizeSpeech API, the limit for input text is a maximum of 6000 characters
|
||||
// total, of which no more than 3000 can be billed characters. For the StartSpeechSynthesisTask
|
||||
// API, the maximum is 200,000 characters, of which no more than 100,000 can
|
||||
// be billed characters. SSML tags are not counted as billed characters.
|
||||
ErrCodeTextLengthExceededException = "TextLengthExceededException"
|
||||
|
||||
// ErrCodeUnsupportedPlsAlphabetException for service response error code
|
||||
|
||||
+2
@@ -225,6 +225,8 @@ func ExamplePolly_SynthesizeSpeech_shared00() {
|
||||
fmt.Println(polly.ErrCodeMarksNotSupportedForFormatException, aerr.Error())
|
||||
case polly.ErrCodeSsmlMarksNotSupportedForTextTypeException:
|
||||
fmt.Println(polly.ErrCodeSsmlMarksNotSupportedForTextTypeException, aerr.Error())
|
||||
case polly.ErrCodeLanguageNotSupportedException:
|
||||
fmt.Println(polly.ErrCodeLanguageNotSupportedException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// +build go1.10,integration
|
||||
|
||||
package polly_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration"
|
||||
"github.com/aws/aws-sdk-go/service/polly"
|
||||
)
|
||||
|
||||
var _ aws.Config
|
||||
var _ awserr.Error
|
||||
var _ request.Request
|
||||
|
||||
func TestInteg_00_DescribeVoices(t *testing.T) {
|
||||
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancelFn()
|
||||
|
||||
sess := integration.SessionWithDefaultRegion("us-west-2")
|
||||
svc := polly.New(sess)
|
||||
params := &polly.DescribeVoicesInput{}
|
||||
_, err := svc.DescribeVoicesWithContext(ctx, params)
|
||||
if err != nil {
|
||||
t.Errorf("expect no error, got %v", err)
|
||||
}
|
||||
}
|
||||
+15
@@ -72,14 +72,29 @@ type PollyAPI interface {
|
||||
GetLexiconWithContext(aws.Context, *polly.GetLexiconInput, ...request.Option) (*polly.GetLexiconOutput, error)
|
||||
GetLexiconRequest(*polly.GetLexiconInput) (*request.Request, *polly.GetLexiconOutput)
|
||||
|
||||
GetSpeechSynthesisTask(*polly.GetSpeechSynthesisTaskInput) (*polly.GetSpeechSynthesisTaskOutput, error)
|
||||
GetSpeechSynthesisTaskWithContext(aws.Context, *polly.GetSpeechSynthesisTaskInput, ...request.Option) (*polly.GetSpeechSynthesisTaskOutput, error)
|
||||
GetSpeechSynthesisTaskRequest(*polly.GetSpeechSynthesisTaskInput) (*request.Request, *polly.GetSpeechSynthesisTaskOutput)
|
||||
|
||||
ListLexicons(*polly.ListLexiconsInput) (*polly.ListLexiconsOutput, error)
|
||||
ListLexiconsWithContext(aws.Context, *polly.ListLexiconsInput, ...request.Option) (*polly.ListLexiconsOutput, error)
|
||||
ListLexiconsRequest(*polly.ListLexiconsInput) (*request.Request, *polly.ListLexiconsOutput)
|
||||
|
||||
ListSpeechSynthesisTasks(*polly.ListSpeechSynthesisTasksInput) (*polly.ListSpeechSynthesisTasksOutput, error)
|
||||
ListSpeechSynthesisTasksWithContext(aws.Context, *polly.ListSpeechSynthesisTasksInput, ...request.Option) (*polly.ListSpeechSynthesisTasksOutput, error)
|
||||
ListSpeechSynthesisTasksRequest(*polly.ListSpeechSynthesisTasksInput) (*request.Request, *polly.ListSpeechSynthesisTasksOutput)
|
||||
|
||||
ListSpeechSynthesisTasksPages(*polly.ListSpeechSynthesisTasksInput, func(*polly.ListSpeechSynthesisTasksOutput, bool) bool) error
|
||||
ListSpeechSynthesisTasksPagesWithContext(aws.Context, *polly.ListSpeechSynthesisTasksInput, func(*polly.ListSpeechSynthesisTasksOutput, bool) bool, ...request.Option) error
|
||||
|
||||
PutLexicon(*polly.PutLexiconInput) (*polly.PutLexiconOutput, error)
|
||||
PutLexiconWithContext(aws.Context, *polly.PutLexiconInput, ...request.Option) (*polly.PutLexiconOutput, error)
|
||||
PutLexiconRequest(*polly.PutLexiconInput) (*request.Request, *polly.PutLexiconOutput)
|
||||
|
||||
StartSpeechSynthesisTask(*polly.StartSpeechSynthesisTaskInput) (*polly.StartSpeechSynthesisTaskOutput, error)
|
||||
StartSpeechSynthesisTaskWithContext(aws.Context, *polly.StartSpeechSynthesisTaskInput, ...request.Option) (*polly.StartSpeechSynthesisTaskOutput, error)
|
||||
StartSpeechSynthesisTaskRequest(*polly.StartSpeechSynthesisTaskInput) (*request.Request, *polly.StartSpeechSynthesisTaskOutput)
|
||||
|
||||
SynthesizeSpeech(*polly.SynthesizeSpeechInput) (*polly.SynthesizeSpeechOutput, error)
|
||||
SynthesizeSpeechWithContext(aws.Context, *polly.SynthesizeSpeechInput, ...request.Option) (*polly.SynthesizeSpeechOutput, error)
|
||||
SynthesizeSpeechRequest(*polly.SynthesizeSpeechInput) (*request.Request, *polly.SynthesizeSpeechOutput)
|
||||
|
||||
+4
-2
@@ -29,8 +29,9 @@ var initRequest func(*request.Request)
|
||||
|
||||
// Service information constants
|
||||
const (
|
||||
ServiceName = "polly" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
ServiceName = "polly" // Name of service.
|
||||
EndpointsID = ServiceName // ID to lookup a service endpoint with.
|
||||
ServiceID = "Polly" // ServiceID is a unique identifer of a specific service.
|
||||
)
|
||||
|
||||
// New creates a new instance of the Polly client with a session.
|
||||
@@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
|
||||
Reference in New Issue
Block a user