tencent

package
v0.0.0-...-a2093d6 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: LGPL-2.1 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

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

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 `mapstructure:"secret_id" json:"secret_id"`
	SecretKey string `mapstructure:"secret_key" json:"secret_key"`
	BucketURL string `mapstructure:"bucket_url" json:"bucket_url"`
}

type Option

type Option func(config *Config)

func WithBucketURL

func WithBucketURL(bucketURL string) Option

func WithSecretID

func WithSecretID(secretID string) Option

func WithSecretKey

func WithSecretKey(secretKey string) Option

Jump to

Keyboard shortcuts

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