-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
49 lines (36 loc) · 1.05 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
server:
addr: 0.0.0.0
port: 8899
# if auth = true, the request header must carry 'Username' and 'Password'
auth: false
accounts:
- username: root
password: 123456
# https
tls: false
cert-file: cert.pem
key-file: private.key
# console print
debug: true
log:
path: ./logs
size: 1
age: 7
backups: 1000
dbs:
- name: testDB
type: mysql
dsn: root:123456@tcp(127.0.0.1:3306)/test_db?charset=utf8mb4&parseTime=True&loc=Local
groups:
- name: testGroup
format: lowerCamel
apis:
# API /query/testDB/testGroup/listByIdOrName
- name: listByIdOrName
sql: select * from test where 0=0 {#name} and name like {name} {/name} {#id} and id = {id} {/id} {#size} limit {size} {/size}
# API /query/testDB/testGroup/listByIds
- name: listByIds
sql: select * from test where id in {ids}
# API /command/testDB/testGroup/editNameById
- name: editNameById
sql: update test set name = {name} where id = {id} limit 1