aws_client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type R2Config

type R2Config struct {
	AccountID       string
	AccessKeyID     string
	AccessKeySecret string
	BucketName      string
}

R2Config holds configuration specific to Cloudflare R2

type S3Client

type S3Client interface {
	Upload(ctx context.Context, uploadContainer s3manager.UploadInput) error
	Download(ctx context.Context, bucket, key string) (string, error)
	ListFiles(ctx context.Context, bucket string) ([]string, error)
	ChangeRegion(ctx context.Context, region string)
	Delete(ctx context.Context, bucket, key string) error
}

func NewR2Client

func NewR2Client(config R2Config) (S3Client, error)

NewR2Client creates an S3Client configured for Cloudflare R2

func NewS3Client

func NewS3Client(config *aws.Config) S3Client

Jump to

Keyboard shortcuts

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