-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.yaml
83 lines (79 loc) · 3.16 KB
/
config.yaml
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
name: example-temp-gin # name of API Server
run_mode: debug # run mode: debug, test, release
addr: :39000 # HTTP port will cover by env ENV_AUTO_HOST and most in docker use env ENV_WEB_HOST
api_url: http://127.0.0.1:39000 # api url full ip:port
api_version: /v1 # api version
ssl_enable: false # is enable ssl mode this will cover by env ENV_WEB_HTTPS_ENABLE
zap:
AtomicLevel: -1 # DebugLevel:-1 InfoLevel:0 WarnLevel:1 ErrorLevel:2
FieldsAuto: false # is use auto Fields key set
Fields:
Key: key
Val: val
Development: true # is open Open file and line number
Encoding: console # output format, only use console or json, default is console
rotate:
Filename: log/example-temp-gin.log # Log file path
MaxSize: 16 # Maximum size of each zlog file, Unit: M
MaxBackups: 10 # How many backups are saved in the zlog file
MaxAge: 7 # How many days can the file be keep, Unit: day
Compress: true # need compress
EncoderConfig:
TimeKey: time
LevelKey: level
NameKey: logger
CallerKey: caller
MessageKey: msg
StacktraceKey: stacktrace
TimeEncoder: ISO8601TimeEncoder # ISO8601TimeEncoder EpochMillisTimeEncoder EpochNanosTimeEncoder EpochTimeEncoder default is ISO8601TimeEncoder
EncodeDuration: SecondsDurationEncoder # NanosDurationEncoder SecondsDurationEncoder StringDurationEncoder default is SecondsDurationEncoder
EncodeLevel: CapitalColorLevelEncoder # CapitalLevelEncoder CapitalColorLevelEncoder LowercaseColorLevelEncoder LowercaseLevelEncoder default is CapitalLevelEncoder
EncodeCaller: ShortCallerEncoder # ShortCallerEncoder FullCallerEncoder default is FullCallerEncoder
monitor: # monitor
status: true # api status use {monitor.health}
health: /status/health # api health
retryCount: 10 # ping api health retry count
hardware: true # hardware true or false
status_hardware:
disk: /status/hardware/disk # hardware api disk
cpu: /status/hardware/cpu # hardware api cpu
ram: /status/hardware/ram # hardware api ram
debug: true # debug true or false
pprof: true # security true or false
security: false # debug and security security true or false
securityUser:
admin: 56a37774c69bd40a1b3e540a3ac8900e # admin:pwd
go_admin:
title: example-temp-gin
theme: adminlte
color_scheme: skin-black
language: CN
captcha: false
index_url: /
url_prefix: admin
store:
path: ./uploads
prefix: uploads
data_bases:
default:
driver: mysql # mysql sqlite postgresql mssql
host: 127.0.0.1
port: 39005
user: golang
pwd: golang123456
name: GoAdmin
max_idle_con: 50
max_open_con: 150
use_custom: true
custom:
logo_url: //img.icons8.com/dusk/64/000000/admin-settings-male.png
dash_board:
title: example-temp-gin
Redis:
addr: localhost:39006
password:
db: 0
max_retries: 0 # Default is to not retry failed commands
dial_timeout: 5 # Default is 5 seconds.
read_timeout: 3 # Default is 3 seconds.
write_timeout: 3 # Default is ReadTimeout