qiniu

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZoneHuanan  = "huanan"
	ZoneHuadong = "huadong"
	ZoneHuabei  = "huabei"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Upload(file io.Reader, filename string) (string, error)
	Delete(filename string) error
}

func NewClient

func NewClient(config Config) Client

type Config

type Config struct {
	AccessKey string `json:"access_key"`
	SecretKey string `json:"secret_key"`
	Bucket    string `json:"bucket"`
	// 空间对应机房
	Zone string `json:"zone"`
	// 是否使用https域名
	UseHTTPS bool `json:"use_https"`
	// 上传是否使用CDN上传加速
	UseCdnDomains bool `json:"use_cdn_domains"`
	// 域名地址,包含http://,通过查看外链可以看到,如:http://image-c4lms-qiniu.whereabouts.icu
	Domain string `json:"domain"`
}

Jump to

Keyboard shortcuts

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