s3

package
v0.0.0-rc7 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OriginalFilenameMetadata = "x-amz-meta-original-filename"
)

Variables

View Source
var (
	ErrObjectNotFound = dto2.NewI18nError("object not found", "errors.object_not_found")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	CreateOne(ctx context.Context, file *FileData) *CreateDto
	CreateMany(ctx context.Context, files []*FileData) map[string]*CreateDto
	GetOne(ctx context.Context, objectID string) *GetDto
	GetMany(ctx context.Context, objectIDs []string) map[string]*GetDto
	DeleteOne(ctx context.Context, objectID string) error
	DeleteMany(ctx context.Context, objectIDs []string) map[string]error
}

func NewClient

func NewClient(minio *minio.Client, bucketName string) Client

type CreateDto

type CreateDto struct {
	ObjectID string
	Error    error
}

type FileData

type FileData struct {
	ID           string
	Size         int64
	ContentType  string
	Reader       io.ReadCloser
	UserMetadata map[string]string
}

type GetDto

type GetDto struct {
	Data  *FileData
	Error error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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