Files
gfast/config/config.toml
T
2021-12-22 10:16:49 +08:00

96 lines
3.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# HTTP Server
[server]
Address = ":8200"
ServerRoot = "./public/resource"
ServerAgent = "gfast-app"
LogPath = "./data/log/gf-app/server"
logStdout = true # 日志是否输出到终端默认为true
errorStack = true # 当Server捕获到异常时是否记录堆栈信息到日志中默认为true
errorLogPattern = "error-{Ymd}.log" # 异常错误日志文件格式默认为"error-{Ymd}.log"
accessLogPattern = "access-{Ymd}.log" # 访问日志文件格式默认为"access-{Ymd}.log"
DumpRouterMap = true
NameToUriType = 3
maxHeaderBytes = "20KB"
clientMaxBodySize = "200MB"
accessLogEnabled = true # 是否记录访问日志默认为false
errorLogEnabled = true # 是否记录异常日志信息到日志中默认为true
PProfEnabled = true # 是否开启PProf性能调试特性默认为false
# Logger.
[logger]
Path = "./data/log/gf-app"
Level = "all"
Stdout = true
# Template.
[viewer]
paths = ["./template"]
defaultFile = "index.html"
delimiters = ["${", "}"]
# Database.
[database]
link = "mysql:root:123456@tcp(localhost:3306)/gfast-v2-os"
charset = "utf8mb4" #数据库编码
debug = true
dryRun = false #空跑
maxIdle = "10" #连接池最大闲置的连接数
maxOpen = "10" #连接池最大打开的连接数
maxLifetime = "30" #(单位秒)连接对象可重复使用的时间长度
# Database logger.
[database.logger]
Path = "./data/log/gf-app/sql"
Level = "all"
Stdout = true
# Redis数据库配置
[redis]
open = true #是否开启 redis 缓存 若不开启使用gchache缓存方式
default = "127.0.0.1:6379,9?idleTimeout=20&maxActive=100"
#jwt配置
[gToken]
[gToken.system]
CacheMode = 2
CacheKey = "GToken:"
Timeout = 10800000 #3个小时
MaxRefresh = 0
TokenDelimiter="_"
EncryptKey = "koi29a83idakguqjq29asd9asd8a7jhq"
AuthFailMsg = "登录超时,请重新登录"
MultiLogin = true #后台是否允许多端同时在线
[system]
notCheckAuthAdminIds = [1,2,31] #无需验证后台权限的用户id
#casbin配置
[casbin]
modelFile="./config/casbin_conf/rbac_model.conf"
policyFile="./config/casbin_conf/rbac_policy.csv"
# Gen
[gen]
author = "gfast"
moduleName = "system"
packageName = "gfast/app/system"
autoRemovePre = true #是否自动删除表前缀
tablePrefix = "table_,qxkj_" #表前缀
templatePath = "./template/vm" #代码生成模板路径
frontDir = "F:/tools/webProject/gfast-ui" #前端路径
# 上传配置
[upload]
type = "local" #local本地tencentCOS:腾讯云 , 七牛云 阿里云等开发中...
[upload.tencentCOS] #腾讯云cos配置
UpPath = "/gfast/"
RawUrl = "https://您的cos空间域名.cos.ap-chongqing.myqcloud.com"
SecretID = "填写您的SecretID"
SecretKey = "填写您的SecretKey"
[upload.local] #本地上传配置
UpPath = "/pub_upload/" #上传路径
# 插件管理
[plugin]
serverUrl = "http://localhost:8199" #获取插件商城插件列表