tencent

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 6 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 {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(options ...Option) *Client

func NewClientWithConfig added in v1.3.0

func NewClientWithConfig(config Config) *Client

func (*Client) Delete

func (client *Client) Delete(ctx context.Context, key string) error

func (*Client) DeleteMulti

func (client *Client) DeleteMulti(ctx context.Context, keys ...string) ([]string, error)

func (*Client) Kernel added in v1.3.0

func (client *Client) Kernel() *cos.Client

func (*Client) Upload

func (client *Client) Upload(ctx context.Context, file io.Reader, key string) (string, error)

type Config

type Config struct {
	SecretID  string `json:"secret_id"`
	SecretKey string `json:"secret_key"`
	BucketURL string `json:"bucket_url"`
}

type Option added in v1.3.0

type Option func(config *Config)

func WithBucketURL added in v1.3.0

func WithBucketURL(bucketURL string) Option

func WithSecretID added in v1.3.0

func WithSecretID(secretID string) Option

func WithSecretKey added in v1.3.0

func WithSecretKey(secretKey string) Option

Jump to

Keyboard shortcuts

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