minio

package
v0.0.0-...-13a9a9d Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Client *minio.Client
)

Functions

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)

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