-
Notifications
You must be signed in to change notification settings - Fork 32
/
application.json5
91 lines (87 loc) · 4.04 KB
/
application.json5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{
debug: true,
server_name: "abs_admin",
server_url: "0.0.0.0:8000",
//choose one ["mem","redis://127.0.0.1:6379"]
cache: "mem",
//choose storage type
//storage: "local",
//storage: "s3://{\"bucket\":\"test\",\"endpoint\":\"http://127.0.0.1:9000\",\"access_key\":\"minioadmin\",\"secret_key\":\"minioadmin\",\"region\":\"\"}",
storage: "local",
//choose database (need add `rbdc-<database> = { version = "*" }` of Cargo.toml)
//db_url: "sqlite://target/sqlite.db",
//db_url: "mysql://root:123456@localhost:3306/test",
//db_url: "postgres://postgres:123456@localhost:5432/postgres",
//db_url: "mssql://SA:TestPass!123456@localhost:1433/test",
db_url: "sqlite://target/sqlite.db",
// database pool len
db_pool_len: 32,
//pool get timeout
db_pool_timeout: 60,
//log dir, you can use "target/logs/abc.log" default is "target/logs/"
log_dir: "target/logs/",
//rolling by LogFileSize use[1KB,1MB,1GB], rolling by date use ['hour','minute','day'],rolling by Duration use ['1hour','10minute','1day']
log_rolling: "day",
// Log rolling retention options:
// Retain all logs: All
// Retain logs by time (in seconds): KeepTime(i64)
// Retain logs by version: KeepNum(i64)
log_keep_type: "KeepNum(120)",
//Log channel length: null for unbounded queue, non-null for bounded queue (better performance)
log_chan_len: 100000,
// Optional log packaging formats: "" (keep as .log), "gzip" (GZip compressed), "zip" (ZIP compressed), "lz4" (LZ4 compressed (very fast))
// The following options need to be enabled:
// Inside the toml file, add to 'fast_log': fast_log = { version = "1.5", features = ["lz4", "zip", "gzip"]}
// In src/config/log.rs, uncomment the section under fn choose_packer()
// In application.json5, add: log_pack_compress: "zip"
log_pack_compress: "",
//log_level: off,info,error,warn,debug,trace
log_level: "info",
//jwt_secret
jwt_secret: "abs_admin",
//jwt to the exp (in seconds) default 30 minutes
jwt_exp : 1800,
//Jwt resolution determines whether the expiration time is less than give minutes (default 10 minutes) and automatically renews the contract
jwt_refresh_token : 600,
// SMS channel caching
// The system first puts the data into the 'sms:send:' queue
// Third-party SMS SDK or program needs to retrieve and send from the queue
// Receipts obtained are stored in 'sms:resp:*' format
sms_cache_send_key_prefix: "sms:send:",
//Login failure rejection policy: Retry count limit (0 for unlimited attempts)
login_fail_retry: 3,
//Wait time (in seconds) for login after exceeding the retry count limit for login failures
login_fail_retry_wait_sec: 30,
//white_list_api
white_list_api: ["/","/admin/sys_login","/admin/captcha"],
// Garbage data timeout, unit: days (data that exceeds the timeout for deletion will be permanently removed)
trash_recycle_days: 90,
/// format datetime.you can choose any ['YYYY-MM-DD hh:mm:ss.000000', 'YYYY-MM-DD hh:mm:ss']
datetime_format: "YYYY-MM-DD hh:mm:ss",
// error map <code : error_msg>
errors: {
"-1":"未知错误",
"empty": "缺少参数",
"arg.name_empty": "权限名字不能为空",
"arg.permission_empty": "权限不能为空",
"access_token_empty": "令牌不能为空",
"access_denied": "无权限访问",
"account_empty": "账户不能为空",
"cannot_disable_admin": "不能禁用超级管理员",
"dict_exists": "字典已存在",
"permission_exists": "权限已存在",
"role_id_empty": "角色id不能为空",
"please_send_code": "请发送验证码",
"role_user_cannot_empty": "添加角色时用户和角色不能为空",
"user_not_exists": "用户不存在",
"user_and_name_cannot_empty": "用户名和姓名不能为空",
"user_cannot_find": "找不到用户",
"account_not_exists": "账号不存在",
"account_disabled": "账户被禁用",
"password_empty": "密码为空",
"password_error": "密码不正确",
"vcode_error": "验证码不正确",
"req_frequently": "操作过于频繁,请等待{}秒后重试",
"id_empty": "id不能为空"
}
}