object

package
v0.0.0-...-d6b644b Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client 封装的 client

func New

func New(config *Config) *Client

New 新建 cos 客户端

func (*Client) COS

func (c *Client) COS() *cos.Client

COS return the origin cos client

func (*Client) Delete

func (c *Client) Delete(key string) error

Delete 删除文件

func (*Client) Get

func (c *Client) Get(key string) ([]byte, error)

Get 获取 cos 对象

func (*Client) Put

func (c *Client) Put(key string, f io.Reader) error

Put 写文件

type Config

type Config struct {
	AppID     string
	Region    string
	Bucket    string
	SecretID  string
	SecretKey string
}

Config 腾讯云 COS 配置

Jump to

Keyboard shortcuts

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