-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.example.yaml
75 lines (75 loc) · 3 KB
/
config.example.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
server:
port: 8080 # Server port
site:
brand: Go-Gin # Site brand
description: A simple web application using Go and Gin # Site description
base_url: http://localhost:8080 # Site base URL, used for generating absolute URLs, cant end with /
debug: false # Debug mode, if true, the server will print detailed error messages
log:
level: debug # debug, info, warn, error, fatal, panic
path: logs/go-gin.log # Log file path, relative to the project root directory. Or you can use an absolute path, such as /var/www/go-gin.log
db_path: db/go-gin.sqlite # Database path, relative to the project root directory. Or you can use an absolute path, such as /var/www/go-gin.sqlite
rate_limit:
max: 100 # requests per minute, 0 means no limit
enable_cors: false # Enable CORS
enable_user_registration: true # Enable user registration
upload:
virtual_path: /upload # Virtual path, used for generating absolute URLs, must start with /, cant end with /
url_prefix: http://localhost:8080/upload # URL prefix, used for generating absolute URLs, must start with http:// or https:// or /, cant end with /
dir: upload # Upload directory, relative to the project root directory. Or you can use an absolute path, such as /var/www/upload
max_size: 10485760 # 10MB, unit: byte
keep_original_name: false # Keep original file name, if false, the server will generate a random file name
create_date_dir: true # Create date directory, such as /upload/2021/01/01
allow_types: # Allowed file types, if empty, all types are allowed
- image/jpeg
- image/jpg
- image/png
- image/gif
- image/bmp
jwt: # JWT settings
access_secret: qhkxjrRmYcVYKSEobqsvhxhtPVeTWquu # Access token secret
refresh_secret: qhkxjrRmYcVYKSEobqsvhxhtPV3TWquu # Refresh token secret
access_token_expiration: 60 # minutes
refresh_token_expiration: 720 # minutes
access_token_cookie_name: go-gin-access # Access token cookie name
refresh_token_cookie_name: go-gin-refresh # Refresh token cookie name
location: Asia/Chongqing # Timezone
notifications: # Notification settings
- type: apprise # You must install apprise first, more details: https://github.com/caronc/apprise
instances:
- url: "apprise-url-1"
- url: "apprise-url-2"
- type: dingtalk
instances:
- webhook: "dingtalk-webhook-1"
- webhook: "dingtalk-webhook-2"
- type: ifttt
instances:
- key: "ifttt-key-1"
event: "event-1"
- key: "ifttt-key-2"
event: "event-2"
- type: smtp
instances:
- host: "smtp-host-1"
port: 587
username: "user-1"
password: "password-1"
from: "from-1"
to: "to-1"
- host: "smtp-host-2"
port: 587
username: "user-2"
password: "password-2"
from: "from-2"
to: "to-2"
- type: telegram
instances:
- botToken: "telegram-bot-token-1"
chatID: "chat-id-1"
- botToken: "telegram-bot-token-2"
chatID: "chat-id-2"
- type: wecom
instances:
- key: "wecom-key-1"
- key: "wecom-key-2"