-
Notifications
You must be signed in to change notification settings - Fork 23
/
config.yaml
123 lines (123 loc) · 2.55 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
host: "127.0.0.1"
port: 9900
pretty_json: true
endpoints:
-
path: "/info"
methods:
GET:
type: "info"
-
path: "/test"
methods:
GET:
type: "shell"
config:
single_result: 0
commands:
-
chdir: "/tmp"
command: "cat out.out"
format: "json"
-
path: "/multi"
methods:
GET:
type: "multi"
config:
single_result: 0
tasks:
-
type: "http"
config:
single_result: 0
urls:
-
url: "http://www.google.com"
-
path: "/ip"
raw_response: true
methods:
GET:
type: "http"
config:
urls:
-
url: "http://ip.jsontest.com/"
format: "json"
POST:
type: "http"
config:
urls:
-
url: "http://ip.jsontest.com/"
format: "json"
method: "GET"
-
path: "/postgres/{id:[0-9]+}"
methods:
GET:
type: "postgres"
config:
return_queries: true
queries:
-
url: "postgres://user:pass@localhost/test"
query: "SELECT * FROM auth_user WHERE id = $1"
args:
- "{{.url.id}}"
-
path: "/redis/{id:[0-9]+}"
methods:
GET:
type: "redis"
config:
database: 1
return_queries: true
queries:
-
command: "GET"
args:
- "aaaa"
type: "string"
-
path: "/mysql/{id:[0-9]+}"
methods:
GET:
type: "mysql"
config:
return_queries: true
queries:
-
url: "user:password@tcp(127.0.0.1:3306)/database"
query: "SELECT * FROM auth_user WHERE id = ?"
args:
- "{{.url.id}}"
-
path: "/file/some"
methods:
GET:
type: "filesystem"
config:
file: "/tmp/file"
-
path: "/static/{file:.+}"
methods:
GET:
type: "filesystem"
config:
file: "{{.url.file}}"
output: "{{.query.output}}"
directory: "/tmp"
index: true
authorizers:
basic:
type: "basic"
config:
username: "hello"
password: "world"
custom:
type: "http"
config:
url: "http://localhost:8080/"
data: '{"user": "{{.username}}", "password": "{{.password}}"}'