Documentation
¶
Index ¶
- type Config
- type S3Downloader
- func (s *S3Downloader) Close() error
- func (s *S3Downloader) Download(ctx context.Context, url string, writer io.Writer) error
- func (s *S3Downloader) DownloadRange(ctx context.Context, url string, writer io.Writer, start, end int64) error
- func (s *S3Downloader) GetObjectMetadata(ctx context.Context, url string) (map[string]interface{}, error)
- func (s *S3Downloader) GetObjectSize(ctx context.Context, url string) (int64, error)
- func (s *S3Downloader) ListObjects(ctx context.Context, bucket, prefix string, maxKeys int32) ([]string, error)
- func (s *S3Downloader) ObjectExists(ctx context.Context, url string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Region string
AccessKeyID string
SecretAccessKey string
SessionToken string
Endpoint string // For S3-compatible services
UsePathStyle bool // For S3-compatible services
DisableSSL bool
Profile string // AWS profile name
}
Config holds S3 connection configuration
type S3Downloader ¶
type S3Downloader struct {
// contains filtered or unexported fields
}
S3Downloader handles AWS S3 protocol downloads
func NewS3Downloader ¶
func NewS3Downloader(cfg *Config) (*S3Downloader, error)
NewS3Downloader creates a new S3 downloader instance
func (*S3Downloader) Close ¶
func (s *S3Downloader) Close() error
Close closes the S3 downloader (no-op for S3 client)
func (*S3Downloader) Download ¶
Download downloads an object from S3 and writes it to the provided writer
func (*S3Downloader) DownloadRange ¶
func (s *S3Downloader) DownloadRange(ctx context.Context, url string, writer io.Writer, start, end int64) error
DownloadRange downloads a specific range of bytes from an S3 object
func (*S3Downloader) GetObjectMetadata ¶
func (s *S3Downloader) GetObjectMetadata(ctx context.Context, url string) (map[string]interface{}, error)
GetObjectMetadata returns metadata for an S3 object
func (*S3Downloader) GetObjectSize ¶
GetObjectSize returns the size of an S3 object
func (*S3Downloader) ListObjects ¶
func (s *S3Downloader) ListObjects(ctx context.Context, bucket, prefix string, maxKeys int32) ([]string, error)
ListObjects lists objects in an S3 bucket with optional prefix
func (*S3Downloader) ObjectExists ¶
ObjectExists checks if an object exists in S3
Click to show internal directories.
Click to hide internal directories.