aws

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PresignValidDuration = 5 * time.Minute
	S3UriPrefix          = "s3://"
)

Variables

This section is empty.

Functions

func CreateKmsSigner

func CreateKmsSigner(uri string) (signature.Signer, error)

CreateKmsSigner creates a signer instance from a KMS ARN

func GetEncryptionKey

func GetEncryptionKey(secretName string) ([]byte, error)

GetEncryptionKey loads an encryption key from Secrets Manager. In Secrets Manager it is stored base64-encoded, so it gets decoded and returned as binary byte slice.

func S3CreatePresignedDownload

func S3CreatePresignedDownload(uri string) (string, error)

S3CreatePresignedDownload creates a presigned link to an object and returns it as string.

func S3DownloadResource

func S3DownloadResource(uri string) ([]byte, error)

S3DownloadResource downloads an object by its key and returns the contents as byte slice.

func S3UploadArchive

func S3UploadArchive(reader io.ReadSeeker, uri string) error

S3UploadArchive uploads the byte slice of the archive to S3.

Types

type S3Uri

type S3Uri struct {
	Bucket *string
	Key    *string
}

Jump to

Keyboard shortcuts

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