utils

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Utils

type S3Utils interface {
	UploadObject(ctx context.Context, bucket string, key string, file multipart.File, contentType string) error
	GeneratePresignedURLForDownload(ctx context.Context, bucket string, key string, expiration time.Duration) (string, error)
	ListFiles(ctx context.Context, bucket string, prefix string) ([]string, error)
	DeleteFile(ctx context.Context, bucket string, key string) error
	ListFolders(ctx context.Context, bucket string, prefix string) ([]string, error)
	CreateFolder(ctx context.Context, bucket string, folderPath string) error
	ListBuckets(ctx context.Context) ([]string, error)
	ListFilesAndFolders(ctx context.Context, bucket string, prefix string) ([]string, []string, error)
	PutObjectTXTWithContent(ctx context.Context, bucket string, folderpath string, content string) error
	DeleteFolder(ctx context.Context, bucket string, folderPath string) error
	CopyObject(ctx context.Context, sourceBucket, sourcePath, destBucket, destPath string) error
	ListFilesAndFoldersRecursively(ctx context.Context, bucket string, prefix string) ([]string, []string, error)
	DeleteFolderRecursively(ctx context.Context, bucket string, folderPath string) error
}

func NewS3Utils

func NewS3Utils(cfg aws.Config, logger *slog.Logger) S3Utils

Jump to

Keyboard shortcuts

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