feat: 添加oss api
This commit is contained in:
@@ -8,4 +8,8 @@ type Config struct {
|
||||
Sqlite Sqlite `mapstructure:"sqlite" json:"sqlite" yaml:"sqlite"`
|
||||
Redis Redis `mapstructure:"redis" json:"redis" yaml:"redis"`
|
||||
Zap Zap `mapstructure:"zap" json:"zap" yaml:"zap"`
|
||||
|
||||
Minio Minio `mapstructure:"minio" json:"minio" yaml:"minio"`
|
||||
RocketMQConfig RocketMQConfig `mapstructure:"rocket-mq" json:"rocket-mq" yaml:"rocket-mq"`
|
||||
TencentCOS TencentCOS `mapstructure:"tencent-cos" json:"tencent-cos" yaml:"tencent-cos"`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package config
|
||||
|
||||
type Minio struct {
|
||||
Endpoint string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"`
|
||||
AccessKeyId string `mapstructure:"access-key-id" json:"access-key-id" yaml:"access-key-id"`
|
||||
AccessKeySecret string `mapstructure:"access-key-secret" json:"access-key-secret" yaml:"access-key-secret"`
|
||||
BucketName string `mapstructure:"bucket-name" json:"bucket-name" yaml:"bucket-name"`
|
||||
UseSSL bool `mapstructure:"use-ssl" json:"use-ssl" yaml:"use-ssl"`
|
||||
BasePath string `mapstructure:"base-path" json:"base-path" yaml:"base-path"`
|
||||
BucketUrl string `mapstructure:"bucket-url" json:"bucket-url" yaml:"bucket-url"`
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package config
|
||||
|
||||
type TencentCOS struct {
|
||||
Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
|
||||
Region string `mapstructure:"region" json:"region" yaml:"region"`
|
||||
SecretID string `mapstructure:"secret-id" json:"secret-id" yaml:"secret-id"`
|
||||
SecretKey string `mapstructure:"secret-key" json:"secret-key" yaml:"secret-key"`
|
||||
BaseURL string `mapstructure:"base-url" json:"base-url" yaml:"base-url"`
|
||||
PathPrefix string `mapstructure:"path-prefix" json:"path-prefix" yaml:"path-prefix"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package config
|
||||
|
||||
type RocketMQConfig struct {
|
||||
NameSpace string `mapstructure:"name-space" json:"nameSpace" yaml:"name-space"`
|
||||
Endpoint string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"`
|
||||
ConsumerGroup string `mapstructure:"consumer-group" json:"consumerGroup" yaml:"consumer-group"`
|
||||
AccessKey string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"`
|
||||
SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"`
|
||||
Topic string `mapstructure:"topic" json:"topic" yaml:"topic"`
|
||||
EnableSSL bool `mapstructure:"enable-ssl" json:"enableSSL" yaml:"enable-ssl"`
|
||||
LogEnabled bool `mapstructure:"log-enabled" json:"logEnabled" yaml:"log-enabled"`
|
||||
}
|
||||
@@ -5,4 +5,5 @@ type System struct {
|
||||
DbType string `mapstructure:"db-type" json:"db-type" yaml:"db-type"`
|
||||
RouterPrefix string `mapstructure:"router-prefix" json:"router-prefix" yaml:"router-prefix"`
|
||||
EnableCaptcha int `mapstructure:"enable-captcha" json:"enable-captcha" yaml:"enable-captcha"`
|
||||
OssType string `mapstructure:"oss-type" json:"oss-type" yaml:"oss-type"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user