qiniu

package
v0.0.0-...-544bbf9 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 10 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 {
	Config        *Config
	StorageCfg    storage.Config
	Mac           *qbox.Mac
	BucketManager *storage.BucketManager
}

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) GetBucket

func (c Client) GetBucket() string

func (Client) GetEndpoint

func (c Client) GetEndpoint() string

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) (url string, err 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
	Endpoint        string
	PrivateURL      bool
}

Jump to

Keyboard shortcuts

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