kk_minio

package
v0.0.0-...-537f5a5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MinioClient *minio.Client

Functions

func BatchOperator

func BatchOperator(opObjects []OPObject, operator func(opObject OPObject) (err error)) (err error)

func GetFileStream

func GetFileStream(stage *kk_stage.Stage, opObject OPObject) (io.Reader, error)

func RemoveIncompleteObject

func RemoveIncompleteObject(opObject OPObject) (err error)

func RemoveObject

func RemoveObject(opObject OPObject) (err error)

func RemoveObjectAndIncompleteObject

func RemoveObjectAndIncompleteObject(opObject OPObject) (err error)

func StatObject

func StatObject(opObject OPObject) (err error, info *minio.ObjectInfo)

StatObject verifies if object exists, you have permission to access it and returns information about the object.

func UploadFile

func UploadFile(opObject OPObject) (err error)

UploadFile localFilePath 要上传的本地的文件路径 objectName 文件上传的目的路径(路径+文件名)

func UploadFileStream

func UploadFileStream(opObject OPObject) (err error)

UploadFileStream objectName 文件上传的目的路径(路径+文件名)

Types

type ConfigMinIO

type ConfigMinIO struct {
	Endpoint string
	Id       string
	Secret   string
	UseSSL   bool
}

func (*ConfigMinIO) Check

func (c *ConfigMinIO) Check()

func (*ConfigMinIO) Close

func (c *ConfigMinIO) Close()

func (*ConfigMinIO) Init

func (c *ConfigMinIO) Init(args *kk_config_interface.InitArgs)

type OPObject

type OPObject struct {
	BucketName    string
	ObjectName    string
	LocalFilePath string
	Reader        io.Reader
	ObjectSize    int64
	ContentType   string
}

Jump to

Keyboard shortcuts

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