s3

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(cfg *config.Config) *Client

NewClient creates a new Client with the provided AWS configuration.

func (*Client) DownloadAndUnzip

func (s *Client) DownloadAndUnzip(ctx context.Context, input *DownloadAndUnzipInput) error

DownloadAndUnzip downloads a file from S3 and unzips it to the specified directory.

func (*Client) DownloadFile added in v0.0.12

func (s *Client) DownloadFile(ctx context.Context, input *DownloadFileInput) error

DownloadFile downloads the remote file from S3 and overwrites or creates the local file.

func (*Client) SyncDirectory

func (s *Client) SyncDirectory(ctx context.Context, input *SyncDirectoryInput) error

SyncDirectory synchronizes files from an S3 bucket to a local directory.

type DownloadAndUnzipInput

type DownloadAndUnzipInput struct {
	Bucket  *string // S3 bucket name
	Key     *string // S3 object key
	Version *string // Optional S3 object version
	DestDir *string // Destination directory for unzipping
}

DownloadAndUnzipInput defines the input parameters for the DownloadAndUnzip method.

type DownloadFileInput added in v0.0.15

type DownloadFileInput struct {
	Bucket    *string // S3 bucket name
	Key       *string // S3 object key (e.g., "requirements.txt")
	LocalPath *string // Local file path to overwrite (e.g., "requirements.txt")
	Version   *string // Optional S3 object version
}

DownloadFileInput defines the input parameters for the DownloadFile method.

type SyncDirectoryInput

type SyncDirectoryInput struct {
	Bucket   *string // S3 bucket name
	Prefix   *string // S3 prefix for the directory
	LocalDir *string // Local directory to sync files to
}

SyncDirectoryInput defines the input parameters for the SyncDirectory method.

Jump to

Keyboard shortcuts

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