tencent

package
v0.0.0-...-9bd63dd Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client *cos.Client
	Config *Config
}

func New

func New(c *Config) (*Client, error)

func (*Client) DeleteObject

func (c *Client) DeleteObject(objectKey string) error

func (*Client) DeleteObjects

func (c *Client) DeleteObjects(objectKeys []string) error

func (*Client) GetObject

func (c *Client) GetObject(objectKey string) (io.ReadCloser, error)

func (*Client) GetObjectToFile

func (c *Client) GetObjectToFile(objectKey string, filePath string) error

func (*Client) GetObjectURL

func (c *Client) GetObjectURL(objectKey string, expires int64) (string, error)

func (*Client) IsObjectExist

func (c *Client) IsObjectExist(objectKey string) (bool, error)

func (*Client) ListObjects

func (c *Client) ListObjects(prefix string) ([]*gooss.Object, error)

func (*Client) PutObject

func (c *Client) PutObject(objectKey string, filePath string) (err error)

type Config

type Config struct {
	AccessKeyId     string // 替换为用户的 SecretId,请登录访问管理控制台进行查看和管理,https://console.cloud.tencent.com/cam/capi
	AccessKeySecret string // 替换为用户的 SecretKey,请登录访问管理控制台进行查看和管理,https://console.cloud.tencent.com/cam/capi
	SessionToken    string
	Region          string
	Bucket          string
}

Jump to

Keyboard shortcuts

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