s3storage

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package s3storage provides AWS S3 storage implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Storage

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

S3Storage implements storage interface for AWS S3.

func NewS3Storage

func NewS3Storage(ctx context.Context, region string, endpoint string, bucket string, path string) (*S3Storage, error)

NewS3Storage creates a new S3Storage. The context is used for AWS SDK configuration loading and may respect timeout/cancellation.

func (*S3Storage) CreateBucket

func (s *S3Storage) CreateBucket(ctx context.Context) error

CreateBucket creates the bucket.

func (*S3Storage) GetFile added in v1.16.0

func (s *S3Storage) GetFile(ctx context.Context, key string, localPath string) (err error)

GetFile downloads a file from S3 and saves it to the specified local path.

func (*S3Storage) SaveFile

func (s *S3Storage) SaveFile(ctx context.Context, archiveFilePath string, dstFilename string) (err error)

SaveFile saves the file in s3.

Jump to

Keyboard shortcuts

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