minio

package
v0.0.0-...-a85bfaf Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitStore

func InitStore() error

Types

type MinioService

type MinioService interface {
	// GetFile return file bytes (read from buffer)
	GetFile(ctx context.Context, bucket, path string) ([]byte, error)
	// GetObject return object as io.Reader
	GetObject(ctx context.Context, bucket, path string) (*minio.Object, error)
	PutFile(ctx context.Context, bucket, path string, data []byte, opts minio.PutObjectOptions) (info minio.UploadInfo, err error)
	CreateBucket(ctx context.Context, name string, opts minio.MakeBucketOptions) error
	BucketExists(ctx context.Context, name string) bool
	RemoveFile(ctx context.Context, bucket, path string, opts minio.RemoveObjectOptions) error
	GetFileURL(ctx context.Context, bucket, path string) string
}

func GetStore

func GetStore() MinioService

func NewService

func NewService(addr, accessKey, secretKey string, useSSL bool) (MinioService, error)

Jump to

Keyboard shortcuts

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