minio

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BucketFileUpload = "file-upload"
	DirFileExpire    = "file-expire"
	DirFileNotExpire = "file-not-expire"
	StoreExpireDays  = 1
)
View Source
var (
	BucketCustom = "custom-upload"
)

Functions

func Custom

func Custom() *client

func DeleteFileCommon

func DeleteFileCommon(ctx context.Context, fileName string, isExpired bool) error

func DeleteFileCommonWithExpire

func DeleteFileCommonWithExpire(ctx context.Context, fileName string) error

func DeleteFileCommonWithNotExpire

func DeleteFileCommonWithNotExpire(ctx context.Context, fileName string) error

func DownloadFileToMemory added in v0.1.5

func DownloadFileToMemory(ctx context.Context, minioFilePath string) ([]byte, error)

func FileUpload

func FileUpload() *client

func GetUploadFileCommon

func GetUploadFileCommon(ctx context.Context, fileName string, isExpired bool) (string, error)

func GetUploadFileWithExpire

func GetUploadFileWithExpire(ctx context.Context, fileName string) (string, error)

func GetUploadFileWithNotExpire

func GetUploadFileWithNotExpire(ctx context.Context, fileName string) (string, error)

func InitAssistant

func InitAssistant(ctx context.Context, cfg Config, initBucketName string) error

func InitCustom

func InitCustom(ctx context.Context, cfg Config) error

func InitFileUpload

func InitFileUpload(ctx context.Context, cfg Config) error

func InitKnowledge

func InitKnowledge(ctx context.Context, cfg Config, initBucketName string, public bool) error

func InitSafety added in v0.1.5

func InitSafety(ctx context.Context, cfg Config, initBucketName string) error

func Knowledge

func Knowledge() *client

func Safety added in v0.1.5

func Safety() *client

func SplitFilePath added in v0.1.5

func SplitFilePath(filePath string) (bucketName string, objectName string, fileName string)

func UploadFile

func UploadFile(ctx context.Context, bucketName string, dir string, fileName string, reader io.Reader, objectSize int64) (string, int64, error)

func UploadFileCommon

func UploadFileCommon(ctx context.Context, reader io.Reader, fileType string, objectSize int64, isExpired bool) (string, int64, error)

func UploadFileCommonWithExpire

func UploadFileCommonWithExpire(ctx context.Context, reader io.Reader, fileType string, objectSize int64) (string, int64, error)

func UploadFileCommonWithNotExpire

func UploadFileCommonWithNotExpire(ctx context.Context, reader io.Reader, fileType string, objectSize int64) (string, int64, error)

Types

type Config

type Config struct {
	Endpoint string `json:"endpoint" mapstructure:"endpoint"`
	User     string `json:"user" mapstructure:"user"`
	Password string `json:"password" mapstructure:"password"`
}

Jump to

Keyboard shortcuts

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