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
8021
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go
generated
vendored
Normal file
8021
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
78
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/doc.go
generated
vendored
Normal file
78
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,78 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package elastictranscoder provides the client and types for making API
|
||||
// requests to Amazon Elastic Transcoder.
|
||||
//
|
||||
// The AWS Elastic Transcoder Service.
|
||||
//
|
||||
// See elastictranscoder package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/elastictranscoder/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Amazon Elastic Transcoder 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 := elastictranscoder.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 Elastic Transcoder client ElasticTranscoder for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/elastictranscoder/#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.CancelJob(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("CancelJob 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.CancelJobWithContext(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 elastictranscoder
|
147
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/elastictranscoderiface/interface.go
generated
vendored
Normal file
147
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/elastictranscoderiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,147 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package elastictranscoderiface provides an interface to enable mocking the Amazon Elastic Transcoder 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 elastictranscoderiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/elastictranscoder"
|
||||
)
|
||||
|
||||
// ElasticTranscoderAPI provides an interface to enable mocking the
|
||||
// elastictranscoder.ElasticTranscoder 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 Elastic Transcoder.
|
||||
// func myFunc(svc elastictranscoderiface.ElasticTranscoderAPI) bool {
|
||||
// // Make svc.CancelJob request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := elastictranscoder.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockElasticTranscoderClient struct {
|
||||
// elastictranscoderiface.ElasticTranscoderAPI
|
||||
// }
|
||||
// func (m *mockElasticTranscoderClient) CancelJob(input *elastictranscoder.CancelJobInput) (*elastictranscoder.CancelJobOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockElasticTranscoderClient{}
|
||||
//
|
||||
// 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 ElasticTranscoderAPI interface {
|
||||
CancelJob(*elastictranscoder.CancelJobInput) (*elastictranscoder.CancelJobOutput, error)
|
||||
CancelJobWithContext(aws.Context, *elastictranscoder.CancelJobInput, ...request.Option) (*elastictranscoder.CancelJobOutput, error)
|
||||
CancelJobRequest(*elastictranscoder.CancelJobInput) (*request.Request, *elastictranscoder.CancelJobOutput)
|
||||
|
||||
CreateJob(*elastictranscoder.CreateJobInput) (*elastictranscoder.CreateJobResponse, error)
|
||||
CreateJobWithContext(aws.Context, *elastictranscoder.CreateJobInput, ...request.Option) (*elastictranscoder.CreateJobResponse, error)
|
||||
CreateJobRequest(*elastictranscoder.CreateJobInput) (*request.Request, *elastictranscoder.CreateJobResponse)
|
||||
|
||||
CreatePipeline(*elastictranscoder.CreatePipelineInput) (*elastictranscoder.CreatePipelineOutput, error)
|
||||
CreatePipelineWithContext(aws.Context, *elastictranscoder.CreatePipelineInput, ...request.Option) (*elastictranscoder.CreatePipelineOutput, error)
|
||||
CreatePipelineRequest(*elastictranscoder.CreatePipelineInput) (*request.Request, *elastictranscoder.CreatePipelineOutput)
|
||||
|
||||
CreatePreset(*elastictranscoder.CreatePresetInput) (*elastictranscoder.CreatePresetOutput, error)
|
||||
CreatePresetWithContext(aws.Context, *elastictranscoder.CreatePresetInput, ...request.Option) (*elastictranscoder.CreatePresetOutput, error)
|
||||
CreatePresetRequest(*elastictranscoder.CreatePresetInput) (*request.Request, *elastictranscoder.CreatePresetOutput)
|
||||
|
||||
DeletePipeline(*elastictranscoder.DeletePipelineInput) (*elastictranscoder.DeletePipelineOutput, error)
|
||||
DeletePipelineWithContext(aws.Context, *elastictranscoder.DeletePipelineInput, ...request.Option) (*elastictranscoder.DeletePipelineOutput, error)
|
||||
DeletePipelineRequest(*elastictranscoder.DeletePipelineInput) (*request.Request, *elastictranscoder.DeletePipelineOutput)
|
||||
|
||||
DeletePreset(*elastictranscoder.DeletePresetInput) (*elastictranscoder.DeletePresetOutput, error)
|
||||
DeletePresetWithContext(aws.Context, *elastictranscoder.DeletePresetInput, ...request.Option) (*elastictranscoder.DeletePresetOutput, error)
|
||||
DeletePresetRequest(*elastictranscoder.DeletePresetInput) (*request.Request, *elastictranscoder.DeletePresetOutput)
|
||||
|
||||
ListJobsByPipeline(*elastictranscoder.ListJobsByPipelineInput) (*elastictranscoder.ListJobsByPipelineOutput, error)
|
||||
ListJobsByPipelineWithContext(aws.Context, *elastictranscoder.ListJobsByPipelineInput, ...request.Option) (*elastictranscoder.ListJobsByPipelineOutput, error)
|
||||
ListJobsByPipelineRequest(*elastictranscoder.ListJobsByPipelineInput) (*request.Request, *elastictranscoder.ListJobsByPipelineOutput)
|
||||
|
||||
ListJobsByPipelinePages(*elastictranscoder.ListJobsByPipelineInput, func(*elastictranscoder.ListJobsByPipelineOutput, bool) bool) error
|
||||
ListJobsByPipelinePagesWithContext(aws.Context, *elastictranscoder.ListJobsByPipelineInput, func(*elastictranscoder.ListJobsByPipelineOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListJobsByStatus(*elastictranscoder.ListJobsByStatusInput) (*elastictranscoder.ListJobsByStatusOutput, error)
|
||||
ListJobsByStatusWithContext(aws.Context, *elastictranscoder.ListJobsByStatusInput, ...request.Option) (*elastictranscoder.ListJobsByStatusOutput, error)
|
||||
ListJobsByStatusRequest(*elastictranscoder.ListJobsByStatusInput) (*request.Request, *elastictranscoder.ListJobsByStatusOutput)
|
||||
|
||||
ListJobsByStatusPages(*elastictranscoder.ListJobsByStatusInput, func(*elastictranscoder.ListJobsByStatusOutput, bool) bool) error
|
||||
ListJobsByStatusPagesWithContext(aws.Context, *elastictranscoder.ListJobsByStatusInput, func(*elastictranscoder.ListJobsByStatusOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListPipelines(*elastictranscoder.ListPipelinesInput) (*elastictranscoder.ListPipelinesOutput, error)
|
||||
ListPipelinesWithContext(aws.Context, *elastictranscoder.ListPipelinesInput, ...request.Option) (*elastictranscoder.ListPipelinesOutput, error)
|
||||
ListPipelinesRequest(*elastictranscoder.ListPipelinesInput) (*request.Request, *elastictranscoder.ListPipelinesOutput)
|
||||
|
||||
ListPipelinesPages(*elastictranscoder.ListPipelinesInput, func(*elastictranscoder.ListPipelinesOutput, bool) bool) error
|
||||
ListPipelinesPagesWithContext(aws.Context, *elastictranscoder.ListPipelinesInput, func(*elastictranscoder.ListPipelinesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListPresets(*elastictranscoder.ListPresetsInput) (*elastictranscoder.ListPresetsOutput, error)
|
||||
ListPresetsWithContext(aws.Context, *elastictranscoder.ListPresetsInput, ...request.Option) (*elastictranscoder.ListPresetsOutput, error)
|
||||
ListPresetsRequest(*elastictranscoder.ListPresetsInput) (*request.Request, *elastictranscoder.ListPresetsOutput)
|
||||
|
||||
ListPresetsPages(*elastictranscoder.ListPresetsInput, func(*elastictranscoder.ListPresetsOutput, bool) bool) error
|
||||
ListPresetsPagesWithContext(aws.Context, *elastictranscoder.ListPresetsInput, func(*elastictranscoder.ListPresetsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ReadJob(*elastictranscoder.ReadJobInput) (*elastictranscoder.ReadJobOutput, error)
|
||||
ReadJobWithContext(aws.Context, *elastictranscoder.ReadJobInput, ...request.Option) (*elastictranscoder.ReadJobOutput, error)
|
||||
ReadJobRequest(*elastictranscoder.ReadJobInput) (*request.Request, *elastictranscoder.ReadJobOutput)
|
||||
|
||||
ReadPipeline(*elastictranscoder.ReadPipelineInput) (*elastictranscoder.ReadPipelineOutput, error)
|
||||
ReadPipelineWithContext(aws.Context, *elastictranscoder.ReadPipelineInput, ...request.Option) (*elastictranscoder.ReadPipelineOutput, error)
|
||||
ReadPipelineRequest(*elastictranscoder.ReadPipelineInput) (*request.Request, *elastictranscoder.ReadPipelineOutput)
|
||||
|
||||
ReadPreset(*elastictranscoder.ReadPresetInput) (*elastictranscoder.ReadPresetOutput, error)
|
||||
ReadPresetWithContext(aws.Context, *elastictranscoder.ReadPresetInput, ...request.Option) (*elastictranscoder.ReadPresetOutput, error)
|
||||
ReadPresetRequest(*elastictranscoder.ReadPresetInput) (*request.Request, *elastictranscoder.ReadPresetOutput)
|
||||
|
||||
TestRole(*elastictranscoder.TestRoleInput) (*elastictranscoder.TestRoleOutput, error)
|
||||
TestRoleWithContext(aws.Context, *elastictranscoder.TestRoleInput, ...request.Option) (*elastictranscoder.TestRoleOutput, error)
|
||||
TestRoleRequest(*elastictranscoder.TestRoleInput) (*request.Request, *elastictranscoder.TestRoleOutput)
|
||||
|
||||
UpdatePipeline(*elastictranscoder.UpdatePipelineInput) (*elastictranscoder.UpdatePipelineOutput, error)
|
||||
UpdatePipelineWithContext(aws.Context, *elastictranscoder.UpdatePipelineInput, ...request.Option) (*elastictranscoder.UpdatePipelineOutput, error)
|
||||
UpdatePipelineRequest(*elastictranscoder.UpdatePipelineInput) (*request.Request, *elastictranscoder.UpdatePipelineOutput)
|
||||
|
||||
UpdatePipelineNotifications(*elastictranscoder.UpdatePipelineNotificationsInput) (*elastictranscoder.UpdatePipelineNotificationsOutput, error)
|
||||
UpdatePipelineNotificationsWithContext(aws.Context, *elastictranscoder.UpdatePipelineNotificationsInput, ...request.Option) (*elastictranscoder.UpdatePipelineNotificationsOutput, error)
|
||||
UpdatePipelineNotificationsRequest(*elastictranscoder.UpdatePipelineNotificationsInput) (*request.Request, *elastictranscoder.UpdatePipelineNotificationsOutput)
|
||||
|
||||
UpdatePipelineStatus(*elastictranscoder.UpdatePipelineStatusInput) (*elastictranscoder.UpdatePipelineStatusOutput, error)
|
||||
UpdatePipelineStatusWithContext(aws.Context, *elastictranscoder.UpdatePipelineStatusInput, ...request.Option) (*elastictranscoder.UpdatePipelineStatusOutput, error)
|
||||
UpdatePipelineStatusRequest(*elastictranscoder.UpdatePipelineStatusInput) (*request.Request, *elastictranscoder.UpdatePipelineStatusOutput)
|
||||
|
||||
WaitUntilJobComplete(*elastictranscoder.ReadJobInput) error
|
||||
WaitUntilJobCompleteWithContext(aws.Context, *elastictranscoder.ReadJobInput, ...request.WaiterOption) error
|
||||
}
|
||||
|
||||
var _ ElasticTranscoderAPI = (*elastictranscoder.ElasticTranscoder)(nil)
|
51
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/errors.go
generated
vendored
Normal file
51
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package elastictranscoder
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeAccessDeniedException for service response error code
|
||||
// "AccessDeniedException".
|
||||
//
|
||||
// General authentication failure. The request was not signed correctly.
|
||||
ErrCodeAccessDeniedException = "AccessDeniedException"
|
||||
|
||||
// ErrCodeIncompatibleVersionException for service response error code
|
||||
// "IncompatibleVersionException".
|
||||
ErrCodeIncompatibleVersionException = "IncompatibleVersionException"
|
||||
|
||||
// ErrCodeInternalServiceException for service response error code
|
||||
// "InternalServiceException".
|
||||
//
|
||||
// Elastic Transcoder encountered an unexpected exception while trying to fulfill
|
||||
// the request.
|
||||
ErrCodeInternalServiceException = "InternalServiceException"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// Too many operations for a given AWS account. For example, the number of pipelines
|
||||
// exceeds the maximum allowed.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeResourceInUseException for service response error code
|
||||
// "ResourceInUseException".
|
||||
//
|
||||
// The resource you are attempting to change is in use. For example, you are
|
||||
// attempting to delete a pipeline that is currently in use.
|
||||
ErrCodeResourceInUseException = "ResourceInUseException"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFoundException".
|
||||
//
|
||||
// The requested resource does not exist or is not available. For example, the
|
||||
// pipeline to which you're trying to add a job doesn't exist or is still being
|
||||
// created.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
|
||||
|
||||
// ErrCodeValidationException for service response error code
|
||||
// "ValidationException".
|
||||
//
|
||||
// One or more required parameter values were not provided in the request.
|
||||
ErrCodeValidationException = "ValidationException"
|
||||
)
|
839
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/examples_test.go
generated
vendored
Normal file
839
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,839 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package elastictranscoder_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/elastictranscoder"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleElasticTranscoder_CancelJob() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.CancelJobInput{
|
||||
Id: aws.String("Id"), // Required
|
||||
}
|
||||
resp, err := svc.CancelJob(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 ExampleElasticTranscoder_CreateJob() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.CreateJobInput{
|
||||
PipelineId: aws.String("Id"), // Required
|
||||
Input: &elastictranscoder.JobInput{
|
||||
AspectRatio: aws.String("AspectRatio"),
|
||||
Container: aws.String("JobContainer"),
|
||||
DetectedProperties: &elastictranscoder.DetectedProperties{
|
||||
DurationMillis: aws.Int64(1),
|
||||
FileSize: aws.Int64(1),
|
||||
FrameRate: aws.String("FloatString"),
|
||||
Height: aws.Int64(1),
|
||||
Width: aws.Int64(1),
|
||||
},
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
FrameRate: aws.String("FrameRate"),
|
||||
InputCaptions: &elastictranscoder.InputCaptions{
|
||||
CaptionSources: []*elastictranscoder.CaptionSource{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Key: aws.String("LongKey"),
|
||||
Label: aws.String("Name"),
|
||||
Language: aws.String("Key"),
|
||||
TimeOffset: aws.String("TimeOffset"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MergePolicy: aws.String("CaptionMergePolicy"),
|
||||
},
|
||||
Interlaced: aws.String("Interlaced"),
|
||||
Key: aws.String("LongKey"),
|
||||
Resolution: aws.String("Resolution"),
|
||||
TimeSpan: &elastictranscoder.TimeSpan{
|
||||
Duration: aws.String("Time"),
|
||||
StartTime: aws.String("Time"),
|
||||
},
|
||||
},
|
||||
Inputs: []*elastictranscoder.JobInput{
|
||||
{ // Required
|
||||
AspectRatio: aws.String("AspectRatio"),
|
||||
Container: aws.String("JobContainer"),
|
||||
DetectedProperties: &elastictranscoder.DetectedProperties{
|
||||
DurationMillis: aws.Int64(1),
|
||||
FileSize: aws.Int64(1),
|
||||
FrameRate: aws.String("FloatString"),
|
||||
Height: aws.Int64(1),
|
||||
Width: aws.Int64(1),
|
||||
},
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
FrameRate: aws.String("FrameRate"),
|
||||
InputCaptions: &elastictranscoder.InputCaptions{
|
||||
CaptionSources: []*elastictranscoder.CaptionSource{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Key: aws.String("LongKey"),
|
||||
Label: aws.String("Name"),
|
||||
Language: aws.String("Key"),
|
||||
TimeOffset: aws.String("TimeOffset"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MergePolicy: aws.String("CaptionMergePolicy"),
|
||||
},
|
||||
Interlaced: aws.String("Interlaced"),
|
||||
Key: aws.String("LongKey"),
|
||||
Resolution: aws.String("Resolution"),
|
||||
TimeSpan: &elastictranscoder.TimeSpan{
|
||||
Duration: aws.String("Time"),
|
||||
StartTime: aws.String("Time"),
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Output: &elastictranscoder.CreateJobOutput{
|
||||
AlbumArt: &elastictranscoder.JobAlbumArt{
|
||||
Artwork: []*elastictranscoder.Artwork{
|
||||
{ // Required
|
||||
AlbumArtFormat: aws.String("JpgOrPng"),
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
InputKey: aws.String("WatermarkKey"),
|
||||
MaxHeight: aws.String("DigitsOrAuto"),
|
||||
MaxWidth: aws.String("DigitsOrAuto"),
|
||||
PaddingPolicy: aws.String("PaddingPolicy"),
|
||||
SizingPolicy: aws.String("SizingPolicy"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MergePolicy: aws.String("MergePolicy"),
|
||||
},
|
||||
Captions: &elastictranscoder.Captions{
|
||||
CaptionFormats: []*elastictranscoder.CaptionFormat{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Format: aws.String("CaptionFormatFormat"),
|
||||
Pattern: aws.String("CaptionFormatPattern"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
CaptionSources: []*elastictranscoder.CaptionSource{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Key: aws.String("LongKey"),
|
||||
Label: aws.String("Name"),
|
||||
Language: aws.String("Key"),
|
||||
TimeOffset: aws.String("TimeOffset"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MergePolicy: aws.String("CaptionMergePolicy"),
|
||||
},
|
||||
Composition: []*elastictranscoder.Clip{
|
||||
{ // Required
|
||||
TimeSpan: &elastictranscoder.TimeSpan{
|
||||
Duration: aws.String("Time"),
|
||||
StartTime: aws.String("Time"),
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Key: aws.String("Key"),
|
||||
PresetId: aws.String("Id"),
|
||||
Rotate: aws.String("Rotate"),
|
||||
SegmentDuration: aws.String("FloatString"),
|
||||
ThumbnailEncryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
ThumbnailPattern: aws.String("ThumbnailPattern"),
|
||||
Watermarks: []*elastictranscoder.JobWatermark{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
InputKey: aws.String("WatermarkKey"),
|
||||
PresetWatermarkId: aws.String("PresetWatermarkId"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
OutputKeyPrefix: aws.String("Key"),
|
||||
Outputs: []*elastictranscoder.CreateJobOutput{
|
||||
{ // Required
|
||||
AlbumArt: &elastictranscoder.JobAlbumArt{
|
||||
Artwork: []*elastictranscoder.Artwork{
|
||||
{ // Required
|
||||
AlbumArtFormat: aws.String("JpgOrPng"),
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
InputKey: aws.String("WatermarkKey"),
|
||||
MaxHeight: aws.String("DigitsOrAuto"),
|
||||
MaxWidth: aws.String("DigitsOrAuto"),
|
||||
PaddingPolicy: aws.String("PaddingPolicy"),
|
||||
SizingPolicy: aws.String("SizingPolicy"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MergePolicy: aws.String("MergePolicy"),
|
||||
},
|
||||
Captions: &elastictranscoder.Captions{
|
||||
CaptionFormats: []*elastictranscoder.CaptionFormat{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Format: aws.String("CaptionFormatFormat"),
|
||||
Pattern: aws.String("CaptionFormatPattern"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
CaptionSources: []*elastictranscoder.CaptionSource{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Key: aws.String("LongKey"),
|
||||
Label: aws.String("Name"),
|
||||
Language: aws.String("Key"),
|
||||
TimeOffset: aws.String("TimeOffset"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MergePolicy: aws.String("CaptionMergePolicy"),
|
||||
},
|
||||
Composition: []*elastictranscoder.Clip{
|
||||
{ // Required
|
||||
TimeSpan: &elastictranscoder.TimeSpan{
|
||||
Duration: aws.String("Time"),
|
||||
StartTime: aws.String("Time"),
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Key: aws.String("Key"),
|
||||
PresetId: aws.String("Id"),
|
||||
Rotate: aws.String("Rotate"),
|
||||
SegmentDuration: aws.String("FloatString"),
|
||||
ThumbnailEncryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
ThumbnailPattern: aws.String("ThumbnailPattern"),
|
||||
Watermarks: []*elastictranscoder.JobWatermark{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
InputKey: aws.String("WatermarkKey"),
|
||||
PresetWatermarkId: aws.String("PresetWatermarkId"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Playlists: []*elastictranscoder.CreateJobPlaylist{
|
||||
{ // Required
|
||||
Format: aws.String("PlaylistFormat"),
|
||||
HlsContentProtection: &elastictranscoder.HlsContentProtection{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
KeyStoragePolicy: aws.String("KeyStoragePolicy"),
|
||||
LicenseAcquisitionUrl: aws.String("ZeroTo512String"),
|
||||
Method: aws.String("HlsContentProtectionMethod"),
|
||||
},
|
||||
Name: aws.String("Filename"),
|
||||
OutputKeys: []*string{
|
||||
aws.String("Key"), // Required
|
||||
// More values...
|
||||
},
|
||||
PlayReadyDrm: &elastictranscoder.PlayReadyDrm{
|
||||
Format: aws.String("PlayReadyDrmFormatString"),
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("NonEmptyBase64EncodedString"),
|
||||
KeyId: aws.String("KeyIdGuid"),
|
||||
KeyMd5: aws.String("NonEmptyBase64EncodedString"),
|
||||
LicenseAcquisitionUrl: aws.String("OneTo512String"),
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
UserMetadata: map[string]*string{
|
||||
"Key": aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateJob(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 ExampleElasticTranscoder_CreatePipeline() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.CreatePipelineInput{
|
||||
InputBucket: aws.String("BucketName"), // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
Role: aws.String("Role"), // Required
|
||||
AwsKmsKeyArn: aws.String("KeyArn"),
|
||||
ContentConfig: &elastictranscoder.PipelineOutputConfig{
|
||||
Bucket: aws.String("BucketName"),
|
||||
Permissions: []*elastictranscoder.Permission{
|
||||
{ // Required
|
||||
Access: []*string{
|
||||
aws.String("AccessControl"), // Required
|
||||
// More values...
|
||||
},
|
||||
Grantee: aws.String("Grantee"),
|
||||
GranteeType: aws.String("GranteeType"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
StorageClass: aws.String("StorageClass"),
|
||||
},
|
||||
Notifications: &elastictranscoder.Notifications{
|
||||
Completed: aws.String("SnsTopic"),
|
||||
Error: aws.String("SnsTopic"),
|
||||
Progressing: aws.String("SnsTopic"),
|
||||
Warning: aws.String("SnsTopic"),
|
||||
},
|
||||
OutputBucket: aws.String("BucketName"),
|
||||
ThumbnailConfig: &elastictranscoder.PipelineOutputConfig{
|
||||
Bucket: aws.String("BucketName"),
|
||||
Permissions: []*elastictranscoder.Permission{
|
||||
{ // Required
|
||||
Access: []*string{
|
||||
aws.String("AccessControl"), // Required
|
||||
// More values...
|
||||
},
|
||||
Grantee: aws.String("Grantee"),
|
||||
GranteeType: aws.String("GranteeType"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
StorageClass: aws.String("StorageClass"),
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreatePipeline(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 ExampleElasticTranscoder_CreatePreset() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.CreatePresetInput{
|
||||
Container: aws.String("PresetContainer"), // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
Audio: &elastictranscoder.AudioParameters{
|
||||
AudioPackingMode: aws.String("AudioPackingMode"),
|
||||
BitRate: aws.String("AudioBitRate"),
|
||||
Channels: aws.String("AudioChannels"),
|
||||
Codec: aws.String("AudioCodec"),
|
||||
CodecOptions: &elastictranscoder.AudioCodecOptions{
|
||||
BitDepth: aws.String("AudioBitDepth"),
|
||||
BitOrder: aws.String("AudioBitOrder"),
|
||||
Profile: aws.String("AudioCodecProfile"),
|
||||
Signed: aws.String("AudioSigned"),
|
||||
},
|
||||
SampleRate: aws.String("AudioSampleRate"),
|
||||
},
|
||||
Description: aws.String("Description"),
|
||||
Thumbnails: &elastictranscoder.Thumbnails{
|
||||
AspectRatio: aws.String("AspectRatio"),
|
||||
Format: aws.String("JpgOrPng"),
|
||||
Interval: aws.String("Digits"),
|
||||
MaxHeight: aws.String("DigitsOrAuto"),
|
||||
MaxWidth: aws.String("DigitsOrAuto"),
|
||||
PaddingPolicy: aws.String("PaddingPolicy"),
|
||||
Resolution: aws.String("ThumbnailResolution"),
|
||||
SizingPolicy: aws.String("SizingPolicy"),
|
||||
},
|
||||
Video: &elastictranscoder.VideoParameters{
|
||||
AspectRatio: aws.String("AspectRatio"),
|
||||
BitRate: aws.String("VideoBitRate"),
|
||||
Codec: aws.String("VideoCodec"),
|
||||
CodecOptions: map[string]*string{
|
||||
"Key": aws.String("CodecOption"), // Required
|
||||
// More values...
|
||||
},
|
||||
DisplayAspectRatio: aws.String("AspectRatio"),
|
||||
FixedGOP: aws.String("FixedGOP"),
|
||||
FrameRate: aws.String("FrameRate"),
|
||||
KeyframesMaxDist: aws.String("KeyframesMaxDist"),
|
||||
MaxFrameRate: aws.String("MaxFrameRate"),
|
||||
MaxHeight: aws.String("DigitsOrAuto"),
|
||||
MaxWidth: aws.String("DigitsOrAuto"),
|
||||
PaddingPolicy: aws.String("PaddingPolicy"),
|
||||
Resolution: aws.String("Resolution"),
|
||||
SizingPolicy: aws.String("SizingPolicy"),
|
||||
Watermarks: []*elastictranscoder.PresetWatermark{
|
||||
{ // Required
|
||||
HorizontalAlign: aws.String("HorizontalAlign"),
|
||||
HorizontalOffset: aws.String("PixelsOrPercent"),
|
||||
Id: aws.String("PresetWatermarkId"),
|
||||
MaxHeight: aws.String("PixelsOrPercent"),
|
||||
MaxWidth: aws.String("PixelsOrPercent"),
|
||||
Opacity: aws.String("Opacity"),
|
||||
SizingPolicy: aws.String("WatermarkSizingPolicy"),
|
||||
Target: aws.String("Target"),
|
||||
VerticalAlign: aws.String("VerticalAlign"),
|
||||
VerticalOffset: aws.String("PixelsOrPercent"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreatePreset(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 ExampleElasticTranscoder_DeletePipeline() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.DeletePipelineInput{
|
||||
Id: aws.String("Id"), // Required
|
||||
}
|
||||
resp, err := svc.DeletePipeline(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 ExampleElasticTranscoder_DeletePreset() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.DeletePresetInput{
|
||||
Id: aws.String("Id"), // Required
|
||||
}
|
||||
resp, err := svc.DeletePreset(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 ExampleElasticTranscoder_ListJobsByPipeline() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.ListJobsByPipelineInput{
|
||||
PipelineId: aws.String("Id"), // Required
|
||||
Ascending: aws.String("Ascending"),
|
||||
PageToken: aws.String("Id"),
|
||||
}
|
||||
resp, err := svc.ListJobsByPipeline(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 ExampleElasticTranscoder_ListJobsByStatus() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.ListJobsByStatusInput{
|
||||
Status: aws.String("JobStatus"), // Required
|
||||
Ascending: aws.String("Ascending"),
|
||||
PageToken: aws.String("Id"),
|
||||
}
|
||||
resp, err := svc.ListJobsByStatus(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 ExampleElasticTranscoder_ListPipelines() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.ListPipelinesInput{
|
||||
Ascending: aws.String("Ascending"),
|
||||
PageToken: aws.String("Id"),
|
||||
}
|
||||
resp, err := svc.ListPipelines(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 ExampleElasticTranscoder_ListPresets() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.ListPresetsInput{
|
||||
Ascending: aws.String("Ascending"),
|
||||
PageToken: aws.String("Id"),
|
||||
}
|
||||
resp, err := svc.ListPresets(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 ExampleElasticTranscoder_ReadJob() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.ReadJobInput{
|
||||
Id: aws.String("Id"), // Required
|
||||
}
|
||||
resp, err := svc.ReadJob(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 ExampleElasticTranscoder_ReadPipeline() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.ReadPipelineInput{
|
||||
Id: aws.String("Id"), // Required
|
||||
}
|
||||
resp, err := svc.ReadPipeline(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 ExampleElasticTranscoder_ReadPreset() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.ReadPresetInput{
|
||||
Id: aws.String("Id"), // Required
|
||||
}
|
||||
resp, err := svc.ReadPreset(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 ExampleElasticTranscoder_TestRole() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.TestRoleInput{
|
||||
InputBucket: aws.String("BucketName"), // Required
|
||||
OutputBucket: aws.String("BucketName"), // Required
|
||||
Role: aws.String("Role"), // Required
|
||||
Topics: []*string{ // Required
|
||||
aws.String("SnsTopic"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.TestRole(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 ExampleElasticTranscoder_UpdatePipeline() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.UpdatePipelineInput{
|
||||
Id: aws.String("Id"), // Required
|
||||
AwsKmsKeyArn: aws.String("KeyArn"),
|
||||
ContentConfig: &elastictranscoder.PipelineOutputConfig{
|
||||
Bucket: aws.String("BucketName"),
|
||||
Permissions: []*elastictranscoder.Permission{
|
||||
{ // Required
|
||||
Access: []*string{
|
||||
aws.String("AccessControl"), // Required
|
||||
// More values...
|
||||
},
|
||||
Grantee: aws.String("Grantee"),
|
||||
GranteeType: aws.String("GranteeType"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
StorageClass: aws.String("StorageClass"),
|
||||
},
|
||||
InputBucket: aws.String("BucketName"),
|
||||
Name: aws.String("Name"),
|
||||
Notifications: &elastictranscoder.Notifications{
|
||||
Completed: aws.String("SnsTopic"),
|
||||
Error: aws.String("SnsTopic"),
|
||||
Progressing: aws.String("SnsTopic"),
|
||||
Warning: aws.String("SnsTopic"),
|
||||
},
|
||||
Role: aws.String("Role"),
|
||||
ThumbnailConfig: &elastictranscoder.PipelineOutputConfig{
|
||||
Bucket: aws.String("BucketName"),
|
||||
Permissions: []*elastictranscoder.Permission{
|
||||
{ // Required
|
||||
Access: []*string{
|
||||
aws.String("AccessControl"), // Required
|
||||
// More values...
|
||||
},
|
||||
Grantee: aws.String("Grantee"),
|
||||
GranteeType: aws.String("GranteeType"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
StorageClass: aws.String("StorageClass"),
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdatePipeline(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 ExampleElasticTranscoder_UpdatePipelineNotifications() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.UpdatePipelineNotificationsInput{
|
||||
Id: aws.String("Id"), // Required
|
||||
Notifications: &elastictranscoder.Notifications{ // Required
|
||||
Completed: aws.String("SnsTopic"),
|
||||
Error: aws.String("SnsTopic"),
|
||||
Progressing: aws.String("SnsTopic"),
|
||||
Warning: aws.String("SnsTopic"),
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdatePipelineNotifications(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 ExampleElasticTranscoder_UpdatePipelineStatus() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elastictranscoder.New(sess)
|
||||
|
||||
params := &elastictranscoder.UpdatePipelineStatusInput{
|
||||
Id: aws.String("Id"), // Required
|
||||
Status: aws.String("PipelineStatus"), // Required
|
||||
}
|
||||
resp, err := svc.UpdatePipelineStatus(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)
|
||||
}
|
93
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go
generated
vendored
Normal file
93
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go
generated
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package elastictranscoder
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// ElasticTranscoder provides the API operation methods for making requests to
|
||||
// Amazon Elastic Transcoder. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// ElasticTranscoder methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type ElasticTranscoder 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 = "elastictranscoder" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the ElasticTranscoder 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 ElasticTranscoder client from just a session.
|
||||
// svc := elastictranscoder.New(mySession)
|
||||
//
|
||||
// // Create a ElasticTranscoder client with additional configuration
|
||||
// svc := elastictranscoder.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ElasticTranscoder {
|
||||
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) *ElasticTranscoder {
|
||||
svc := &ElasticTranscoder{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2012-09-25",
|
||||
},
|
||||
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 ElasticTranscoder operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *ElasticTranscoder) 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
|
||||
}
|
66
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/waiters.go
generated
vendored
Normal file
66
vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/waiters.go
generated
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package elastictranscoder
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
)
|
||||
|
||||
// WaitUntilJobComplete uses the Amazon Elastic Transcoder API operation
|
||||
// ReadJob to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *ElasticTranscoder) WaitUntilJobComplete(input *ReadJobInput) error {
|
||||
return c.WaitUntilJobCompleteWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilJobCompleteWithContext is an extended version of WaitUntilJobComplete.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *ElasticTranscoder) WaitUntilJobCompleteWithContext(ctx aws.Context, input *ReadJobInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilJobComplete",
|
||||
MaxAttempts: 120,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "Job.Status",
|
||||
Expected: "Complete",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "Job.Status",
|
||||
Expected: "Canceled",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "Job.Status",
|
||||
Expected: "Error",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *ReadJobInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.ReadJobRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue