tencent

package
v0.0.0-...-52e4a05 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package tencent @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package tencent @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package tencent @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package tencent @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package tencent @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Index

Constants

This section is empty.

Variables

View Source
var (
	Request = &Tencent{}
)

Functions

func NewClientV1

func NewClientV1(types marshal.CosType, position string) (client link.ClientV1Interface)

NewClientV1 缓存到tencent Cos客户端管理

func OnConfig

func OnConfig(str string)

OnConfig 初始化配置参数信息到内存

Types

type Tencent

type Tencent struct {
	CosType marshal.CosType `dc:"代理仓库缓存类型"`

	Bucket    string `yaml:"bucket"   dc:"对应的桶名称"`
	Endpoint  string `yaml:"endpoint" dc:"服务地址" tg:"https://<bucket>.cos.<region>.myqcloud.com"`
	SecretId  string `yaml:"secretId" dc:"服务 ID" tg:"COS_SECRETID"`
	SecretKey string `yaml:"secretKey" dc:"服务 Key" tg:"COS_SECRETKEY"`
	Region    string `yaml:"region" dc:"存储地区区域" tg:"guangzhou"`
	// contains filtered or unexported fields
}

func (*Tencent) BucketInfo

func (c *Tencent) BucketInfo(ctx context.Context) (*marshal.BucketInfo, error)

func (*Tencent) GetData

func (c *Tencent) GetData(moduleName string, data []byte) (m *marshal.ObjectsInfo)

GetData 组装数据存储对象

func (*Tencent) GetLocation

func (c *Tencent) GetLocation(moduleName string) string

GetLocation 组装并获取存储位置

func (*Tencent) GetObject

func (c *Tencent) GetObject(ctx context.Context, moduleName string) (m *marshal.ObjectsInfo, err error)

func (*Tencent) GetObjectExists

func (c *Tencent) GetObjectExists(ctx context.Context, moduleName string) (bool, error)

func (*Tencent) GetObjectList

func (c *Tencent) GetObjectList(ctx context.Context, moduleNames []string) (list []*marshal.ObjectsInfo, err error)

func (*Tencent) GetObjectUrl

func (c *Tencent) GetObjectUrl(ctx context.Context, moduleName string) (string, error)

func (*Tencent) PutByObject

func (c *Tencent) PutByObject(ctx context.Context, moduleName string, reader []byte) (err error)

func (*Tencent) PutByObjectList

func (c *Tencent) PutByObjectList(ctx context.Context, maps map[string][]byte) (err error)

func (*Tencent) RemoveByObject

func (c *Tencent) RemoveByObject(ctx context.Context, moduleName string) error

func (*Tencent) RemoveByObjectList

func (c *Tencent) RemoveByObjectList(ctx context.Context, moduleNames []string) error

Jump to

Keyboard shortcuts

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