@@ -194,26 +194,34 @@ type Casbin struct {
194
194
``` yaml
195
195
# system configuration
196
196
system :
197
- env : ' public' # Change to "develop" to skip authentication for development mode
198
- addr : 8888
199
- db-type : ' mysql'
200
- oss-type : ' local'
201
- use-multipoint : false
202
- use-redis : false
203
- iplimit-count : 15000
204
- iplimit-time : 3600
197
+ db-type: mysql
198
+ oss-type: local
199
+ router-prefix: ""
200
+ addr: 8888
201
+ iplimit-count: 15000
202
+ iplimit-time: 3600
203
+ use-multipoint: false
204
+ use-redis: false
205
+ use-mongo: false
206
+ use-strict-auth: false
205
207
```
206
208
207
209
### struct
208
210
209
211
``` go
210
212
type System struct {
211
- Env string `mapstructure:"env" json:"env" yaml:"env"`
212
- Addr int `mapstructure:"addr" json:"addr" yaml:"addr"`
213
- DbType string `mapstructure:"db-type" json:"dbType" yaml:"db-type"`
214
- OssType string `mapstructure:"oss-type" json:"ossType" yaml:"oss-type"`
215
- UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint" yaml:"use-multipoint"`
213
+ DbType string ` mapstructure:"db-type" json:"db-type" yaml:"db-type"` // 数据库类型:mysql(默认)|sqlite|sqlserver|postgresql
214
+ OssType string ` mapstructure:"oss-type" json:"oss-type" yaml:"oss-type"` // Oss类型
215
+ RouterPrefix string ` mapstructure:"router-prefix" json:"router-prefix" yaml:"router-prefix"`
216
+ Addr int ` mapstructure:"addr" json:"addr" yaml:"addr"` // 端口值
217
+ LimitCountIP int ` mapstructure:"iplimit-count" json:"iplimit-count" yaml:"iplimit-count"`
218
+ LimitTimeIP int ` mapstructure:"iplimit-time" json:"iplimit-time" yaml:"iplimit-time"`
219
+ UseMultipoint bool ` mapstructure:"use-multipoint" json:"use-multipoint" yaml:"use-multipoint"` // 多点登录拦截
220
+ UseRedis bool ` mapstructure:"use-redis" json:"use-redis" yaml:"use-redis"` // 使用redis
221
+ UseMongo bool ` mapstructure:"use-mongo" json:"use-mongo" yaml:"use-mongo"` // 使用mongo
222
+ UseStrictAuth bool ` mapstructure:"use-strict-auth" json:"use-strict-auth" yaml:"use-strict-auth"` // 使用树形角色分配模式
216
223
}
224
+
217
225
```
218
226
219
227
### description
@@ -222,12 +230,14 @@ type System struct {
222
230
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------|
223
231
| env | string | 更改为“develop”以跳过开发模式的身份验证 |
224
232
| addr | int | 后端端口,默认8888 |
225
- | db-type | string | 可以使用 pgsql,sqlite,mssql,oracle |
233
+ | db-type | string | 可以使用 pgsql,sqlite,mssql,oracle |
226
234
| oss-type | string | 可以指定上传头像的oss为local/qiniu/aliyun/minio<br />local:本地的 ` local.path ` 目录<br />qiniu:七牛云<br />aliyun与minio可能框架不会集成,需自己添加,或者参考 [ 额外功能] ( oss ) |
227
235
| use-multipoint | bool | 单点登录,默认为关闭 |
228
236
| use-redis | bool | 使用redis,默认为关闭 |
229
237
| iplimit-count | int | time时间段内同IP最多访问次数,默认为15000 |
230
238
| iplimit-time | int | 限制时间区间,默认为3600 |
239
+ | use-mongo | bool | 是否使用mongodb |
240
+ | use-strict-auth | bool | 是否开启[ 严格角色模式] ( strictAuth ) |
231
241
232
242
## captcha
233
243
0 commit comments