何秀钢
4 years ago
10 changed files with 69 additions and 39 deletions
-
4server/config/captcha.go
-
2server/config/casbin.go
-
2server/config/email.go
-
16server/config/gorm.go
-
4server/config/oss.go
-
2server/config/redis.go
-
10server/config/timer.go
-
24server/docs/docs.go
-
22server/docs/swagger.json
-
22server/docs/swagger.yaml
@ -1,5 +1,5 @@ |
|||||
package config |
package config |
||||
|
|
||||
type Casbin struct { |
type Casbin struct { |
||||
ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"` // Model路径
|
|
||||
|
ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"` // 存放casbin模型的相对路径
|
||||
} |
} |
@ -1,7 +1,7 @@ |
|||||
package config |
package config |
||||
|
|
||||
type Redis struct { |
type Redis struct { |
||||
DB int `mapstructure:"db" json:"db" yaml:"db"` |
|
||||
|
DB int `mapstructure:"db" json:"db" yaml:"db"` // redis的哪个数据库
|
||||
Addr string `mapstructure:"addr" json:"addr" yaml:"addr"` // 服务器地址:端口
|
Addr string `mapstructure:"addr" json:"addr" yaml:"addr"` // 服务器地址:端口
|
||||
Password string `mapstructure:"password" json:"password" yaml:"password"` // 密码
|
Password string `mapstructure:"password" json:"password" yaml:"password"` // 密码
|
||||
} |
} |
@ -1,13 +1,13 @@ |
|||||
package config |
package config |
||||
|
|
||||
type Timer struct { |
type Timer struct { |
||||
Start bool `mapstructure:"start" json:"start" yaml:"start"` |
|
||||
Spec string `mapstructure:"spec" json:"spec" yaml:"spec"` |
|
||||
|
Start bool `mapstructure:"start" json:"start" yaml:"start"` // 是否启用
|
||||
|
Spec string `mapstructure:"spec" json:"spec" yaml:"spec"` // CRON表达式
|
||||
Detail []Detail `mapstructure:"detail" json:"detail" yaml:"detail"` |
Detail []Detail `mapstructure:"detail" json:"detail" yaml:"detail"` |
||||
} |
} |
||||
|
|
||||
type Detail struct { |
type Detail struct { |
||||
TableName string `mapstructure:"tableName" json:"tableName" yaml:"tableName"` |
|
||||
CompareField string `mapstructure:"compareField" json:"compareField" yaml:"compareField"` |
|
||||
Interval string `mapstructure:"interval" json:"interval" yaml:"interval"` |
|
||||
|
TableName string `mapstructure:"tableName" json:"tableName" yaml:"tableName"` // 需要清理的表名
|
||||
|
CompareField string `mapstructure:"compareField" json:"compareField" yaml:"compareField"` // 需要比较时间的字段
|
||||
|
Interval string `mapstructure:"interval" json:"interval" yaml:"interval"` // 时间间隔
|
||||
} |
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue