Skip to content

Commit c5439ba

Browse files
author
奇淼(piexlmax
authored
Merge pull request #986 from flipped-aurora/fix-config
Fix config
2 parents 68576f4 + 31f8876 commit c5439ba

File tree

22 files changed

+182
-182
lines changed

22 files changed

+182
-182
lines changed

server/config/auto_code.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
package config
22

33
type Autocode struct {
4-
TransferRestart bool `mapstructure:"transfer-restart" json:"transferRestart" yaml:"transfer-restart"`
4+
TransferRestart bool `mapstructure:"transfer-restart" json:"transfer-restart" yaml:"transfer-restart"`
55
Root string `mapstructure:"root" json:"root" yaml:"root"`
66
Server string `mapstructure:"server" json:"server" yaml:"server"`
7-
SApi string `mapstructure:"server-api" json:"serverApi" yaml:"server-api"`
8-
SInitialize string `mapstructure:"server-initialize" json:"serverInitialize" yaml:"server-initialize"`
9-
SModel string `mapstructure:"server-model" json:"serverModel" yaml:"server-model"`
10-
SRequest string `mapstructure:"server-request" json:"serverRequest" yaml:"server-request"`
11-
SRouter string `mapstructure:"server-router" json:"serverRouter" yaml:"server-router"`
12-
SService string `mapstructure:"server-service" json:"serverService" yaml:"server-service"`
7+
SApi string `mapstructure:"server-api" json:"server-api" yaml:"server-api"`
8+
SInitialize string `mapstructure:"server-initialize" json:"server-initialize" yaml:"server-initialize"`
9+
SModel string `mapstructure:"server-model" json:"server-model" yaml:"server-model"`
10+
SRequest string `mapstructure:"server-request" json:"server-request" yaml:"server-request"`
11+
SRouter string `mapstructure:"server-router" json:"server-router" yaml:"server-router"`
12+
SService string `mapstructure:"server-service" json:"server-service" yaml:"server-service"`
1313
Web string `mapstructure:"web" json:"web" yaml:"web"`
14-
WApi string `mapstructure:"web-api" json:"webApi" yaml:"web-api"`
15-
WForm string `mapstructure:"web-form" json:"webForm" yaml:"web-form"`
16-
WTable string `mapstructure:"web-table" json:"webTable" yaml:"web-table"`
14+
WApi string `mapstructure:"web-api" json:"web-api" yaml:"web-api"`
15+
WForm string `mapstructure:"web-form" json:"web-form" yaml:"web-form"`
16+
WTable string `mapstructure:"web-table" json:"web-table" yaml:"web-table"`
1717
}

server/config/captcha.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package config
22

33
type Captcha struct {
4-
KeyLong int `mapstructure:"key-long" json:"keyLong" yaml:"key-long"` // 验证码长度
5-
ImgWidth int `mapstructure:"img-width" json:"imgWidth" yaml:"img-width"` // 验证码宽度
6-
ImgHeight int `mapstructure:"img-height" json:"imgHeight" yaml:"img-height"` // 验证码高度
4+
KeyLong int `mapstructure:"key-long" json:"key-long" yaml:"key-long"` // 验证码长度
5+
ImgWidth int `mapstructure:"img-width" json:"img-width" yaml:"img-width"` // 验证码宽度
6+
ImgHeight int `mapstructure:"img-height" json:"img-height" yaml:"img-height"` // 验证码高度
77
}

server/config/casbin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package config
22

33
type Casbin struct {
4-
ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"` // 存放casbin模型的相对路径
4+
ModelPath string `mapstructure:"model-path" json:"model-path" yaml:"model-path"` // 存放casbin模型的相对路径
55
}

server/config/config.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ type Server struct {
99
System System `mapstructure:"system" json:"system" yaml:"system"`
1010
Captcha Captcha `mapstructure:"captcha" json:"captcha" yaml:"captcha"`
1111
// auto
12-
AutoCode Autocode `mapstructure:"autoCode" json:"autoCode" yaml:"autoCode"`
12+
AutoCode Autocode `mapstructure:"autocode" json:"autocode" yaml:"autocode"`
1313
// gorm
1414
Mysql Mysql `mapstructure:"mysql" json:"mysql" yaml:"mysql"`
1515
Pgsql Pgsql `mapstructure:"pgsql" json:"pgsql" yaml:"pgsql"`
1616
DBList []DB `mapstructure:"db-list" json:"db-list" yaml:"db-list"`
1717
// oss
1818
Local Local `mapstructure:"local" json:"local" yaml:"local"`
1919
Qiniu Qiniu `mapstructure:"qiniu" json:"qiniu" yaml:"qiniu"`
20-
AliyunOSS AliyunOSS `mapstructure:"aliyun-oss" json:"aliyunOSS" yaml:"aliyun-oss"`
21-
HuaWeiObs HuaWeiObs `mapstructure:"hua-wei-obs" json:"huaWeiObs" yaml:"hua-wei-obs"`
22-
TencentCOS TencentCOS `mapstructure:"tencent-cos" json:"tencentCOS" yaml:"tencent-cos"`
23-
AwsS3 AwsS3 `mapstructure:"aws-s3" json:"awsS3" yaml:"aws-s3"`
20+
AliyunOSS AliyunOSS `mapstructure:"aliyun-oss" json:"aliyun-oss" yaml:"aliyun-oss"`
21+
HuaWeiObs HuaWeiObs `mapstructure:"hua-wei-obs" json:"hua-wei-obs" yaml:"hua-wei-obs"`
22+
TencentCOS TencentCOS `mapstructure:"tencent-cos" json:"tencent-cos" yaml:"tencent-cos"`
23+
AwsS3 AwsS3 `mapstructure:"aws-s3" json:"aws-s3" yaml:"aws-s3"`
2424

2525
Excel Excel `mapstructure:"excel" json:"excel" yaml:"excel"`
2626
Timer Timer `mapstructure:"timer" json:"timer" yaml:"timer"`

server/config/db_list.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ type DB struct {
44
Disable bool `mapstructure:"disable" json:"disable" yaml:"disable"`
55
Type string `mapstructure:"type" json:"type" yaml:"type"`
66
AliasName string `mapstructure:"alias-name" json:"alias-name" yaml:"alias-name"`
7-
Path string `mapstructure:"path" json:"path" yaml:"path"` // 服务器地址:端口
8-
Port string `mapstructure:"port" json:"port" yaml:"port"` //:端口
9-
Config string `mapstructure:"config" json:"config" yaml:"config"` // 高级配置
10-
Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"` // 数据库名
11-
Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名
12-
Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
13-
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"` // 空闲中的最大连接数
14-
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"` // 打开到数据库的最大连接数
15-
LogMode string `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"` // 是否开启Gorm全局日志
16-
LogZap bool `mapstructure:"log-zap" json:"logZap" yaml:"log-zap"`
7+
Path string `mapstructure:"path" json:"path" yaml:"path"` // 服务器地址:端口
8+
Port string `mapstructure:"port" json:"port" yaml:"port"` //:端口
9+
Config string `mapstructure:"config" json:"config" yaml:"config"` // 高级配置
10+
Dbname string `mapstructure:"db-name" json:"db-name" yaml:"db-name"` // 数据库名
11+
Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名
12+
Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
13+
MaxIdleConns int `mapstructure:"max-idle-conns" json:"max-idle-conns" yaml:"max-idle-conns"` // 空闲中的最大连接数
14+
MaxOpenConns int `mapstructure:"max-open-conns" json:"max-open-conns" yaml:"max-open-conns"` // 打开到数据库的最大连接数
15+
LogMode string `mapstructure:"log-mode" json:"log-mode" yaml:"log-mode"` // 是否开启Gorm全局日志
16+
LogZap bool `mapstructure:"log-zap" json:"log-zap" yaml:"log-zap"`
1717
}
1818

1919
func (m *DB) Dsn() string {

server/config/email.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type Email struct {
55
Port int `mapstructure:"port" json:"port" yaml:"port"` // 端口
66
From string `mapstructure:"from" json:"from" yaml:"from"` // 收件人
77
Host string `mapstructure:"host" json:"host" yaml:"host"` // 服务器地址
8-
IsSSL bool `mapstructure:"is-ssl" json:"isSSL" yaml:"is-ssl"` // 是否SSL
8+
IsSSL bool `mapstructure:"is-ssl" json:"is-ssl" yaml:"is-ssl"` // 是否SSL
99
Secret string `mapstructure:"secret" json:"secret" yaml:"secret"` // 密钥
1010
Nickname string `mapstructure:"nickname" json:"nickname" yaml:"nickname"` // 昵称
1111
}

server/config/gorm_mysql.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package config
22

33
type Mysql struct {
4-
Path string `mapstructure:"path" json:"path" yaml:"path"` // 服务器地址
5-
Port string `mapstructure:"port" json:"port" yaml:"port"` // 端口
6-
Config string `mapstructure:"config" json:"config" yaml:"config"` // 高级配置
7-
Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"` // 数据库名
8-
Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名
9-
Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
10-
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"` // 空闲中的最大连接数
11-
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"` // 打开到数据库的最大连接数
12-
LogMode string `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"` // 是否开启Gorm全局日志
13-
LogZap bool `mapstructure:"log-zap" json:"logZap" yaml:"log-zap"` // 是否通过zap写入日志文件
4+
Path string `mapstructure:"path" json:"path" yaml:"path"` // 服务器地址
5+
Port string `mapstructure:"port" json:"port" yaml:"port"` // 端口
6+
Config string `mapstructure:"config" json:"config" yaml:"config"` // 高级配置
7+
Dbname string `mapstructure:"db-name" json:"db-name" yaml:"db-name"` // 数据库名
8+
Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名
9+
Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
10+
MaxIdleConns int `mapstructure:"max-idle-conns" json:"max-idle-conns" yaml:"max-idle-conns"` // 空闲中的最大连接数
11+
MaxOpenConns int `mapstructure:"max-open-conns" json:"max-open-conns" yaml:"max-open-conns"` // 打开到数据库的最大连接数
12+
LogMode string `mapstructure:"log-mode" json:"log-mode" yaml:"log-mode"` // 是否开启Gorm全局日志
13+
LogZap bool `mapstructure:"log-zap" json:"log-zap" yaml:"log-zap"` // 是否通过zap写入日志文件
1414
}
1515

1616
func (m *Mysql) Dsn() string {

server/config/gorm_pgsql.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package config
22

33
type Pgsql struct {
4-
Path string `mapstructure:"path" json:"path" yaml:"path"` // 服务器地址:端口
5-
Port string `mapstructure:"port" json:"port" yaml:"port"` //:端口
6-
Config string `mapstructure:"config" json:"config" yaml:"config"` // 高级配置
7-
Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"` // 数据库名
8-
Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名
9-
Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
10-
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"` // 空闲中的最大连接数
11-
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"` // 打开到数据库的最大连接数
12-
LogMode string `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"` // 是否开启Gorm全局日志
13-
LogZap bool `mapstructure:"log-zap" json:"logZap" yaml:"log-zap"` // 是否通过zap写入日志文件
4+
Path string `mapstructure:"path" json:"path" yaml:"path"` // 服务器地址:端口
5+
Port string `mapstructure:"port" json:"port" yaml:"port"` //:端口
6+
Config string `mapstructure:"config" json:"config" yaml:"config"` // 高级配置
7+
Dbname string `mapstructure:"db-name" json:"db-name" yaml:"db-name"` // 数据库名
8+
Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名
9+
Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
10+
MaxIdleConns int `mapstructure:"max-idle-conns" json:"max-idle-conns" yaml:"max-idle-conns"` // 空闲中的最大连接数
11+
MaxOpenConns int `mapstructure:"max-open-conns" json:"max-open-conns" yaml:"max-open-conns"` // 打开到数据库的最大连接数
12+
LogMode string `mapstructure:"log-mode" json:"log-mode" yaml:"log-mode"` // 是否开启Gorm全局日志
13+
LogZap bool `mapstructure:"log-zap" json:"log-zap" yaml:"log-zap"` // 是否通过zap写入日志文件
1414
}
1515

1616
// Dsn 基于配置文件获取 dsn

server/config/jwt.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package config
22

33
type JWT struct {
4-
SigningKey string `mapstructure:"signing-key" json:"signingKey" yaml:"signing-key"` // jwt签名
5-
ExpiresTime int64 `mapstructure:"expires-time" json:"expiresTime" yaml:"expires-time"` // 过期时间
6-
BufferTime int64 `mapstructure:"buffer-time" json:"bufferTime" yaml:"buffer-time"` // 缓冲时间
7-
Issuer string `mapstructure:"issuer" json:"issuer" yaml:"issuer"` // 签发者
4+
SigningKey string `mapstructure:"signing-key" json:"signing-key" yaml:"signing-key"` // jwt签名
5+
ExpiresTime int64 `mapstructure:"expires-time" json:"expires-time" yaml:"expires-time"` // 过期时间
6+
BufferTime int64 `mapstructure:"buffer-time" json:"buffer-time" yaml:"buffer-time"` // 缓冲时间
7+
Issuer string `mapstructure:"issuer" json:"issuer" yaml:"issuer"` // 签发者
88
}

server/config/oss_aliyun.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package config
22

33
type AliyunOSS struct {
44
Endpoint string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"`
5-
AccessKeyId string `mapstructure:"access-key-id" json:"accessKeyId" yaml:"access-key-id"`
6-
AccessKeySecret string `mapstructure:"access-key-secret" json:"accessKeySecret" yaml:"access-key-secret"`
7-
BucketName string `mapstructure:"bucket-name" json:"bucketName" yaml:"bucket-name"`
8-
BucketUrl string `mapstructure:"bucket-url" json:"bucketUrl" yaml:"bucket-url"`
9-
BasePath string `mapstructure:"base-path" json:"basePath" yaml:"base-path"`
5+
AccessKeyId string `mapstructure:"access-key-id" json:"access-key-id" yaml:"access-key-id"`
6+
AccessKeySecret string `mapstructure:"access-key-secret" json:"access-key-secret" yaml:"access-key-secret"`
7+
BucketName string `mapstructure:"bucket-name" json:"bucket-name" yaml:"bucket-name"`
8+
BucketUrl string `mapstructure:"bucket-url" json:"bucket-url" yaml:"bucket-url"`
9+
BasePath string `mapstructure:"base-path" json:"base-path" yaml:"base-path"`
1010
}

0 commit comments

Comments
 (0)