Documentation ¶
Overview ¶
Package qiniu @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Package qiniu @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Package qiniu @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Package qiniu @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Package qiniu @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Package qiniu @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Package qiniu @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Index ¶
- func NewClientV1(types enums.CosType, proxy string) (client service.OssService)
- type CfgConfig
- type Qiniu
- func (c *Qiniu) BucketInfo() (*model.BucketInfo, error)
- func (c *Qiniu) GetLocation(moduleName string) string
- func (c *Qiniu) GetObject(ctx context.Context, moduleName string) (m *model.ObjectsInfo, err error)
- func (c *Qiniu) GetObjectExists(ctx context.Context, moduleName string) (bool, error)
- func (c *Qiniu) GetObjectList(ctx context.Context, moduleNames []string) (list []*model.ObjectsInfo, err error)
- func (c *Qiniu) GetObjectUri(ctx context.Context, moduleName string) (string, error)
- func (c *Qiniu) GetObjectsInfo(moduleName string, data []byte) (m *model.ObjectsInfo)
- func (c *Qiniu) PutByObject(ctx context.Context, moduleName string, reader []byte) (err error)
- func (c *Qiniu) PutByObjectList(ctx context.Context, maps map[string][]byte) (err error)
- func (c *Qiniu) RemoveByObject(ctx context.Context, moduleName string) error
- func (c *Qiniu) RemoveByObjectList(ctx context.Context, moduleNames []string) error
- func (c *Qiniu) 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 存储到本地文件夹客户端管理
Types ¶
type CfgConfig ¶
type CfgConfig struct { Endpoint string `yaml:"endpoint" dc:"服务地址" tg:"rxx2c8o5q.hn-bkt.clouddn.com"` AccessKey string `yaml:"accessKey" dc:"服务 ID" tg:"QINIU_ACCESS_KEY"` SecretKey string `yaml:"secretKey" dc:"服务 Key" tg:"QINIU_SECRET_KEY"` Bucket string `yaml:"bucket" dc:"对应的桶名称"` UseSSL bool `yaml:"useSSL" dc:"服务协议类型,默认不支持ssl"` }
type Qiniu ¶
type Qiniu struct {
// contains filtered or unexported fields
}
func (*Qiniu) BucketInfo ¶
func (c *Qiniu) BucketInfo() (*model.BucketInfo, error)
BucketInfo 获取组件配置的Bucket快信息
func (*Qiniu) GetLocation ¶
GetLocation 组装并获取存储位置 @param moduleName 参数是 文件模块名称(请求的文件全路径名称)
func (*Qiniu) GetObjectExists ¶
GetObjectExists 获取文件是否存在 @param moduleName 参数是 文件模块名称(请求的文件全路径名称)
func (*Qiniu) GetObjectList ¶
func (c *Qiniu) GetObjectList(ctx context.Context, moduleNames []string) (list []*model.ObjectsInfo, err error)
GetObjectList 获取对象存储服务下所有件夹列表 @param moduleName 参数是 文件模块名称(请求的文件全路径名称)
func (*Qiniu) GetObjectUri ¶
GetObjectUri 获取文件的外链url @param moduleName 参数是 文件模块名称(请求的文件全路径名称)
func (*Qiniu) GetObjectsInfo ¶
func (c *Qiniu) GetObjectsInfo(moduleName string, data []byte) (m *model.ObjectsInfo)
GetObjectsInfo 组装数据存储对象
func (*Qiniu) PutByObject ¶
PutByObject 上传对象 @param moduleName 参数是 文件模块名称(请求的文件全路径名称) @param reader 参数是 文件字节数据
func (*Qiniu) PutByObjectList ¶
PutByObjectList 上传对象 @param maps key 参数是 文件模块名称(请求的文件全路径名称),value 参数是 文件字节数据
func (*Qiniu) RemoveByObject ¶
RemoveByObject 删除对象 @param moduleName 参数是 文件模块名称(请求的文件全路径名称)
func (*Qiniu) RemoveByObjectList ¶
RemoveByObjectList 删除对象集合 @param moduleName 参数是 文件模块名称(请求的文件全路径名称)