Documentation ¶
Overview ¶
Package minio @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package minio @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package minio @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package minio @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package minio @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package minio @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package minio @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Index ¶
- func NewClientV1(types enums.CosType, proxy string) (client service.OssService)
- type CfgConfig
- type Minio
- func (c *Minio) BucketInfo() (*model.BucketInfo, error)
- func (c *Minio) GetLocation(moduleName string) string
- func (c *Minio) GetObject(ctx context.Context, moduleName string) (m *model.ObjectsInfo, err error)
- func (c *Minio) GetObjectExists(ctx context.Context, moduleName string) (bool, error)
- func (c *Minio) GetObjectList(ctx context.Context, moduleNames []string) (list []*model.ObjectsInfo, err error)
- func (c *Minio) GetObjectUri(ctx context.Context, moduleName string) (string, error)
- func (c *Minio) GetObjectsInfo(moduleName string, data []byte) (m *model.ObjectsInfo)
- func (c *Minio) PutByObject(ctx context.Context, moduleName string, reader []byte) (err error)
- func (c *Minio) PutByObjectList(ctx context.Context, maps map[string][]byte) (err error)
- func (c *Minio) RemoveByObject(ctx context.Context, moduleName string) error
- func (c *Minio) RemoveByObjectList(ctx context.Context, moduleNames []string) error
- func (c *Minio) ViewMapDbFiles(ctx context.Context) (mp map[string][]byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientV1 ¶
func NewClientV1(types enums.CosType, proxy string) (client service.OssService)
NewClientV1 存储客户端管理 @param types 代理仓库对象存储服务类型(embedfs/leveldb等) @param proxy 代理仓库类型:如maven/golang/docker/npm/python等等 @return service.OssService接口构造,如 minio
Types ¶
type CfgConfig ¶
type CfgConfig struct { Endpoint string `yaml:"endpoint" dc:"minio服务地址"` SecretId string `yaml:"secretId" dc:"服务 ID"` SecretKey string `yaml:"secretKey" dc:"服务 Key"` Bucket string `yaml:"bucket" dc:"对应的桶名称"` Region string `yaml:"region" dc:"存储地区区域"` UseSSL bool `yaml:"useSSL" dc:"服务协议类型,默认不支持ssl"` }
type Minio ¶
type Minio struct {
// contains filtered or unexported fields
}
func (*Minio) BucketInfo ¶
func (c *Minio) BucketInfo() (*model.BucketInfo, error)
func (*Minio) GetLocation ¶
GetLocation 组装并获取存储位置
func (*Minio) GetObjectExists ¶
func (*Minio) GetObjectList ¶
func (*Minio) GetObjectUri ¶
GetObjectUri 获取文件的外链url @param moduleName 参数是 文件模块名称(请求的文件全路径名称)
func (*Minio) GetObjectsInfo ¶
func (c *Minio) GetObjectsInfo(moduleName string, data []byte) (m *model.ObjectsInfo)
GetObjectsInfo 组装数据存储对象