Skip to content

Commit ad6311d

Browse files
author
pixel
committed
Merge branch 'master' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev
2 parents 758c1f8 + 645d679 commit ad6311d

File tree

10 files changed

+69
-39
lines changed

10 files changed

+69
-39
lines changed

server/config/captcha.go

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

33
type Captcha struct {
44
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"` // 图片高度
5+
ImgWidth int `mapstructure:"img-width" json:"imgWidth" yaml:"img-width"` // 验证码宽度
6+
ImgHeight int `mapstructure:"img-height" json:"imgHeight" 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"` // Model路径
4+
ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"` // 存放casbin模型的相对路径
55
}

server/config/email.go

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

33
type Email struct {
4-
To string `mapstructure:"to" json:"to" yaml:"to"` // 收件人
4+
To string `mapstructure:"to" json:"to" yaml:"to"` // 收件人:多个以英文逗号分隔
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"` // 服务器地址

server/config/gorm.go

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

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

server/config/oss.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ type Qiniu struct {
99
Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"` // 空间名称
1010
ImgPath string `mapstructure:"img-path" json:"imgPath" yaml:"img-path"` // CDN加速域名
1111
UseHTTPS bool `mapstructure:"use-https" json:"useHttps" yaml:"use-https"` // 是否使用https
12-
AccessKey string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"` // accessKey
13-
SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"` // secretKey
12+
AccessKey string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"` // 秘钥AK
13+
SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"` // 秘钥SK
1414
UseCdnDomains bool `mapstructure:"use-cdn-domains" json:"useCdnDomains" yaml:"use-cdn-domains"` // 上传是否使用CDN上传加速
1515
}
1616

server/config/redis.go

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

33
type Redis struct {
4-
DB int `mapstructure:"db" json:"db" yaml:"db"`
4+
DB int `mapstructure:"db" json:"db" yaml:"db"` // redis的哪个数据库
55
Addr string `mapstructure:"addr" json:"addr" yaml:"addr"` // 服务器地址:端口
66
Password string `mapstructure:"password" json:"password" yaml:"password"` // 密码
77
}

server/config/timer.go

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

33
type Timer struct {
4-
Start bool `mapstructure:"start" json:"start" yaml:"start"`
5-
Spec string `mapstructure:"spec" json:"spec" yaml:"spec"`
4+
Start bool `mapstructure:"start" json:"start" yaml:"start"` // 是否启用
5+
Spec string `mapstructure:"spec" json:"spec" yaml:"spec"` // CRON表达式
66
Detail []Detail `mapstructure:"detail" json:"detail" yaml:"detail"`
77
}
88

99
type Detail struct {
10-
TableName string `mapstructure:"tableName" json:"tableName" yaml:"tableName"`
11-
CompareField string `mapstructure:"compareField" json:"compareField" yaml:"compareField"`
12-
Interval string `mapstructure:"interval" json:"interval" yaml:"interval"`
10+
TableName string `mapstructure:"tableName" json:"tableName" yaml:"tableName"` // 需要清理的表名
11+
CompareField string `mapstructure:"compareField" json:"compareField" yaml:"compareField"` // 需要比较时间的字段
12+
Interval string `mapstructure:"interval" json:"interval" yaml:"interval"` // 时间间隔
1313
}

server/docs/docs.go

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
22
// This file was generated by swaggo/swag at
3-
// 2021-05-11 17:25:23.4731221 +0800 CST m=+1.258292701
3+
// 2021-05-14 11:28:23.4731221 +0800 CST m=+1.258292701
44

55
package docs
66

@@ -2829,11 +2829,11 @@ var doc = `{
28292829
"type": "object",
28302830
"properties": {
28312831
"imgHeight": {
2832-
"description": "图片高度",
2832+
"description": "验证码高度",
28332833
"type": "integer"
28342834
},
28352835
"imgWidth": {
2836-
"description": "图片宽度",
2836+
"description": "验证码宽度",
28372837
"type": "integer"
28382838
},
28392839
"keyLong": {
@@ -2846,7 +2846,7 @@ var doc = `{
28462846
"type": "object",
28472847
"properties": {
28482848
"modelPath": {
2849-
"description": "Model路径",
2849+
"description": "存放casbin模型的相对路径",
28502850
"type": "string"
28512851
}
28522852
}
@@ -2855,12 +2855,15 @@ var doc = `{
28552855
"type": "object",
28562856
"properties": {
28572857
"compareField": {
2858+
"description": "需要比较时间的字段",
28582859
"type": "string"
28592860
},
28602861
"interval": {
2862+
"description": "时间间隔",
28612863
"type": "string"
28622864
},
28632865
"tableName": {
2866+
"description": "需要清理的表名",
28642867
"type": "string"
28652868
}
28662869
}
@@ -2893,7 +2896,7 @@ var doc = `{
28932896
"type": "string"
28942897
},
28952898
"to": {
2896-
"description": "收件人",
2899+
"description": "收件人:多个以英文逗号分隔",
28972900
"type": "string"
28982901
}
28992902
}
@@ -2936,22 +2939,26 @@ var doc = `{
29362939
"type": "object",
29372940
"properties": {
29382941
"config": {
2942+
"description": "高级配置",
29392943
"type": "string"
29402944
},
29412945
"dbname": {
29422946
"description": "数据库名",
29432947
"type": "string"
29442948
},
29452949
"logMode": {
2950+
"description": "是否开启Gorm全局日志",
29462951
"type": "boolean"
29472952
},
29482953
"logZap": {
29492954
"type": "string"
29502955
},
29512956
"maxIdleConns": {
2957+
"description": "空闲中的最大连接数",
29522958
"type": "integer"
29532959
},
29542960
"maxOpenConns": {
2961+
"description": "打开到数据库的最大连接数",
29552962
"type": "integer"
29562963
},
29572964
"password": {
@@ -2972,7 +2979,7 @@ var doc = `{
29722979
"type": "object",
29732980
"properties": {
29742981
"accessKey": {
2975-
"description": "accessKey",
2982+
"description": "秘钥AK",
29762983
"type": "string"
29772984
},
29782985
"bucket": {
@@ -2984,7 +2991,7 @@ var doc = `{
29842991
"type": "string"
29852992
},
29862993
"secretKey": {
2987-
"description": "secretKey",
2994+
"description": "秘钥SK",
29882995
"type": "string"
29892996
},
29902997
"useCdnDomains": {
@@ -3009,6 +3016,7 @@ var doc = `{
30093016
"type": "string"
30103017
},
30113018
"db": {
3019+
"description": "redis的哪个数据库",
30123020
"type": "integer"
30133021
},
30143022
"password": {
@@ -3128,9 +3136,11 @@ var doc = `{
31283136
}
31293137
},
31303138
"spec": {
3139+
"description": "CRON表达式",
31313140
"type": "string"
31323141
},
31333142
"start": {
3143+
"description": "是否启用",
31343144
"type": "boolean"
31353145
}
31363146
}

server/docs/swagger.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2812,11 +2812,11 @@
28122812
"type": "object",
28132813
"properties": {
28142814
"imgHeight": {
2815-
"description": "图片高度",
2815+
"description": "验证码高度",
28162816
"type": "integer"
28172817
},
28182818
"imgWidth": {
2819-
"description": "图片宽度",
2819+
"description": "验证码宽度",
28202820
"type": "integer"
28212821
},
28222822
"keyLong": {
@@ -2829,7 +2829,7 @@
28292829
"type": "object",
28302830
"properties": {
28312831
"modelPath": {
2832-
"description": "Model路径",
2832+
"description": "存放casbin模型的相对路径",
28332833
"type": "string"
28342834
}
28352835
}
@@ -2838,12 +2838,15 @@
28382838
"type": "object",
28392839
"properties": {
28402840
"compareField": {
2841+
"description": "需要比较时间的字段",
28412842
"type": "string"
28422843
},
28432844
"interval": {
2845+
"description": "时间间隔",
28442846
"type": "string"
28452847
},
28462848
"tableName": {
2849+
"description": "需要清理的表名",
28472850
"type": "string"
28482851
}
28492852
}
@@ -2876,7 +2879,7 @@
28762879
"type": "string"
28772880
},
28782881
"to": {
2879-
"description": "收件人",
2882+
"description": "收件人:多个以英文逗号分隔",
28802883
"type": "string"
28812884
}
28822885
}
@@ -2919,22 +2922,26 @@
29192922
"type": "object",
29202923
"properties": {
29212924
"config": {
2925+
"description": "高级配置",
29222926
"type": "string"
29232927
},
29242928
"dbname": {
29252929
"description": "数据库名",
29262930
"type": "string"
29272931
},
29282932
"logMode": {
2933+
"description": "是否开启Gorm全局日志",
29292934
"type": "boolean"
29302935
},
29312936
"logZap": {
29322937
"type": "string"
29332938
},
29342939
"maxIdleConns": {
2940+
"description": "空闲中的最大连接数",
29352941
"type": "integer"
29362942
},
29372943
"maxOpenConns": {
2944+
"description": "打开到数据库的最大连接数",
29382945
"type": "integer"
29392946
},
29402947
"password": {
@@ -2955,7 +2962,7 @@
29552962
"type": "object",
29562963
"properties": {
29572964
"accessKey": {
2958-
"description": "accessKey",
2965+
"description": "秘钥AK",
29592966
"type": "string"
29602967
},
29612968
"bucket": {
@@ -2967,7 +2974,7 @@
29672974
"type": "string"
29682975
},
29692976
"secretKey": {
2970-
"description": "secretKey",
2977+
"description": "秘钥SK",
29712978
"type": "string"
29722979
},
29732980
"useCdnDomains": {
@@ -2992,6 +2999,7 @@
29922999
"type": "string"
29933000
},
29943001
"db": {
3002+
"description": "redis的哪个数据库",
29953003
"type": "integer"
29963004
},
29973005
"password": {
@@ -3111,9 +3119,11 @@
31113119
}
31123120
},
31133121
"spec": {
3122+
"description": "CRON表达式",
31143123
"type": "string"
31153124
},
31163125
"start": {
3126+
"description": "是否启用",
31173127
"type": "boolean"
31183128
}
31193129
}

0 commit comments

Comments
 (0)