minio

package
v0.0.0-...-3a3bdc2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Client *minio.Client
)

Functions

func DelObject

func DelObject(ctx context.Context, bucketName, fileName string) error

DelObject delete file in bucket

func GetObjURL

func GetObjURL(ctx context.Context, bucketName, filename string) (u *url.URL, err error)

GetObjURL get the original link of the file in minio

func Init

func Init()

func MakeBucket

func MakeBucket(ctx context.Context, bucketName string) error

MakeBucket create a bucket with a specified name

func PutToBucket

func PutToBucket(ctx context.Context, bucketName string, file *multipart.FileHeader) (info minio.UploadInfo, err error)

PutToBucket put the file into the bucket by *multipart.FileHeader

func PutToBucketByBuf

func PutToBucketByBuf(ctx context.Context, bucketName, filename string, buf *bytes.Buffer) (info minio.UploadInfo, err error)

PutToBucketByBuf put the file into the bucket by *bytes.Buffer

func PutToBucketByFilePath

func PutToBucketByFilePath(ctx context.Context, bucketName, filename, filepath string) (info minio.UploadInfo, err error)

PutToBucketByFilePath put the file into the bucket by filepath

Types

This section is empty.

Jump to

Keyboard shortcuts

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