docs.go 85 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901
  1. // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  2. // This file was generated by swaggo/swag
  3. package docs
  4. import (
  5. "bytes"
  6. "encoding/json"
  7. "strings"
  8. "github.com/alecthomas/template"
  9. "github.com/swaggo/swag"
  10. )
  11. var doc = `{
  12. "schemes": {{ marshal .Schemes }},
  13. "swagger": "2.0",
  14. "info": {
  15. "description": "{{.Description}}",
  16. "title": "{{.Title}}",
  17. "contact": {
  18. "name": "lauren.pan",
  19. "url": "https://www.zimaboard.com",
  20. "email": "lauren.pan@icewhale.org"
  21. },
  22. "version": "{{.Version}}"
  23. },
  24. "host": "{{.Host}}",
  25. "basePath": "{{.BasePath}}",
  26. "paths": {
  27. "/app/appinfo/{id}": {
  28. "get": {
  29. "security": [
  30. {
  31. "ApiKeyAuth": []
  32. }
  33. ],
  34. "consumes": [
  35. "application/json"
  36. ],
  37. "produces": [
  38. "application/json"
  39. ],
  40. "tags": [
  41. "app"
  42. ],
  43. "summary": "应用详情",
  44. "parameters": [
  45. {
  46. "type": "integer",
  47. "description": "id",
  48. "name": "id",
  49. "in": "path",
  50. "required": true
  51. }
  52. ],
  53. "responses": {
  54. "200": {
  55. "description": "ok",
  56. "schema": {
  57. "type": "string"
  58. }
  59. }
  60. }
  61. }
  62. },
  63. "/app/category": {
  64. "get": {
  65. "security": [
  66. {
  67. "ApiKeyAuth": []
  68. }
  69. ],
  70. "consumes": [
  71. "application/json"
  72. ],
  73. "produces": [
  74. "application/json"
  75. ],
  76. "tags": [
  77. "app"
  78. ],
  79. "summary": "获取远程分类列表",
  80. "responses": {
  81. "200": {
  82. "description": "ok",
  83. "schema": {
  84. "type": "string"
  85. }
  86. }
  87. }
  88. }
  89. },
  90. "/app/check/{port}": {
  91. "get": {
  92. "security": [
  93. {
  94. "ApiKeyAuth": []
  95. }
  96. ],
  97. "consumes": [
  98. "application/json"
  99. ],
  100. "produces": [
  101. "application/json"
  102. ],
  103. "tags": [
  104. "app"
  105. ],
  106. "summary": "检查端口是否可用",
  107. "parameters": [
  108. {
  109. "type": "integer",
  110. "description": "端口号",
  111. "name": "port",
  112. "in": "path",
  113. "required": true
  114. },
  115. {
  116. "type": "string",
  117. "description": "端口类型 udp/tcp",
  118. "name": "type",
  119. "in": "query",
  120. "required": true
  121. }
  122. ],
  123. "responses": {
  124. "200": {
  125. "description": "ok",
  126. "schema": {
  127. "type": "string"
  128. }
  129. }
  130. }
  131. }
  132. },
  133. "/app/getport": {
  134. "get": {
  135. "security": [
  136. {
  137. "ApiKeyAuth": []
  138. }
  139. ],
  140. "consumes": [
  141. "application/json"
  142. ],
  143. "produces": [
  144. "application/json"
  145. ],
  146. "tags": [
  147. "app"
  148. ],
  149. "summary": "获取一个可用端口",
  150. "parameters": [
  151. {
  152. "type": "string",
  153. "description": "端口类型 udp/tcp",
  154. "name": "type",
  155. "in": "query",
  156. "required": true
  157. }
  158. ],
  159. "responses": {
  160. "200": {
  161. "description": "ok",
  162. "schema": {
  163. "type": "string"
  164. }
  165. }
  166. }
  167. }
  168. },
  169. "/app/info/{id}": {
  170. "get": {
  171. "security": [
  172. {
  173. "ApiKeyAuth": []
  174. }
  175. ],
  176. "consumes": [
  177. "application/json"
  178. ],
  179. "produces": [
  180. "application/json"
  181. ],
  182. "tags": [
  183. "app"
  184. ],
  185. "summary": "获取容器详情",
  186. "parameters": [
  187. {
  188. "type": "string",
  189. "description": "appid",
  190. "name": "id",
  191. "in": "path",
  192. "required": true
  193. }
  194. ],
  195. "responses": {
  196. "200": {
  197. "description": "ok",
  198. "schema": {
  199. "type": "string"
  200. }
  201. }
  202. }
  203. }
  204. },
  205. "/app/install/config": {
  206. "get": {
  207. "security": [
  208. {
  209. "ApiKeyAuth": []
  210. }
  211. ],
  212. "consumes": [
  213. "application/json"
  214. ],
  215. "produces": [
  216. "application/json"
  217. ],
  218. "tags": [
  219. "app"
  220. ],
  221. "summary": "获取安装所需要的数据",
  222. "responses": {
  223. "200": {
  224. "description": "ok",
  225. "schema": {
  226. "type": "string"
  227. }
  228. }
  229. }
  230. }
  231. },
  232. "/app/install/{id}": {
  233. "post": {
  234. "security": [
  235. {
  236. "ApiKeyAuth": []
  237. }
  238. ],
  239. "consumes": [
  240. "application/json"
  241. ],
  242. "produces": [
  243. "application/json"
  244. ],
  245. "tags": [
  246. "app"
  247. ],
  248. "summary": "安装app(该接口需要post json数据)",
  249. "parameters": [
  250. {
  251. "type": "integer",
  252. "description": "id",
  253. "name": "id",
  254. "in": "path",
  255. "required": true
  256. },
  257. {
  258. "type": "integer",
  259. "description": "主端口",
  260. "name": "port",
  261. "in": "formData",
  262. "required": true
  263. },
  264. {
  265. "type": "string",
  266. "description": "tcp端口",
  267. "name": "tcp",
  268. "in": "formData"
  269. },
  270. {
  271. "type": "string",
  272. "description": "udp端口",
  273. "name": "udp",
  274. "in": "formData"
  275. },
  276. {
  277. "type": "string",
  278. "description": "环境变量",
  279. "name": "env",
  280. "in": "formData"
  281. }
  282. ],
  283. "responses": {
  284. "200": {
  285. "description": "ok",
  286. "schema": {
  287. "type": "string"
  288. }
  289. }
  290. }
  291. }
  292. },
  293. "/app/list": {
  294. "get": {
  295. "security": [
  296. {
  297. "ApiKeyAuth": []
  298. }
  299. ],
  300. "consumes": [
  301. "application/json"
  302. ],
  303. "produces": [
  304. "application/json"
  305. ],
  306. "tags": [
  307. "app"
  308. ],
  309. "summary": "获取远程列表",
  310. "parameters": [
  311. {
  312. "type": "integer",
  313. "description": "页码",
  314. "name": "index",
  315. "in": "query"
  316. },
  317. {
  318. "type": "integer",
  319. "description": "每页数量",
  320. "name": "size",
  321. "in": "query"
  322. },
  323. {
  324. "type": "integer",
  325. "description": "分类id",
  326. "name": "category_id",
  327. "in": "query"
  328. },
  329. {
  330. "type": "string",
  331. "description": "rank,new",
  332. "name": "type",
  333. "in": "query"
  334. },
  335. {
  336. "type": "string",
  337. "description": "search key",
  338. "name": "key",
  339. "in": "query"
  340. }
  341. ],
  342. "responses": {
  343. "200": {
  344. "description": "ok",
  345. "schema": {
  346. "type": "string"
  347. }
  348. }
  349. }
  350. }
  351. },
  352. "/app/logs/{id}": {
  353. "get": {
  354. "security": [
  355. {
  356. "ApiKeyAuth": []
  357. }
  358. ],
  359. "consumes": [
  360. "application/json"
  361. ],
  362. "produces": [
  363. "application/json"
  364. ],
  365. "tags": [
  366. "app"
  367. ],
  368. "summary": "查看容器日志",
  369. "parameters": [
  370. {
  371. "type": "string",
  372. "description": "appid",
  373. "name": "id",
  374. "in": "path",
  375. "required": true
  376. }
  377. ],
  378. "responses": {
  379. "200": {
  380. "description": "ok",
  381. "schema": {
  382. "type": "string"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "/app/mylist": {
  389. "get": {
  390. "security": [
  391. {
  392. "ApiKeyAuth": []
  393. }
  394. ],
  395. "consumes": [
  396. "application/json"
  397. ],
  398. "produces": [
  399. "application/json"
  400. ],
  401. "tags": [
  402. "app"
  403. ],
  404. "summary": "我的应用列表",
  405. "parameters": [
  406. {
  407. "type": "integer",
  408. "description": "index",
  409. "name": "index",
  410. "in": "query"
  411. },
  412. {
  413. "type": "integer",
  414. "description": "size",
  415. "name": "size",
  416. "in": "query"
  417. },
  418. {
  419. "type": "boolean",
  420. "description": "是否是首页应用",
  421. "name": "position",
  422. "in": "query"
  423. }
  424. ],
  425. "responses": {
  426. "200": {
  427. "description": "ok",
  428. "schema": {
  429. "type": "string"
  430. }
  431. }
  432. }
  433. }
  434. },
  435. "/app/rely/{id}/info": {
  436. "get": {
  437. "security": [
  438. {
  439. "ApiKeyAuth": []
  440. }
  441. ],
  442. "consumes": [
  443. "application/json"
  444. ],
  445. "produces": [
  446. "application/json"
  447. ],
  448. "tags": [
  449. "app"
  450. ],
  451. "summary": "获取依赖数据",
  452. "parameters": [
  453. {
  454. "type": "string",
  455. "description": "rely id",
  456. "name": "id",
  457. "in": "path",
  458. "required": true
  459. }
  460. ],
  461. "responses": {
  462. "200": {
  463. "description": "ok",
  464. "schema": {
  465. "type": "string"
  466. }
  467. }
  468. }
  469. }
  470. },
  471. "/app/speed/{id}": {
  472. "get": {
  473. "security": [
  474. {
  475. "ApiKeyAuth": []
  476. }
  477. ],
  478. "consumes": [
  479. "application/json"
  480. ],
  481. "produces": [
  482. "application/json"
  483. ],
  484. "tags": [
  485. "app"
  486. ],
  487. "summary": "获取安装进度",
  488. "parameters": [
  489. {
  490. "type": "string",
  491. "description": "容器id",
  492. "name": "id",
  493. "in": "path",
  494. "required": true
  495. }
  496. ],
  497. "responses": {
  498. "200": {
  499. "description": "ok",
  500. "schema": {
  501. "type": "string"
  502. }
  503. }
  504. }
  505. }
  506. },
  507. "/app/state/{id}": {
  508. "get": {
  509. "security": [
  510. {
  511. "ApiKeyAuth": []
  512. }
  513. ],
  514. "consumes": [
  515. "application/json"
  516. ],
  517. "produces": [
  518. "application/json"
  519. ],
  520. "tags": [
  521. "app"
  522. ],
  523. "summary": "获取容器状态",
  524. "parameters": [
  525. {
  526. "type": "string",
  527. "description": "容器id",
  528. "name": "id",
  529. "in": "path",
  530. "required": true
  531. },
  532. {
  533. "type": "string",
  534. "description": "type=1",
  535. "name": "type",
  536. "in": "query"
  537. }
  538. ],
  539. "responses": {
  540. "200": {
  541. "description": "ok",
  542. "schema": {
  543. "type": "string"
  544. }
  545. }
  546. }
  547. },
  548. "put": {
  549. "security": [
  550. {
  551. "ApiKeyAuth": []
  552. }
  553. ],
  554. "consumes": [
  555. "multipart/form-data"
  556. ],
  557. "produces": [
  558. "application/json"
  559. ],
  560. "tags": [
  561. "app"
  562. ],
  563. "summary": "修改app状态",
  564. "parameters": [
  565. {
  566. "type": "string",
  567. "description": "appid",
  568. "name": "id",
  569. "in": "path",
  570. "required": true
  571. },
  572. {
  573. "type": "string",
  574. "description": "是否停止 strat stop restart",
  575. "name": "state",
  576. "in": "query"
  577. }
  578. ],
  579. "responses": {
  580. "200": {
  581. "description": "ok",
  582. "schema": {
  583. "type": "string"
  584. }
  585. }
  586. }
  587. }
  588. },
  589. "/app/uninstall/{id}": {
  590. "delete": {
  591. "security": [
  592. {
  593. "ApiKeyAuth": []
  594. }
  595. ],
  596. "consumes": [
  597. "multipart/form-data"
  598. ],
  599. "produces": [
  600. "application/json"
  601. ],
  602. "tags": [
  603. "app"
  604. ],
  605. "summary": "卸载app",
  606. "parameters": [
  607. {
  608. "type": "string",
  609. "description": "容器id",
  610. "name": "id",
  611. "in": "path",
  612. "required": true
  613. }
  614. ],
  615. "responses": {
  616. "200": {
  617. "description": "ok",
  618. "schema": {
  619. "type": "string"
  620. }
  621. }
  622. }
  623. }
  624. },
  625. "/app/update/{id}/info": {
  626. "get": {
  627. "security": [
  628. {
  629. "ApiKeyAuth": []
  630. }
  631. ],
  632. "consumes": [
  633. "application/json"
  634. ],
  635. "produces": [
  636. "application/json"
  637. ],
  638. "tags": [
  639. "app"
  640. ],
  641. "summary": "获取可更新数据",
  642. "parameters": [
  643. {
  644. "type": "string",
  645. "description": "appid",
  646. "name": "id",
  647. "in": "path",
  648. "required": true
  649. }
  650. ],
  651. "responses": {
  652. "200": {
  653. "description": "ok",
  654. "schema": {
  655. "type": "string"
  656. }
  657. }
  658. }
  659. }
  660. },
  661. "/app/update/{id}/setting": {
  662. "put": {
  663. "security": [
  664. {
  665. "ApiKeyAuth": []
  666. }
  667. ],
  668. "consumes": [
  669. "multipart/form-data"
  670. ],
  671. "produces": [
  672. "application/json"
  673. ],
  674. "tags": [
  675. "app"
  676. ],
  677. "summary": "更新设置",
  678. "parameters": [
  679. {
  680. "type": "string",
  681. "description": "容器id",
  682. "name": "id",
  683. "in": "path",
  684. "required": true
  685. },
  686. {
  687. "type": "string",
  688. "description": "cpu权重",
  689. "name": "shares",
  690. "in": "formData"
  691. },
  692. {
  693. "type": "string",
  694. "description": "内存大小MB",
  695. "name": "mem",
  696. "in": "formData"
  697. },
  698. {
  699. "type": "string",
  700. "description": "重启策略",
  701. "name": "restart",
  702. "in": "formData"
  703. },
  704. {
  705. "type": "string",
  706. "description": "应用名称",
  707. "name": "label",
  708. "in": "formData"
  709. },
  710. {
  711. "type": "boolean",
  712. "description": "是否放到首页",
  713. "name": "position",
  714. "in": "formData",
  715. "required": true
  716. }
  717. ],
  718. "responses": {
  719. "200": {
  720. "description": "ok",
  721. "schema": {
  722. "type": "string"
  723. }
  724. }
  725. }
  726. }
  727. },
  728. "/ddns/delete/{id}": {
  729. "delete": {
  730. "security": [
  731. {
  732. "ApiKeyAuth": []
  733. }
  734. ],
  735. "consumes": [
  736. "application/json"
  737. ],
  738. "produces": [
  739. "application/json"
  740. ],
  741. "tags": [
  742. "ddns"
  743. ],
  744. "summary": "删除ddns",
  745. "parameters": [
  746. {
  747. "type": "integer",
  748. "description": "ID",
  749. "name": "id",
  750. "in": "path",
  751. "required": true
  752. }
  753. ],
  754. "responses": {
  755. "200": {
  756. "description": "ok",
  757. "schema": {
  758. "type": "string"
  759. }
  760. }
  761. }
  762. }
  763. },
  764. "/ddns/getlist": {
  765. "get": {
  766. "security": [
  767. {
  768. "ApiKeyAuth": []
  769. }
  770. ],
  771. "consumes": [
  772. "application/json"
  773. ],
  774. "produces": [
  775. "application/json"
  776. ],
  777. "tags": [
  778. "ddns"
  779. ],
  780. "summary": "获取可以设置的ddns列表",
  781. "responses": {
  782. "200": {
  783. "description": "ok",
  784. "schema": {
  785. "type": "string"
  786. }
  787. }
  788. }
  789. }
  790. },
  791. "/ddns/ip": {
  792. "get": {
  793. "security": [
  794. {
  795. "ApiKeyAuth": []
  796. }
  797. ],
  798. "consumes": [
  799. "application/json"
  800. ],
  801. "produces": [
  802. "application/json"
  803. ],
  804. "tags": [
  805. "ddns"
  806. ],
  807. "summary": "获取ip,仅做展示使用",
  808. "responses": {
  809. "200": {
  810. "description": "ok",
  811. "schema": {
  812. "type": "string"
  813. }
  814. }
  815. }
  816. }
  817. },
  818. "/ddns/list": {
  819. "get": {
  820. "security": [
  821. {
  822. "ApiKeyAuth": []
  823. }
  824. ],
  825. "consumes": [
  826. "application/json"
  827. ],
  828. "produces": [
  829. "application/json"
  830. ],
  831. "tags": [
  832. "ddns"
  833. ],
  834. "summary": "获取已设置的列表",
  835. "responses": {
  836. "200": {
  837. "description": "ok",
  838. "schema": {
  839. "type": "string"
  840. }
  841. }
  842. }
  843. }
  844. },
  845. "/ddns/ping/{api_host}": {
  846. "get": {
  847. "security": [
  848. {
  849. "ApiKeyAuth": []
  850. }
  851. ],
  852. "consumes": [
  853. "application/json"
  854. ],
  855. "produces": [
  856. "application/json"
  857. ],
  858. "tags": [
  859. "ddns"
  860. ],
  861. "summary": "测试网址是否可以ping通",
  862. "parameters": [
  863. {
  864. "type": "integer",
  865. "description": "api地址",
  866. "name": "api_host",
  867. "in": "path",
  868. "required": true
  869. }
  870. ],
  871. "responses": {
  872. "200": {
  873. "description": "ok",
  874. "schema": {
  875. "type": "string"
  876. }
  877. }
  878. }
  879. }
  880. },
  881. "/ddns/set": {
  882. "post": {
  883. "security": [
  884. {
  885. "ApiKeyAuth": []
  886. }
  887. ],
  888. "consumes": [
  889. "multipart/form-data"
  890. ],
  891. "produces": [
  892. "application/json"
  893. ],
  894. "tags": [
  895. "ddns"
  896. ],
  897. "summary": "添加新的ddns(按给定模型返回内容)",
  898. "parameters": [
  899. {
  900. "type": "string",
  901. "description": "类型",
  902. "name": "type",
  903. "in": "formData",
  904. "required": true
  905. },
  906. {
  907. "type": "string",
  908. "description": "host",
  909. "name": "host",
  910. "in": "formData",
  911. "required": true
  912. }
  913. ],
  914. "responses": {
  915. "200": {
  916. "description": "ok",
  917. "schema": {
  918. "type": "string"
  919. }
  920. }
  921. }
  922. }
  923. },
  924. "/disk/addpart": {
  925. "post": {
  926. "security": [
  927. {
  928. "ApiKeyAuth": []
  929. }
  930. ],
  931. "consumes": [
  932. "multipart/form-data"
  933. ],
  934. "produces": [
  935. "application/json"
  936. ],
  937. "tags": [
  938. "disk"
  939. ],
  940. "summary": "添加分区",
  941. "parameters": [
  942. {
  943. "type": "string",
  944. "description": "磁盘路径 例如/dev/sda",
  945. "name": "path",
  946. "in": "formData",
  947. "required": true
  948. },
  949. {
  950. "type": "string",
  951. "description": "需要分区容量大小(MB)",
  952. "name": "size",
  953. "in": "formData",
  954. "required": true
  955. },
  956. {
  957. "type": "string",
  958. "description": "磁盘符号",
  959. "name": "num",
  960. "in": "formData",
  961. "required": true
  962. }
  963. ],
  964. "responses": {
  965. "200": {
  966. "description": "ok",
  967. "schema": {
  968. "type": "string"
  969. }
  970. }
  971. }
  972. }
  973. },
  974. "/disk/delpart": {
  975. "delete": {
  976. "security": [
  977. {
  978. "ApiKeyAuth": []
  979. }
  980. ],
  981. "consumes": [
  982. "multipart/form-data"
  983. ],
  984. "produces": [
  985. "application/json"
  986. ],
  987. "tags": [
  988. "disk"
  989. ],
  990. "summary": "删除分区",
  991. "parameters": [
  992. {
  993. "type": "string",
  994. "description": "磁盘路径 例如/dev/sda1",
  995. "name": "path",
  996. "in": "formData",
  997. "required": true
  998. }
  999. ],
  1000. "responses": {
  1001. "200": {
  1002. "description": "ok",
  1003. "schema": {
  1004. "type": "string"
  1005. }
  1006. }
  1007. }
  1008. }
  1009. },
  1010. "/disk/format": {
  1011. "post": {
  1012. "security": [
  1013. {
  1014. "ApiKeyAuth": []
  1015. }
  1016. ],
  1017. "consumes": [
  1018. "multipart/form-data"
  1019. ],
  1020. "produces": [
  1021. "application/json"
  1022. ],
  1023. "tags": [
  1024. "disk"
  1025. ],
  1026. "summary": "磁盘详情",
  1027. "parameters": [
  1028. {
  1029. "type": "string",
  1030. "description": "磁盘路径 例如/dev/sda1",
  1031. "name": "path",
  1032. "in": "formData",
  1033. "required": true
  1034. }
  1035. ],
  1036. "responses": {
  1037. "200": {
  1038. "description": "ok",
  1039. "schema": {
  1040. "type": "string"
  1041. }
  1042. }
  1043. }
  1044. }
  1045. },
  1046. "/disk/info": {
  1047. "get": {
  1048. "security": [
  1049. {
  1050. "ApiKeyAuth": []
  1051. }
  1052. ],
  1053. "consumes": [
  1054. "application/json"
  1055. ],
  1056. "produces": [
  1057. "application/json"
  1058. ],
  1059. "tags": [
  1060. "disk"
  1061. ],
  1062. "summary": "磁盘详情",
  1063. "parameters": [
  1064. {
  1065. "type": "string",
  1066. "description": "要获取的磁盘详情 例如/dev/sda",
  1067. "name": "path",
  1068. "in": "query",
  1069. "required": true
  1070. }
  1071. ],
  1072. "responses": {
  1073. "200": {
  1074. "description": "ok",
  1075. "schema": {
  1076. "type": "string"
  1077. }
  1078. }
  1079. }
  1080. }
  1081. },
  1082. "/disk/list": {
  1083. "get": {
  1084. "security": [
  1085. {
  1086. "ApiKeyAuth": []
  1087. }
  1088. ],
  1089. "consumes": [
  1090. "application/json"
  1091. ],
  1092. "produces": [
  1093. "application/json"
  1094. ],
  1095. "tags": [
  1096. "disk"
  1097. ],
  1098. "summary": "获取磁盘列表",
  1099. "responses": {
  1100. "200": {
  1101. "description": "ok",
  1102. "schema": {
  1103. "type": "string"
  1104. }
  1105. }
  1106. }
  1107. }
  1108. },
  1109. "/disk/lists": {
  1110. "get": {
  1111. "security": [
  1112. {
  1113. "ApiKeyAuth": []
  1114. }
  1115. ],
  1116. "consumes": [
  1117. "application/json"
  1118. ],
  1119. "produces": [
  1120. "application/json"
  1121. ],
  1122. "tags": [
  1123. "disk"
  1124. ],
  1125. "summary": "获取磁盘列表",
  1126. "responses": {
  1127. "200": {
  1128. "description": "ok",
  1129. "schema": {
  1130. "type": "string"
  1131. }
  1132. }
  1133. }
  1134. }
  1135. },
  1136. "/disk/type": {
  1137. "get": {
  1138. "security": [
  1139. {
  1140. "ApiKeyAuth": []
  1141. }
  1142. ],
  1143. "consumes": [
  1144. "application/json"
  1145. ],
  1146. "produces": [
  1147. "application/json"
  1148. ],
  1149. "tags": [
  1150. "disk"
  1151. ],
  1152. "summary": "获取支持的格式",
  1153. "responses": {
  1154. "200": {
  1155. "description": "ok",
  1156. "schema": {
  1157. "type": "string"
  1158. }
  1159. }
  1160. }
  1161. }
  1162. },
  1163. "/file/dirpath": {
  1164. "get": {
  1165. "security": [
  1166. {
  1167. "ApiKeyAuth": []
  1168. }
  1169. ],
  1170. "consumes": [
  1171. "application/json"
  1172. ],
  1173. "produces": [
  1174. "application/json"
  1175. ],
  1176. "tags": [
  1177. "file"
  1178. ],
  1179. "summary": "获取目录列表",
  1180. "parameters": [
  1181. {
  1182. "type": "string",
  1183. "description": "路径",
  1184. "name": "path",
  1185. "in": "query"
  1186. }
  1187. ],
  1188. "responses": {
  1189. "200": {
  1190. "description": "ok",
  1191. "schema": {
  1192. "type": "string"
  1193. }
  1194. }
  1195. }
  1196. }
  1197. },
  1198. "/file/download": {
  1199. "get": {
  1200. "security": [
  1201. {
  1202. "ApiKeyAuth": []
  1203. }
  1204. ],
  1205. "consumes": [
  1206. "application/json"
  1207. ],
  1208. "produces": [
  1209. "application/json"
  1210. ],
  1211. "tags": [
  1212. "file"
  1213. ],
  1214. "summary": "下载文件",
  1215. "parameters": [
  1216. {
  1217. "type": "string",
  1218. "description": "路径",
  1219. "name": "path",
  1220. "in": "query",
  1221. "required": true
  1222. }
  1223. ],
  1224. "responses": {
  1225. "200": {
  1226. "description": "ok",
  1227. "schema": {
  1228. "type": "string"
  1229. }
  1230. }
  1231. }
  1232. }
  1233. },
  1234. "/file/mkdir": {
  1235. "post": {
  1236. "security": [
  1237. {
  1238. "ApiKeyAuth": []
  1239. }
  1240. ],
  1241. "consumes": [
  1242. "multipart/form-data"
  1243. ],
  1244. "produces": [
  1245. "application/json"
  1246. ],
  1247. "tags": [
  1248. "file"
  1249. ],
  1250. "summary": "上传文件",
  1251. "parameters": [
  1252. {
  1253. "type": "string",
  1254. "description": "路径",
  1255. "name": "path",
  1256. "in": "formData"
  1257. }
  1258. ],
  1259. "responses": {
  1260. "200": {
  1261. "description": "ok",
  1262. "schema": {
  1263. "type": "string"
  1264. }
  1265. }
  1266. }
  1267. }
  1268. },
  1269. "/file/read": {
  1270. "get": {
  1271. "security": [
  1272. {
  1273. "ApiKeyAuth": []
  1274. }
  1275. ],
  1276. "consumes": [
  1277. "application/json"
  1278. ],
  1279. "produces": [
  1280. "application/json"
  1281. ],
  1282. "tags": [
  1283. "file"
  1284. ],
  1285. "summary": "读取文件",
  1286. "parameters": [
  1287. {
  1288. "type": "string",
  1289. "description": "路径",
  1290. "name": "path",
  1291. "in": "query",
  1292. "required": true
  1293. }
  1294. ],
  1295. "responses": {
  1296. "200": {
  1297. "description": "ok",
  1298. "schema": {
  1299. "type": "string"
  1300. }
  1301. }
  1302. }
  1303. }
  1304. },
  1305. "/file/rename": {
  1306. "put": {
  1307. "security": [
  1308. {
  1309. "ApiKeyAuth": []
  1310. }
  1311. ],
  1312. "consumes": [
  1313. "application/json"
  1314. ],
  1315. "produces": [
  1316. "application/json"
  1317. ],
  1318. "tags": [
  1319. "file"
  1320. ],
  1321. "summary": "重命名目录或文件",
  1322. "parameters": [
  1323. {
  1324. "type": "string",
  1325. "description": "旧的路径",
  1326. "name": "oldpath",
  1327. "in": "formData",
  1328. "required": true
  1329. },
  1330. {
  1331. "type": "string",
  1332. "description": "新路径",
  1333. "name": "newpath",
  1334. "in": "formData",
  1335. "required": true
  1336. }
  1337. ],
  1338. "responses": {
  1339. "200": {
  1340. "description": "ok",
  1341. "schema": {
  1342. "type": "string"
  1343. }
  1344. }
  1345. }
  1346. }
  1347. },
  1348. "/notify/read/{id}": {
  1349. "put": {
  1350. "security": [
  1351. {
  1352. "ApiKeyAuth": []
  1353. }
  1354. ],
  1355. "consumes": [
  1356. "application/json"
  1357. ],
  1358. "produces": [
  1359. "application/json"
  1360. ],
  1361. "tags": [
  1362. "notify"
  1363. ],
  1364. "summary": "标记notify已读",
  1365. "responses": {
  1366. "200": {
  1367. "description": "ok",
  1368. "schema": {
  1369. "type": "string"
  1370. }
  1371. }
  1372. }
  1373. }
  1374. },
  1375. "/notify/ws": {},
  1376. "/share/add": {
  1377. "post": {
  1378. "security": [
  1379. {
  1380. "ApiKeyAuth": []
  1381. }
  1382. ],
  1383. "consumes": [
  1384. "multipart/form-data"
  1385. ],
  1386. "produces": [
  1387. "application/json"
  1388. ],
  1389. "tags": [
  1390. "share"
  1391. ],
  1392. "summary": "添加文件共享",
  1393. "parameters": [
  1394. {
  1395. "type": "string",
  1396. "description": "要分享的文件路径",
  1397. "name": "path",
  1398. "in": "formData",
  1399. "required": true
  1400. },
  1401. {
  1402. "type": "string",
  1403. "description": "名称",
  1404. "name": "name",
  1405. "in": "formData",
  1406. "required": true
  1407. },
  1408. {
  1409. "type": "string",
  1410. "description": "描述",
  1411. "name": "comment",
  1412. "in": "formData",
  1413. "required": true
  1414. },
  1415. {
  1416. "type": "boolean",
  1417. "description": "是否只读",
  1418. "name": "read_only",
  1419. "in": "formData"
  1420. },
  1421. {
  1422. "type": "boolean",
  1423. "description": "是否可写",
  1424. "name": "writeable",
  1425. "in": "formData"
  1426. },
  1427. {
  1428. "type": "boolean",
  1429. "description": "是否可浏览",
  1430. "name": "browseable",
  1431. "in": "formData"
  1432. },
  1433. {
  1434. "type": "string",
  1435. "description": "用户",
  1436. "name": "user",
  1437. "in": "formData"
  1438. }
  1439. ],
  1440. "responses": {
  1441. "200": {
  1442. "description": "ok",
  1443. "schema": {
  1444. "type": "string"
  1445. }
  1446. }
  1447. }
  1448. }
  1449. },
  1450. "/share/del/{id}": {
  1451. "delete": {
  1452. "security": [
  1453. {
  1454. "ApiKeyAuth": []
  1455. }
  1456. ],
  1457. "consumes": [
  1458. "application/json"
  1459. ],
  1460. "produces": [
  1461. "application/json"
  1462. ],
  1463. "tags": [
  1464. "share"
  1465. ],
  1466. "summary": "删除分享",
  1467. "parameters": [
  1468. {
  1469. "type": "string",
  1470. "description": "id",
  1471. "name": "id",
  1472. "in": "path",
  1473. "required": true
  1474. }
  1475. ],
  1476. "responses": {
  1477. "200": {
  1478. "description": "ok",
  1479. "schema": {
  1480. "type": "string"
  1481. }
  1482. }
  1483. }
  1484. }
  1485. },
  1486. "/share/info/{id}": {
  1487. "get": {
  1488. "security": [
  1489. {
  1490. "ApiKeyAuth": []
  1491. }
  1492. ],
  1493. "consumes": [
  1494. "application/json"
  1495. ],
  1496. "produces": [
  1497. "application/json"
  1498. ],
  1499. "tags": [
  1500. "share"
  1501. ],
  1502. "summary": "分享详情",
  1503. "parameters": [
  1504. {
  1505. "type": "string",
  1506. "description": "id",
  1507. "name": "id",
  1508. "in": "path",
  1509. "required": true
  1510. }
  1511. ],
  1512. "responses": {
  1513. "200": {
  1514. "description": "ok",
  1515. "schema": {
  1516. "type": "string"
  1517. }
  1518. }
  1519. }
  1520. }
  1521. },
  1522. "/share/list": {
  1523. "get": {
  1524. "security": [
  1525. {
  1526. "ApiKeyAuth": []
  1527. }
  1528. ],
  1529. "consumes": [
  1530. "application/json"
  1531. ],
  1532. "produces": [
  1533. "application/json"
  1534. ],
  1535. "tags": [
  1536. "share"
  1537. ],
  1538. "summary": "获取列表",
  1539. "responses": {
  1540. "200": {
  1541. "description": "ok",
  1542. "schema": {
  1543. "type": "string"
  1544. }
  1545. }
  1546. }
  1547. }
  1548. },
  1549. "/share/update/{id}": {
  1550. "put": {
  1551. "security": [
  1552. {
  1553. "ApiKeyAuth": []
  1554. }
  1555. ],
  1556. "consumes": [
  1557. "application/json"
  1558. ],
  1559. "produces": [
  1560. "application/json"
  1561. ],
  1562. "tags": [
  1563. "share"
  1564. ],
  1565. "summary": "更新分享详情",
  1566. "parameters": [
  1567. {
  1568. "type": "string",
  1569. "description": "id",
  1570. "name": "id",
  1571. "in": "path",
  1572. "required": true
  1573. },
  1574. {
  1575. "type": "string",
  1576. "description": "要分享的文件路径",
  1577. "name": "path",
  1578. "in": "formData",
  1579. "required": true
  1580. },
  1581. {
  1582. "type": "string",
  1583. "description": "名称",
  1584. "name": "name",
  1585. "in": "formData",
  1586. "required": true
  1587. },
  1588. {
  1589. "type": "string",
  1590. "description": "描述",
  1591. "name": "comment",
  1592. "in": "formData",
  1593. "required": true
  1594. },
  1595. {
  1596. "type": "boolean",
  1597. "description": "是否只读",
  1598. "name": "read_only",
  1599. "in": "formData"
  1600. },
  1601. {
  1602. "type": "boolean",
  1603. "description": "是否可写",
  1604. "name": "writeable",
  1605. "in": "formData"
  1606. },
  1607. {
  1608. "type": "boolean",
  1609. "description": "是否可浏览",
  1610. "name": "browseable",
  1611. "in": "formData"
  1612. },
  1613. {
  1614. "type": "string",
  1615. "description": "用户",
  1616. "name": "user",
  1617. "in": "formData"
  1618. }
  1619. ],
  1620. "responses": {
  1621. "200": {
  1622. "description": "ok",
  1623. "schema": {
  1624. "type": "string"
  1625. }
  1626. }
  1627. }
  1628. }
  1629. },
  1630. "/shortcuts/add": {
  1631. "post": {
  1632. "security": [
  1633. {
  1634. "ApiKeyAuth": []
  1635. }
  1636. ],
  1637. "consumes": [
  1638. "application/json"
  1639. ],
  1640. "produces": [
  1641. "application/json"
  1642. ],
  1643. "tags": [
  1644. "shortcuts"
  1645. ],
  1646. "summary": "添加shortcuts",
  1647. "parameters": [
  1648. {
  1649. "type": "string",
  1650. "description": "title",
  1651. "name": "title",
  1652. "in": "formData",
  1653. "required": true
  1654. },
  1655. {
  1656. "type": "string",
  1657. "description": "url",
  1658. "name": "url",
  1659. "in": "formData",
  1660. "required": true
  1661. }
  1662. ],
  1663. "responses": {
  1664. "200": {
  1665. "description": "ok",
  1666. "schema": {
  1667. "type": "string"
  1668. }
  1669. }
  1670. }
  1671. }
  1672. },
  1673. "/shortcuts/del/{id}": {
  1674. "post": {
  1675. "security": [
  1676. {
  1677. "ApiKeyAuth": []
  1678. }
  1679. ],
  1680. "consumes": [
  1681. "application/json"
  1682. ],
  1683. "produces": [
  1684. "application/json"
  1685. ],
  1686. "tags": [
  1687. "shortcuts"
  1688. ],
  1689. "summary": "删除shortcuts",
  1690. "responses": {
  1691. "200": {
  1692. "description": "ok",
  1693. "schema": {
  1694. "type": "string"
  1695. }
  1696. }
  1697. }
  1698. }
  1699. },
  1700. "/shortcuts/edit": {
  1701. "put": {
  1702. "security": [
  1703. {
  1704. "ApiKeyAuth": []
  1705. }
  1706. ],
  1707. "consumes": [
  1708. "application/json"
  1709. ],
  1710. "produces": [
  1711. "application/json"
  1712. ],
  1713. "tags": [
  1714. "shortcuts"
  1715. ],
  1716. "summary": "编辑shortcuts",
  1717. "parameters": [
  1718. {
  1719. "type": "string",
  1720. "description": "title",
  1721. "name": "title",
  1722. "in": "formData",
  1723. "required": true
  1724. },
  1725. {
  1726. "type": "string",
  1727. "description": "url",
  1728. "name": "url",
  1729. "in": "formData",
  1730. "required": true
  1731. }
  1732. ],
  1733. "responses": {
  1734. "200": {
  1735. "description": "ok",
  1736. "schema": {
  1737. "type": "string"
  1738. }
  1739. }
  1740. }
  1741. }
  1742. },
  1743. "/shortcuts/list": {
  1744. "get": {
  1745. "security": [
  1746. {
  1747. "ApiKeyAuth": []
  1748. }
  1749. ],
  1750. "consumes": [
  1751. "application/json"
  1752. ],
  1753. "produces": [
  1754. "application/json"
  1755. ],
  1756. "tags": [
  1757. "shortcuts"
  1758. ],
  1759. "summary": "获取短链列表",
  1760. "parameters": [
  1761. {
  1762. "type": "string",
  1763. "description": "User name",
  1764. "name": "username",
  1765. "in": "formData",
  1766. "required": true
  1767. },
  1768. {
  1769. "type": "string",
  1770. "description": "password",
  1771. "name": "pwd",
  1772. "in": "formData",
  1773. "required": true
  1774. }
  1775. ],
  1776. "responses": {
  1777. "200": {
  1778. "description": "ok",
  1779. "schema": {
  1780. "type": "string"
  1781. }
  1782. }
  1783. }
  1784. }
  1785. },
  1786. "/sys/chackversion": {
  1787. "get": {
  1788. "security": [
  1789. {
  1790. "ApiKeyAuth": []
  1791. }
  1792. ],
  1793. "consumes": [
  1794. "application/json"
  1795. ],
  1796. "produces": [
  1797. "application/json"
  1798. ],
  1799. "tags": [
  1800. "sys"
  1801. ],
  1802. "summary": "系统信息",
  1803. "responses": {
  1804. "200": {
  1805. "description": "ok",
  1806. "schema": {
  1807. "type": "string"
  1808. }
  1809. }
  1810. }
  1811. }
  1812. },
  1813. "/task/completion/{id}": {
  1814. "put": {
  1815. "security": [
  1816. {
  1817. "ApiKeyAuth": []
  1818. }
  1819. ],
  1820. "consumes": [
  1821. "application/json"
  1822. ],
  1823. "produces": [
  1824. "application/json"
  1825. ],
  1826. "tags": [
  1827. "task"
  1828. ],
  1829. "summary": "标记task已完成",
  1830. "responses": {
  1831. "200": {
  1832. "description": "ok",
  1833. "schema": {
  1834. "type": "string"
  1835. }
  1836. }
  1837. }
  1838. }
  1839. },
  1840. "/task/list": {
  1841. "get": {
  1842. "security": [
  1843. {
  1844. "ApiKeyAuth": []
  1845. }
  1846. ],
  1847. "consumes": [
  1848. "application/json"
  1849. ],
  1850. "produces": [
  1851. "application/json"
  1852. ],
  1853. "tags": [
  1854. "task"
  1855. ],
  1856. "summary": "获取task列表",
  1857. "responses": {
  1858. "200": {
  1859. "description": "ok",
  1860. "schema": {
  1861. "type": "string"
  1862. }
  1863. }
  1864. }
  1865. }
  1866. },
  1867. "/user/changhead": {
  1868. "post": {
  1869. "security": [
  1870. {
  1871. "ApiKeyAuth": []
  1872. }
  1873. ],
  1874. "consumes": [
  1875. "multipart/form-data"
  1876. ],
  1877. "produces": [
  1878. "application/json"
  1879. ],
  1880. "tags": [
  1881. "user"
  1882. ],
  1883. "summary": "修改配置文件",
  1884. "parameters": [
  1885. {
  1886. "type": "file",
  1887. "description": "用户头像",
  1888. "name": "file",
  1889. "in": "formData",
  1890. "required": true
  1891. }
  1892. ],
  1893. "responses": {
  1894. "200": {
  1895. "description": "ok",
  1896. "schema": {
  1897. "type": "string"
  1898. }
  1899. }
  1900. }
  1901. }
  1902. },
  1903. "/user/changuserinfo": {
  1904. "post": {
  1905. "security": [
  1906. {
  1907. "ApiKeyAuth": []
  1908. }
  1909. ],
  1910. "consumes": [
  1911. "multipart/form-data"
  1912. ],
  1913. "produces": [
  1914. "application/json"
  1915. ],
  1916. "tags": [
  1917. "user"
  1918. ],
  1919. "summary": "修改用户信息",
  1920. "parameters": [
  1921. {
  1922. "type": "string",
  1923. "description": "User Name",
  1924. "name": "username",
  1925. "in": "formData"
  1926. },
  1927. {
  1928. "type": "string",
  1929. "description": "Email",
  1930. "name": "email",
  1931. "in": "formData"
  1932. },
  1933. {
  1934. "type": "string",
  1935. "description": "Description",
  1936. "name": "description",
  1937. "in": "formData"
  1938. },
  1939. {
  1940. "type": "string",
  1941. "description": "Password",
  1942. "name": "pwd",
  1943. "in": "formData"
  1944. },
  1945. {
  1946. "type": "string",
  1947. "description": "Old password",
  1948. "name": "oldpwd",
  1949. "in": "formData"
  1950. }
  1951. ],
  1952. "responses": {
  1953. "200": {
  1954. "description": "ok",
  1955. "schema": {
  1956. "type": "string"
  1957. }
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "/user/changusername": {
  1963. "put": {
  1964. "security": [
  1965. {
  1966. "ApiKeyAuth": []
  1967. }
  1968. ],
  1969. "consumes": [
  1970. "multipart/form-data"
  1971. ],
  1972. "produces": [
  1973. "application/json"
  1974. ],
  1975. "tags": [
  1976. "user"
  1977. ],
  1978. "summary": "修改用户名",
  1979. "parameters": [
  1980. {
  1981. "type": "string",
  1982. "description": "User name",
  1983. "name": "username",
  1984. "in": "formData",
  1985. "required": true
  1986. },
  1987. {
  1988. "type": "string",
  1989. "description": "Old user name",
  1990. "name": "oldname",
  1991. "in": "formData",
  1992. "required": true
  1993. }
  1994. ],
  1995. "responses": {
  1996. "200": {
  1997. "description": "ok",
  1998. "schema": {
  1999. "type": "string"
  2000. }
  2001. }
  2002. }
  2003. }
  2004. },
  2005. "/user/changuserpwd": {
  2006. "put": {
  2007. "security": [
  2008. {
  2009. "ApiKeyAuth": []
  2010. }
  2011. ],
  2012. "consumes": [
  2013. "multipart/form-data"
  2014. ],
  2015. "produces": [
  2016. "application/json"
  2017. ],
  2018. "tags": [
  2019. "user"
  2020. ],
  2021. "summary": "修改密码",
  2022. "parameters": [
  2023. {
  2024. "type": "string",
  2025. "description": "Password",
  2026. "name": "pwd",
  2027. "in": "formData",
  2028. "required": true
  2029. },
  2030. {
  2031. "type": "string",
  2032. "description": "Old password",
  2033. "name": "oldpwd",
  2034. "in": "formData",
  2035. "required": true
  2036. }
  2037. ],
  2038. "responses": {
  2039. "200": {
  2040. "description": "ok",
  2041. "schema": {
  2042. "type": "string"
  2043. }
  2044. }
  2045. }
  2046. }
  2047. },
  2048. "/user/info": {
  2049. "get": {
  2050. "security": [
  2051. {
  2052. "ApiKeyAuth": []
  2053. }
  2054. ],
  2055. "consumes": [
  2056. "mapplication/json"
  2057. ],
  2058. "produces": [
  2059. "application/json"
  2060. ],
  2061. "tags": [
  2062. "user"
  2063. ],
  2064. "summary": "获取用户详情",
  2065. "responses": {
  2066. "200": {
  2067. "description": "ok",
  2068. "schema": {
  2069. "type": "string"
  2070. }
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "/user/login": {
  2076. "post": {
  2077. "consumes": [
  2078. "multipart/form-data"
  2079. ],
  2080. "produces": [
  2081. "application/json"
  2082. ],
  2083. "tags": [
  2084. "user"
  2085. ],
  2086. "summary": "登录",
  2087. "parameters": [
  2088. {
  2089. "type": "string",
  2090. "description": "User name",
  2091. "name": "username",
  2092. "in": "formData",
  2093. "required": true
  2094. },
  2095. {
  2096. "type": "string",
  2097. "description": "password",
  2098. "name": "pwd",
  2099. "in": "formData",
  2100. "required": true
  2101. }
  2102. ],
  2103. "responses": {
  2104. "200": {
  2105. "description": "ok",
  2106. "schema": {
  2107. "type": "string"
  2108. }
  2109. }
  2110. }
  2111. }
  2112. },
  2113. "/user/setusernamepwd": {
  2114. "post": {
  2115. "security": [
  2116. {
  2117. "ApiKeyAuth": []
  2118. }
  2119. ],
  2120. "consumes": [
  2121. "multipart/form-data"
  2122. ],
  2123. "produces": [
  2124. "application/json"
  2125. ],
  2126. "tags": [
  2127. "user"
  2128. ],
  2129. "summary": "设置用户名和密码",
  2130. "parameters": [
  2131. {
  2132. "type": "string",
  2133. "description": "User name",
  2134. "name": "username",
  2135. "in": "formData",
  2136. "required": true
  2137. },
  2138. {
  2139. "type": "string",
  2140. "description": "password",
  2141. "name": "pwd",
  2142. "in": "formData",
  2143. "required": true
  2144. }
  2145. ],
  2146. "responses": {
  2147. "200": {
  2148. "description": "ok",
  2149. "schema": {
  2150. "type": "string"
  2151. }
  2152. }
  2153. }
  2154. }
  2155. },
  2156. "/zerotier/create": {
  2157. "post": {
  2158. "security": [
  2159. {
  2160. "ApiKeyAuth": []
  2161. }
  2162. ],
  2163. "consumes": [
  2164. "application/json"
  2165. ],
  2166. "produces": [
  2167. "application/json"
  2168. ],
  2169. "tags": [
  2170. "zerotier"
  2171. ],
  2172. "summary": "create new network",
  2173. "responses": {
  2174. "200": {
  2175. "description": "ok",
  2176. "schema": {
  2177. "type": "string"
  2178. }
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "/zerotier/edit/{id}": {
  2184. "put": {
  2185. "security": [
  2186. {
  2187. "ApiKeyAuth": []
  2188. }
  2189. ],
  2190. "consumes": [
  2191. "application/json"
  2192. ],
  2193. "produces": [
  2194. "application/json"
  2195. ],
  2196. "tags": [
  2197. "zerotier"
  2198. ],
  2199. "summary": "修改网络",
  2200. "parameters": [
  2201. {
  2202. "type": "string",
  2203. "description": "network id",
  2204. "name": "id",
  2205. "in": "path",
  2206. "required": true
  2207. },
  2208. {
  2209. "type": "string",
  2210. "description": "json数据",
  2211. "name": "json",
  2212. "in": "formData",
  2213. "required": true
  2214. }
  2215. ],
  2216. "responses": {
  2217. "200": {
  2218. "description": "ok",
  2219. "schema": {
  2220. "type": "string"
  2221. }
  2222. }
  2223. }
  2224. }
  2225. },
  2226. "/zerotier/info/{id}": {
  2227. "get": {
  2228. "security": [
  2229. {
  2230. "ApiKeyAuth": []
  2231. }
  2232. ],
  2233. "consumes": [
  2234. "application/json"
  2235. ],
  2236. "produces": [
  2237. "application/json"
  2238. ],
  2239. "tags": [
  2240. "zerotier"
  2241. ],
  2242. "summary": "获取zerotier网络详情",
  2243. "parameters": [
  2244. {
  2245. "type": "string",
  2246. "description": "network id",
  2247. "name": "id",
  2248. "in": "path",
  2249. "required": true
  2250. }
  2251. ],
  2252. "responses": {
  2253. "200": {
  2254. "description": "ok",
  2255. "schema": {
  2256. "type": "string"
  2257. }
  2258. }
  2259. }
  2260. }
  2261. },
  2262. "/zerotier/islogin": {
  2263. "get": {
  2264. "security": [
  2265. {
  2266. "ApiKeyAuth": []
  2267. }
  2268. ],
  2269. "consumes": [
  2270. "application/json"
  2271. ],
  2272. "produces": [
  2273. "application/json"
  2274. ],
  2275. "tags": [
  2276. "zerotier"
  2277. ],
  2278. "summary": "是否需要登录zerotier",
  2279. "responses": {
  2280. "200": {
  2281. "description": "false:需要登录,true:不需要登录",
  2282. "schema": {
  2283. "type": "string"
  2284. }
  2285. }
  2286. }
  2287. }
  2288. },
  2289. "/zerotier/join/{id}": {
  2290. "post": {
  2291. "security": [
  2292. {
  2293. "ApiKeyAuth": []
  2294. }
  2295. ],
  2296. "consumes": [
  2297. "multipart/form-data"
  2298. ],
  2299. "produces": [
  2300. "application/json"
  2301. ],
  2302. "tags": [
  2303. "zerotier"
  2304. ],
  2305. "summary": "加入网络",
  2306. "parameters": [
  2307. {
  2308. "type": "string",
  2309. "description": "network id",
  2310. "name": "id",
  2311. "in": "path",
  2312. "required": true
  2313. }
  2314. ],
  2315. "responses": {
  2316. "200": {
  2317. "description": "ok",
  2318. "schema": {
  2319. "type": "string"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "/zerotier/joined/list": {
  2326. "get": {
  2327. "security": [
  2328. {
  2329. "ApiKeyAuth": []
  2330. }
  2331. ],
  2332. "consumes": [
  2333. "application/json"
  2334. ],
  2335. "produces": [
  2336. "application/json"
  2337. ],
  2338. "tags": [
  2339. "zerotier"
  2340. ],
  2341. "summary": "获取已加入的网络",
  2342. "responses": {
  2343. "200": {
  2344. "description": "ok",
  2345. "schema": {
  2346. "type": "string"
  2347. }
  2348. }
  2349. }
  2350. }
  2351. },
  2352. "/zerotier/leave/{id}": {
  2353. "post": {
  2354. "security": [
  2355. {
  2356. "ApiKeyAuth": []
  2357. }
  2358. ],
  2359. "consumes": [
  2360. "multipart/form-data"
  2361. ],
  2362. "produces": [
  2363. "application/json"
  2364. ],
  2365. "tags": [
  2366. "zerotier"
  2367. ],
  2368. "summary": "获取zerotier网络列表",
  2369. "parameters": [
  2370. {
  2371. "type": "string",
  2372. "description": "network id",
  2373. "name": "id",
  2374. "in": "path",
  2375. "required": true
  2376. }
  2377. ],
  2378. "responses": {
  2379. "200": {
  2380. "description": "ok",
  2381. "schema": {
  2382. "type": "string"
  2383. }
  2384. }
  2385. }
  2386. }
  2387. },
  2388. "/zerotier/list": {
  2389. "get": {
  2390. "security": [
  2391. {
  2392. "ApiKeyAuth": []
  2393. }
  2394. ],
  2395. "consumes": [
  2396. "application/json"
  2397. ],
  2398. "produces": [
  2399. "application/json"
  2400. ],
  2401. "tags": [
  2402. "zerotier"
  2403. ],
  2404. "summary": "获取zerotier网络列表",
  2405. "responses": {
  2406. "200": {
  2407. "description": "ok",
  2408. "schema": {
  2409. "type": "string"
  2410. }
  2411. }
  2412. }
  2413. }
  2414. },
  2415. "/zerotier/login": {
  2416. "post": {
  2417. "security": [
  2418. {
  2419. "ApiKeyAuth": []
  2420. }
  2421. ],
  2422. "consumes": [
  2423. "multipart/form-data"
  2424. ],
  2425. "produces": [
  2426. "application/json"
  2427. ],
  2428. "tags": [
  2429. "zerotier"
  2430. ],
  2431. "summary": "登录zerotier获取token",
  2432. "parameters": [
  2433. {
  2434. "type": "string",
  2435. "description": "User name",
  2436. "name": "username",
  2437. "in": "formData",
  2438. "required": true
  2439. },
  2440. {
  2441. "type": "string",
  2442. "description": "password",
  2443. "name": "pwd",
  2444. "in": "formData",
  2445. "required": true
  2446. }
  2447. ],
  2448. "responses": {
  2449. "200": {
  2450. "description": "ok",
  2451. "schema": {
  2452. "type": "string"
  2453. }
  2454. }
  2455. }
  2456. }
  2457. },
  2458. "/zerotier/member/{id}": {
  2459. "get": {
  2460. "security": [
  2461. {
  2462. "ApiKeyAuth": []
  2463. }
  2464. ],
  2465. "consumes": [
  2466. "application/json"
  2467. ],
  2468. "produces": [
  2469. "application/json"
  2470. ],
  2471. "tags": [
  2472. "zerotier"
  2473. ],
  2474. "summary": "网络列表",
  2475. "parameters": [
  2476. {
  2477. "type": "string",
  2478. "description": "network id",
  2479. "name": "id",
  2480. "in": "path",
  2481. "required": true
  2482. }
  2483. ],
  2484. "responses": {
  2485. "200": {
  2486. "description": "ok",
  2487. "schema": {
  2488. "type": "string"
  2489. }
  2490. }
  2491. }
  2492. }
  2493. },
  2494. "/zerotier/member/{id}/del/{mId}": {
  2495. "delete": {
  2496. "security": [
  2497. {
  2498. "ApiKeyAuth": []
  2499. }
  2500. ],
  2501. "consumes": [
  2502. "application/json"
  2503. ],
  2504. "produces": [
  2505. "application/json"
  2506. ],
  2507. "tags": [
  2508. "zerotier"
  2509. ],
  2510. "summary": "删除网络中的用户",
  2511. "parameters": [
  2512. {
  2513. "type": "string",
  2514. "description": "network id",
  2515. "name": "id",
  2516. "in": "path",
  2517. "required": true
  2518. },
  2519. {
  2520. "type": "string",
  2521. "description": "member_id",
  2522. "name": "mId",
  2523. "in": "path",
  2524. "required": true
  2525. }
  2526. ],
  2527. "responses": {
  2528. "200": {
  2529. "description": "ok",
  2530. "schema": {
  2531. "type": "string"
  2532. }
  2533. }
  2534. }
  2535. }
  2536. },
  2537. "/zerotier/member/{id}/edit/{mId}": {
  2538. "put": {
  2539. "security": [
  2540. {
  2541. "ApiKeyAuth": []
  2542. }
  2543. ],
  2544. "consumes": [
  2545. "application/json"
  2546. ],
  2547. "produces": [
  2548. "application/json"
  2549. ],
  2550. "tags": [
  2551. "zerotier"
  2552. ],
  2553. "summary": "修改网络用户信息",
  2554. "parameters": [
  2555. {
  2556. "type": "string",
  2557. "description": "network id",
  2558. "name": "id",
  2559. "in": "path",
  2560. "required": true
  2561. },
  2562. {
  2563. "type": "string",
  2564. "description": "mId",
  2565. "name": "mId",
  2566. "in": "path",
  2567. "required": true
  2568. },
  2569. {
  2570. "type": "string",
  2571. "description": "json数据",
  2572. "name": "json",
  2573. "in": "formData",
  2574. "required": true
  2575. }
  2576. ],
  2577. "responses": {
  2578. "200": {
  2579. "description": "ok",
  2580. "schema": {
  2581. "type": "string"
  2582. }
  2583. }
  2584. }
  2585. }
  2586. },
  2587. "/zerotier/network/{id}/del": {
  2588. "delete": {
  2589. "security": [
  2590. {
  2591. "ApiKeyAuth": []
  2592. }
  2593. ],
  2594. "consumes": [
  2595. "application/json"
  2596. ],
  2597. "produces": [
  2598. "application/json"
  2599. ],
  2600. "tags": [
  2601. "zerotier"
  2602. ],
  2603. "summary": "删除网络",
  2604. "parameters": [
  2605. {
  2606. "type": "string",
  2607. "description": "network id",
  2608. "name": "id",
  2609. "in": "path",
  2610. "required": true
  2611. }
  2612. ],
  2613. "responses": {
  2614. "200": {
  2615. "description": "ok",
  2616. "schema": {
  2617. "type": "string"
  2618. }
  2619. }
  2620. }
  2621. }
  2622. },
  2623. "/zerotier/register": {
  2624. "post": {
  2625. "security": [
  2626. {
  2627. "ApiKeyAuth": []
  2628. }
  2629. ],
  2630. "consumes": [
  2631. "multipart/form-data"
  2632. ],
  2633. "produces": [
  2634. "application/json"
  2635. ],
  2636. "tags": [
  2637. "zerotier"
  2638. ],
  2639. "summary": "注册zerotier",
  2640. "parameters": [
  2641. {
  2642. "type": "string",
  2643. "description": "first name",
  2644. "name": "firstName",
  2645. "in": "formData",
  2646. "required": true
  2647. },
  2648. {
  2649. "type": "string",
  2650. "description": "password",
  2651. "name": "pwd",
  2652. "in": "formData",
  2653. "required": true
  2654. },
  2655. {
  2656. "type": "string",
  2657. "description": "email",
  2658. "name": "email",
  2659. "in": "formData",
  2660. "required": true
  2661. },
  2662. {
  2663. "type": "string",
  2664. "description": "last name",
  2665. "name": "lastName",
  2666. "in": "formData",
  2667. "required": true
  2668. }
  2669. ],
  2670. "responses": {
  2671. "200": {
  2672. "description": "ok",
  2673. "schema": {
  2674. "type": "string"
  2675. }
  2676. }
  2677. }
  2678. }
  2679. },
  2680. "/zima/getcpuinfo": {
  2681. "get": {
  2682. "security": [
  2683. {
  2684. "ApiKeyAuth": []
  2685. }
  2686. ],
  2687. "consumes": [
  2688. "application/json"
  2689. ],
  2690. "produces": [
  2691. "application/json"
  2692. ],
  2693. "tags": [
  2694. "zima"
  2695. ],
  2696. "summary": "获取cpu信息",
  2697. "responses": {
  2698. "200": {
  2699. "description": "ok",
  2700. "schema": {
  2701. "type": "string"
  2702. }
  2703. }
  2704. }
  2705. }
  2706. },
  2707. "/zima/getdiskinfo": {
  2708. "get": {
  2709. "security": [
  2710. {
  2711. "ApiKeyAuth": []
  2712. }
  2713. ],
  2714. "consumes": [
  2715. "application/json"
  2716. ],
  2717. "produces": [
  2718. "application/json"
  2719. ],
  2720. "tags": [
  2721. "zima"
  2722. ],
  2723. "summary": "获取硬盘信息",
  2724. "responses": {
  2725. "200": {
  2726. "description": "ok",
  2727. "schema": {
  2728. "type": "string"
  2729. }
  2730. }
  2731. }
  2732. }
  2733. },
  2734. "/zima/getinfo": {
  2735. "get": {
  2736. "security": [
  2737. {
  2738. "ApiKeyAuth": []
  2739. }
  2740. ],
  2741. "consumes": [
  2742. "application/json"
  2743. ],
  2744. "produces": [
  2745. "application/json"
  2746. ],
  2747. "tags": [
  2748. "zima"
  2749. ],
  2750. "summary": "获取信息",
  2751. "responses": {
  2752. "200": {
  2753. "description": "ok",
  2754. "schema": {
  2755. "type": "string"
  2756. }
  2757. }
  2758. }
  2759. }
  2760. },
  2761. "/zima/getmeminfo": {
  2762. "get": {
  2763. "security": [
  2764. {
  2765. "ApiKeyAuth": []
  2766. }
  2767. ],
  2768. "consumes": [
  2769. "application/json"
  2770. ],
  2771. "produces": [
  2772. "application/json"
  2773. ],
  2774. "tags": [
  2775. "zima"
  2776. ],
  2777. "summary": "获取内存信息",
  2778. "responses": {
  2779. "200": {
  2780. "description": "ok",
  2781. "schema": {
  2782. "type": "string"
  2783. }
  2784. }
  2785. }
  2786. }
  2787. },
  2788. "/zima/getnetinfo": {
  2789. "get": {
  2790. "security": [
  2791. {
  2792. "ApiKeyAuth": []
  2793. }
  2794. ],
  2795. "consumes": [
  2796. "application/json"
  2797. ],
  2798. "produces": [
  2799. "application/json"
  2800. ],
  2801. "tags": [
  2802. "zima"
  2803. ],
  2804. "summary": "获取网络信息",
  2805. "responses": {
  2806. "200": {
  2807. "description": "ok",
  2808. "schema": {
  2809. "type": "string"
  2810. }
  2811. }
  2812. }
  2813. }
  2814. },
  2815. "/zima/sysinfo": {
  2816. "get": {
  2817. "security": [
  2818. {
  2819. "ApiKeyAuth": []
  2820. }
  2821. ],
  2822. "consumes": [
  2823. "application/json"
  2824. ],
  2825. "produces": [
  2826. "application/json"
  2827. ],
  2828. "tags": [
  2829. "zima"
  2830. ],
  2831. "summary": "获取信息系统信息",
  2832. "responses": {
  2833. "200": {
  2834. "description": "ok",
  2835. "schema": {
  2836. "type": "string"
  2837. }
  2838. }
  2839. }
  2840. }
  2841. }
  2842. },
  2843. "securityDefinitions": {
  2844. "ApiKeyAuth": {
  2845. "type": "apiKey",
  2846. "name": "Authorization",
  2847. "in": "header"
  2848. }
  2849. }
  2850. }`
  2851. type swaggerInfo struct {
  2852. Version string
  2853. Host string
  2854. BasePath string
  2855. Schemes []string
  2856. Title string
  2857. Description string
  2858. }
  2859. // SwaggerInfo holds exported Swagger Info so clients can modify it
  2860. var SwaggerInfo = swaggerInfo{
  2861. Version: "1.0.0",
  2862. Host: "192.168.2.114:8089",
  2863. BasePath: "/v1",
  2864. Schemes: []string{},
  2865. Title: "Oasis API",
  2866. Description: "Oasis v1版本api",
  2867. }
  2868. type s struct{}
  2869. func (s *s) ReadDoc() string {
  2870. sInfo := SwaggerInfo
  2871. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  2872. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  2873. "marshal": func(v interface{}) string {
  2874. a, _ := json.Marshal(v)
  2875. return string(a)
  2876. },
  2877. }).Parse(doc)
  2878. if err != nil {
  2879. return doc
  2880. }
  2881. var tpl bytes.Buffer
  2882. if err := t.Execute(&tpl, sInfo); err != nil {
  2883. return doc
  2884. }
  2885. return tpl.String()
  2886. }
  2887. func init() {
  2888. swag.Register(swag.Name, &s{})
  2889. }