s3

package
v1.87.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 13 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 {
	Endpoint        string
	AccessKeyID     string
	SecretAccessKey string
	SSL             bool
	Location        string
	BucketPrefix    string
	MultiDelete     bool
}

func (*Config) NewStorage

func (c *Config) NewStorage() (static.Storage, error)

type Minio

type Minio struct {
	Client       *minio.Client
	Location     string
	BucketPrefix string
	MultiDelete  bool
}

func (*Minio) CreateBucket

func (m *Minio) CreateBucket(ctx context.Context, name, location string) error

func (*Minio) GetObject

func (m *Minio) GetObject(ctx context.Context, bucketName, objectName string) (io.Reader, func() (*domain.AssetInfo, error), error)

func (*Minio) GetObjectInfo

func (m *Minio) GetObjectInfo(ctx context.Context, bucketName, objectName string) (*domain.AssetInfo, error)

func (*Minio) GetObjectPresignedURL

func (m *Minio) GetObjectPresignedURL(ctx context.Context, bucketName, objectName string, expiration time.Duration) (*url.URL, error)

func (*Minio) ListBuckets

func (m *Minio) ListBuckets(ctx context.Context) ([]*domain.BucketInfo, error)

func (*Minio) ListObjectInfos

func (m *Minio) ListObjectInfos(ctx context.Context, bucketName, prefix string, recursive bool) ([]*domain.AssetInfo, error)

func (*Minio) PutObject

func (m *Minio) PutObject(ctx context.Context, bucketName, objectName, contentType string, object io.Reader, objectSize int64, createBucketIfNotExisting bool) (*domain.AssetInfo, error)

func (*Minio) RemoveBucket

func (m *Minio) RemoveBucket(ctx context.Context, name string) error

func (*Minio) RemoveObject

func (m *Minio) RemoveObject(ctx context.Context, bucketName, objectName string) error

func (*Minio) RemoveObjects

func (m *Minio) RemoveObjects(ctx context.Context, bucketName, path string, recursive bool) error

Jump to

Keyboard shortcuts

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