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 ¶
func (*Client) Kernel ¶
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 ¶
type Option func(config *Config)
func WithAccessKey ¶
func WithBucket ¶
func WithDomain ¶
func WithSecretKey ¶
func WithUseCdnDomains ¶
func WithUseHTTPS ¶
Click to show internal directories.
Click to hide internal directories.