s3

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Config added in v1.3.4

type S3Config struct {
	Bucket    string
	Region    string
	KeyPrefix string
}

type S3Storage

type S3Storage struct {
	Client    *s3.Client
	Bucket    string
	KeyPrefix string
	Region    string
}

func New added in v1.3.4

func New(config ...S3Config) (*S3Storage, error)

func (*S3Storage) DeleteFile added in v1.3.4

func (s *S3Storage) DeleteFile(ctx context.Context, s3Key string) error

DeleteFile deletes a file from S3

func (*S3Storage) Download

func (s *S3Storage) Download(ctx context.Context, key string) ([]byte, error)

func (*S3Storage) FileExists added in v1.3.4

func (s *S3Storage) FileExists(ctx context.Context, s3Key string) (bool, error)

FileExists checks if a file exists in S3

func (*S3Storage) GeneratePresignedURL added in v1.3.4

func (s *S3Storage) GeneratePresignedURL(ctx context.Context, s3Key string, expirationMinutes int) (string, error)

GeneratePresignedURL generates a presigned URL for file access

func (*S3Storage) Upload

func (s *S3Storage) Upload(ctx context.Context, file []byte, key string, options ...types.UploadOptions) (string, error)

Jump to

Keyboard shortcuts

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