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
88
89
90
91
92
93
settings:
application:
# dev开发环境 test测试环境 prod线上环境
mode: dev
# 服务器ip,默认使用 0.0.0.0
host: 0.0.0.0
# 服务名称
name: testApp
# 端口号
port: 8053 # 服务端口号
readtimeout: 1
writertimeout: 2
# 数据权限功能开关
enabledp: false
logger:
# 日志存放路径
path: temp/logs
# 日志输出,file:文件,default:命令行,其他:命令行
stdout: '' #控制台日志,启用后,不输出到文件
# 日志等级, trace, debug, info, warn, error, fatal
level: trace
# 数据库日志开关
enableddb: false
jwt:
# token 密钥,生产环境时及的修改
secret: go-admin
# token 过期时间 单位:秒
timeout: 604800
database:
# 数据库类型 mysql,sqlite3, postgres
driver: mysql
# 数据库连接字符串 mysql 缺省信息 charset=utf8&parseTime=True&loc=Local&timeout=1000ms
source: root:abc123456@tcp(39.96.85.45:3307)/dbc_nbya?charset=utf8mb4&parseTime=True&loc=Local&timeout=1000ms
# databases:
# 'locaohost:8000':
# driver: mysql
# # 数据库连接字符串 mysql 缺省信息 charset=utf8&parseTime=True&loc=Local&timeout=1000ms
# source: user:password@tcp(127.0.0.1:3306)/dbname?charset=utf8&parseTime=True&loc=Local&timeout=1000ms
# registers:
# - sources:
# - user:password@tcp(127.0.0.1:3306)/dbname?charset=utf8&parseTime=True&loc=Local&timeout=1000ms
gen:
# 代码生成读取的数据库名称
dbname: dbc_nbya
# 代码生成是使用前端代码存放位置,需要指定到src文件夹,相对路径
frontpath: ../go-admin-ui/src
cache:
# redis:
# addr: 127.0.0.1:6379
# password: xxxxxx
# db: 2
# key存在即可
memory: ''
queue:
memory:
poolSize: 100
# redis:
# addr: 127.0.0.1:6379
# password: xxxxxx
# producer:
# streamMaxLength: 100
# approximateMaxLength: true
# consumer:
# visibilityTimeout: 60
# bufferSize: 100
# concurrency: 10
# blockingTimeout: 5
# reclaimInterval: 1
locker:
redis:
extend:
aliyunoss:
accessid: "LTAIDfwPBC9AnsRt" # 阿里云的accessid
accesskey: "Z6FtUptrAk0Sl6H8vrVBGZLbBzXEpO" # 阿里云的accesskey
endpoint: "oss-cn-beijing.aliyuncs.com" # 阿里云的endpoint
bucket: "nbya" # 阿里云的 bucket名称
uploaddir: "https://nbya.oss-cn-beijing.aliyuncs.com/" # 所有上传文件都存在这个目录下面
upload:
dir: "nbya"
maxfilesize: 50000000
imagetypes: "(jpg|jpeg|png|pdf|gif|zip|rar)"
Sacceptfiletypes: IMAGE_TYPES
sms:
smsname: "dbc"
smspwd: "Dbc38590"
epid: "125060"
sign: "【nbya】"
ip: "114.255.71.158:8061"
url: "https://tsms.pet-dbc.cn/v1/send"
source: 13
sourcename: "nbya"