storage

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectMinio

func ConnectMinio(cfg *config.Env) (*minio.Client, error)

Types

type Storage

type Storage struct {
	MinioClient *minio.Client
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(cfg *config.Env, minioClient *minio.Client) *Storage

func (*Storage) BucketExists

func (pkg *Storage) BucketExists(bucketName string) (bool, error)

func (*Storage) Close

func (pkg *Storage) Close() error

func (*Storage) CopyObject

func (pkg *Storage) CopyObject(srcBucket, srcObject, destBucket, destObject string) error

func (*Storage) CreateBucket

func (pkg *Storage) CreateBucket(bucketName string) error

func (*Storage) DeleteObject

func (pkg *Storage) DeleteObject(bucketName, objectName string) error

func (*Storage) Download

func (pkg *Storage) Download(bucketName, objectName, filePath string) error

func (*Storage) GeneratePresignedPutURL

func (pkg *Storage) GeneratePresignedPutURL(bucketName, objectName string, expiry time.Duration) (string, error)

func (*Storage) GeneratePresignedURL

func (pkg *Storage) GeneratePresignedURL(bucketName, objectName string, expiry time.Duration) (string, error)

func (*Storage) GetBucketPolicy

func (pkg *Storage) GetBucketPolicy(bucketName string) (string, error)

func (*Storage) GetObjectInfo

func (pkg *Storage) GetObjectInfo(bucketName, objectName string) (minio.ObjectInfo, error)

func (*Storage) ListObjects

func (pkg *Storage) ListObjects(bucketName, prefix string, recursive bool) <-chan minio.ObjectInfo

func (*Storage) RemoveBucket

func (pkg *Storage) RemoveBucket(bucketName string) error

func (*Storage) SafeDownload

func (pkg *Storage) SafeDownload(bucketName, objectName, filePath string) error

func (*Storage) SetBucketPolicy

func (pkg *Storage) SetBucketPolicy(bucketName, policy string) error

func (*Storage) Upload

func (pkg *Storage) Upload(bucketName, objectPath, objectName string) (string, error)

func (*Storage) UploadFromStream

func (pkg *Storage) UploadFromStream(bucketName, objectName string, reader io.Reader, size int64) error

Jump to

Keyboard shortcuts

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