Documentation ¶
Overview ¶
Package minio @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package minio @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package minio @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package minio @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package minio @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Index ¶
- type OssMinio
- func (c *OssMinio) GetBucketExists(ctx context.Context, minioClient *minio.Client, bucketName string) (bool, error)
- func (c *OssMinio) GetObject(ctx context.Context, minioClient *minio.Client, bucketName, objectName string) (reader io.Reader, err error)
- func (c *OssMinio) GetObjectByInfo(ctx context.Context, minioClient *minio.Client, bucketName, objectName string) (u *em.UploadInfo, err error)
- func (c *OssMinio) MinioClient() (*minio.Client, error)
- func (c *OssMinio) PutObject(ctx context.Context, minioClient *minio.Client, bucketName, objectName string, ...) (info minio.UploadInfo, err error)
- func (c *OssMinio) PutObjectByInfo(ctx context.Context, minioClient *minio.Client, bucketName, objectName string, ...) (info *em.UploadInfo, err error)
- func (c *OssMinio) RemoveObject(ctx context.Context, minioClient *minio.Client, bucketName, objectName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OssMinio ¶
type OssMinio struct{}
func (*OssMinio) GetBucketExists ¶
func (c *OssMinio) GetBucketExists(ctx context.Context, minioClient *minio.Client, bucketName string) (bool, error)
GetBucketExists 判断 桶是否存在
func (*OssMinio) GetObject ¶
func (c *OssMinio) GetObject(ctx context.Context, minioClient *minio.Client, bucketName, objectName string) (reader io.Reader, err error)
GetObject 获取返回文件流与error 第一个参数是桶名,第二个参数是对象名,第三个参数是额外GET请求参数
func (*OssMinio) GetObjectByInfo ¶
func (c *OssMinio) GetObjectByInfo(ctx context.Context, minioClient *minio.Client, bucketName, objectName string) (u *em.UploadInfo, err error)
GetObjectByInfo 获取返回文件流与error 第一个参数是桶名,第二个参数是对象名,第三个参数是额外GET请求参数
func (*OssMinio) MinioClient ¶
MinioClient 初始化minio client
func (*OssMinio) PutObject ¶
func (c *OssMinio) PutObject(ctx context.Context, minioClient *minio.Client, bucketName, objectName string, data []byte) (info minio.UploadInfo, err error)
PutObject 上传对象 @param minioClient minio链接对象 @param objectName 文件名称 @param bucketName 桶名称 @param reader 文件byte信息
func (*OssMinio) PutObjectByInfo ¶
func (c *OssMinio) PutObjectByInfo(ctx context.Context, minioClient *minio.Client, bucketName, objectName string, data []byte) (info *em.UploadInfo, err error)
PutObjectByInfo 上传对象 @param minioClient minio链接对象 @param objectName 文件名称 @param bucketName 桶名称 @param reader 文件byte信息