s3

package
v0.0.0-...-239d3cc Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileReader

type FileReader struct {
	// contains filtered or unexported fields
}

func MakeFileReader

func MakeFileReader() *FileReader

func (*FileReader) ReadFile

func (reader *FileReader) ReadFile(ctx context.Context, s3Bucket string, s3Key string) (string, error)

type Presigner

type Presigner struct {
	PresignClient *s3.PresignClient
}

Presigner encapsulates the Amazon Simple Storage Service (Amazon S3) presign actions used in the examples. It contains PresignClient, a client that is used to presign requests to Amazon S3. Presigned requests contain temporary credentials and can be made from any HTTP client.

func MakePresigner

func MakePresigner() *Presigner

func (Presigner) DeleteObject

func (presigner Presigner) DeleteObject(bucketName string, objectKey string) (*v4.PresignedHTTPRequest, error)

DeleteObject makes a presigned request that can be used to delete an object from a bucket.

func (Presigner) GetObject

func (presigner Presigner) GetObject(
	bucketName string, objectKey string, lifetimeSecs int64) (*v4.PresignedHTTPRequest, error)

GetObject makes a presigned request that can be used to get an object from a bucket. The presigned request is valid for the specified number of seconds.

func (Presigner) PutObject

func (presigner Presigner) PutObject(
	bucketName string, objectKey string, lifetimeSecs int64) (*v4.PresignedHTTPRequest, error)

PutObject makes a presigned request that can be used to put an object in a bucket. The presigned request is valid for the specified number of seconds.

Jump to

Keyboard shortcuts

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