minio

package
v0.0.0-...-22e1697 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AccessKeyID     string
	SecretAccessKey string
	Endpoint        string
	Region          string
	BaseDirectory   string
	Bucket          string
	HttpClient      *http.Client
}

type MinioStorage

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

func NewMinioStorage

func NewMinioStorage(config Config) (*MinioStorage, error)

func (*MinioStorage) BasePath

func (storage *MinioStorage) BasePath() string

func (*MinioStorage) CopyObject

func (storage *MinioStorage) CopyObject(ctx context.Context, from string, to string) error

func (*MinioStorage) DeleteObject

func (storage *MinioStorage) DeleteObject(ctx context.Context, key string) error

func (*MinioStorage) DeleteObjectsWithPrefix

func (storage *MinioStorage) DeleteObjectsWithPrefix(ctx context.Context, prefix string) (err error)

func (*MinioStorage) GetObject

func (storage *MinioStorage) GetObject(ctx context.Context, key string) (io.ReadCloser, error)

func (*MinioStorage) GetObjectSize

func (storage *MinioStorage) GetObjectSize(ctx context.Context, key string) (int64, error)

func (*MinioStorage) PutObject

func (storage *MinioStorage) PutObject(ctx context.Context, key string, contentType string, size int64, object io.Reader) error

Jump to

Keyboard shortcuts

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