oss.go 1.2 KB

123456789101112131415161718192021222324
  1. package config
  2. type Local struct {
  3. Path string `mapstructure:"path" json:"path" yaml:"path" `
  4. }
  5. type Qiniu struct {
  6. Zone string `mapstructure:"zone" json:"zone" yaml:"zone"`
  7. Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
  8. ImgPath string `mapstructure:"img-path" json:"imgPath" yaml:"img-path"`
  9. UseHTTPS bool `mapstructure:"use-https" json:"useHttps" yaml:"use-https"`
  10. AccessKey string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"`
  11. SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"`
  12. UseCdnDomains bool `mapstructure:"use-cdn-domains" json:"useCdnDomains" yaml:"use-cdn-domains"`
  13. }
  14. type TencentCOS struct {
  15. Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
  16. Region string `mapstructure:"region" json:"region" yaml:"region"`
  17. SecretID string `mapstructure:"secret-id" json:"secretID" yaml:"secret-id"`
  18. SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"`
  19. BaseURL string `mapstructure:"base-url" json:"baseURL" yaml:"base-url"`
  20. PathPrefix string `mapstructure:"path-prefix" json:"pathPrefix" yaml:"path-prefix"`
  21. }