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 struct {
// contains filtered or unexported fields
}
func NewClientWithConfig ¶ added in v1.3.0
func (*Client) Kernel ¶ added in v1.3.0
func (client *Client) Kernel() *storage.FormUploader
type Config ¶
type Config struct {
AccessKey string `mapstructure:"access_key" json:"access_key"`
SecretKey string `mapstructure:"secret_key" json:"secret_key"`
Bucket string `mapstructure:"bucket" json:"bucket"`
// 空间对应机房
Zone string `mapstructure:"zone" json:"zone"`
// 是否使用https域名
UseHTTPS bool `mapstructure:"use_https" json:"use_https"`
// 上传是否使用CDN上传加速
UseCdnDomains bool `mapstructure:"use_cdn_domains" json:"use_cdn_domains"`
// 域名地址,包含http://,通过查看外链可以看到,如:http://image-c4lms-qiniu.whereabouts.icu
Domain string `mapstructure:"domain" json:"domain"`
}
type Option ¶ added in v1.3.0
type Option func(config *Config)
func WithAccessKey ¶ added in v1.3.0
func WithBucket ¶ added in v1.3.0
func WithDomain ¶ added in v1.3.0
func WithSecretKey ¶ added in v1.3.0
func WithUseCdnDomains ¶ added in v1.3.0
func WithUseHTTPS ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.