awssdk

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadS3

func DownloadS3(s3Url *S3Url, tempDir string,
	progressCallback func(int64, int64, float32), endCallback func(int64)) (string, int64, error)

func DownloadS3Partially

func DownloadS3Partially(s3Url *S3Url, tempDir string, partialRange string,
	progressCallback func(int64, int64, float32), endCallback func(int64)) (string, int64, error)

func GetKeysInBucket

func GetKeysInBucket(region string, bucket string) ([]string, error)

func GetKeysInBucketPrefix

func GetKeysInBucketPrefix(region, bucket, prefix string) ([]string, error)

func GetPreSignedUrl

func GetPreSignedUrl(s3Url *S3Url, minutes int64) (string, error)

func GetS3CredentialQueryString

func GetS3CredentialQueryString(region, serviceName string) (string, error)

func GetSha256

func GetSha256(data string, secret []byte) []byte

func SubmitJob

func SubmitJob(region, jobDefinition, jobName, jobQueue string, envs []*batch.KeyValuePair,
	arrayProperties *batch.ArrayProperties, dependOn []*batch.JobDependency) (*batch.SubmitJobOutput, error)

func TerminateJob

func TerminateJob(region, jobId, reason string) (*batch.TerminateJobOutput, error)

func UploadS3

func UploadS3(bucketName string, s3Folder string, localFileName string,
	progressCallback func(int64, int64, float32),
	endCallback func(*s3manager.UploadOutput)) (*s3manager.UploadOutput, error)

Types

type AWSCredential

type AWSCredential struct {
	AwsAccessKeyId     string `json:"aws_access_key_id"`
	AwsSecretAccessKey string `json:"aws_secret_access_key"`
}

func GetAwsCredential

func GetAwsCredential(s3Url *S3Url) (*AWSCredential, error)

type CredentialHeaders

type CredentialHeaders struct {
	SessionToken    string
	AccessKeyId     string
	SecretAccessKey string
	Signature       string
	DateStamp       string
}

func GetSignature

func GetSignature(region, serviceName string) (*CredentialHeaders, error)

type S3Url

type S3Url struct {
	Region                  string `json:"region"`
	InputBucket             string `json:"input_bucket"`
	TempBucket              string `json:"temp_bucket"`
	OutputBucket            string `json:"output_bucket"`
	SystemSettingsBucket    string `json:"setting_bucket"`
	Key                     string `json:"key"`
	MediaId                 string `json:"media_id"`
	EncodingProfileForVideo string `json:"encoding_profile_for_video"`
	AudioType               string `json:"audio_type"`
	EncodingProfileForAudio string `json:"encoding_profile_for_audio"`
}

func GetS3UrlFromEnv

func GetS3UrlFromEnv() *S3Url

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL