package minio

import "git.sr.ht/~pingoo/stdx/storage/minio"

Index

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

Source Files

minio.go

Version
v0.0.0-20240218134121-094174641f6e (latest)
Published
Feb 18, 2024
Platform
linux/amd64
Imports
7 packages
Last checked
4 months ago

Tools for package owners.