Compare commits
924 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
df33db24bb | ||
|
437b06b64b | ||
|
f649e2946e | ||
|
1b61176818 | ||
|
374447ccc7 | ||
|
af9349d4a7 | ||
|
4ff911def0 | ||
|
e890bfcf10 | ||
|
9a5cbbba49 | ||
|
b877bea86c | ||
|
306ac20457 | ||
|
ba138581e1 | ||
|
456c59c746 | ||
|
6c76c041c4 | ||
|
a239be993c | ||
|
a82df0d931 | ||
|
e4595860f5 | ||
|
18ecda7955 | ||
|
8ddb191a7a | ||
|
cd6b772e72 | ||
|
29a4ac42d0 | ||
|
5d3bc0fabd | ||
|
1d5d3ecd7a | ||
|
8033d052fe | ||
|
6d0bf1c68b | ||
|
560f3d9b29 | ||
|
7ea64c46e9 | ||
|
88b46ef9ef | ||
|
ef34f01914 | ||
|
f5b3568893 | ||
|
6147ee925e | ||
|
5586d16afd | ||
|
ca4d92d793 | ||
|
0a50672ab6 | ||
|
f6b219772d | ||
|
ad848a6478 | ||
|
0418264070 | ||
|
882674867c | ||
|
e39f18b0d1 | ||
|
6efa4e2beb | ||
|
17a108f75f | ||
|
bc6825c148 | ||
|
395152c1ab | ||
|
5e5f0de0e2 | ||
|
b3ae2f4dbb | ||
|
726b6e69f7 | ||
|
c00b690ed3 | ||
|
8d37f5df8d | ||
|
5b6dbaf43e | ||
|
b8008606fd | ||
|
f51c12ed9a | ||
|
3c0af95468 | ||
|
ee4c6a3a8b | ||
|
d44f75af1b | ||
|
b221446bb0 | ||
|
523449f050 | ||
|
322048d5af | ||
|
671715042e | ||
|
f37bb2e7dc | ||
|
3267832fe5 | ||
|
e31b01b80e | ||
|
0a18432860 | ||
|
a2baa85b08 | ||
|
3bfdc21256 | ||
|
49da5d7acc | ||
|
5bc2cd9be4 | ||
|
07739ee84e | ||
|
91d23be4e3 | ||
|
9dcb1e1c9c | ||
|
5729dddaf9 | ||
|
d1bb22d768 | ||
|
db61a9a175 | ||
|
e4a97d4813 | ||
|
8dd6880f8c | ||
|
34dfbe2c36 | ||
|
2110ecc382 | ||
|
4db34f5894 | ||
|
d1a338107b | ||
|
0d0b7e117f | ||
|
3538f9719f | ||
|
feaafdc559 | ||
|
eb148eb8f0 | ||
|
e879d41ee4 | ||
|
bb26f5b2c7 | ||
|
8e61d3eadf | ||
|
749ab36b1a | ||
|
c68874743d | ||
|
1a76f4ebfc | ||
|
59238d1dc1 | ||
|
661f3d6899 | ||
|
14b889a85f | ||
|
ac25171420 | ||
|
7281ed5968 | ||
|
dc541b2c72 | ||
|
9a854fd8fe | ||
|
8eb44c404d | ||
|
61b25e1213 | ||
|
d3a5a3d0d6 | ||
|
366fcf0bed | ||
|
29c0fcbad6 | ||
|
de84d5d463 | ||
|
078114ee67 | ||
|
49f350fb00 | ||
|
e141b5ff20 | ||
|
181f163cb5 | ||
|
30a9d3ae8d | ||
|
83e09ad5a7 | ||
|
8e5255a275 | ||
|
e4f06368bb | ||
|
0edd87324c | ||
|
96e034aa75 | ||
|
821432263a | ||
|
5edb16f36e | ||
|
a233bc0045 | ||
|
eed40d095e | ||
|
0d0e5295f4 | ||
|
51ac4bc688 | ||
|
4f97592965 | ||
|
be5a763d39 | ||
|
c435ce0224 | ||
|
67d8ede247 | ||
|
5e98ce32b7 | ||
|
a2c01655f0 | ||
|
3a71281937 | ||
|
f235ec8b5a | ||
|
fa7df05b92 | ||
|
1f3ac7a9ec | ||
|
5bd002a568 | ||
|
5fb0cc5fab | ||
|
818b9595aa | ||
|
c78f641e85 | ||
|
081380c8d5 | ||
|
7e451bce0b | ||
|
a082ec0604 | ||
|
973a10a9d1 | ||
|
1ec95096d5 | ||
|
e81cc45405 | ||
|
b9ef11e8bf | ||
|
0d8dd03c3d | ||
|
74d610d9ad | ||
|
9146ca6c63 | ||
|
d7e0ae0fa0 | ||
|
29ee48530c | ||
|
abe53a4bdd | ||
|
2d23bedf12 | ||
|
4e17fb476b | ||
|
c803ec7e26 | ||
|
7e67f33766 | ||
|
9dd5644183 | ||
|
5a8028a72d | ||
|
747de511d4 | ||
|
7800938fd2 | ||
|
ab80fe13e9 | ||
|
5d106c4064 | ||
|
2ac1026e4b | ||
|
b78c7e1c53 | ||
|
849bdcda7b | ||
|
5aae8cd0e3 | ||
|
adc5a2020a | ||
|
40b1521f72 | ||
|
ac23c66659 | ||
|
84bc33db8a | ||
|
6392df36c3 | ||
|
c82843279c | ||
|
b394eb8e55 | ||
|
bb422d4454 | ||
|
3dfe23836c | ||
|
d45f39aae3 | ||
|
cb091040a8 | ||
|
ddd538944a | ||
|
1f879f67a9 | ||
|
ee89dedd0f | ||
|
9ab5333652 | ||
|
3bd97ae1b0 | ||
|
432062e0f4 | ||
|
0c8bbb4bc2 | ||
|
48e96c46d5 | ||
|
25e9acf618 | ||
|
a517e80236 | ||
|
3d4d3bc73b | ||
|
cf4d1f73fa | ||
|
c203d1a0d8 | ||
|
5f29f6b039 | ||
|
f75b5b867b | ||
|
67463ca136 | ||
|
8db541f37f | ||
|
a5229d0e92 | ||
|
38ec0f9f95 | ||
|
3d80759a21 | ||
|
d95cd36b3e | ||
|
4c6b96ad5d | ||
|
c3bef2867e | ||
|
efc5bff2e1 | ||
|
ffe3db8c08 | ||
|
4ada0feae3 | ||
|
e17de6058e | ||
|
9efe6cfb39 | ||
|
c86a1a50bd | ||
|
c55476b196 | ||
|
3b47decbb0 | ||
|
d0bfa082e0 | ||
|
6b7a8b009e | ||
|
ca59e585d8 | ||
|
bbde7a108a | ||
|
87731a8b5c | ||
|
29d4bd4ccf | ||
|
925ad90f91 | ||
|
650ae61c43 | ||
|
02f3f9704f | ||
|
da7c3057b4 | ||
|
040b45cafa | ||
|
8ece310b9f | ||
|
96959db3c2 | ||
|
6360100611 | ||
|
b833044cea | ||
|
97909830f5 | ||
|
8ae2de2f49 | ||
|
bf7b659e89 | ||
|
4e3c7749af | ||
|
f63441921f | ||
|
725ba83606 | ||
|
281906c0b5 | ||
|
8ed121f43d | ||
|
81a9cab2b3 | ||
|
8d98a417c5 | ||
|
6fa81b179b | ||
|
9e169fbb42 | ||
|
27f84f880a | ||
|
0d9c941b4e | ||
|
8865aa9c8c | ||
|
6d8c4218f1 | ||
|
c134a43337 | ||
|
780759dc27 | ||
|
85128f08f3 | ||
|
d2f8c1e5f1 | ||
|
9c88b9c1e9 | ||
|
13fd2ce4e2 | ||
|
9979f516d6 | ||
|
39a5cd2d6e | ||
|
784516283f | ||
|
ce503232c3 | ||
|
f2edf9130f | ||
|
413ab50fc4 | ||
|
c1880bd3ff | ||
|
0f0a672275 | ||
|
06c5f991e7 | ||
|
babc5b7a38 | ||
|
b96c996a45 | ||
|
fb8f2c2f9a | ||
|
6794937391 | ||
|
f022e84979 | ||
|
fd5ac952cc | ||
|
07f60e5c77 | ||
|
628b8a7e1f | ||
|
30a442807d | ||
|
1626c8edd1 | ||
|
ca6561bf6c | ||
|
273a81471d | ||
|
8b07a67133 | ||
|
32089ea272 | ||
|
658acd147c | ||
|
ca3370a6ac | ||
|
c4e2557de2 | ||
|
6f2b4fdf86 | ||
|
f302ff71c9 | ||
|
fee87a44d6 | ||
|
8944609b63 | ||
|
be87c45f27 | ||
|
1b1807c79a | ||
|
a8f4699816 | ||
|
ac3df6dd77 | ||
|
5c67908460 | ||
|
7b67ef3015 | ||
|
e5a3b5ee2f | ||
|
5e9ff4d2bf | ||
|
daa71764b6 | ||
|
6a6c2ef192 | ||
|
320315956d | ||
|
4f10d129c2 | ||
|
62eb3fcd85 | ||
|
ab40e4e2cf | ||
|
0bb9450642 | ||
|
a6e15532b9 | ||
|
9a89a8a77e | ||
|
fe3675dc7a | ||
|
5c9acc2bff | ||
|
c94e937a50 | ||
|
3e4e10e644 | ||
|
ba7bb57ca2 | ||
|
14c125150a | ||
|
053701a702 | ||
|
3fc3e43042 | ||
|
b0dc68d7d4 | ||
|
e895baaeb4 | ||
|
c47f6fdb21 | ||
|
9e188e441a | ||
|
f6efcdf9f9 | ||
|
b1ceda3af4 | ||
|
cd3a0684d0 | ||
|
f25e54c6cb | ||
|
66f86cf497 | ||
|
d260edc547 | ||
|
ba1e6fa984 | ||
|
6b59f36213 | ||
|
1894960762 | ||
|
83c5c55f32 | ||
|
fb8c0b9a48 | ||
|
d34691152c | ||
|
cea80b482e | ||
|
c460a8fa5c | ||
|
5f852437fe | ||
|
8aded1a685 | ||
|
f2acb9e150 | ||
|
6f3a00c9b8 | ||
|
fbae107c04 | ||
|
6c1ae77a2a | ||
|
67e8ca6714 | ||
|
a56d976947 | ||
|
ac0bb6bee2 | ||
|
dee67dac75 | ||
|
9458cfbd1a | ||
|
4b8bdd22b3 | ||
|
a4c143e2d1 | ||
|
e91019feb9 | ||
|
8a37ec72b7 | ||
|
c263a33095 | ||
|
4b2c0115db | ||
|
673f40bd85 | ||
|
b9f8108cd3 | ||
|
a16ecf656b | ||
|
842cff130b | ||
|
346b9b4b79 | ||
|
56c317d223 | ||
|
b7b150a979 | ||
|
fae848bd1b | ||
|
a5b8087dc5 | ||
|
7aa078e025 | ||
|
4b6b276b64 | ||
|
0373daae5c | ||
|
7f30dd0475 | ||
|
d2a77c2371 | ||
|
104f65b541 | ||
|
d0fb4b6914 | ||
|
42c3272def | ||
|
2812889d61 | ||
|
bd3a13b2a5 | ||
|
289d179142 | ||
|
deca493912 | ||
|
d16bf7d6c0 | ||
|
3f1415dad1 | ||
|
3e744b6b2d | ||
|
56c4f8a106 | ||
|
99ef8bae4c | ||
|
b7f0343730 | ||
|
c807b59fb4 | ||
|
60fc57431a | ||
|
d988a3a307 | ||
|
de763d3fa9 | ||
|
21bfb61cc8 | ||
|
a79adeb280 | ||
|
9b7a019222 | ||
|
e65143d276 | ||
|
61bb183eda | ||
|
f3d3a6db91 | ||
|
9ebb443cb7 | ||
|
fa4c4d0a8d | ||
|
3e1518fef6 | ||
|
e59db84721 | ||
|
c281b31fc8 | ||
|
1c93ca9896 | ||
|
df5836e573 | ||
|
41ef35f0d0 | ||
|
5e6ce8643f | ||
|
f575400bc8 | ||
|
6d9a335b0e | ||
|
f94eb5f318 | ||
|
245fa421a2 | ||
|
655094a816 | ||
|
d544650b05 | ||
|
d9d682585c | ||
|
44a202552e | ||
|
fd6673420b | ||
|
0e9cd5db9c | ||
|
6da6e6f145 | ||
|
bdaa7460e4 | ||
|
d6d1c1ac35 | ||
|
67958155fc | ||
|
198bd74ec6 | ||
|
92eec95dad | ||
|
b73a034fca | ||
|
11b508f021 | ||
|
c2b5be37f9 | ||
|
1a04863a08 | ||
|
077d3eb993 | ||
|
ac38221bdf | ||
|
9f146b8fc3 | ||
|
9a2d9659a7 | ||
|
6faae5350a | ||
|
2616709e7f | ||
|
bed9ff084c | ||
|
fb3082b0bb | ||
|
c8439b8429 | ||
|
4c3632d3e7 | ||
|
24d8cd57da | ||
|
b7c0a8b0c2 | ||
|
d6d7b22b1e | ||
|
5269c957ce | ||
|
bf8d2672c8 | ||
|
8461acab9b | ||
|
731ae43fe8 | ||
|
5354c85352 | ||
|
22a37bb923 | ||
|
07bbece704 | ||
|
9af2f50d81 | ||
|
7b148f7970 | ||
|
a1e52d919f | ||
|
899b487daa | ||
|
86eeb5fc44 | ||
|
62a708b416 | ||
|
a7ce8704b3 | ||
|
7319a13077 | ||
|
95bd4d93c5 | ||
|
69c33f0395 | ||
|
cd4caea2dc | ||
|
c9daf19940 | ||
|
7c2540b193 | ||
|
3e600552dc | ||
|
69ee6b1699 | ||
|
ca1ea042b2 | ||
|
f26df7d9bb | ||
|
ba45705571 | ||
|
bf8ea71c77 | ||
|
7deb64a5de | ||
|
e283865d3d | ||
|
a32be3e96b | ||
|
0cfd6eab3f | ||
|
c2361f13e6 | ||
|
bc81de54b9 | ||
|
07884bc9b1 | ||
|
58c3204187 | ||
|
19d3deddd4 | ||
|
f0233b947e | ||
|
c6a90a2fd0 | ||
|
3607c30d98 | ||
|
717105f243 | ||
|
2373e4a06d | ||
|
4c76803f13 | ||
|
6a46e88f8f | ||
|
e4e94d5be0 | ||
|
a3b896fa70 | ||
|
60347a90e9 | ||
|
a02d4ec46f | ||
|
485bae8f22 | ||
|
655477316b | ||
|
e22f87dee7 | ||
|
d3337322dd | ||
|
6202f4f943 | ||
|
b42cc9ed3e | ||
|
fbf72c0f61 | ||
|
cbd0b0c070 | ||
|
874f049323 | ||
|
42ab4020e2 | ||
|
7ab9683b87 | ||
|
865facfd05 | ||
|
0951f4a202 | ||
|
882ec27969 | ||
|
a84158c1ff | ||
|
161d3ec817 | ||
|
5b15249689 | ||
|
602fce1c7e | ||
|
f2f653e345 | ||
|
b55738bd6e | ||
|
b39a59ce72 | ||
|
9872daf29f | ||
|
91044e730b | ||
|
656a7dceef | ||
|
d636502eaa | ||
|
389fd158ad | ||
|
30fa63b379 | ||
|
691063545c | ||
|
421934efed | ||
|
f056b9dc7f | ||
|
48d421ba28 | ||
|
096b714117 | ||
|
0d25dc1aaa | ||
|
63d3c2d06f | ||
|
5fc704ccad | ||
|
61d99561c1 | ||
|
c26ce2083f | ||
|
847d71f72a | ||
|
3c35039445 | ||
|
1a64d44857 | ||
|
ba5f0c212c | ||
|
4eddb5d7f3 | ||
|
3b104710d5 | ||
|
74db0004bd | ||
|
6e67352a0f | ||
|
b127f02468 | ||
|
c9c53d9670 | ||
|
d36dbb868b | ||
|
b7fb2cfe92 | ||
|
d0a0c77556 | ||
|
9469b9c78a | ||
|
e4988f34c7 | ||
|
1fe9e24f0a | ||
|
9c39de3454 | ||
|
9bb68ad4eb | ||
|
5bf774bee1 | ||
|
99514464fb | ||
|
3bf1c1e531 | ||
|
e2e31094aa | ||
|
f29ff15167 | ||
|
1c64252015 | ||
|
ead19915f3 | ||
|
967e0dd98a | ||
|
bd0324dba0 | ||
|
607fb83a1e | ||
|
bb5fc58f3a | ||
|
afbec0aca9 | ||
|
1e5d9dfbff | ||
|
cfcb657cde | ||
|
7f243e6f06 | ||
|
7e7032c051 | ||
|
b7b808d98d | ||
|
a21289bf11 | ||
|
4a8d01224a | ||
|
f0eebc43e3 | ||
|
49fbf031d1 | ||
|
4060718e5c | ||
|
49b0f11ae7 | ||
|
9b83d35ef4 | ||
|
eb20add0c7 | ||
|
1f122e9145 | ||
|
329d0ecaed | ||
|
77a2ee948a | ||
|
ebeda6345e | ||
|
e35138ebed | ||
|
8ba6c4f7e7 | ||
|
6df7b72e08 | ||
|
fe13b12f43 | ||
|
ea28da90b2 | ||
|
b243324c65 | ||
|
a2dde00f40 | ||
|
5ff07faa7e | ||
|
272c652847 | ||
|
3964bbf3fe | ||
|
11175aaa5f | ||
|
7fcc4a7ef0 | ||
|
5abb9458c7 | ||
|
0ca5587a6f | ||
|
d29650882b | ||
|
9c3a7b02ec | ||
|
ef3a073af5 | ||
|
15c4857a4b | ||
|
63a71afbc8 | ||
|
64761ee9c6 | ||
|
d6c344b5ec | ||
|
d27826d10e | ||
|
4ac52a0e25 | ||
|
efa841d75a | ||
|
d1fac583ea | ||
|
8cb44c7b97 | ||
|
f2293a9dda | ||
|
da0d1d4a2f | ||
|
6a8d5e2166 | ||
|
d732665a23 | ||
|
e0748c9bc7 | ||
|
23573543a3 | ||
|
bfb328238e | ||
|
64cc4f57d6 | ||
|
7a3c91c6a4 | ||
|
508bc62852 | ||
|
59e8446d47 | ||
|
d13596d2f7 | ||
|
9adccfa341 | ||
|
5cc3b53378 | ||
|
b62b0a2fb7 | ||
|
1faac4edf2 | ||
|
4c60dce169 | ||
|
771f31f44d | ||
|
8bedb95e1d | ||
|
ac4be08df2 | ||
|
0d6e058e23 | ||
|
bee2ceb667 | ||
|
6af13d4f40 | ||
|
9dd0ebd899 | ||
|
6e97bfa717 | ||
|
07b69f41eb | ||
|
6bd2ac7d6d | ||
|
528e5ef3bc | ||
|
bc1c50ac92 | ||
|
8c2ab42b75 | ||
|
62053d15d4 | ||
|
6fed642aba | ||
|
72ac549a58 | ||
|
9f38617135 | ||
|
94eec805df | ||
|
05a940e732 | ||
|
1c43cc2181 | ||
|
657ee73ff1 | ||
|
4ee5d993cf | ||
|
70a445e2d7 | ||
|
2115da210d | ||
|
540554c4f6 | ||
|
1337c50d28 | ||
|
c5ceb3b2b1 | ||
|
57fc1d8f08 | ||
|
1518ecd1e9 | ||
|
6be0343918 | ||
|
cf8812c932 | ||
|
5bc3e474a9 | ||
|
13eaa346bc | ||
|
d7437cc4a7 | ||
|
ddb3c6590c | ||
|
89d6773bda | ||
|
3651b9484f | ||
|
2200c950b7 | ||
|
14f84f01b5 | ||
|
cb014027bb | ||
|
32e5155783 | ||
|
a3159ad59e | ||
|
60a40197f1 | ||
|
7d693a4271 | ||
|
f192748bf9 | ||
|
96f401cba6 | ||
|
ffd2430160 | ||
|
190cd2d6bb | ||
|
7ba58bdbd3 | ||
|
08ab62108f | ||
|
1028de8158 | ||
|
301499dc52 | ||
|
5c2f13ed8e | ||
|
e30ad81f69 | ||
|
21f36f535f | ||
|
c14236823a | ||
|
551a9fe1c6 | ||
|
e3399e1035 | ||
|
c413b4af3f | ||
|
dbf5dec23b | ||
|
10f0eb17d7 | ||
|
e3b680c351 | ||
|
0df0545777 | ||
|
165bfc9f5f | ||
|
5830bd73b9 | ||
|
3c4ce839b9 | ||
|
ac9f052309 | ||
|
049e424957 | ||
|
07e78aec48 | ||
|
3fec135fe5 | ||
|
867fe1322b | ||
|
95208a50a7 | ||
|
514b13fcc2 | ||
|
4cbc1f5bbe | ||
|
64de36cdf2 | ||
|
093b48ad7b | ||
|
05f6a55a0b | ||
|
2523424f68 | ||
|
b81325d7bf | ||
|
3e10b7b2b1 | ||
|
e5cb750015 | ||
|
28f72086ec | ||
|
a6b9bd7b01 | ||
|
2c5eac9dad | ||
|
87f61b8527 | ||
|
74bfe490c6 | ||
|
015167f34d | ||
|
4bafc7ff1a | ||
|
bf8beb50b4 | ||
|
e5034a34f5 | ||
|
a561605653 | ||
|
e8596c1554 | ||
|
ab67481e99 | ||
|
1b611e67c8 | ||
|
c5aa2b9f77 | ||
|
cff6c4d1f5 | ||
|
077cf75ef2 | ||
|
ff1770204c | ||
|
b9a95840e0 | ||
|
2d7576c57e | ||
|
251aac716a | ||
|
6694a42270 | ||
|
f78a4c6ad1 | ||
|
83fad8bcda | ||
|
f539e813aa | ||
|
5d65166777 | ||
|
70346138a7 | ||
|
d68656559c | ||
|
01660b5b80 | ||
|
74010acd85 | ||
|
7c7d255172 | ||
|
058f1e9835 | ||
|
b4fc629ec0 | ||
|
ae06b2da75 | ||
|
54d423a11f | ||
|
5da6c97a00 | ||
|
bf2f13443f | ||
|
9ce4c3fe2f | ||
|
4a07bf666d | ||
|
5be46b4b20 | ||
|
7fd825b76b | ||
|
b23d59dec7 | ||
|
492d450d26 | ||
|
04412f3624 | ||
|
c41057b28a | ||
|
8312bc0100 | ||
|
85ac43bc5e | ||
|
d1a0780c7a | ||
|
f9b8d76527 | ||
|
26f00eeae4 | ||
|
1bc2df2178 | ||
|
8dfbcef198 | ||
|
6690b7735d | ||
|
a9e7222e5e | ||
|
f8edeb2775 | ||
|
d1786fe159 | ||
|
157a12fb7c | ||
|
3f723b1638 | ||
|
e2e9835d01 | ||
|
7599617b67 | ||
|
18a5b11033 | ||
|
fff31b0f34 | ||
|
c02e30663a | ||
|
4c6527cafc | ||
|
55bddb12e5 | ||
|
d95861e1fb | ||
|
94754a5cb3 | ||
|
546f862236 | ||
|
f105e29e56 | ||
|
5c15993d06 | ||
|
a369ea1080 | ||
|
98068c0f57 | ||
|
e0ef8683a2 | ||
|
66412a75f9 | ||
|
84d8fb0899 | ||
|
c631537dbe | ||
|
8d2f49541c | ||
|
55a28e3437 | ||
|
67ea2d01c8 | ||
|
dab229e37c | ||
|
7084473330 | ||
|
dd2e335fae | ||
|
1ff87bbc12 | ||
|
2ebfdcf0c9 | ||
|
8ab161a3ee | ||
|
e74b9617be | ||
|
c3d88c83e3 | ||
|
3e912a7474 | ||
|
0d726a1d83 | ||
|
affabf065e | ||
|
e6ea77d263 | ||
|
df73c2a458 | ||
|
96c5c79aef | ||
|
64922f07ff | ||
|
bae21f3210 | ||
|
0702a4e58e | ||
|
31f1d304d6 | ||
|
291a74c295 | ||
|
c0e9d1eb2f | ||
|
a7cabdde3a | ||
|
3af560c2d0 | ||
|
1d23d5c761 | ||
|
995db12f22 | ||
|
4c60bfb66b | ||
|
1716747047 | ||
|
090b4d0388 | ||
|
a9f068daa8 | ||
|
f5ee91aeb3 | ||
|
e2ee2cbf2d | ||
|
dcf8364899 | ||
|
b783602786 | ||
|
005e64eb9f | ||
|
e9e5d293cc | ||
|
a57255350f | ||
|
781442bf1e | ||
|
604bd2c576 | ||
|
d9e1e1bbb7 | ||
|
907e9e182d | ||
|
0f238a5021 | ||
|
8d432bd60a | ||
|
fd932c7678 | ||
|
46a9f5cb96 | ||
|
f990d3f674 | ||
|
4a6de8deee | ||
|
9a7a216b23 | ||
|
fccaaaae4d | ||
|
a882b0be82 | ||
|
db7bbab768 | ||
|
030e553549 | ||
|
8b0ca8e367 | ||
|
83b2b07200 | ||
|
bdb591af9e | ||
|
2993a08777 | ||
|
2a2d3d57ec | ||
|
33c2c131c2 | ||
|
e4286c96a7 | ||
|
2d9486b6fd | ||
|
632ee2d0bd | ||
|
b09f201819 | ||
|
baaf39c23d | ||
|
b7467c10e8 | ||
|
701ef18606 | ||
|
3e7d2b216b | ||
|
41f16c20b6 | ||
|
96bc0b53c3 | ||
|
b80baa78ef | ||
|
ce88e0745d | ||
|
256bd2336f | ||
|
1b6993ee70 | ||
|
af319b4729 | ||
|
1a15b4f18d | ||
|
3ddd3b49fd | ||
|
e2c4b32311 | ||
|
8fb2821343 | ||
|
93f29734b7 | ||
|
569d2b0dce | ||
|
b7e1e4fd9e | ||
|
a1cebb889c | ||
|
f040de5788 | ||
|
e869c76e63 | ||
|
6f298ada61 | ||
|
26a8e234fa | ||
|
43b5720532 | ||
|
a25f196ceb | ||
|
f9e15a4470 | ||
|
447cf12629 | ||
|
bb0f4bfa62 | ||
|
bf036cbb88 | ||
|
8a9495de18 | ||
|
3e9614879a | ||
|
0057c793ee | ||
|
ea5bdab374 | ||
|
0e96ad62bb | ||
|
aa26f3908b | ||
|
d3f90647f5 | ||
|
7d6c6129f2 | ||
|
0bc12f3bdf | ||
|
13767d13d6 | ||
|
a215958cec | ||
|
288086c78d | ||
|
31aa9c9644 | ||
|
ddbfdf6f6e | ||
|
43c7063538 | ||
|
3f089fb239 | ||
|
2d0f7d5126 | ||
|
06272d3d2c | ||
|
3885c0ad6d | ||
|
099ec00155 | ||
|
92fcae9c54 | ||
|
22e8961c80 | ||
|
4d5adefa41 | ||
|
feaa0e51bd | ||
|
af83cb57d0 | ||
|
8b4f3507c3 | ||
|
bda3dba369 | ||
|
beb313af40 | ||
|
4fad9d672f | ||
|
0fca64929e | ||
|
9e476e5b24 | ||
|
0819a265f5 | ||
|
ad8eac4f07 | ||
|
b49de0e23e | ||
|
efbd024da9 | ||
|
e7ddcb91fc | ||
|
3095cff7d9 | ||
|
6d8f5aa3a7 | ||
|
27a06850ff | ||
|
dce6423c85 | ||
|
d79fcbf447 | ||
|
631d9ae4eb | ||
|
0ac349ba67 | ||
|
1b0563a4a6 | ||
|
1db2a29d49 | ||
|
14e62a0830 | ||
|
2280a61c2b | ||
|
f3e6f64c0c | ||
|
d04b7a0d88 | ||
|
71dfd5d8f8 | ||
|
133d66c2fe | ||
|
6f1d38a0e2 | ||
|
aad9ecde6b | ||
|
ae9324295c | ||
|
0acec1105b | ||
|
5a9a716ca6 | ||
|
418899d425 | ||
|
e7379e3683 | ||
|
29bebcc73e | ||
|
26064b20b8 | ||
|
3dc9b20543 | ||
|
444dbd5160 | ||
|
c2f99e253c | ||
|
5c7fb7b698 | ||
|
733d7d9583 | ||
|
6d2f532806 | ||
|
f76c9226c8 | ||
|
ecbc41b622 | ||
|
4f60d3e7df | ||
|
7d86fd223e | ||
|
e3ed216a70 | ||
|
2a3d792591 | ||
|
4d754275ab | ||
|
44e5f0957c | ||
|
83ef426b93 | ||
|
8b8f5fac69 | ||
|
424ccce43c | ||
|
ad41cc985d | ||
|
981d5a199f | ||
|
48f2bb4cd8 | ||
|
aa270925e9 | ||
|
3836f7c40a | ||
|
9fcd32c2ca | ||
|
2657bcf30c | ||
|
86ad7d6238 | ||
|
c97e6ada5b | ||
|
cd40ca7f0a | ||
|
e2ac3b4880 | ||
|
7f8b185e48 | ||
|
e923db7e94 | ||
|
e53d9fa3eb | ||
|
411734f392 | ||
|
a457a40359 | ||
|
caa183c8de | ||
|
0ea5014edb | ||
|
046cb0b76e | ||
|
9fd480cf77 |
.babelrc.dockerignorefontsimages
.github/ISSUE_TEMPLATE
.gitignore.versionDEV-README.mdDockerfileDockerfile.armhfJenkinsfileREADME.mdTODO.mdbackend
.editorconfig.golangci.yml.nancy-ignoreREADME.mdTaskfile.ymlgo.modgo.sum
cmd
server
embed
api_docs
api.swagger.json
main.gocomponents
CertificateAuthorityList.jsonCertificateAuthorityObject.jsonCertificateList.jsonCertificateObject.jsonConfigObject.jsonDNSProviderList.jsonDNSProviderObject.jsonDeletedItemResponse.jsonErrorObject.jsonFilterObject.jsonHealthObject.jsonHostList.jsonHostObject.jsonNginxTemplateList.jsonNginxTemplateObject.jsonSettingList.jsonSettingObject.jsonSortObject.jsonStreamList.jsonStreamObject.jsonTokenObject.jsonUpstreamList.jsonUpstreamObject.jsonUserAuthObject.jsonUserList.jsonUserObject.json
main.gopaths
certificates-authorities
certificates
config
dns-providers
get.jsonhosts
nginx-templates
schema
settings
streams
tokens
upstreams
users
migrations
nginx
internal
acme
api
context
filters
handler
access_lists.goauth.gocertificate_authorities.gocertificates.goconfig.godns_providers.gohealth.gohelpers.gohosts.gonginx_templates.gonot_allowed.gonot_found.goschema.gosettings.gostreams.gotokens.goupstreams.gousers.go
http
middleware
access_control.goauth.goauth_cache.gobody_context.gocors.goenforce_setup.goexpansion.gofilters.gopretty_print.goschema.go
router.gorouter_test.goschema
certificates.gocommon.gocreate_access_list.gocreate_certificate_authority.gocreate_dns_provider.gocreate_host.gocreate_nginx_template.gocreate_setting.gocreate_stream.gocreate_upstream.gocreate_user.goget_token.goset_auth.goupdate_access_list.goupdate_certificate_authority.goupdate_dns_provider.goupdate_host.goupdate_nginx_template.goupdate_setting.goupdate_stream.goupdate_upstream.goupdate_user.go
server.gocache
config
database
dnsproviders
common.godns_acmedns.godns_ad.godns_ali.godns_autodns.godns_aws.godns_azure.godns_cf.godns_cloudns.godns_conoha.godns_cx.godns_cyon.godns_da.godns_dgon.godns_dnsimple.godns_dp.godns_dpi.godns_dreamhost.godns_duckdns.godns_dyn.godns_dynu.godns_euserv.godns_freedns.godns_gandi_livedns.godns_gd.godns_he.godns_infoblox.godns_inwx.godns_ispconfig.godns_kinghost.godns_linode_v4.godns_loopia.godns_lua.godns_me.godns_namecom.godns_namesilo.godns_nsone.godns_pdns.godns_selectel.godns_servercow.godns_tele3.godns_unoeuro.godns_vscale.godns_yandex.godns_zilore.godns_zonomi.go
entity
accesslist
auth
certificate
certificateauthority
dnsprovider
filters.gofilters_schema.gohost
lists_query.gonginxtemplate
setting
stream
upstream
upstreamserver
user
errors
jobqueue
jwt
logger
model
nginx
status
types
util
validator
scripts
bin
config
doc
docker-compose.ymldocker
.dive-ciDockerfile
dev
docker-compose.ci.ymldocker-compose.dev.ymlrootfs
bin
etc
cont-finish.d
cont-init.d
fix-attrs.d
nginx
conf.d
default.confdev.conf
mime.typesnginx.confinclude
acme-challenge.confassets.confblock-exploits.confforce-ssl.confproxy.confresolvers.confssl-ciphers.conf
production.confservices.d
root
var
www
html
docs
.gitignore
.vuepress
README.mdadvanced-config
dev-notes
faq
guide
package.jsonscreenshots
setup
third-party
upgrading
yarn.lockfrontend
.env.development.eslintrc.gitignore.prettierrcREADME.mdcheck-locales.jsglobalSetup.jsjest.eslint.jspackage.json
knexfile.jsnodemon.jsonpackage.jsonpublic
images
default-avatar.jpg
index.htmlfavicon
android-chrome-192x192.pngandroid-chrome-512x512.pngapple-touch-icon.pngbrowserconfig.xmlfavicon-16x16.pngfavicon-32x32.pngfavicon.icomstile-150x150.pngsafari-pinned-tab.svgsite.webmanifest
logo-256.pnglogo-bold-horizontal-grey.svglogo-no-text.svglogo-text-horizontal-grey.pnglogo-text-vertical-grey.pngsrc
App.test.tsxApp.tsxRouter.tsxreact-app-env.d.ts
tsconfig.jsonyarn.lockapi
npm
base.tscreateCertificate.tscreateCertificateAuthority.tscreateDNSProvider.tscreateUser.tsgetAccessLists.tsgetCertificate.tsgetCertificateAuthorities.tsgetCertificateAuthority.tsgetCertificates.tsgetDNSProvider.tsgetDNSProviders.tsgetDNSProvidersAcmesh.tsgetHealth.tsgetHosts.tsgetNginxTemplates.tsgetSettings.tsgetToken.tsgetUpstreamNginxConfig.tsgetUpstreams.tsgetUser.tsgetUsers.tshelpers.tsindex.tsmodels.tsrefreshToken.tsresponseTypes.tssetAuth.tssetCertificate.tssetCertificateAuthority.tssetDNSProvider.tssetUser.ts
components
EmptyList.tsx
Flag
Footer.tsxHelpDrawer
Loader
Loading.tsxLocalePicker.tsxMonospace.tsxNavigation
Permissions
PrettyButton.tsxSiteWrapper.tsxSpinnerPage.tsxTable
Formatters.tsxRowActionsMenu.tsxTableHelpers.tsTableLayout.tsxTextFilter.tsxindex.tsreact-table-config.d.ts
ThemeSwitcher.tsxUnhealthy.tsxindex.tscontext
declarations.d.tsfonts
source-sans-pro
source-sans-pro-v14-latin-700.woffsource-sans-pro-v14-latin-700.woff2source-sans-pro-v14-latin-700italic.woffsource-sans-pro-v14-latin-700italic.woff2source-sans-pro-v14-latin-italic.woffsource-sans-pro-v14-latin-italic.woff2source-sans-pro-v14-latin-regular.woffsource-sans-pro-v14-latin-regular.woff2
hooks
index.tsuseAccessLists.tsuseCertificate.tsuseCertificateAuthorities.tsuseCertificateAuthority.tsuseCertificates.tsuseDNSProvider.tsuseDNSProviders.tsuseDNSProvidersAcmesh.tsuseHealth.tsuseHosts.tsuseNginxTemplates.tsuseSettings.tsuseUpstreamNginxConfig.tsuseUpstreams.tsuseUser.tsuseUsers.ts
img
index.scssindex.tsxlocale
modals
AccessListCreateModal.tsxCertificateAuthorityCreateModal.tsxCertificateAuthorityEditModal.tsxCertificateCreateModal.tsxCertificateEditModal.tsxChangePasswordModal.tsxDNSProviderCreateModal.tsxHostCreateModal.tsxProfileModal.tsxSetPasswordModal.tsxUpstreamCreateModal.tsxUpstreamEditModal.tsxUpstreamNginxConfigModal.tsxUserCreateModal.tsxUserEditModal.tsxindex.ts
modules
pages
AccessLists
AuditLog
CertificateAuthorities
Certificates
DNSProviders
Dashboard
Hosts
Login
NginxTemplates
Settings
Setup
Upstreams
Users
styles
theme
rootfs
etc
fix-attrs.d
nginx
services.d
root
var
www
html
scripts
.common.shbuildx
ci
destroy-devdocs-builddocs-uploadfrontend-lintgo-multiarch-wrapperinstall-s6sqlitestart-devstop-devtest-devwait-healthysrc
backend
app.jsdb.jsimporter.jsindex.js
internal
access-list.jsaudit-log.jscertificate.jsdead-host.jshost.jsnginx.jsproxy-host.jsredirection-host.jsreport.jsstream.jstoken.jsuser.js
lib
access.js
logger.jsmigrate.jsaccess
access_lists-create.jsonaccess_lists-delete.jsonaccess_lists-get.jsonaccess_lists-list.jsonaccess_lists-update.jsonauditlog-list.jsoncertificates-create.jsoncertificates-delete.jsoncertificates-get.jsoncertificates-list.jsoncertificates-update.jsondead_hosts-create.jsondead_hosts-delete.jsondead_hosts-get.jsondead_hosts-list.jsondead_hosts-update.jsonpermissions.jsonproxy_hosts-create.jsonproxy_hosts-delete.jsonproxy_hosts-get.jsonproxy_hosts-list.jsonproxy_hosts-update.jsonredirection_hosts-create.jsonredirection_hosts-delete.jsonredirection_hosts-get.jsonredirection_hosts-list.jsonredirection_hosts-update.jsonreports-hosts.jsonroles.jsonstreams-create.jsonstreams-delete.jsonstreams-get.jsonstreams-list.jsonstreams-update.jsonusers-create.jsonusers-delete.jsonusers-get.jsonusers-list.jsonusers-loginas.jsonusers-password.jsonusers-permissions.jsonusers-update.json
error.jsexpress
helpers.jsmigrate_template.jsutils.jsvalidator
migrations
models
access_list.jsaccess_list_auth.jsaudit-log.jsauth.jscertificate.jsdead_host.jsproxy_host.jsredirection_host.jsstream.jstoken.jsuser.jsuser_permission.js
routes
schema
definitions.json
setup.jsendpoints
access-lists.jsoncertificates.jsondead-hosts.jsonproxy-hosts.jsonredirection-hosts.jsonstreams.jsontokens.jsonusers.json
examples.jsonindex.jsontemplates
_assets.conf_certificates.conf_exploits.conf_forced_ssl.conf_header_comment.conf_listen.confdead_host.confletsencrypt-request.confproxy_host.confredirection_host.confstream.conf
views
frontend
app-images
favicons
js
app
api.jsrouter.jstokens.js
audit-log
cache.jscontroller.jsdashboard
empty
error
help
i18n.jsmain.jsnginx
access
certificates-list-item.ejscertificates
dead
proxy
redirection
stream
ui
user
users
i18n
index.jslib
login.jslogin
models
scss
test
.eslintrc.json.gitignore.prettierrcREADME.md
webpack.config.jscypress
Dockerfile
jsconfig.jsonmulti-reporter.jsonpackage.jsonyarn.lockconfig
fixtures
integration
api
Certificates.spec.jsFullCertProvision.spec.jsHealth.spec.jsSettings.spec.jsSetupPhase.spec.jsSwaggerSchema.spec.jsUpstreams.spec.jsUsers.spec.js
ui
plugins
support
12
.babelrc
12
.babelrc
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"presets": [
|
|
||||||
["env", {
|
|
||||||
"targets": {
|
|
||||||
"browsers": ["Chrome >= 65"]
|
|
||||||
},
|
|
||||||
"debug": false,
|
|
||||||
"modules": false,
|
|
||||||
"useBuiltIns": "usage"
|
|
||||||
}]
|
|
||||||
]
|
|
||||||
}
|
|
8
.dockerignore
Normal file
8
.dockerignore
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Ignore everything
|
||||||
|
*
|
||||||
|
|
||||||
|
# Only allow the following for docker build:
|
||||||
|
!backend/
|
||||||
|
!docker/
|
||||||
|
!scripts/
|
||||||
|
!test/
|
55
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
55
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: bug
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Are you in the right place?
|
||||||
|
- If you are looking for support on how to get your upstream server forwarding, please consider asking the community on Reddit.
|
||||||
|
- If you are writing code changes to contribute and need to ask about the internals of the software, Gitter is the best place to ask.
|
||||||
|
- If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the *right place.*
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
**Checklist**
|
||||||
|
- Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image?
|
||||||
|
- Yes / No
|
||||||
|
- Are you sure you're not using someone else's docker image?
|
||||||
|
- Yes / No
|
||||||
|
- Have you searched for similar issues (both open and closed)?
|
||||||
|
- Yes / No
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
<!-- A clear and concise description of what the bug is. -->
|
||||||
|
|
||||||
|
|
||||||
|
**Nginx Proxy Manager Version**
|
||||||
|
<!-- What version of Nginx Proxy Manager is reported on the login page? -->
|
||||||
|
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
<!-- A clear and concise description of what you expected to happen. -->
|
||||||
|
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||||
|
|
||||||
|
|
||||||
|
**Operating System**
|
||||||
|
<!-- Please specify if using a Rpi, Mac, orchestration tool or any other setups that might affect the reproduction of this error. -->
|
||||||
|
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
<!-- Add any other context about the problem here, docker version, browser version, logs if applicable to the problem. Too much info is better than too little. -->
|
18
.github/ISSUE_TEMPLATE/dns_challenge_request.md
vendored
Normal file
18
.github/ISSUE_TEMPLATE/dns_challenge_request.md
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
name: DNS challenge provider request
|
||||||
|
about: Suggest a new provider to be available for a certificate DNS challenge
|
||||||
|
title: ''
|
||||||
|
labels: dns provider request
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**What provider would you like to see added to NPM?**
|
||||||
|
<!-- What is this provider called? -->
|
||||||
|
|
||||||
|
|
||||||
|
**Have you checked if a certbot plugin exists?**
|
||||||
|
<!--
|
||||||
|
Currently NPM only supports DNS challenge providers for which a certbot plugin exists.
|
||||||
|
You can visit pypi.org, and search for a package with the name `certbot-dns-<privider>`.
|
||||||
|
-->
|
32
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
32
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Are you in the right place?
|
||||||
|
- If you are looking for support on how to get your upstream server forwarding, please consider asking the community on Reddit.
|
||||||
|
- If you are writing code changes to contribute and need to ask about the internals of the software, Gitter is the best place to ask.
|
||||||
|
- If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the *right place.*
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||||
|
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
<!-- A clear and concise description of what you want to happen. -->
|
||||||
|
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
||||||
|
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
<!-- Add any other context or screenshots about the feature request here. -->
|
31
.gitignore
vendored
31
.gitignore
vendored
@@ -1,14 +1,25 @@
|
|||||||
|
git.idea
|
||||||
|
.env
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.idea
|
|
||||||
._*
|
._*
|
||||||
node_modules
|
*.code-workspace
|
||||||
core*
|
vendor
|
||||||
config/development.json
|
bin/*
|
||||||
|
backend/config.json
|
||||||
|
backend/embed/assets
|
||||||
|
test/node_modules
|
||||||
|
*/node_modules
|
||||||
|
docs/.vuepress/dist
|
||||||
|
frontend/build
|
||||||
|
frontend/yarn-error.log
|
||||||
|
frontend/.npmrc
|
||||||
|
frontend/src/locale/lang
|
||||||
|
test/cypress/fixtures/example.json
|
||||||
|
.vscode
|
||||||
|
docker-build
|
||||||
|
data
|
||||||
dist
|
dist
|
||||||
webpack_stats.html
|
backend/embed/acme.sh
|
||||||
data/*
|
docker/dev/resolv.conf
|
||||||
yarn-error.log
|
docker/dev/dnsrouter-config.json.tmp
|
||||||
yarn.lock
|
|
||||||
tmp
|
|
||||||
certbot.log
|
|
||||||
|
|
||||||
|
1
.version
Normal file
1
.version
Normal file
@@ -0,0 +1 @@
|
|||||||
|
3.0.0a
|
93
DEV-README.md
Normal file
93
DEV-README.md
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
# Development
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone nginxproxymanager
|
||||||
|
cd nginxproxymanager
|
||||||
|
./scripts/start-dev
|
||||||
|
# wait a minute or 2 for the package to build after container start
|
||||||
|
curl http://127.0.0.1:3081/api/
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using Local Test Certificate Authorities
|
||||||
|
|
||||||
|
It's handy to use these instead of hitting production or staging acme servers
|
||||||
|
when testing lots of stuff.
|
||||||
|
|
||||||
|
Firstly create your first user using the api:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl --request POST \
|
||||||
|
--url http://127.0.0.1:3081/api/users \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{
|
||||||
|
"name": "Bobby Tables",
|
||||||
|
"nickname": "Bobby",
|
||||||
|
"email": "you@example.com",
|
||||||
|
"roles": ["admin"],
|
||||||
|
"is_disabled": false,
|
||||||
|
"auth": {
|
||||||
|
"type": "password",
|
||||||
|
"secret": "changeme"
|
||||||
|
}
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
Then login in with those credentials to get your JWT token and set
|
||||||
|
that as an environment variable:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
NPM_TOKEN=$(curl --request POST \
|
||||||
|
--url http://127.0.0.1:3081/api/tokens \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{
|
||||||
|
"type": "password",
|
||||||
|
"identity": "you@example.com",
|
||||||
|
"secret": "changeme"
|
||||||
|
}' | jq -r '.result.token')
|
||||||
|
```
|
||||||
|
|
||||||
|
Then choose one or both of the following CA's to set up.
|
||||||
|
|
||||||
|
### SmallStep Acme CA
|
||||||
|
|
||||||
|
[StepCA](https://github.com/smallstep/certificates) is SmallSteps's test CA server.
|
||||||
|
|
||||||
|
- ✅ HTTP Validation
|
||||||
|
- ✅ DNS Validation
|
||||||
|
|
||||||
|
Create a Certificate Authority that points to the Step CA:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl --request POST \
|
||||||
|
--url http://127.0.0.1:3081/api/certificate-authorities \
|
||||||
|
--header "Authorization: Bearer ${NPM_TOKEN}" \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{
|
||||||
|
"name": "Step CA",
|
||||||
|
"acmesh_server": "https://ca.internal/acme/acme/directory",
|
||||||
|
"ca_bundle": "/etc/ssl/certs/NginxProxyManager.crt",
|
||||||
|
"max_domains": 2
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pebble Test Acme CA
|
||||||
|
|
||||||
|
[Pebble](https://github.com/letsencrypt/pebble) is Let's Encrypt's own test CA server.
|
||||||
|
|
||||||
|
- ✅ HTTP Validation
|
||||||
|
- ❌ DNS Validation
|
||||||
|
|
||||||
|
Create a Certificate Authority that points to the Pebble CA:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl --request POST \
|
||||||
|
--url http://127.0.0.1:3081/api/certificate-authorities \
|
||||||
|
--header "Authorization: Bearer ${NPM_TOKEN}" \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{
|
||||||
|
"name": "Pebble CA",
|
||||||
|
"acmesh_server": "https://pebble/dir",
|
||||||
|
"ca_bundle": "/etc/ssl/certs/pebble.minica.pem",
|
||||||
|
"max_domains": 2
|
||||||
|
}'
|
||||||
|
```
|
39
Dockerfile
39
Dockerfile
@@ -1,39 +0,0 @@
|
|||||||
FROM jc21/nginx-proxy-manager-base:latest
|
|
||||||
|
|
||||||
MAINTAINER Jamie Curnow <jc@jc21.com>
|
|
||||||
LABEL maintainer="Jamie Curnow <jc@jc21.com>"
|
|
||||||
|
|
||||||
ENV SUPPRESS_NO_CONFIG_WARNING=1
|
|
||||||
ENV S6_FIX_ATTRS_HIDDEN=1
|
|
||||||
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf
|
|
||||||
|
|
||||||
# Nginx, Node and required packages should already be installed from the base image
|
|
||||||
|
|
||||||
# root filesystem
|
|
||||||
COPY rootfs /
|
|
||||||
|
|
||||||
# s6 overlay
|
|
||||||
RUN curl -L -o /tmp/s6-overlay-amd64.tar.gz "https://github.com/just-containers/s6-overlay/releases/download/v1.21.4.0/s6-overlay-amd64.tar.gz" \
|
|
||||||
&& tar xzf /tmp/s6-overlay-amd64.tar.gz -C /
|
|
||||||
|
|
||||||
# App
|
|
||||||
ENV NODE_ENV=production
|
|
||||||
|
|
||||||
ADD dist /app/dist
|
|
||||||
ADD node_modules /app/node_modules
|
|
||||||
ADD src/backend /app/src/backend
|
|
||||||
ADD package.json /app/package.json
|
|
||||||
ADD knexfile.js /app/knexfile.js
|
|
||||||
|
|
||||||
# Volumes
|
|
||||||
VOLUME [ "/data", "/etc/letsencrypt" ]
|
|
||||||
CMD [ "/init" ]
|
|
||||||
|
|
||||||
# Ports
|
|
||||||
EXPOSE 80
|
|
||||||
EXPOSE 81
|
|
||||||
EXPOSE 443
|
|
||||||
EXPOSE 9876
|
|
||||||
|
|
||||||
HEALTHCHECK --interval=15s --timeout=3s CMD curl -f http://localhost:9876/health || exit 1
|
|
||||||
|
|
@@ -1,38 +0,0 @@
|
|||||||
FROM jc21/nginx-proxy-manager-base:armhf
|
|
||||||
|
|
||||||
MAINTAINER Jamie Curnow <jc@jc21.com>
|
|
||||||
LABEL maintainer="Jamie Curnow <jc@jc21.com>"
|
|
||||||
|
|
||||||
ENV SUPPRESS_NO_CONFIG_WARNING=1
|
|
||||||
ENV S6_FIX_ATTRS_HIDDEN=1
|
|
||||||
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf
|
|
||||||
|
|
||||||
# Nginx, Node and required packages should already be installed from the base image
|
|
||||||
|
|
||||||
# root filesystem
|
|
||||||
COPY rootfs /
|
|
||||||
|
|
||||||
# s6 overlay
|
|
||||||
RUN curl -L -o /tmp/s6-overlay-armhf.tar.gz "https://github.com/just-containers/s6-overlay/releases/download/v1.21.4.0/s6-overlay-armhf.tar.gz" \
|
|
||||||
&& tar xzf /tmp/s6-overlay-armhf.tar.gz -C /
|
|
||||||
|
|
||||||
# App
|
|
||||||
ENV NODE_ENV=production
|
|
||||||
|
|
||||||
ADD dist /app/dist
|
|
||||||
ADD node_modules /app/node_modules
|
|
||||||
ADD src/backend /app/src/backend
|
|
||||||
ADD package.json /app/package.json
|
|
||||||
ADD knexfile.js /app/knexfile.js
|
|
||||||
|
|
||||||
# Volumes
|
|
||||||
VOLUME [ "/data", "/etc/letsencrypt" ]
|
|
||||||
CMD [ "/init" ]
|
|
||||||
|
|
||||||
# Ports
|
|
||||||
EXPOSE 80
|
|
||||||
EXPOSE 81
|
|
||||||
EXPOSE 443
|
|
||||||
EXPOSE 9876
|
|
||||||
|
|
||||||
HEALTHCHECK --interval=15s --timeout=3s CMD curl -f http://localhost:9876/health || exit 1
|
|
283
Jenkinsfile
vendored
283
Jenkinsfile
vendored
@@ -1,124 +1,247 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
options {
|
agent {
|
||||||
buildDiscarder(logRotator(numToKeepStr: '10'))
|
label 'docker-multiarch'
|
||||||
disableConcurrentBuilds()
|
}
|
||||||
|
options {
|
||||||
|
buildDiscarder(logRotator(numToKeepStr: '5'))
|
||||||
|
disableConcurrentBuilds()
|
||||||
|
ansiColor('xterm')
|
||||||
}
|
}
|
||||||
agent any
|
|
||||||
environment {
|
environment {
|
||||||
IMAGE_NAME = "nginx-proxy-manager"
|
DOCKER_ORG = 'jc21'
|
||||||
BASE_IMAGE_NAME = "jc21/nginx-proxy-manager-base:v2"
|
IMAGE = 'nginx-proxy-manager'
|
||||||
TEMP_IMAGE_NAME = "nginx-proxy-manager-build_${BUILD_NUMBER}"
|
BUILD_VERSION = getVersion()
|
||||||
TEMP_IMAGE_NAME_ARM = "nginx-proxy-manager-arm-build_${BUILD_NUMBER}"
|
BUILD_COMMIT = getCommit()
|
||||||
TAG_VERSION = getPackageVersion()
|
MAJOR_VERSION = '3'
|
||||||
MAJOR_VERSION = "2"
|
BRANCH_LOWER = "${BRANCH_NAME.toLowerCase().replaceAll('/', '-')}"
|
||||||
|
COMPOSE_PROJECT_NAME = "npm_${BRANCH_LOWER}_${BUILD_NUMBER}"
|
||||||
|
COMPOSE_FILE = 'docker/docker-compose.ci.yml'
|
||||||
|
COMPOSE_INTERACTIVE_NO_CLI = 1
|
||||||
|
BUILDX_NAME = "${COMPOSE_PROJECT_NAME}"
|
||||||
|
DOCS_BUCKET = 'jc21-npm-site-next' // TODO: change to prod when official
|
||||||
|
DOCS_CDN = 'E2Z0128EHS0Q23' // TODO: same
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Prepare') {
|
stage('Environment') {
|
||||||
steps {
|
|
||||||
sh 'docker pull $DOCKER_CI_TOOLS'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Build') {
|
|
||||||
parallel {
|
parallel {
|
||||||
stage('x86_64') {
|
stage('Master') {
|
||||||
when {
|
when {
|
||||||
branch 'master'
|
branch 'master'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
ansiColor('xterm') {
|
script {
|
||||||
// Codebase
|
env.BUILDX_PUSH_TAGS = "-t docker.io/${DOCKER_ORG}/${IMAGE}:${BUILD_VERSION} -t docker.io/${DOCKER_ORG}/${IMAGE}:${MAJOR_VERSION} -t docker.io/${DOCKER_ORG}/${IMAGE}:latest"
|
||||||
sh 'docker run --rm -v $(pwd):/app -w /app $BASE_IMAGE_NAME yarn install'
|
echo 'Building on Master is disabled!'
|
||||||
sh 'docker run --rm -v $(pwd):/app -w /app $BASE_IMAGE_NAME npm run-script build'
|
sh 'exit 1'
|
||||||
sh 'rm -rf node_modules'
|
|
||||||
sh 'docker run --rm -v $(pwd):/app -w /app $BASE_IMAGE_NAME yarn install --prod'
|
|
||||||
sh 'docker run --rm -v $(pwd):/data $DOCKER_CI_TOOLS node-prune'
|
|
||||||
|
|
||||||
// Docker Build
|
|
||||||
sh 'docker build --pull --no-cache --squash --compress -t $TEMP_IMAGE_NAME .'
|
|
||||||
|
|
||||||
// Private Registry
|
|
||||||
sh 'docker tag $TEMP_IMAGE_NAME $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$TAG_VERSION'
|
|
||||||
sh 'docker push $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$TAG_VERSION'
|
|
||||||
sh 'docker tag $TEMP_IMAGE_NAME $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$MAJOR_VERSION'
|
|
||||||
sh 'docker push $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$MAJOR_VERSION'
|
|
||||||
sh 'docker tag $TEMP_IMAGE_NAME $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:latest'
|
|
||||||
sh 'docker push $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:latest'
|
|
||||||
|
|
||||||
// Dockerhub
|
|
||||||
sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:$TAG_VERSION'
|
|
||||||
sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:$MAJOR_VERSION'
|
|
||||||
sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:latest'
|
|
||||||
|
|
||||||
withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) {
|
|
||||||
sh "docker login -u '${duser}' -p '$dpass'"
|
|
||||||
sh 'docker push docker.io/jc21/$IMAGE_NAME:$TAG_VERSION'
|
|
||||||
sh 'docker push docker.io/jc21/$IMAGE_NAME:$MAJOR_VERSION'
|
|
||||||
sh 'docker push docker.io/jc21/$IMAGE_NAME:latest'
|
|
||||||
}
|
|
||||||
|
|
||||||
sh 'docker rmi $TEMP_IMAGE_NAME'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('armhf') {
|
stage('Other') {
|
||||||
when {
|
when {
|
||||||
|
not {
|
||||||
branch 'master'
|
branch 'master'
|
||||||
}
|
}
|
||||||
agent {
|
|
||||||
label 'armhf'
|
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
ansiColor('xterm') {
|
script {
|
||||||
// Codebase
|
// Defaults to the Branch name, which is applies to all branches AND pr's
|
||||||
sh 'docker run --rm -v $(pwd):/app -w /app $BASE_IMAGE_NAME-armhf yarn install'
|
// env.BUILDX_PUSH_TAGS = "-t docker.io/jc21/${IMAGE}:github-${BRANCH_LOWER}"
|
||||||
sh 'docker run --rm -v $(pwd):/app -w /app $BASE_IMAGE_NAME-armhf npm run-script build'
|
env.BUILDX_PUSH_TAGS = "-t docker.io/${DOCKER_ORG}/${IMAGE}:v3"
|
||||||
sh 'rm -rf node_modules'
|
}
|
||||||
sh 'docker run --rm -v $(pwd):/app -w /app $BASE_IMAGE_NAME-armhf yarn install --prod'
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Frontend') {
|
||||||
|
steps {
|
||||||
|
sh './scripts/ci/build-frontend'
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
junit 'frontend/eslint.xml'
|
||||||
|
junit 'frontend/junit.xml'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
stage('Backend') {
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'npm-sentry-dsn', variable: 'SENTRY_DSN')]) {
|
||||||
|
withCredentials([usernamePassword(credentialsId: 'oss-index-token', passwordVariable: 'NANCY_TOKEN', usernameVariable: 'NANCY_USER')]) {
|
||||||
|
sh './scripts/ci/test-backend'
|
||||||
|
}
|
||||||
|
sh './scripts/ci/build-backend'
|
||||||
|
sh '''docker build --pull --no-cache \\
|
||||||
|
-t "${IMAGE}:${BRANCH_LOWER}-ci-${BUILD_NUMBER}" \\
|
||||||
|
-f docker/Dockerfile \\
|
||||||
|
--build-arg BUILD_COMMIT="${BUILD_COMMIT}" \\
|
||||||
|
--build-arg BUILD_DATE="$(date '+%Y-%m-%d %T %Z')" \\
|
||||||
|
--build-arg BUILD_VERSION="${BUILD_VERSION}" \\
|
||||||
|
.
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
archiveArtifacts allowEmptyArchive: false, artifacts: 'bin/*'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Test') {
|
||||||
|
when {
|
||||||
|
not {
|
||||||
|
equals expected: 'UNSTABLE', actual: currentBuild.result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
// Docker image check
|
||||||
|
/*
|
||||||
|
sh '''docker run --rm \
|
||||||
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
|
-v "$(pwd)/docker:/app" \
|
||||||
|
-e CI=true \
|
||||||
|
wagoodman/dive:latest --ci-config /app/.dive-ci \
|
||||||
|
"${IMAGE}:${BRANCH_LOWER}-ci-${BUILD_NUMBER}"
|
||||||
|
'''
|
||||||
|
*/
|
||||||
|
sh './scripts/ci/fulltest-cypress'
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
// Dumps to analyze later
|
||||||
|
sh 'mkdir -p debug'
|
||||||
|
sh 'docker-compose logs fullstack > debug/docker_fullstack.log'
|
||||||
|
sh 'docker-compose logs stepca > debug/docker_stepca.log'
|
||||||
|
sh 'docker-compose logs pdns > debug/docker_pdns.log'
|
||||||
|
sh 'docker-compose logs pdns-db > debug/docker_pdns-db.log'
|
||||||
|
sh 'docker-compose logs dnsrouter > debug/docker_dnsrouter.log'
|
||||||
|
junit 'test/results/junit/*'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Docs') {
|
||||||
|
when {
|
||||||
|
not {
|
||||||
|
equals expected: 'UNSTABLE', actual: currentBuild.result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
dir(path: 'docs') {
|
||||||
|
sh 'yarn install'
|
||||||
|
sh 'yarn build'
|
||||||
|
}
|
||||||
|
|
||||||
// Docker Build
|
// API Docs:
|
||||||
sh 'docker build --pull --no-cache --squash --compress -t $TEMP_IMAGE_NAME_ARM -f Dockerfile.armhf .'
|
sh 'docker-compose exec -T fullstack curl -s --output /temp-docs/api-schema.json "http://fullstack:81/api/schema"'
|
||||||
|
sh 'mkdir -p "docs/.vuepress/dist/api"'
|
||||||
// Private Registry
|
sh 'mv docs/api-schema.json docs/.vuepress/dist/api/'
|
||||||
sh 'docker tag $TEMP_IMAGE_NAME_ARM $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$TAG_VERSION-armhf'
|
|
||||||
sh 'docker push $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$TAG_VERSION-armhf'
|
|
||||||
sh 'docker tag $TEMP_IMAGE_NAME_ARM $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$MAJOR_VERSION-armhf'
|
|
||||||
sh 'docker push $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$MAJOR_VERSION-armhf'
|
|
||||||
sh 'docker tag $TEMP_IMAGE_NAME_ARM $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:latest-armhf'
|
|
||||||
sh 'docker push $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:latest-armhf'
|
|
||||||
|
|
||||||
// Dockerhub
|
|
||||||
sh 'docker tag $TEMP_IMAGE_NAME_ARM docker.io/jc21/$IMAGE_NAME:$TAG_VERSION-armhf'
|
|
||||||
sh 'docker tag $TEMP_IMAGE_NAME_ARM docker.io/jc21/$IMAGE_NAME:$MAJOR_VERSION-armhf'
|
|
||||||
sh 'docker tag $TEMP_IMAGE_NAME_ARM docker.io/jc21/$IMAGE_NAME:latest-armhf'
|
|
||||||
|
|
||||||
|
dir(path: 'docs/.vuepress/dist') {
|
||||||
|
sh 'tar -czf ../../docs.tgz *'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('MultiArch Build') {
|
||||||
|
when {
|
||||||
|
not {
|
||||||
|
equals expected: 'UNSTABLE', actual: currentBuild.result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
withCredentials([string(credentialsId: 'npm-sentry-dsn', variable: 'SENTRY_DSN')]) {
|
||||||
withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) {
|
withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) {
|
||||||
sh "docker login -u '${duser}' -p '$dpass'"
|
sh 'docker login -u "${duser}" -p "${dpass}"'
|
||||||
sh 'docker push docker.io/jc21/$IMAGE_NAME:$TAG_VERSION-armhf'
|
sh './scripts/buildx --push ${BUILDX_PUSH_TAGS}'
|
||||||
sh 'docker push docker.io/jc21/$IMAGE_NAME:$MAJOR_VERSION-armhf'
|
// sh './scripts/buildx -o type=local,dest=docker-build'
|
||||||
sh 'docker push docker.io/jc21/$IMAGE_NAME:latest-armhf'
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Docs Deploy') {
|
||||||
|
when {
|
||||||
|
allOf {
|
||||||
|
branch 'v3' // TOODO: change to master when ready
|
||||||
|
not {
|
||||||
|
equals expected: 'UNSTABLE', actual: currentBuild.result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', accessKeyVariable: 'AWS_ACCESS_KEY_ID', credentialsId: 'npm-s3-docs', secretKeyVariable: 'AWS_SECRET_ACCESS_KEY']]) {
|
||||||
|
sh """docker run --rm \\
|
||||||
|
--name \${COMPOSE_PROJECT_NAME}-docs-upload \\
|
||||||
|
-e S3_BUCKET=$DOCS_BUCKET \\
|
||||||
|
-e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \\
|
||||||
|
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \\
|
||||||
|
-v \$(pwd):/app \\
|
||||||
|
-w /app \\
|
||||||
|
jc21/ci-tools \\
|
||||||
|
scripts/docs-upload /app/docs/.vuepress/dist/
|
||||||
|
"""
|
||||||
|
|
||||||
sh 'docker rmi $TEMP_IMAGE_NAME_ARM'
|
sh """docker run --rm \\
|
||||||
|
--name \${COMPOSE_PROJECT_NAME}-docs-invalidate \\
|
||||||
|
-e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \\
|
||||||
|
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \\
|
||||||
|
jc21/ci-tools \\
|
||||||
|
aws cloudfront create-invalidation --distribution-id $DOCS_CDN --paths '/*'
|
||||||
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('PR Comment') {
|
||||||
|
when {
|
||||||
|
allOf {
|
||||||
|
changeRequest()
|
||||||
|
not {
|
||||||
|
equals expected: 'UNSTABLE', actual: currentBuild.result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
def comment = pullRequest.comment("This is an automated message from CI:\n\nDocker Image for build ${BUILD_NUMBER} is available on [DockerHub](https://cloud.docker.com/repository/docker/${DOCKER_ORG}/${IMAGE}) as `${DOCKER_ORG}/${IMAGE}:github-${BRANCH_LOWER}`\n\n**Note:** ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
always {
|
||||||
|
sh 'docker-compose down --rmi all --remove-orphans --volumes -t 30 || true'
|
||||||
|
sh './scripts/ci/build-cleanup'
|
||||||
|
echo 'Reverting ownership'
|
||||||
|
sh 'docker run --rm -v $(pwd):/data jc21/gotools:latest chown -R "$(id -u):$(id -g)" /data'
|
||||||
|
}
|
||||||
success {
|
success {
|
||||||
juxtapose event: 'success'
|
juxtapose event: 'success'
|
||||||
sh 'figlet "SUCCESS"'
|
sh 'figlet "SUCCESS"'
|
||||||
}
|
}
|
||||||
failure {
|
failure {
|
||||||
|
dir(path: 'test') {
|
||||||
|
archiveArtifacts allowEmptyArchive: true, artifacts: 'results/**/*', excludes: '**/*.xml'
|
||||||
|
}
|
||||||
|
archiveArtifacts(artifacts: 'debug/**.*', allowEmptyArchive: true)
|
||||||
juxtapose event: 'failure'
|
juxtapose event: 'failure'
|
||||||
sh 'figlet "FAILURE"'
|
sh 'figlet "FAILURE"'
|
||||||
}
|
}
|
||||||
|
unstable {
|
||||||
|
dir(path: 'test') {
|
||||||
|
archiveArtifacts allowEmptyArchive: true, artifacts: 'results/**/*', excludes: '**/*.xml'
|
||||||
|
}
|
||||||
|
archiveArtifacts(artifacts: 'debug/**.*', allowEmptyArchive: true)
|
||||||
|
juxtapose event: 'unstable'
|
||||||
|
sh 'figlet "UNSTABLE"'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def getPackageVersion() {
|
def getVersion() {
|
||||||
ver = sh(script: 'docker run --rm -v $(pwd):/data $DOCKER_CI_TOOLS bash -c "cat /data/package.json|jq -r \'.version\'"', returnStdout: true)
|
ver = sh(script: 'cat .version', returnStdout: true)
|
||||||
return ver.trim()
|
return ver.trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def getCommit() {
|
||||||
|
ver = sh(script: 'git log -n 1 --format=%h', returnStdout: true)
|
||||||
|
return ver.trim()
|
||||||
|
}
|
||||||
|
158
README.md
158
README.md
@@ -1,24 +1,35 @@
|
|||||||

|
<p align="center">
|
||||||
|
<img src="https://nginxproxymanager.com/github.png">
|
||||||
# Nginx Proxy Manager
|
<br><br>
|
||||||
|
<img src="https://img.shields.io/badge/version-2.9.19-green.svg?style=for-the-badge">
|
||||||

|
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
|
||||||

|
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
|
||||||

|
</a>
|
||||||
|
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
|
||||||
|
<img src="https://img.shields.io/docker/pulls/jc21/nginx-proxy-manager.svg?style=for-the-badge">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
This project comes as a pre-built docker image that enables you to easily forward to your websites
|
This project comes as a pre-built docker image that enables you to easily forward to your websites
|
||||||
running at home or otherwise, including free SSL, without having to know too much about Nginx or Letsencrypt.
|
running at home or otherwise, including free SSL, without having to know too much about Nginx or Letsencrypt.
|
||||||
|
|
||||||
----------
|
- [Quick Setup](#quick-setup)
|
||||||
|
- [Full Setup](https://nginxproxymanager.com/setup/)
|
||||||
|
- [Screenshots](https://nginxproxymanager.com/screenshots/)
|
||||||
|
|
||||||
**WARNING: Version 2 a complete rewrite!** If you are using the `latest` docker tag and update to version 2
|
## Project Goal
|
||||||
without preparation, horrible things might happen. Refer to the [Importing Documentation](doc/IMPORTING.md).
|
|
||||||
|
I created this project to fill a personal need to provide users with a easy way to accomplish reverse
|
||||||
|
proxying hosts with SSL termination and it had to be so easy that a monkey could do it. This goal hasn't changed.
|
||||||
|
While there might be advanced options they are optional and the project should be as simple as possible
|
||||||
|
so that the barrier for entry here is low.
|
||||||
|
|
||||||
|
<a href="https://www.buymeacoffee.com/jc21" target="_blank"><img src="http://public.jc21.com/github/by-me-a-coffee.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" ></a>
|
||||||
|
|
||||||
----------
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Beautiful and Secure Admin Interface based on [Tabler](https://tabler.github.io/)
|
- Beautiful and Secure Admin Interface based on [Chakra UI](https://chakra-ui.com/)
|
||||||
- Easily create forwarding domains, redirections, streams and 404 hosts without knowing anything about Nginx
|
- Easily create forwarding domains, redirections, streams and 404 hosts without knowing anything about Nginx
|
||||||
- Free SSL using Let's Encrypt or provide your own custom SSL certificates
|
- Free SSL using Let's Encrypt or provide your own custom SSL certificates
|
||||||
- Access Lists and basic HTTP Authentication for your hosts
|
- Access Lists and basic HTTP Authentication for your hosts
|
||||||
@@ -26,78 +37,65 @@ without preparation, horrible things might happen. Refer to the [Importing Docum
|
|||||||
- User management, permissions and audit log
|
- User management, permissions and audit log
|
||||||
|
|
||||||
|
|
||||||
## Screenshots
|
|
||||||
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/login.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/dashboard.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/proxy-hosts.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/proxy-hosts-new1.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/proxy-hosts-new2.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/redirection-hosts.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/redirection-hosts-new1.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/streams.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/streams-new1.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/dead-hosts.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/dead-hosts-new1.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/certificates.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/certificates-new1.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/certificates-new2.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/access-lists.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/access-lists-new1.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/users.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/users-permissions.jpg)
|
|
||||||
[](https://public.jc21.com/nginx-proxy-manager/v2/large/audit-log.jpg)
|
|
||||||
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
Please consult the [installation instructions](doc/INSTALL.md) for a complete guide or
|
|
||||||
if you just want to get up and running in the quickest time possible, grab all the files in the `doc/example/` folder and run `docker-compose up -d`
|
|
||||||
|
|
||||||
|
|
||||||
## Importing from Version 1?
|
|
||||||
|
|
||||||
Here's a [guide for you to migrate your configuration](doc/IMPORTING.md). You should definitely read the [installation instructions](doc/INSTALL.md) first though.
|
|
||||||
|
|
||||||
**Why should I?**
|
|
||||||
|
|
||||||
Version 2 has the following improvements:
|
|
||||||
|
|
||||||
- Management security and multiple user access
|
|
||||||
- User permissions and visibility
|
|
||||||
- Custom SSL certificate support
|
|
||||||
- Audit log of changes
|
|
||||||
- Broken nginx config detection
|
|
||||||
- Multiple domains in Let's Encrypt certificates
|
|
||||||
- Wildcard domain name support (not available with a Let's Encrypt certificate though)
|
|
||||||
- It's super sexy
|
|
||||||
|
|
||||||
|
|
||||||
## Administration
|
|
||||||
|
|
||||||
When your docker container is running, connect to it on port `81` for the admin interface.
|
|
||||||
|
|
||||||
[http://localhost:81](http://localhost:81)
|
|
||||||
|
|
||||||
Note: Requesting SSL Certificates won't work until this project is accessible from the outside world, as explained below.
|
|
||||||
|
|
||||||
|
|
||||||
### Default Administrator User
|
|
||||||
|
|
||||||
```
|
|
||||||
Email: admin@example.com
|
|
||||||
Password: changeme
|
|
||||||
```
|
|
||||||
|
|
||||||
Immediately after logging in with this default user you will be asked to modify your details and change your password.
|
|
||||||
|
|
||||||
|
|
||||||
## Hosting your home network
|
## Hosting your home network
|
||||||
|
|
||||||
I won't go in to too much detail here but here are the basics for someone new to this self-hosted world.
|
I won't go in to too much detail here but here are the basics for someone new to this self-hosted world.
|
||||||
|
|
||||||
1. Your home router will have a Port Forwarding section somewhere. Log in and find it
|
1. Your home router will have a Port Forwarding section somewhere. Log in and find it
|
||||||
2. Add port forwarding for port 80 and 443 to the server hosting this project
|
2. Add port forwarding for port 80 and 443 to the server hosting this project
|
||||||
3. Configure your domain name details to point to your home, either with a static ip or a service like DuckDNS
|
3. Configure your domain name details to point to your home, either with a static ip or a service like DuckDNS or [Amazon Route53](https://github.com/jc21/route53-ddns)
|
||||||
4. Use the Nginx Proxy Manager here as your gateway to forward to your other web based services
|
4. Use the Nginx Proxy Manager as your gateway to forward to your other web based services
|
||||||
|
|
||||||
|
|
||||||
|
## Quickest Setup
|
||||||
|
|
||||||
|
1. Install Docker and Docker-Compose
|
||||||
|
|
||||||
|
- [Docker Install documentation](https://docs.docker.com/install/)
|
||||||
|
- [Docker-Compose Install documentation](https://docs.docker.com/compose/install/)
|
||||||
|
|
||||||
|
2. Create a docker-compose.yml file similar to this:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: 'jc21/nginx-proxy-manager:v3'
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- '80:80'
|
||||||
|
- '81:81'
|
||||||
|
- '443:443'
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Bring up your stack by running
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
|
||||||
|
# If using docker-compose-plugin
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Log in to the Admin UI
|
||||||
|
|
||||||
|
When your docker container is running, connect to it on port `81` for the admin interface.
|
||||||
|
|
||||||
|
[http://127.0.0.1:81](http://127.0.0.1:81)
|
||||||
|
|
||||||
|
## Contributors
|
||||||
|
|
||||||
|
Special thanks to [all of our contributors](https://github.com/NginxProxyManager/nginx-proxy-manager/graphs/contributors).
|
||||||
|
|
||||||
|
## Getting Support
|
||||||
|
|
||||||
|
1. [Found a bug?](https://github.com/NginxProxyManager/nginx-proxy-manager/issues)
|
||||||
|
2. [Discussions](https://github.com/NginxProxyManager/nginx-proxy-manager/discussions)
|
||||||
|
3. [Development Gitter](https://gitter.im/nginx-proxy-manager/community)
|
||||||
|
4. [Reddit](https://reddit.com/r/nginxproxymanager)
|
||||||
|
|
||||||
|
## Become a Contributor
|
||||||
|
|
||||||
|
A guide to setting up your own development environment [is found here](DEV-README.md).
|
||||||
|
17
TODO.md
17
TODO.md
@@ -1,17 +0,0 @@
|
|||||||
# TODO
|
|
||||||
|
|
||||||
- Dashboard stats are caching instead of querying
|
|
||||||
|
|
||||||
Next version:
|
|
||||||
|
|
||||||
- UI Log tail
|
|
||||||
- Enable/Disable a config
|
|
||||||
|
|
||||||
Testing:
|
|
||||||
|
|
||||||
- Access Levels
|
|
||||||
- Adding a proxy host without access to read certs or access lists
|
|
||||||
- Visibility
|
|
||||||
- Forwarding
|
|
||||||
- Cert renewals
|
|
||||||
- Custom certs
|
|
8
backend/.editorconfig
Normal file
8
backend/.editorconfig
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = false
|
56
backend/.golangci.yml
Normal file
56
backend/.golangci.yml
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
linters:
|
||||||
|
enable:
|
||||||
|
- bodyclose
|
||||||
|
- errcheck
|
||||||
|
- gosimple
|
||||||
|
- govet
|
||||||
|
- gosec
|
||||||
|
- goconst
|
||||||
|
- gocritic
|
||||||
|
- gocyclo
|
||||||
|
- gofmt
|
||||||
|
- goimports
|
||||||
|
- ineffassign
|
||||||
|
- misspell
|
||||||
|
- nakedret
|
||||||
|
- prealloc
|
||||||
|
#- revive
|
||||||
|
- staticcheck
|
||||||
|
- typecheck
|
||||||
|
- unused
|
||||||
|
- unconvert
|
||||||
|
- unparam
|
||||||
|
linters-settings:
|
||||||
|
goconst:
|
||||||
|
# minimal length of string constant
|
||||||
|
# default: 3
|
||||||
|
min-len: 2
|
||||||
|
# minimum number of occurrences of string constant
|
||||||
|
# default: 3
|
||||||
|
min-occurences: 2
|
||||||
|
misspell:
|
||||||
|
locale: UK
|
||||||
|
ignore-words:
|
||||||
|
- color
|
||||||
|
issues:
|
||||||
|
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
|
||||||
|
# We have chosen an arbitrary value that works based on practical usage.
|
||||||
|
max-same: 20
|
||||||
|
# See cmdline flag documentation for more info about default excludes --exclude-use-default
|
||||||
|
# Nothing is excluded by default
|
||||||
|
exclude-use-default: false
|
||||||
|
# Excluding configuration per-path, per-linter, per-text and per-source
|
||||||
|
exclude-rules:
|
||||||
|
# Exclude some linters from running on tests files. # TODO: Add examples why this is good
|
||||||
|
|
||||||
|
- path: _test\.go
|
||||||
|
linters:
|
||||||
|
# Tests should be simple? Add example why this is good?
|
||||||
|
- gocyclo
|
||||||
|
# Error checking adds verbosity and complexity for minimal value
|
||||||
|
- errcheck
|
||||||
|
# Table test encourage duplication in defining the table tests.
|
||||||
|
- dupl
|
||||||
|
# Hard coded example tokens, SQL injection and other bad practices may
|
||||||
|
# want to be tested
|
||||||
|
- gosec
|
41
backend/.nancy-ignore
Normal file
41
backend/.nancy-ignore
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# If you need to ignore any of nancy's warnings add them
|
||||||
|
|
||||||
|
# here with a reference to the package/version that
|
||||||
|
|
||||||
|
# triggers them and rational for ignoring it.
|
||||||
|
|
||||||
|
# pkg:golang/github.com/coreos/etcd@3.3.10
|
||||||
|
|
||||||
|
# etcd before versions 3.3.23 and 3.4.10 does not perform any password length validation
|
||||||
|
|
||||||
|
CVE-2020-15115
|
||||||
|
|
||||||
|
# pkg:golang/github.com/coreos/etcd@3.3.10
|
||||||
|
|
||||||
|
# In ectd before versions 3.4.10 and 3.3.23, gateway TLS authentication is only applied to endpoints detected in DNS SRV records
|
||||||
|
|
||||||
|
CVE-2020-15136
|
||||||
|
|
||||||
|
# pkg:golang/github.com/coreos/etcd@3.3.10
|
||||||
|
|
||||||
|
# In etcd before versions 3.3.23 and 3.4.10, the etcd gateway is a simple TCP proxy to allow for basic service discovery and access
|
||||||
|
|
||||||
|
CVE-2020-15114
|
||||||
|
|
||||||
|
# pkg:golang/github.com/gorilla/websocket@1.4.0
|
||||||
|
|
||||||
|
# Integer Overflow or Wraparound
|
||||||
|
|
||||||
|
CWE-190
|
||||||
|
|
||||||
|
# jwt-go before 4.0.0-preview1 allows attackers to bypass intended access restrict...
|
||||||
|
|
||||||
|
CVE-2020-26160
|
||||||
|
|
||||||
|
# https://ossindex.sonatype.org/vulnerability/sonatype-2021-1485
|
||||||
|
|
||||||
|
sonatype-2021-1485
|
||||||
|
|
||||||
|
# CWE-770: Allocation of Resources Without Limits or Throttling
|
||||||
|
|
||||||
|
CVE-2022-41717
|
6
backend/README.md
Normal file
6
backend/README.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Backend
|
||||||
|
|
||||||
|
## Guides and materials
|
||||||
|
|
||||||
|
- [Nginx Proxy Protocol](https://docs.nginx.com/nginx/admin-guide/load-balancer/using-proxy-protocol/)
|
||||||
|
-
|
69
backend/Taskfile.yml
Normal file
69
backend/Taskfile.yml
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
version: "2"
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
default:
|
||||||
|
cmds:
|
||||||
|
- task: run
|
||||||
|
|
||||||
|
run:
|
||||||
|
desc: Build and run
|
||||||
|
sources:
|
||||||
|
- internal/**/*.go
|
||||||
|
- cmd/**/*.go
|
||||||
|
- ../frontend/src/locale/src/*.json
|
||||||
|
cmds:
|
||||||
|
- task: locale
|
||||||
|
- task: build
|
||||||
|
- cmd: echo -e "==> Running..."
|
||||||
|
silent: true
|
||||||
|
- cmd: ../dist/bin/server
|
||||||
|
ignore_error: true
|
||||||
|
silent: true
|
||||||
|
env:
|
||||||
|
LOG_LEVEL: debug
|
||||||
|
|
||||||
|
build:
|
||||||
|
desc: Build the server
|
||||||
|
cmds:
|
||||||
|
- cmd: echo -e "==> Building..."
|
||||||
|
silent: true
|
||||||
|
- cmd: rm -f dist/bin/*
|
||||||
|
silent: true
|
||||||
|
- cmd: go build -ldflags="-X main.commit={{.GIT_COMMIT}} -X main.version={{.VERSION}}" -o ../dist/bin/server ./cmd/server/main.go
|
||||||
|
silent: true
|
||||||
|
- task: lint
|
||||||
|
vars:
|
||||||
|
GIT_COMMIT:
|
||||||
|
sh: git log -n 1 --format=%h
|
||||||
|
VERSION:
|
||||||
|
sh: cat ../.version
|
||||||
|
env:
|
||||||
|
GO111MODULE: on
|
||||||
|
CGO_ENABLED: 1
|
||||||
|
|
||||||
|
lint:
|
||||||
|
desc: Linting
|
||||||
|
cmds:
|
||||||
|
- cmd: echo -e "==> Linting..."
|
||||||
|
silent: true
|
||||||
|
- cmd: bash scripts/lint.sh
|
||||||
|
silent: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
desc: Testing
|
||||||
|
cmds:
|
||||||
|
- cmd: echo -e "==> Testing..."
|
||||||
|
silent: true
|
||||||
|
- cmd: bash scripts/test.sh
|
||||||
|
silent: true
|
||||||
|
|
||||||
|
locale:
|
||||||
|
desc: Locale
|
||||||
|
dir: /app/frontend
|
||||||
|
cmds:
|
||||||
|
- cmd: yarn locale-compile
|
||||||
|
silent: true
|
||||||
|
ignore_error: true
|
||||||
|
- cmd: chown -R "$PUID:$PGID" src/locale/lang
|
||||||
|
silent: true
|
||||||
|
ignore_error: true
|
54
backend/cmd/server/main.go
Normal file
54
backend/cmd/server/main.go
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os"
|
||||||
|
"os/signal"
|
||||||
|
"syscall"
|
||||||
|
|
||||||
|
"npm/internal/api"
|
||||||
|
"npm/internal/config"
|
||||||
|
"npm/internal/database"
|
||||||
|
"npm/internal/entity/certificate"
|
||||||
|
"npm/internal/entity/host"
|
||||||
|
"npm/internal/entity/setting"
|
||||||
|
"npm/internal/jobqueue"
|
||||||
|
"npm/internal/logger"
|
||||||
|
)
|
||||||
|
|
||||||
|
var commit string
|
||||||
|
var version string
|
||||||
|
var sentryDSN string
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
config.InitArgs(&version, &commit)
|
||||||
|
config.Init(&version, &commit, &sentryDSN)
|
||||||
|
|
||||||
|
database.Migrate(func() {
|
||||||
|
setting.ApplySettings()
|
||||||
|
database.CheckSetup()
|
||||||
|
|
||||||
|
// Internal Job Queue
|
||||||
|
jobqueue.Start()
|
||||||
|
certificate.AddPendingJobs()
|
||||||
|
host.AddPendingJobs()
|
||||||
|
|
||||||
|
// Http server
|
||||||
|
api.StartServer()
|
||||||
|
irqchan := make(chan os.Signal, 1)
|
||||||
|
signal.Notify(irqchan, syscall.SIGINT, syscall.SIGTERM)
|
||||||
|
|
||||||
|
for irq := range irqchan {
|
||||||
|
if irq == syscall.SIGINT || irq == syscall.SIGTERM {
|
||||||
|
logger.Info("Got ", irq, " shutting server down ...")
|
||||||
|
// Close db
|
||||||
|
err := database.GetInstance().Close()
|
||||||
|
if err != nil {
|
||||||
|
logger.Error("DatabaseCloseError", err)
|
||||||
|
}
|
||||||
|
// nolint
|
||||||
|
jobqueue.Shutdown()
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
297
backend/embed/api_docs/api.swagger.json
Normal file
297
backend/embed/api_docs/api.swagger.json
Normal file
@@ -0,0 +1,297 @@
|
|||||||
|
{
|
||||||
|
"openapi": "3.0.0",
|
||||||
|
"info": {
|
||||||
|
"title": "Nginx Proxy Manager API",
|
||||||
|
"version": "{{VERSION}}"
|
||||||
|
},
|
||||||
|
"paths": {
|
||||||
|
"/": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/get.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/certificates": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/certificates/get.json"
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"$ref": "file://./paths/certificates/post.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/certificates/{certificateID}": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/certificates/certificateID/get.json"
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"$ref": "file://./paths/certificates/certificateID/put.json"
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"$ref": "file://./paths/certificates/certificateID/delete.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/certificates-authorities": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/certificates-authorities/get.json"
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"$ref": "file://./paths/certificates-authorities/post.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/certificates-authorities/{caID}": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/certificates-authorities/caID/get.json"
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"$ref": "file://./paths/certificates-authorities/caID/put.json"
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"$ref": "file://./paths/certificates-authorities/caID/delete.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/config": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/config/get.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/dns-providers": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/dns-providers/get.json"
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"$ref": "file://./paths/dns-providers/post.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/dns-providers/{providerID}": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/dns-providers/providerID/get.json"
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"$ref": "file://./paths/dns-providers/providerID/put.json"
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"$ref": "file://./paths/dns-providers/providerID/delete.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/hosts": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/hosts/get.json"
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"$ref": "file://./paths/hosts/post.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/hosts/{hostID}": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/hosts/hostID/get.json"
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"$ref": "file://./paths/hosts/hostID/put.json"
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"$ref": "file://./paths/hosts/hostID/delete.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/hosts/{hostID}/nginx-config": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/hosts/hostID/nginx-config/get.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/nginx-templates": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/nginx-templates/get.json"
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"$ref": "file://./paths/nginx-templates/post.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/nginx-templates/{templateID}": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/nginx-templates/templateID/get.json"
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"$ref": "file://./paths/nginx-templates/templateID/put.json"
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"$ref": "file://./paths/nginx-templates/templateID/delete.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/schema": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/schema/get.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/settings": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/settings/get.json"
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"$ref": "file://./paths/settings/post.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/settings/{name}": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/settings/name/get.json"
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"$ref": "file://./paths/settings/name/put.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/streams": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/streams/get.json"
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"$ref": "file://./paths/streams/post.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/streams/{streamID}": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/streams/streamID/get.json"
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"$ref": "file://./paths/streams/streamID/put.json"
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"$ref": "file://./paths/streams/streamID/delete.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/tokens": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/tokens/get.json"
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"$ref": "file://./paths/tokens/post.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/upstreams": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/upstreams/get.json"
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"$ref": "file://./paths/upstreams/post.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/upstreams/{upstreamID}": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/upstreams/upstreamID/get.json"
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"$ref": "file://./paths/upstreams/upstreamID/put.json"
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"$ref": "file://./paths/upstreams/upstreamID/delete.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/upstreams/{upstreamID}/nginx-config": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/upstreams/upstreamID/nginx-config/get.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/users": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/users/get.json"
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"$ref": "file://./paths/users/post.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/users/{userID}": {
|
||||||
|
"get": {
|
||||||
|
"$ref": "file://./paths/users/userID/get.json"
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"$ref": "file://./paths/users/userID/put.json"
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"$ref": "file://./paths/users/userID/delete.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/users/{userID}/auth": {
|
||||||
|
"post": {
|
||||||
|
"$ref": "file://./paths/users/userID/auth/post.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"components": {
|
||||||
|
"schemas": {
|
||||||
|
"CertificateAuthorityList": {
|
||||||
|
"$ref": "file://./components/CertificateAuthorityList.json"
|
||||||
|
},
|
||||||
|
"CertificateAuthorityObject": {
|
||||||
|
"$ref": "file://./components/CertificateAuthorityObject.json"
|
||||||
|
},
|
||||||
|
"CertificateList": {
|
||||||
|
"$ref": "file://./components/CertificateList.json"
|
||||||
|
},
|
||||||
|
"CertificateObject": {
|
||||||
|
"$ref": "file://./components/CertificateObject.json"
|
||||||
|
},
|
||||||
|
"ConfigObject": {
|
||||||
|
"$ref": "file://./components/ConfigObject.json"
|
||||||
|
},
|
||||||
|
"DeletedItemResponse": {
|
||||||
|
"$ref": "file://./components/DeletedItemResponse.json"
|
||||||
|
},
|
||||||
|
"DNSProviderList": {
|
||||||
|
"$ref": "file://./components/DNSProviderList.json"
|
||||||
|
},
|
||||||
|
"DNSProviderObject": {
|
||||||
|
"$ref": "file://./components/DNSProviderObject.json"
|
||||||
|
},
|
||||||
|
"ErrorObject": {
|
||||||
|
"$ref": "file://./components/ErrorObject.json"
|
||||||
|
},
|
||||||
|
"FilterObject": {
|
||||||
|
"$ref": "file://./components/FilterObject.json"
|
||||||
|
},
|
||||||
|
"HealthObject": {
|
||||||
|
"$ref": "file://./components/HealthObject.json"
|
||||||
|
},
|
||||||
|
"HostList": {
|
||||||
|
"$ref": "file://./components/HostList.json"
|
||||||
|
},
|
||||||
|
"HostObject": {
|
||||||
|
"$ref": "file://./components/HostObject.json"
|
||||||
|
},
|
||||||
|
"NginxTemplateList": {
|
||||||
|
"$ref": "file://./components/NginxTemplateList.json"
|
||||||
|
},
|
||||||
|
"NginxTemplateObject": {
|
||||||
|
"$ref": "file://./components/NginxTemplateObject.json"
|
||||||
|
},
|
||||||
|
"SettingList": {
|
||||||
|
"$ref": "file://./components/SettingList.json"
|
||||||
|
},
|
||||||
|
"SettingObject": {
|
||||||
|
"$ref": "file://./components/SettingObject.json"
|
||||||
|
},
|
||||||
|
"SortObject": {
|
||||||
|
"$ref": "file://./components/SortObject.json"
|
||||||
|
},
|
||||||
|
"StreamList": {
|
||||||
|
"$ref": "file://./components/StreamList.json"
|
||||||
|
},
|
||||||
|
"StreamObject": {
|
||||||
|
"$ref": "file://./components/StreamObject.json"
|
||||||
|
},
|
||||||
|
"TokenObject": {
|
||||||
|
"$ref": "file://./components/TokenObject.json"
|
||||||
|
},
|
||||||
|
"UpstreamList": {
|
||||||
|
"$ref": "file://./components/UpstreamList.json"
|
||||||
|
},
|
||||||
|
"UpstreamObject": {
|
||||||
|
"$ref": "file://./components/UpstreamObject.json"
|
||||||
|
},
|
||||||
|
"UserAuthObject": {
|
||||||
|
"$ref": "file://./components/UserAuthObject.json"
|
||||||
|
},
|
||||||
|
"UserList": {
|
||||||
|
"$ref": "file://./components/UserList.json"
|
||||||
|
},
|
||||||
|
"UserObject": {
|
||||||
|
"$ref": "file://./components/UserObject.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "CertificateAuthorityList",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["total", "offset", "limit", "sort"],
|
||||||
|
"properties": {
|
||||||
|
"total": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Total number of rows"
|
||||||
|
},
|
||||||
|
"offset": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Offset"
|
||||||
|
},
|
||||||
|
"limit": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Limit"
|
||||||
|
},
|
||||||
|
"sort": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Sorting",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/SortObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Filters",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/FilterObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/CertificateAuthorityObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "CertificateAuthorityObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"created_on",
|
||||||
|
"modified_on",
|
||||||
|
"name",
|
||||||
|
"acmesh_server",
|
||||||
|
"ca_bundle",
|
||||||
|
"max_domains",
|
||||||
|
"is_wildcard_supported",
|
||||||
|
"is_readonly"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"created_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"modified_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"acmesh_server": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 2,
|
||||||
|
"maxLength": 255
|
||||||
|
},
|
||||||
|
"ca_bundle": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 0,
|
||||||
|
"maxLength": 255
|
||||||
|
},
|
||||||
|
"max_domains": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"is_wildcard_supported": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"is_readonly": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
40
backend/embed/api_docs/components/CertificateList.json
Normal file
40
backend/embed/api_docs/components/CertificateList.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "CertificateList",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["total", "offset", "limit", "sort"],
|
||||||
|
"properties": {
|
||||||
|
"total": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Total number of rows"
|
||||||
|
},
|
||||||
|
"offset": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Offset"
|
||||||
|
},
|
||||||
|
"limit": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Limit"
|
||||||
|
},
|
||||||
|
"sort": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Sorting",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/SortObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Filters",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/FilterObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/CertificateObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
85
backend/embed/api_docs/components/CertificateObject.json
Normal file
85
backend/embed/api_docs/components/CertificateObject.json
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "CertificateObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"created_on",
|
||||||
|
"modified_on",
|
||||||
|
"expires_on",
|
||||||
|
"type",
|
||||||
|
"user_id",
|
||||||
|
"certificate_authority_id",
|
||||||
|
"dns_provider_id",
|
||||||
|
"name",
|
||||||
|
"is_ecc",
|
||||||
|
"status",
|
||||||
|
"domain_names"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"created_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"modified_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"expires_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["custom", "http", "dns"]
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"certificate_authority_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"certificate_authority": {
|
||||||
|
"$ref": "#/components/schemas/CertificateAuthorityObject"
|
||||||
|
},
|
||||||
|
"dns_provider_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"domain_names": {
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["ready", "requesting", "failed", "provided"]
|
||||||
|
},
|
||||||
|
"is_ecc": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"maximum": 1
|
||||||
|
},
|
||||||
|
"error_message": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"user": {
|
||||||
|
"$ref": "#/components/schemas/UserObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
4
backend/embed/api_docs/components/ConfigObject.json
Normal file
4
backend/embed/api_docs/components/ConfigObject.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "ConfigObject"
|
||||||
|
}
|
40
backend/embed/api_docs/components/DNSProviderList.json
Normal file
40
backend/embed/api_docs/components/DNSProviderList.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "DNSProviderList",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["total", "offset", "limit", "sort"],
|
||||||
|
"properties": {
|
||||||
|
"total": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Total number of rows"
|
||||||
|
},
|
||||||
|
"offset": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Offset"
|
||||||
|
},
|
||||||
|
"limit": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Limit"
|
||||||
|
},
|
||||||
|
"sort": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Sorting",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/SortObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Filters",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/FilterObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/DNSProviderObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
49
backend/embed/api_docs/components/DNSProviderObject.json
Normal file
49
backend/embed/api_docs/components/DNSProviderObject.json
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "DNSProviderObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"created_on",
|
||||||
|
"modified_on",
|
||||||
|
"user_id",
|
||||||
|
"name",
|
||||||
|
"acmesh_name",
|
||||||
|
"dns_sleep",
|
||||||
|
"meta"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"created_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"modified_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"acmesh_name": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 4,
|
||||||
|
"maxLength": 50
|
||||||
|
},
|
||||||
|
"dns_sleep": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
15
backend/embed/api_docs/components/DeletedItemResponse.json
Normal file
15
backend/embed/api_docs/components/DeletedItemResponse.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "DeletedItemResponse",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"type": "boolean",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"$ref": "#/components/schemas/ErrorObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
backend/embed/api_docs/components/ErrorObject.json
Normal file
17
backend/embed/api_docs/components/ErrorObject.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "ErrorObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["code", "message"],
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Error code",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Error message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
24
backend/embed/api_docs/components/FilterObject.json
Normal file
24
backend/embed/api_docs/components/FilterObject.json
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "FilterObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["field", "modifier", "value"],
|
||||||
|
"properties": {
|
||||||
|
"field": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Field to filter with"
|
||||||
|
},
|
||||||
|
"modifier": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Filter modifier",
|
||||||
|
"pattern": "^(equals|not|min|max|greater|lesser|contains|starts|ends|in|notin)$"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Values used for filtering",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
41
backend/embed/api_docs/components/HealthObject.json
Normal file
41
backend/embed/api_docs/components/HealthObject.json
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "HealthObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["version", "commit", "healthy", "setup", "error_reporting"],
|
||||||
|
"properties": {
|
||||||
|
"version": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Version",
|
||||||
|
"example": "3.0.0",
|
||||||
|
"minLength": 1
|
||||||
|
},
|
||||||
|
"commit": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Commit hash",
|
||||||
|
"example": "946b88f",
|
||||||
|
"minLength": 7
|
||||||
|
},
|
||||||
|
"healthy": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Healthy?",
|
||||||
|
"example": true
|
||||||
|
},
|
||||||
|
"setup": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Is the application set up?",
|
||||||
|
"example": true
|
||||||
|
},
|
||||||
|
"error_reporting": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Will the application send any error reporting?",
|
||||||
|
"example": true
|
||||||
|
},
|
||||||
|
"acme.sh": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Acme.sh version",
|
||||||
|
"example": "v3.0.0",
|
||||||
|
"minLength": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
40
backend/embed/api_docs/components/HostList.json
Normal file
40
backend/embed/api_docs/components/HostList.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "HostList",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["total", "offset", "limit", "sort"],
|
||||||
|
"properties": {
|
||||||
|
"total": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Total number of rows"
|
||||||
|
},
|
||||||
|
"offset": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Offset"
|
||||||
|
},
|
||||||
|
"limit": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Limit"
|
||||||
|
},
|
||||||
|
"sort": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Sorting",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/SortObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Filters",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/FilterObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/HostObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
58
backend/embed/api_docs/components/HostObject.json
Normal file
58
backend/embed/api_docs/components/HostObject.json
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "HostObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"created_on",
|
||||||
|
"modified_on",
|
||||||
|
"expires_on",
|
||||||
|
"user_id",
|
||||||
|
"provider",
|
||||||
|
"name",
|
||||||
|
"domain_names"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"created_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"modified_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"expires_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"provider": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"domain_names": {
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"user": {
|
||||||
|
"$ref": "#/components/schemas/UserObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
40
backend/embed/api_docs/components/NginxTemplateList.json
Normal file
40
backend/embed/api_docs/components/NginxTemplateList.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "NginxTemplateList",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["total", "offset", "limit", "sort"],
|
||||||
|
"properties": {
|
||||||
|
"total": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Total number of rows"
|
||||||
|
},
|
||||||
|
"offset": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Offset"
|
||||||
|
},
|
||||||
|
"limit": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Limit"
|
||||||
|
},
|
||||||
|
"sort": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Sorting",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/SortObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Filters",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/FilterObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/NginxTemplateObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
44
backend/embed/api_docs/components/NginxTemplateObject.json
Normal file
44
backend/embed/api_docs/components/NginxTemplateObject.json
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "NginxTemplateObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"created_on",
|
||||||
|
"modified_on",
|
||||||
|
"user_id",
|
||||||
|
"name",
|
||||||
|
"type",
|
||||||
|
"template"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"created_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"modified_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^proxy|redirect|dead|stream|upstream$"
|
||||||
|
},
|
||||||
|
"template": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
40
backend/embed/api_docs/components/SettingList.json
Normal file
40
backend/embed/api_docs/components/SettingList.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "SettingList",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["total", "offset", "limit", "sort"],
|
||||||
|
"properties": {
|
||||||
|
"total": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Total number of rows"
|
||||||
|
},
|
||||||
|
"offset": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Offset"
|
||||||
|
},
|
||||||
|
"limit": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Limit"
|
||||||
|
},
|
||||||
|
"sort": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Sorting",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/SortObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Filters",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/FilterObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/SettingObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
49
backend/embed/api_docs/components/SettingObject.json
Normal file
49
backend/embed/api_docs/components/SettingObject.json
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "SettingObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["id", "name", "value"],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"created_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"modified_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 2,
|
||||||
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 0,
|
||||||
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
backend/embed/api_docs/components/SortObject.json
Normal file
17
backend/embed/api_docs/components/SortObject.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "SortObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["field", "direction"],
|
||||||
|
"properties": {
|
||||||
|
"field": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Field for sorting on"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Sort order",
|
||||||
|
"pattern": "^(ASC|DESC)$"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
40
backend/embed/api_docs/components/StreamList.json
Normal file
40
backend/embed/api_docs/components/StreamList.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "StreamList",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["total", "offset", "limit", "sort"],
|
||||||
|
"properties": {
|
||||||
|
"total": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Total number of rows"
|
||||||
|
},
|
||||||
|
"offset": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Offset"
|
||||||
|
},
|
||||||
|
"limit": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Limit"
|
||||||
|
},
|
||||||
|
"sort": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Sorting",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/SortObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Filters",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/FilterObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/StreamObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
55
backend/embed/api_docs/components/StreamObject.json
Normal file
55
backend/embed/api_docs/components/StreamObject.json
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "StreamObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"created_on",
|
||||||
|
"modified_on",
|
||||||
|
"expires_on",
|
||||||
|
"user_id",
|
||||||
|
"provider",
|
||||||
|
"name",
|
||||||
|
"domain_names"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"created_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"modified_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"expires_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"provider": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"domain_names": {
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
backend/embed/api_docs/components/TokenObject.json
Normal file
19
backend/embed/api_docs/components/TokenObject.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "TokenObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["expires", "token"],
|
||||||
|
"properties": {
|
||||||
|
"expires": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Token Expiry Unix Time",
|
||||||
|
"example": 1566540249,
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"token": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "JWT Token",
|
||||||
|
"example": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
40
backend/embed/api_docs/components/UpstreamList.json
Normal file
40
backend/embed/api_docs/components/UpstreamList.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "UpstreamList",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["total", "offset", "limit", "sort"],
|
||||||
|
"properties": {
|
||||||
|
"total": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Total number of rows"
|
||||||
|
},
|
||||||
|
"offset": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Offset"
|
||||||
|
},
|
||||||
|
"limit": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Limit"
|
||||||
|
},
|
||||||
|
"sort": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Sorting",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/SortObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Filters",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/FilterObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/UpstreamObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
136
backend/embed/api_docs/components/UpstreamObject.json
Normal file
136
backend/embed/api_docs/components/UpstreamObject.json
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "UpstreamObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"created_on",
|
||||||
|
"modified_on",
|
||||||
|
"user_id",
|
||||||
|
"name",
|
||||||
|
"nginx_template_id",
|
||||||
|
"ip_hash",
|
||||||
|
"ntlm",
|
||||||
|
"keepalive",
|
||||||
|
"keepalive_requests",
|
||||||
|
"keepalive_time",
|
||||||
|
"keepalive_timeout",
|
||||||
|
"advanced_config",
|
||||||
|
"status",
|
||||||
|
"error_message",
|
||||||
|
"servers"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"created_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"modified_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"nginx_template_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"ip_hash": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"ntlm": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"keepalive": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"keepalive_requests": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"keepalive_time": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"keepalive_timeout": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"advanced_config": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"error_message": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"user": {
|
||||||
|
"$ref": "#/components/schemas/UserObject"
|
||||||
|
},
|
||||||
|
"servers": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"created_on",
|
||||||
|
"modified_on",
|
||||||
|
"upstream_id",
|
||||||
|
"server",
|
||||||
|
"weight",
|
||||||
|
"max_conns",
|
||||||
|
"max_fails",
|
||||||
|
"fail_timeout",
|
||||||
|
"backup"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"created_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"modified_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"upstream_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"server": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 2
|
||||||
|
},
|
||||||
|
"weight": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"max_conns": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"max_fails": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"fail_timeout": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"backup": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
28
backend/embed/api_docs/components/UserAuthObject.json
Normal file
28
backend/embed/api_docs/components/UserAuthObject.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "UserAuthObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["id", "user_id", "type", "created_on", "modified_on"],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^password$"
|
||||||
|
},
|
||||||
|
"created_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"modified_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
40
backend/embed/api_docs/components/UserList.json
Normal file
40
backend/embed/api_docs/components/UserList.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "UserList",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["total", "offset", "limit", "sort"],
|
||||||
|
"properties": {
|
||||||
|
"total": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Total number of rows"
|
||||||
|
},
|
||||||
|
"offset": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Offset"
|
||||||
|
},
|
||||||
|
"limit": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Pagination Limit"
|
||||||
|
},
|
||||||
|
"sort": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Sorting",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/SortObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Filters",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/FilterObject"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/UserObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
73
backend/embed/api_docs/components/UserObject.json
Normal file
73
backend/embed/api_docs/components/UserObject.json
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"description": "UserObject",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"name",
|
||||||
|
"nickname",
|
||||||
|
"email",
|
||||||
|
"created_on",
|
||||||
|
"modified_on",
|
||||||
|
"is_disabled"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 2,
|
||||||
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"nickname": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 2,
|
||||||
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 5,
|
||||||
|
"maxLength": 150
|
||||||
|
},
|
||||||
|
"created_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"modified_on": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"gravatar_url": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"is_disabled": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"is_deleted": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"auth": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["type"],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^password$"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"capabilities": {
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
backend/embed/api_docs/main.go
Normal file
10
backend/embed/api_docs/main.go
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package doc
|
||||||
|
|
||||||
|
import "embed"
|
||||||
|
|
||||||
|
// SwaggerFiles contain all the files used for swagger schema generation
|
||||||
|
//
|
||||||
|
//go:embed api.swagger.json
|
||||||
|
//go:embed components
|
||||||
|
//go:embed paths
|
||||||
|
var SwaggerFiles embed.FS
|
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"operationId": "deleteCertificateAuthority",
|
||||||
|
"summary": "Delete a Certificate Authority",
|
||||||
|
"tags": [
|
||||||
|
"Certificate Authorities"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "caID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "Numeric ID of the Certificate Authority",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getCertificateAuthority",
|
||||||
|
"summary": "Get a Certificate Authority object by ID",
|
||||||
|
"tags": ["Certificate Authorities"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "caID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the Certificate Authority",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/CertificateAuthorityObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1627531400,
|
||||||
|
"modified_on": 1627531400,
|
||||||
|
"name": "ZeroSSL",
|
||||||
|
"acmesh_server": "zerossl",
|
||||||
|
"ca_bundle": "",
|
||||||
|
"max_domains": 10,
|
||||||
|
"is_wildcard_supported": true,
|
||||||
|
"is_readonly": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"operationId": "updateCertificateAuthority",
|
||||||
|
"summary": "Update an existing Certificate Authority",
|
||||||
|
"tags": ["Certificate Authorities"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "caID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the Certificate Authority",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Certificate Authority details to update",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.UpdateCertificateAuthority}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/CertificateAuthorityObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1627531400,
|
||||||
|
"modified_on": 1627531400,
|
||||||
|
"name": "ZeroSSL",
|
||||||
|
"acmesh_server": "zerossl",
|
||||||
|
"ca_bundle": "",
|
||||||
|
"max_domains": 10,
|
||||||
|
"is_wildcard_supported": true,
|
||||||
|
"is_readonly": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,92 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getCertificateAuthorities",
|
||||||
|
"summary": "Get a list of Certificate Authorities",
|
||||||
|
"tags": ["Certificate Authorities"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "offset",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row offset, default 0",
|
||||||
|
"example": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "limit",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row limit, default 10",
|
||||||
|
"example": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "sort",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": "The sorting of the list",
|
||||||
|
"example": "id,name.asc,value.desc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/CertificateAuthorityList"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"total": 2,
|
||||||
|
"offset": 0,
|
||||||
|
"limit": 10,
|
||||||
|
"sort": [
|
||||||
|
{
|
||||||
|
"field": "name",
|
||||||
|
"direction": "ASC"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1627531400,
|
||||||
|
"modified_on": 1627531400,
|
||||||
|
"name": "ZeroSSL",
|
||||||
|
"acmesh_server": "zerossl",
|
||||||
|
"ca_bundle": "",
|
||||||
|
"max_domains": 10,
|
||||||
|
"is_wildcard_supported": true,
|
||||||
|
"is_setup": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"created_on": 1627531400,
|
||||||
|
"modified_on": 1627531400,
|
||||||
|
"name": "Let's Encrypt",
|
||||||
|
"acmesh_server": "https://acme-v02.api.letsencrypt.org/directory",
|
||||||
|
"ca_bundle": "",
|
||||||
|
"max_domains": 10,
|
||||||
|
"is_wildcard_supported": true,
|
||||||
|
"is_setup": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"operationId": "createCertificateAuthority",
|
||||||
|
"summary": "Create a new Certificate Authority",
|
||||||
|
"tags": ["Certificate Authorities"],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Certificate Authority to Create",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.CreateCertificateAuthority}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "201 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/CertificateAuthorityObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1627531400,
|
||||||
|
"modified_on": 1627531400,
|
||||||
|
"name": "ZeroSSL",
|
||||||
|
"acmesh_server": "zerossl",
|
||||||
|
"ca_bundle": "",
|
||||||
|
"max_domains": 10,
|
||||||
|
"is_wildcard_supported": true,
|
||||||
|
"is_readonly": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
"operationId": "deleteCertificate",
|
||||||
|
"summary": "Delete a Certificate",
|
||||||
|
"tags": [
|
||||||
|
"Certificates"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "certificateID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "Numeric ID of the certificate",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "400 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": null,
|
||||||
|
"error": {
|
||||||
|
"code": 400,
|
||||||
|
"message": "You cannot delete a certificate that is in use!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getCertificate",
|
||||||
|
"summary": "Get a certificate object by ID",
|
||||||
|
"tags": [
|
||||||
|
"Certificates"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "certificateID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the certificate",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/CertificateObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1604536109,
|
||||||
|
"modified_on": 1604536109,
|
||||||
|
"expires_on": null,
|
||||||
|
"type": "dns",
|
||||||
|
"user_id": 1,
|
||||||
|
"certificate_authority_id": 2,
|
||||||
|
"dns_provider_id": 1,
|
||||||
|
"name": "test1.jc21.com.au",
|
||||||
|
"domain_names": [
|
||||||
|
"test1.jc21.com.au"
|
||||||
|
],
|
||||||
|
"is_ecc": 0,
|
||||||
|
"status": "ready"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"operationId": "updateCertificate",
|
||||||
|
"summary": "Update an existing Certificate",
|
||||||
|
"tags": [
|
||||||
|
"Certificates"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "certificateID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the certificate",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Certificate details to update",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.UpdateCertificate}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/CertificateObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1604536109,
|
||||||
|
"modified_on": 1604536109,
|
||||||
|
"expires_on": null,
|
||||||
|
"type": "dns",
|
||||||
|
"user_id": 1,
|
||||||
|
"certificate_authority_id": 2,
|
||||||
|
"dns_provider_id": 1,
|
||||||
|
"name": "test1.jc21.com.au",
|
||||||
|
"domain_names": [
|
||||||
|
"test1.jc21.com.au"
|
||||||
|
],
|
||||||
|
"is_ecc": 0,
|
||||||
|
"status": "ready"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
90
backend/embed/api_docs/paths/certificates/get.json
Normal file
90
backend/embed/api_docs/paths/certificates/get.json
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getCertificates",
|
||||||
|
"summary": "Get a list of certificates",
|
||||||
|
"tags": [
|
||||||
|
"Certificates"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "offset",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row offset, default 0",
|
||||||
|
"example": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "limit",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row limit, default 10",
|
||||||
|
"example": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "sort",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": "The sorting of the list",
|
||||||
|
"example": "id,name.asc,value.desc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/CertificateList"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"total": 1,
|
||||||
|
"offset": 0,
|
||||||
|
"limit": 10,
|
||||||
|
"sort": [
|
||||||
|
{
|
||||||
|
"field": "name",
|
||||||
|
"direction": "ASC"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1604536109,
|
||||||
|
"modified_on": 1604536109,
|
||||||
|
"expires_on": null,
|
||||||
|
"type": "dns",
|
||||||
|
"user_id": 1,
|
||||||
|
"certificate_authority_id": 2,
|
||||||
|
"dns_provider_id": 1,
|
||||||
|
"name": "test1.jc21.com.au",
|
||||||
|
"domain_names": [
|
||||||
|
"test1.jc21.com.au"
|
||||||
|
],
|
||||||
|
"is_ecc": 0,
|
||||||
|
"status": "ready"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
57
backend/embed/api_docs/paths/certificates/post.json
Normal file
57
backend/embed/api_docs/paths/certificates/post.json
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"operationId": "createCertificate",
|
||||||
|
"summary": "Create a new Certificate",
|
||||||
|
"tags": [
|
||||||
|
"Certificates"
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Certificate to create",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.CreateCertificate}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "201 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/CertificateObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1604536109,
|
||||||
|
"modified_on": 1604536109,
|
||||||
|
"expires_on": null,
|
||||||
|
"type": "dns",
|
||||||
|
"user_id": 1,
|
||||||
|
"certificate_authority_id": 2,
|
||||||
|
"dns_provider_id": 1,
|
||||||
|
"name": "test1.jc21.com.au",
|
||||||
|
"domain_names": [
|
||||||
|
"test1.jc21.com.au"
|
||||||
|
],
|
||||||
|
"is_ecc": 0,
|
||||||
|
"status": "ready"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
backend/embed/api_docs/paths/config/get.json
Normal file
36
backend/embed/api_docs/paths/config/get.json
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"operationId": "config",
|
||||||
|
"summary": "Returns the API Service configuration",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/ConfigObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"data": "/data",
|
||||||
|
"log": {
|
||||||
|
"level": "debug",
|
||||||
|
"format": "nice"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
82
backend/embed/api_docs/paths/dns-providers/get.json
Normal file
82
backend/embed/api_docs/paths/dns-providers/get.json
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getDNSProviders",
|
||||||
|
"summary": "Get a list of DNS Providers",
|
||||||
|
"tags": ["DNS Providers"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "offset",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row offset, default 0",
|
||||||
|
"example": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "limit",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row limit, default 10",
|
||||||
|
"example": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "sort",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": "The sorting of the list",
|
||||||
|
"example": "id,name.asc,value.desc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/DNSProviderList"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"total": 1,
|
||||||
|
"offset": 0,
|
||||||
|
"limit": 10,
|
||||||
|
"sort": [
|
||||||
|
{
|
||||||
|
"field": "name",
|
||||||
|
"direction": "ASC"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1602593653,
|
||||||
|
"modified_on": 1602593653,
|
||||||
|
"user_id": 1,
|
||||||
|
"name": "Route53",
|
||||||
|
"acmesh_name": "dns_aws",
|
||||||
|
"meta": {
|
||||||
|
"AWS_ACCESS_KEY_ID": "abc123",
|
||||||
|
"AWS_SECRET_ACCESS_KEY": "def098"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
49
backend/embed/api_docs/paths/dns-providers/post.json
Normal file
49
backend/embed/api_docs/paths/dns-providers/post.json
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"operationId": "createDNSProvider",
|
||||||
|
"summary": "Create a new DNS Provider",
|
||||||
|
"tags": ["DNS Providers"],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "DNS Provider to Create",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.CreateDNSProvider}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "201 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/DNSProviderObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1602593653,
|
||||||
|
"modified_on": 1602593653,
|
||||||
|
"user_id": 1,
|
||||||
|
"name": "Route53",
|
||||||
|
"acmesh_name": "dns_aws",
|
||||||
|
"meta": {
|
||||||
|
"AWS_ACCESS_KEY_ID": "abc123",
|
||||||
|
"AWS_SECRET_ACCESS_KEY": "def098"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
"operationId": "deleteDNSProvider",
|
||||||
|
"summary": "Delete a DNS Provider",
|
||||||
|
"tags": [
|
||||||
|
"DNS Providers"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "providerID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "Numeric ID of the DNS Provider",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "400 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": null,
|
||||||
|
"error": {
|
||||||
|
"code": 400,
|
||||||
|
"message": "You cannot delete a DNS Provider that is in use!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getDNSProvider",
|
||||||
|
"summary": "Get a DNS Provider object by ID",
|
||||||
|
"tags": ["DNS Providers"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "providerID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the DNS Provider",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/DNSProviderObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1602593653,
|
||||||
|
"modified_on": 1602593653,
|
||||||
|
"user_id": 1,
|
||||||
|
"name": "Route53",
|
||||||
|
"acmesh_name": "dns_aws",
|
||||||
|
"meta": {
|
||||||
|
"AWS_ACCESS_KEY_ID": "abc123",
|
||||||
|
"AWS_SECRET_ACCESS_KEY": "def098"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"operationId": "updateDNSProvider",
|
||||||
|
"summary": "Update an existing DNS Provider",
|
||||||
|
"tags": ["DNS Providers"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "providerID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the DNS Provider",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "DNS Provider details to update",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.UpdateDNSProvider}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/DNSProviderObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1602593653,
|
||||||
|
"modified_on": 1602593653,
|
||||||
|
"user_id": 1,
|
||||||
|
"name": "Route53",
|
||||||
|
"acmesh_name": "dns_aws",
|
||||||
|
"meta": {
|
||||||
|
"AWS_ACCESS_KEY_ID": "abc123",
|
||||||
|
"AWS_SECRET_ACCESS_KEY": "def098"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
47
backend/embed/api_docs/paths/get.json
Normal file
47
backend/embed/api_docs/paths/get.json
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"operationId": "health",
|
||||||
|
"summary": "Returns the API health status",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/HealthObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"commit": "9f119b6",
|
||||||
|
"healthy": true,
|
||||||
|
"setup": true,
|
||||||
|
"error_reporting": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"unhealthy": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"commit": "9f119b6",
|
||||||
|
"healthy": false,
|
||||||
|
"setup": true,
|
||||||
|
"error_reporting": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
93
backend/embed/api_docs/paths/hosts/get.json
Normal file
93
backend/embed/api_docs/paths/hosts/get.json
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getHosts",
|
||||||
|
"summary": "Get a list of Hosts",
|
||||||
|
"tags": ["Hosts"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "offset",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row offset, default 0",
|
||||||
|
"example": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "limit",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row limit, default 10",
|
||||||
|
"example": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "sort",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": "The sorting of the list",
|
||||||
|
"example": "id,name.asc,value.desc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/HostList"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"total": 1,
|
||||||
|
"offset": 0,
|
||||||
|
"limit": 10,
|
||||||
|
"sort": [
|
||||||
|
{
|
||||||
|
"field": "domain_names",
|
||||||
|
"direction": "ASC"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1646279455,
|
||||||
|
"modified_on": 1646279455,
|
||||||
|
"user_id": 2,
|
||||||
|
"type": "proxy",
|
||||||
|
"nginx_template_id": 1,
|
||||||
|
"listen_interface": "",
|
||||||
|
"domain_names": ["jc21.com"],
|
||||||
|
"upstream_id": 0,
|
||||||
|
"certificate_id": 0,
|
||||||
|
"access_list_id": 0,
|
||||||
|
"ssl_forced": false,
|
||||||
|
"caching_enabled": false,
|
||||||
|
"block_exploits": false,
|
||||||
|
"allow_websocket_upgrade": false,
|
||||||
|
"http2_support": false,
|
||||||
|
"hsts_enabled": false,
|
||||||
|
"hsts_subdomains": false,
|
||||||
|
"paths": "",
|
||||||
|
"advanced_config": "",
|
||||||
|
"is_disabled": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
60
backend/embed/api_docs/paths/hosts/hostID/delete.json
Normal file
60
backend/embed/api_docs/paths/hosts/hostID/delete.json
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
"operationId": "deleteHost",
|
||||||
|
"summary": "Delete a Host",
|
||||||
|
"tags": [
|
||||||
|
"Hosts"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "hostID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "Numeric ID of the Host",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "400 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": null,
|
||||||
|
"error": {
|
||||||
|
"code": 400,
|
||||||
|
"message": "You cannot delete a host that is in use!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
64
backend/embed/api_docs/paths/hosts/hostID/get.json
Normal file
64
backend/embed/api_docs/paths/hosts/hostID/get.json
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getHost",
|
||||||
|
"summary": "Get a Host object by ID",
|
||||||
|
"tags": ["Hosts"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "hostID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the Host",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/HostObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1646279455,
|
||||||
|
"modified_on": 1646279455,
|
||||||
|
"user_id": 2,
|
||||||
|
"type": "proxy",
|
||||||
|
"nginx_template_id": 1,
|
||||||
|
"listen_interface": "",
|
||||||
|
"domain_names": ["jc21.com"],
|
||||||
|
"upstream_id": 0,
|
||||||
|
"certificate_id": 0,
|
||||||
|
"access_list_id": 0,
|
||||||
|
"ssl_forced": false,
|
||||||
|
"caching_enabled": false,
|
||||||
|
"block_exploits": false,
|
||||||
|
"allow_websocket_upgrade": false,
|
||||||
|
"http2_support": false,
|
||||||
|
"hsts_enabled": false,
|
||||||
|
"hsts_subdomains": false,
|
||||||
|
"paths": "",
|
||||||
|
"advanced_config": "",
|
||||||
|
"is_disabled": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getHostNginxConfig",
|
||||||
|
"summary": "Get a Host Nginx Config object by ID",
|
||||||
|
"tags": ["Hosts"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "hostID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the Host",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": "# ------------------------------------------------------------\n# a.example.com\n# ------------------------------------------------------------\nserver {\n listen 80;\n server_name a.example.com ;\n access_log /data/logs/host-1_access.log proxy;\n error_log /data/logs/host-1_error.log warn;\n # locations ?\n # default location:\n location / {\n # Access Rules ? todo\n # Access checks must...? todo\n # Proxy!\n add_header X-Served-By $host;\n proxy_set_header Host $host;\n proxy_set_header X-Forwarded-Scheme $scheme;\n proxy_set_header X-Forwarded-Proto $scheme;\n proxy_set_header X-Forwarded-For $remote_addr;\n proxy_http_version 1.1;\n # proxy a single host\n proxy_pass http://192.168.0.10:80;\n }\n # Legacy Custom Configuration\n include /data/nginx/custom/server_proxy[.]conf;\n}\n"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
73
backend/embed/api_docs/paths/hosts/hostID/put.json
Normal file
73
backend/embed/api_docs/paths/hosts/hostID/put.json
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
{
|
||||||
|
"operationId": "updateHost",
|
||||||
|
"summary": "Update an existing Host",
|
||||||
|
"tags": ["Hosts"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "hostID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the Host",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Host details to update",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.UpdateHost}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/HostObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1646279455,
|
||||||
|
"modified_on": 1646279455,
|
||||||
|
"user_id": 2,
|
||||||
|
"type": "proxy",
|
||||||
|
"nginx_template_id": 1,
|
||||||
|
"listen_interface": "",
|
||||||
|
"domain_names": ["jc21.com"],
|
||||||
|
"upstream_id": 0,
|
||||||
|
"certificate_id": 0,
|
||||||
|
"access_list_id": 0,
|
||||||
|
"ssl_forced": false,
|
||||||
|
"caching_enabled": false,
|
||||||
|
"block_exploits": false,
|
||||||
|
"allow_websocket_upgrade": false,
|
||||||
|
"http2_support": false,
|
||||||
|
"hsts_enabled": false,
|
||||||
|
"hsts_subdomains": false,
|
||||||
|
"paths": "",
|
||||||
|
"advanced_config": "",
|
||||||
|
"is_disabled": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
60
backend/embed/api_docs/paths/hosts/post.json
Normal file
60
backend/embed/api_docs/paths/hosts/post.json
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
"operationId": "createHost",
|
||||||
|
"summary": "Create a new Host",
|
||||||
|
"tags": ["Hosts"],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Host to Create",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.CreateHost}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "201 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/HostObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1645700556,
|
||||||
|
"modified_on": 1645700556,
|
||||||
|
"user_id": 2,
|
||||||
|
"type": "proxy",
|
||||||
|
"nginx_template_id": 1,
|
||||||
|
"listen_interface": "",
|
||||||
|
"domain_names": ["jc21.com"],
|
||||||
|
"upstream_id": 0,
|
||||||
|
"certificate_id": 0,
|
||||||
|
"access_list_id": 0,
|
||||||
|
"ssl_forced": false,
|
||||||
|
"caching_enabled": false,
|
||||||
|
"block_exploits": false,
|
||||||
|
"allow_websocket_upgrade": false,
|
||||||
|
"http2_support": false,
|
||||||
|
"hsts_enabled": false,
|
||||||
|
"hsts_subdomains": false,
|
||||||
|
"paths": "",
|
||||||
|
"advanced_config": "",
|
||||||
|
"is_disabled": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
79
backend/embed/api_docs/paths/nginx-templates/get.json
Normal file
79
backend/embed/api_docs/paths/nginx-templates/get.json
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getNginxTemplates",
|
||||||
|
"summary": "Get a list of Nginx Templates",
|
||||||
|
"tags": ["Nginx Templates"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "offset",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row offset, default 0",
|
||||||
|
"example": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "limit",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row limit, default 10",
|
||||||
|
"example": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "sort",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": "The sorting of the list",
|
||||||
|
"example": "id,name.asc,value.desc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/NginxTemplateList"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"total": 1,
|
||||||
|
"offset": 0,
|
||||||
|
"limit": 10,
|
||||||
|
"sort": [
|
||||||
|
{
|
||||||
|
"field": "created_on",
|
||||||
|
"direction": "ASC"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1646218093,
|
||||||
|
"modified_on": 1646218093,
|
||||||
|
"user_id": 1,
|
||||||
|
"name": "Default Proxy Template",
|
||||||
|
"type": "proxy",
|
||||||
|
"template": "# this is a proxy template"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
46
backend/embed/api_docs/paths/nginx-templates/post.json
Normal file
46
backend/embed/api_docs/paths/nginx-templates/post.json
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"operationId": "createNginxTemplate",
|
||||||
|
"summary": "Create a new Nginx Template",
|
||||||
|
"tags": ["Nginx Templates"],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Template to Create",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.CreateNginxTemplate}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "201 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/NginxTemplateObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 10,
|
||||||
|
"created_on": 1646218093,
|
||||||
|
"modified_on": 1646218093,
|
||||||
|
"user_id": 1,
|
||||||
|
"name": "My proxy template",
|
||||||
|
"type": "proxy",
|
||||||
|
"template": "# this is a proxy template"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"operationId": "deleteNginxTemplate",
|
||||||
|
"summary": "Delete a Nginx Template",
|
||||||
|
"tags": ["Nginx Templates"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "templateID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "Numeric ID of the Template",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "400 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": null,
|
||||||
|
"error": {
|
||||||
|
"code": 400,
|
||||||
|
"message": "You cannot delete a template that is in use!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getNginxTemplate",
|
||||||
|
"summary": "Get a Nginx Template object by ID",
|
||||||
|
"tags": ["Nginx Templates"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "templateID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the Host Template",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/NginxTemplateObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1646218093,
|
||||||
|
"modified_on": 1646218093,
|
||||||
|
"user_id": 1,
|
||||||
|
"name": "Default Proxy Template",
|
||||||
|
"type": "proxy",
|
||||||
|
"template": "# this is a proxy template"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"operationId": "updateNginxTemplate",
|
||||||
|
"summary": "Update an existing Nginx Template",
|
||||||
|
"tags": ["Nginx Templates"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "templateID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the Template",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Template details to update",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.UpdateNginxTemplate}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/NginxTemplateObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1646218093,
|
||||||
|
"modified_on": 1646218093,
|
||||||
|
"user_id": 1,
|
||||||
|
"name": "My renamed proxy template",
|
||||||
|
"type": "proxy",
|
||||||
|
"template": "# this is a proxy template"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
9
backend/embed/api_docs/paths/schema/get.json
Normal file
9
backend/embed/api_docs/paths/schema/get.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"operationId": "schema",
|
||||||
|
"summary": "Returns this swagger API schema",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
84
backend/embed/api_docs/paths/settings/get.json
Normal file
84
backend/embed/api_docs/paths/settings/get.json
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getSettings",
|
||||||
|
"summary": "Get a list of settings",
|
||||||
|
"tags": [
|
||||||
|
"Settings"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "offset",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row offset, default 0",
|
||||||
|
"example": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "limit",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row limit, default 10",
|
||||||
|
"example": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "sort",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": "The sorting of the list",
|
||||||
|
"example": "id,name.asc,value.desc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/SettingList"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"total": 1,
|
||||||
|
"offset": 0,
|
||||||
|
"limit": 10,
|
||||||
|
"sort": [
|
||||||
|
{
|
||||||
|
"field": "name",
|
||||||
|
"direction": "ASC"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1578010090,
|
||||||
|
"modified_on": 1578010095,
|
||||||
|
"name": "default-site",
|
||||||
|
"value": {
|
||||||
|
"html": "<p>not found</p>",
|
||||||
|
"type": "custom"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
55
backend/embed/api_docs/paths/settings/name/get.json
Normal file
55
backend/embed/api_docs/paths/settings/name/get.json
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getSetting",
|
||||||
|
"summary": "Get a setting object by name",
|
||||||
|
"tags": [
|
||||||
|
"Settings"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "name",
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 2
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "Name of the setting",
|
||||||
|
"example": "default-site"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/SettingObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 2,
|
||||||
|
"created_on": 1578010090,
|
||||||
|
"modified_on": 1578010095,
|
||||||
|
"name": "default-site",
|
||||||
|
"value": {
|
||||||
|
"html": "<p>not found</p>",
|
||||||
|
"type": "custom"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
64
backend/embed/api_docs/paths/settings/name/put.json
Normal file
64
backend/embed/api_docs/paths/settings/name/put.json
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"operationId": "updateSetting",
|
||||||
|
"summary": "Update an existing Setting",
|
||||||
|
"tags": [
|
||||||
|
"Settings"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "name",
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 2
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "Name of the setting",
|
||||||
|
"example": "default-site"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Setting details to update",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.UpdateSetting}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/SettingObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 2,
|
||||||
|
"created_on": 1578010090,
|
||||||
|
"modified_on": 1578010090,
|
||||||
|
"name": "default-site",
|
||||||
|
"value": {
|
||||||
|
"html": "<p>not found</p>",
|
||||||
|
"type": "custom"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
51
backend/embed/api_docs/paths/settings/post.json
Normal file
51
backend/embed/api_docs/paths/settings/post.json
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
"operationId": "createSetting",
|
||||||
|
"summary": "Create a new Setting",
|
||||||
|
"tags": [
|
||||||
|
"Settings"
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Setting to Create",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.CreateSetting}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "201 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/SettingObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 2,
|
||||||
|
"created_on": 1578010090,
|
||||||
|
"modified_on": 1578010090,
|
||||||
|
"name": "default-site",
|
||||||
|
"value": {
|
||||||
|
"html": "<p>not found</p>",
|
||||||
|
"type": "custom"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
75
backend/embed/api_docs/paths/streams/get.json
Normal file
75
backend/embed/api_docs/paths/streams/get.json
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getStreams",
|
||||||
|
"summary": "Get a list of Streams",
|
||||||
|
"tags": [
|
||||||
|
"Streams"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "offset",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row offset, default 0",
|
||||||
|
"example": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "limit",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row limit, default 10",
|
||||||
|
"example": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "sort",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": "The sorting of the list",
|
||||||
|
"example": "id,name.asc,value.desc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/StreamList"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"total": 1,
|
||||||
|
"offset": 0,
|
||||||
|
"limit": 10,
|
||||||
|
"sort": [
|
||||||
|
{
|
||||||
|
"field": "name",
|
||||||
|
"direction": "ASC"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"items": [
|
||||||
|
"TODO"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
38
backend/embed/api_docs/paths/streams/post.json
Normal file
38
backend/embed/api_docs/paths/streams/post.json
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"operationId": "createStream",
|
||||||
|
"summary": "Create a new Stream",
|
||||||
|
"tags": ["Streams"],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Stream to Create",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.CreateStream}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "201 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/StreamObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": "TODO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
60
backend/embed/api_docs/paths/streams/streamID/delete.json
Normal file
60
backend/embed/api_docs/paths/streams/streamID/delete.json
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
"operationId": "deleteStream",
|
||||||
|
"summary": "Delete a Stream",
|
||||||
|
"tags": [
|
||||||
|
"Streams"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "streamID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "Numeric ID of the Stream",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "400 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": null,
|
||||||
|
"error": {
|
||||||
|
"code": 400,
|
||||||
|
"message": "You cannot delete a Stream that is in use!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
46
backend/embed/api_docs/paths/streams/streamID/get.json
Normal file
46
backend/embed/api_docs/paths/streams/streamID/get.json
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getStream",
|
||||||
|
"summary": "Get a Stream object by ID",
|
||||||
|
"tags": [
|
||||||
|
"Streams"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "streamID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the Stream",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/StreamObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": "TODO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
55
backend/embed/api_docs/paths/streams/streamID/put.json
Normal file
55
backend/embed/api_docs/paths/streams/streamID/put.json
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"operationId": "updateStream",
|
||||||
|
"summary": "Update an existing Stream",
|
||||||
|
"tags": [
|
||||||
|
"Streams"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "streamID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the Stream",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Stream details to update",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.UpdateStream}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/StreamObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": "TODO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
37
backend/embed/api_docs/paths/tokens/get.json
Normal file
37
backend/embed/api_docs/paths/tokens/get.json
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"operationId": "refreshToken",
|
||||||
|
"summary": "Refresh your access token",
|
||||||
|
"tags": [
|
||||||
|
"Tokens"
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/StreamObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"expires": 1566540510,
|
||||||
|
"token": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4",
|
||||||
|
"scope": "user"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
79
backend/embed/api_docs/paths/tokens/post.json
Normal file
79
backend/embed/api_docs/paths/tokens/post.json
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
"operationId": "requestToken",
|
||||||
|
"summary": "Request a new access token from credentials",
|
||||||
|
"tags": [
|
||||||
|
"Tokens"
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Credentials Payload",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.GetToken}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/StreamObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"expires": 1566540510,
|
||||||
|
"token": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4",
|
||||||
|
"scope": "user"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"description": "403 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"error"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"$ref": "#/components/schemas/ErrorObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": null,
|
||||||
|
"error": {
|
||||||
|
"code": 403,
|
||||||
|
"message": "Not available during setup phase"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
285
backend/embed/api_docs/paths/upstreams/get.json
Normal file
285
backend/embed/api_docs/paths/upstreams/get.json
Normal file
@@ -0,0 +1,285 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getUpstreams",
|
||||||
|
"summary": "Get a list of Upstreams",
|
||||||
|
"tags": ["Upstreams"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "offset",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row offset, default 0",
|
||||||
|
"example": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "limit",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row limit, default 10",
|
||||||
|
"example": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "sort",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": "The sorting of the list",
|
||||||
|
"example": "id,name.asc,value.desc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/UpstreamList"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"total": 5,
|
||||||
|
"offset": 0,
|
||||||
|
"limit": 10,
|
||||||
|
"sort": [
|
||||||
|
{
|
||||||
|
"field": "name",
|
||||||
|
"direction": "ASC"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1672804124,
|
||||||
|
"modified_on": 1672804124,
|
||||||
|
"user_id": 2,
|
||||||
|
"name": "API servers",
|
||||||
|
"nginx_template_id": 5,
|
||||||
|
"ip_hash": true,
|
||||||
|
"ntlm": false,
|
||||||
|
"keepalive": 10,
|
||||||
|
"keepalive_requests": 10,
|
||||||
|
"keepalive_time": "60s",
|
||||||
|
"keepalive_timeout": "3s",
|
||||||
|
"advanced_config": "",
|
||||||
|
"status": "ok",
|
||||||
|
"error_message": "",
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1672804124,
|
||||||
|
"modified_on": 1672804124,
|
||||||
|
"upstream_group_id": 1,
|
||||||
|
"server": "192.168.0.10:80",
|
||||||
|
"weight": 100,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"created_on": 1672804124,
|
||||||
|
"modified_on": 1672804124,
|
||||||
|
"upstream_group_id": 1,
|
||||||
|
"server": "192.168.0.11:80",
|
||||||
|
"weight": 50,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"created_on": 1672804197,
|
||||||
|
"modified_on": 1672804197,
|
||||||
|
"user_id": 2,
|
||||||
|
"name": "API servers 2",
|
||||||
|
"nginx_template_id": 5,
|
||||||
|
"ip_hash": false,
|
||||||
|
"ntlm": false,
|
||||||
|
"keepalive": 0,
|
||||||
|
"keepalive_requests": 0,
|
||||||
|
"keepalive_time": "",
|
||||||
|
"keepalive_timeout": "",
|
||||||
|
"advanced_config": "",
|
||||||
|
"status": "ok",
|
||||||
|
"error_message": "",
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"created_on": 1672804197,
|
||||||
|
"modified_on": 1672804197,
|
||||||
|
"upstream_group_id": 2,
|
||||||
|
"server": "192.168.0.10:80",
|
||||||
|
"weight": 100,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"created_on": 1672804197,
|
||||||
|
"modified_on": 1672804197,
|
||||||
|
"upstream_group_id": 2,
|
||||||
|
"server": "192.168.0.11:80",
|
||||||
|
"weight": 50,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"created_on": 1672804200,
|
||||||
|
"modified_on": 1672804200,
|
||||||
|
"user_id": 2,
|
||||||
|
"name": "API servers 2",
|
||||||
|
"nginx_template_id": 5,
|
||||||
|
"ip_hash": false,
|
||||||
|
"ntlm": false,
|
||||||
|
"keepalive": 0,
|
||||||
|
"keepalive_requests": 0,
|
||||||
|
"keepalive_time": "",
|
||||||
|
"keepalive_timeout": "",
|
||||||
|
"advanced_config": "",
|
||||||
|
"status": "ok",
|
||||||
|
"error_message": "",
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"created_on": 1672804200,
|
||||||
|
"modified_on": 1672804200,
|
||||||
|
"upstream_group_id": 3,
|
||||||
|
"server": "192.168.0.10:80",
|
||||||
|
"weight": 100,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"created_on": 1672804200,
|
||||||
|
"modified_on": 1672804200,
|
||||||
|
"upstream_group_id": 3,
|
||||||
|
"server": "192.168.0.11:80",
|
||||||
|
"weight": 50,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"created_on": 1672804201,
|
||||||
|
"modified_on": 1672804201,
|
||||||
|
"user_id": 2,
|
||||||
|
"name": "API servers 2",
|
||||||
|
"nginx_template_id": 5,
|
||||||
|
"ip_hash": false,
|
||||||
|
"ntlm": false,
|
||||||
|
"keepalive": 0,
|
||||||
|
"keepalive_requests": 0,
|
||||||
|
"keepalive_time": "",
|
||||||
|
"keepalive_timeout": "",
|
||||||
|
"advanced_config": "",
|
||||||
|
"status": "ok",
|
||||||
|
"error_message": "",
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"created_on": 1672804201,
|
||||||
|
"modified_on": 1672804201,
|
||||||
|
"upstream_group_id": 4,
|
||||||
|
"server": "192.168.0.10:80",
|
||||||
|
"weight": 100,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"created_on": 1672804201,
|
||||||
|
"modified_on": 1672804201,
|
||||||
|
"upstream_group_id": 4,
|
||||||
|
"server": "192.168.0.11:80",
|
||||||
|
"weight": 50,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"created_on": 1672804201,
|
||||||
|
"modified_on": 1672804201,
|
||||||
|
"user_id": 2,
|
||||||
|
"name": "API servers 2",
|
||||||
|
"nginx_template_id": 5,
|
||||||
|
"ip_hash": false,
|
||||||
|
"ntlm": false,
|
||||||
|
"keepalive": 0,
|
||||||
|
"keepalive_requests": 0,
|
||||||
|
"keepalive_time": "",
|
||||||
|
"keepalive_timeout": "",
|
||||||
|
"advanced_config": "",
|
||||||
|
"status": "ok",
|
||||||
|
"error_message": "",
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"id": 9,
|
||||||
|
"created_on": 1672804201,
|
||||||
|
"modified_on": 1672804201,
|
||||||
|
"upstream_group_id": 5,
|
||||||
|
"server": "192.168.0.10:80",
|
||||||
|
"weight": 100,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10,
|
||||||
|
"created_on": 1672804201,
|
||||||
|
"modified_on": 1672804201,
|
||||||
|
"upstream_group_id": 5,
|
||||||
|
"server": "192.168.0.11:80",
|
||||||
|
"weight": 50,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
80
backend/embed/api_docs/paths/upstreams/post.json
Normal file
80
backend/embed/api_docs/paths/upstreams/post.json
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"operationId": "createUpstream",
|
||||||
|
"summary": "Create a new Upstream",
|
||||||
|
"tags": ["Upstreams"],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Upstream to Create",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.CreateUpstream}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "201 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/UpstreamObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 6,
|
||||||
|
"created_on": 1672806857,
|
||||||
|
"modified_on": 1672806857,
|
||||||
|
"user_id": 2,
|
||||||
|
"name": "API servers 2",
|
||||||
|
"nginx_template_id": 5,
|
||||||
|
"ip_hash": false,
|
||||||
|
"ntlm": false,
|
||||||
|
"keepalive": 0,
|
||||||
|
"keepalive_requests": 0,
|
||||||
|
"keepalive_time": "",
|
||||||
|
"keepalive_timeout": "",
|
||||||
|
"advanced_config": "",
|
||||||
|
"status": "ready",
|
||||||
|
"error_message": "",
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"id": 11,
|
||||||
|
"created_on": 1672806857,
|
||||||
|
"modified_on": 1672806857,
|
||||||
|
"upstream_id": 6,
|
||||||
|
"server": "192.168.0.10:80",
|
||||||
|
"weight": 100,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12,
|
||||||
|
"created_on": 1672806857,
|
||||||
|
"modified_on": 1672806857,
|
||||||
|
"upstream_id": 6,
|
||||||
|
"server": "192.168.0.11:80",
|
||||||
|
"weight": 50,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"operationId": "deleteUpstream",
|
||||||
|
"summary": "Delete a Upstream",
|
||||||
|
"tags": ["Upstreams"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "upstreamID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "Numeric ID of the Upstream",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "400 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": null,
|
||||||
|
"error": {
|
||||||
|
"code": 400,
|
||||||
|
"message": "You cannot delete a Upstream that is in use!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
81
backend/embed/api_docs/paths/upstreams/upstreamID/get.json
Normal file
81
backend/embed/api_docs/paths/upstreams/upstreamID/get.json
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getUpstream",
|
||||||
|
"summary": "Get a Upstream object by ID",
|
||||||
|
"tags": ["Upstreams"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "upstreamID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the Upstream",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/UpstreamObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1672786008,
|
||||||
|
"modified_on": 1672786008,
|
||||||
|
"user_id": 2,
|
||||||
|
"name": "API servers 3",
|
||||||
|
"ip_hash": true,
|
||||||
|
"ntlm": false,
|
||||||
|
"keepalive": 10,
|
||||||
|
"keepalive_requests": 10,
|
||||||
|
"keepalive_time": "60s",
|
||||||
|
"keepalive_timeout": "3s",
|
||||||
|
"advanced_config": "",
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1672786009,
|
||||||
|
"modified_on": 1672786009,
|
||||||
|
"upstream_id": 1,
|
||||||
|
"server": "api1.localhost:1234",
|
||||||
|
"weight": 100,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"created_on": 1672786009,
|
||||||
|
"modified_on": 1672786009,
|
||||||
|
"upstream_id": 1,
|
||||||
|
"server": "api2.localhost:1234",
|
||||||
|
"weight": 50,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getUpstreamNginxConfig",
|
||||||
|
"summary": "Get a Upstream Nginx Config object by ID",
|
||||||
|
"tags": ["Upstreams"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "upstreamID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the Upstream",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": "# ------------------------------------------------------------\n# Upstream 1: API servers\n# ------------------------------------------------------------\nupstream npm_upstream_1 {\nserver 192.168.0.10:80 weight=100 ;\n server 192.168.0.11:80 weight=50 ;\n}\n"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
93
backend/embed/api_docs/paths/upstreams/upstreamID/put.json
Normal file
93
backend/embed/api_docs/paths/upstreams/upstreamID/put.json
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
"operationId": "updateUpstream",
|
||||||
|
"summary": "Update an existing Upstream",
|
||||||
|
"tags": ["Upstreams"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "upstreamID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "ID of the Upstream",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Upstream details to update",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.UpdateUpstream}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/UpstreamObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1673234177,
|
||||||
|
"modified_on": 1673244559,
|
||||||
|
"user_id": 2,
|
||||||
|
"name": "API servers 2",
|
||||||
|
"nginx_template_id": 5,
|
||||||
|
"ip_hash": false,
|
||||||
|
"ntlm": false,
|
||||||
|
"keepalive": 0,
|
||||||
|
"keepalive_requests": 0,
|
||||||
|
"keepalive_time": "",
|
||||||
|
"keepalive_timeout": "",
|
||||||
|
"advanced_config": "",
|
||||||
|
"status": "ready",
|
||||||
|
"error_message": "",
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"created_on": 1673234177,
|
||||||
|
"modified_on": 1673244559,
|
||||||
|
"upstream_id": 1,
|
||||||
|
"server": "192.168.0.10:80",
|
||||||
|
"weight": 100,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"created_on": 1673234177,
|
||||||
|
"modified_on": 1673244559,
|
||||||
|
"upstream_id": 1,
|
||||||
|
"server": "192.168.0.11:80",
|
||||||
|
"weight": 50,
|
||||||
|
"max_conns": 0,
|
||||||
|
"max_fails": 0,
|
||||||
|
"fail_timeout": 0,
|
||||||
|
"backup": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
117
backend/embed/api_docs/paths/users/get.json
Normal file
117
backend/embed/api_docs/paths/users/get.json
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getUsers",
|
||||||
|
"summary": "Get a list of users",
|
||||||
|
"tags": ["Users"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "offset",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row offset, default 0",
|
||||||
|
"example": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "limit",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"description": "The pagination row limit, default 10",
|
||||||
|
"example": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "sort",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": "The sorting of the list",
|
||||||
|
"example": "name,nickname.desc,email.asc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/UserList"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"total": 3,
|
||||||
|
"offset": 0,
|
||||||
|
"limit": 100,
|
||||||
|
"sort": [
|
||||||
|
{
|
||||||
|
"field": "name",
|
||||||
|
"direction": "ASC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"field": "nickname",
|
||||||
|
"direction": "DESC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"field": "email",
|
||||||
|
"direction": "ASC"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "Jamie Curnow",
|
||||||
|
"nickname": "James",
|
||||||
|
"email": "jc@jc21.com",
|
||||||
|
"created_on": 1578010090,
|
||||||
|
"modified_on": 1578010095,
|
||||||
|
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
|
||||||
|
"is_disabled": false,
|
||||||
|
"capabilities": ["full-admin"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"name": "John Doe",
|
||||||
|
"nickname": "John",
|
||||||
|
"email": "johdoe@example.com",
|
||||||
|
"created_on": 1578010100,
|
||||||
|
"modified_on": 1578010105,
|
||||||
|
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
|
||||||
|
"is_disabled": false,
|
||||||
|
"capabilities": [
|
||||||
|
"hosts.view",
|
||||||
|
"hosts.manage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"name": "Jane Doe",
|
||||||
|
"nickname": "Jane",
|
||||||
|
"email": "janedoe@example.com",
|
||||||
|
"created_on": 1578010110,
|
||||||
|
"modified_on": 1578010115,
|
||||||
|
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
|
||||||
|
"is_disabled": false,
|
||||||
|
"capabilities": [
|
||||||
|
"hosts.view",
|
||||||
|
"hosts.manage"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
79
backend/embed/api_docs/paths/users/post.json
Normal file
79
backend/embed/api_docs/paths/users/post.json
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
"operationId": "createUser",
|
||||||
|
"summary": "Create a new User",
|
||||||
|
"tags": ["Users"],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "User to Create",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.CreateUser}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "201 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/UserObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"name": "Jamie Curnow",
|
||||||
|
"nickname": "James",
|
||||||
|
"email": "jc@jc21.com",
|
||||||
|
"created_on": 1578010100,
|
||||||
|
"modified_on": 1578010100,
|
||||||
|
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
|
||||||
|
"is_disabled": false,
|
||||||
|
"auth": {
|
||||||
|
"$ref": "#/components/schemas/UserAuthObject"
|
||||||
|
},
|
||||||
|
"capabilities": ["full-admin"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "400 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["error"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"$ref": "#/components/schemas/ErrorObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"error": {
|
||||||
|
"code": 400,
|
||||||
|
"message": "An user already exists with this email address"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
65
backend/embed/api_docs/paths/users/userID/auth/post.json
Normal file
65
backend/embed/api_docs/paths/users/userID/auth/post.json
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"operationId": "setPassword",
|
||||||
|
"summary": "Set a User's password",
|
||||||
|
"tags": ["Users"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "userID",
|
||||||
|
"schema": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^me$"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "Numeric ID of the user or 'me' to set yourself",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Credentials to set",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.SetAuth}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/UserAuthObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 2,
|
||||||
|
"user_id": 3,
|
||||||
|
"type": "password",
|
||||||
|
"created_on": 1648422222,
|
||||||
|
"modified_on": 1648423979
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
60
backend/embed/api_docs/paths/users/userID/delete.json
Normal file
60
backend/embed/api_docs/paths/users/userID/delete.json
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
"operationId": "deleteUser",
|
||||||
|
"summary": "Delete a User",
|
||||||
|
"tags": [
|
||||||
|
"Users"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "userID",
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "Numeric ID of the user",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "400 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": null,
|
||||||
|
"error": {
|
||||||
|
"code": 400,
|
||||||
|
"message": "You cannot delete yourself!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
60
backend/embed/api_docs/paths/users/userID/get.json
Normal file
60
backend/embed/api_docs/paths/users/userID/get.json
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
"operationId": "getUser",
|
||||||
|
"summary": "Get a user object by ID or 'me'",
|
||||||
|
"tags": ["Users"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "userID",
|
||||||
|
"schema": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^me$"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "Numeric ID of the user or 'me' to get yourself",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/UserObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"name": "Jamie Curnow",
|
||||||
|
"nickname": "James",
|
||||||
|
"email": "jc@jc21.com",
|
||||||
|
"created_on": 1578010100,
|
||||||
|
"modified_on": 1578010105,
|
||||||
|
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
|
||||||
|
"is_disabled": false,
|
||||||
|
"capabilities": ["full-admin"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
107
backend/embed/api_docs/paths/users/userID/put.json
Normal file
107
backend/embed/api_docs/paths/users/userID/put.json
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
{
|
||||||
|
"operationId": "updateUser",
|
||||||
|
"summary": "Update an existing User",
|
||||||
|
"tags": ["Users"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "userID",
|
||||||
|
"schema": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^me$"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"required": true,
|
||||||
|
"description": "Numeric ID of the user or 'me' to update yourself",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "User details to update",
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": "{{schema.UpdateUser}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "200 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["result"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/UserObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"default": {
|
||||||
|
"value": {
|
||||||
|
"result": {
|
||||||
|
"id": 1,
|
||||||
|
"name": "Jamie Curnow",
|
||||||
|
"nickname": "James",
|
||||||
|
"email": "jc@jc21.com",
|
||||||
|
"created_on": 1578010100,
|
||||||
|
"modified_on": 1578010110,
|
||||||
|
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
|
||||||
|
"is_disabled": false,
|
||||||
|
"capabilities": ["full-admin"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "400 response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"required": ["error"],
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"$ref": "#/components/schemas/ErrorObject"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"duplicateemail": {
|
||||||
|
"value": {
|
||||||
|
"result": null,
|
||||||
|
"error": {
|
||||||
|
"code": 400,
|
||||||
|
"message": "A user already exists with this email address"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nodisable": {
|
||||||
|
"value": {
|
||||||
|
"result": null,
|
||||||
|
"error": {
|
||||||
|
"code": 400,
|
||||||
|
"message": "You cannot disable yourself!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
23
backend/embed/main.go
Normal file
23
backend/embed/main.go
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
package embed
|
||||||
|
|
||||||
|
import "embed"
|
||||||
|
|
||||||
|
// APIDocFiles contain all the files used for swagger schema generation
|
||||||
|
//
|
||||||
|
//go:embed api_docs
|
||||||
|
var APIDocFiles embed.FS
|
||||||
|
|
||||||
|
// Assets are frontend assets served from within this app
|
||||||
|
//
|
||||||
|
//go:embed assets
|
||||||
|
var Assets embed.FS
|
||||||
|
|
||||||
|
// MigrationFiles are database migrations
|
||||||
|
//
|
||||||
|
//go:embed migrations/*.sql
|
||||||
|
var MigrationFiles embed.FS
|
||||||
|
|
||||||
|
// NginxFiles hold nginx config templates
|
||||||
|
//
|
||||||
|
//go:embed nginx
|
||||||
|
var NginxFiles embed.FS
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user