docs.go 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  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. "license": {},
  19. "version": "{{.Version}}"
  20. },
  21. "host": "{{.Host}}",
  22. "basePath": "{{.BasePath}}",
  23. "paths": {
  24. "/api/v1/file": {
  25. "get": {
  26. "description": "获取文件",
  27. "consumes": [
  28. "application/json"
  29. ],
  30. "produces": [
  31. "application/json"
  32. ],
  33. "tags": [
  34. "download"
  35. ],
  36. "summary": "获取文件",
  37. "parameters": [
  38. {
  39. "type": "string",
  40. "description": "jwt token",
  41. "name": "token",
  42. "in": "header",
  43. "required": true
  44. },
  45. {
  46. "type": "string",
  47. "description": " ",
  48. "name": "obj",
  49. "in": "query",
  50. "required": true
  51. }
  52. ],
  53. "responses": {
  54. "200": {
  55. "description": "OK",
  56. "schema": {
  57. "$ref": "#/definitions/v1.UploadResponse"
  58. }
  59. },
  60. "500": {
  61. "description": "Internal Server Error",
  62. "schema": {
  63. "$ref": "#/definitions/base.HTTPError"
  64. }
  65. }
  66. }
  67. }
  68. },
  69. "/api/v1/jt/announcement": {
  70. "get": {
  71. "description": "公示公告列表",
  72. "consumes": [
  73. "application/json"
  74. ],
  75. "produces": [
  76. "application/json"
  77. ],
  78. "tags": [
  79. "公示公告"
  80. ],
  81. "summary": "公示公告列表",
  82. "parameters": [
  83. {
  84. "type": "integer",
  85. "description": " ",
  86. "name": "page",
  87. "in": "query"
  88. },
  89. {
  90. "type": "integer",
  91. "description": " ",
  92. "name": "page_size",
  93. "in": "query"
  94. }
  95. ],
  96. "responses": {
  97. "200": {
  98. "description": "OK",
  99. "schema": {
  100. "$ref": "#/definitions/v1.JtContentListResponse"
  101. }
  102. },
  103. "500": {
  104. "description": "Internal Server Error",
  105. "schema": {
  106. "$ref": "#/definitions/base.HTTPError"
  107. }
  108. }
  109. }
  110. }
  111. },
  112. "/api/v1/jt/contact": {
  113. "get": {
  114. "description": "联系我们信息",
  115. "consumes": [
  116. "application/json"
  117. ],
  118. "produces": [
  119. "application/json"
  120. ],
  121. "tags": [
  122. "联系我们"
  123. ],
  124. "summary": "联系我们信息",
  125. "responses": {
  126. "200": {
  127. "description": "OK",
  128. "schema": {
  129. "$ref": "#/definitions/v1.ContactInfoResponse"
  130. }
  131. },
  132. "500": {
  133. "description": "Internal Server Error",
  134. "schema": {
  135. "$ref": "#/definitions/base.HTTPError"
  136. }
  137. }
  138. }
  139. }
  140. },
  141. "/api/v1/jt/desc": {
  142. "get": {
  143. "description": "集团简介信息",
  144. "consumes": [
  145. "application/json"
  146. ],
  147. "produces": [
  148. "application/json"
  149. ],
  150. "tags": [
  151. "集团简介"
  152. ],
  153. "summary": "集团简介信息",
  154. "responses": {
  155. "200": {
  156. "description": "OK",
  157. "schema": {
  158. "$ref": "#/definitions/v1.JtContentInfoResponse"
  159. }
  160. },
  161. "500": {
  162. "description": "Internal Server Error",
  163. "schema": {
  164. "$ref": "#/definitions/base.HTTPError"
  165. }
  166. }
  167. }
  168. }
  169. },
  170. "/api/v1/jt/df": {
  171. "get": {
  172. "description": "党风廉洁列表",
  173. "consumes": [
  174. "application/json"
  175. ],
  176. "produces": [
  177. "application/json"
  178. ],
  179. "tags": [
  180. "党风廉洁"
  181. ],
  182. "summary": "党风廉洁列表",
  183. "parameters": [
  184. {
  185. "type": "integer",
  186. "description": " ",
  187. "name": "page",
  188. "in": "query"
  189. },
  190. {
  191. "type": "integer",
  192. "description": " ",
  193. "name": "page_size",
  194. "in": "query"
  195. }
  196. ],
  197. "responses": {
  198. "200": {
  199. "description": "OK",
  200. "schema": {
  201. "$ref": "#/definitions/v1.JtContentListResponse"
  202. }
  203. },
  204. "500": {
  205. "description": "Internal Server Error",
  206. "schema": {
  207. "$ref": "#/definitions/base.HTTPError"
  208. }
  209. }
  210. }
  211. }
  212. },
  213. "/api/v1/jt/hw": {
  214. "get": {
  215. "description": "会务动态列表",
  216. "consumes": [
  217. "application/json"
  218. ],
  219. "produces": [
  220. "application/json"
  221. ],
  222. "tags": [
  223. "会务动态"
  224. ],
  225. "summary": "会务动态列表",
  226. "parameters": [
  227. {
  228. "type": "integer",
  229. "description": " ",
  230. "name": "page",
  231. "in": "query"
  232. },
  233. {
  234. "type": "integer",
  235. "description": " ",
  236. "name": "page_size",
  237. "in": "query"
  238. }
  239. ],
  240. "responses": {
  241. "200": {
  242. "description": "OK",
  243. "schema": {
  244. "$ref": "#/definitions/v1.JtContentListResponse"
  245. }
  246. },
  247. "500": {
  248. "description": "Internal Server Error",
  249. "schema": {
  250. "$ref": "#/definitions/base.HTTPError"
  251. }
  252. }
  253. }
  254. }
  255. },
  256. "/api/v1/jt/lx": {
  257. "get": {
  258. "description": "两学一做列表",
  259. "consumes": [
  260. "application/json"
  261. ],
  262. "produces": [
  263. "application/json"
  264. ],
  265. "tags": [
  266. "两学一做"
  267. ],
  268. "summary": "两学一做列表",
  269. "parameters": [
  270. {
  271. "type": "integer",
  272. "description": " ",
  273. "name": "page",
  274. "in": "query"
  275. },
  276. {
  277. "type": "integer",
  278. "description": " ",
  279. "name": "page_size",
  280. "in": "query"
  281. }
  282. ],
  283. "responses": {
  284. "200": {
  285. "description": "OK",
  286. "schema": {
  287. "$ref": "#/definitions/v1.JtContentListResponse"
  288. }
  289. },
  290. "500": {
  291. "description": "Internal Server Error",
  292. "schema": {
  293. "$ref": "#/definitions/base.HTTPError"
  294. }
  295. }
  296. }
  297. }
  298. },
  299. "/api/v1/jt/news": {
  300. "get": {
  301. "description": "兴嘉要闻列表",
  302. "consumes": [
  303. "application/json"
  304. ],
  305. "produces": [
  306. "application/json"
  307. ],
  308. "tags": [
  309. "兴嘉要闻"
  310. ],
  311. "summary": "兴嘉要闻列表",
  312. "parameters": [
  313. {
  314. "type": "integer",
  315. "description": " ",
  316. "name": "page",
  317. "in": "query"
  318. },
  319. {
  320. "type": "integer",
  321. "description": " ",
  322. "name": "page_size",
  323. "in": "query"
  324. }
  325. ],
  326. "responses": {
  327. "200": {
  328. "description": "OK",
  329. "schema": {
  330. "$ref": "#/definitions/v1.JtContentListResponse"
  331. }
  332. },
  333. "500": {
  334. "description": "Internal Server Error",
  335. "schema": {
  336. "$ref": "#/definitions/base.HTTPError"
  337. }
  338. }
  339. }
  340. }
  341. },
  342. "/api/v1/jt/page_pic": {
  343. "get": {
  344. "description": "首页顶层图片列表",
  345. "consumes": [
  346. "application/json"
  347. ],
  348. "produces": [
  349. "application/json"
  350. ],
  351. "tags": [
  352. "首页顶层图片"
  353. ],
  354. "summary": "首页顶层图片列表",
  355. "parameters": [
  356. {
  357. "type": "integer",
  358. "description": " ",
  359. "name": "page",
  360. "in": "query"
  361. },
  362. {
  363. "type": "integer",
  364. "description": " ",
  365. "name": "page_size",
  366. "in": "query"
  367. }
  368. ],
  369. "responses": {
  370. "200": {
  371. "description": "OK",
  372. "schema": {
  373. "$ref": "#/definitions/v1.PagePicListResponse"
  374. }
  375. },
  376. "500": {
  377. "description": "Internal Server Error",
  378. "schema": {
  379. "$ref": "#/definitions/base.HTTPError"
  380. }
  381. }
  382. }
  383. }
  384. },
  385. "/api/v1/jt/program": {
  386. "get": {
  387. "description": "项目展示列表",
  388. "consumes": [
  389. "application/json"
  390. ],
  391. "produces": [
  392. "application/json"
  393. ],
  394. "tags": [
  395. "项目展示"
  396. ],
  397. "summary": "项目展示列表",
  398. "parameters": [
  399. {
  400. "type": "integer",
  401. "description": " ",
  402. "name": "page",
  403. "in": "query"
  404. },
  405. {
  406. "type": "integer",
  407. "description": " ",
  408. "name": "page_size",
  409. "in": "query"
  410. }
  411. ],
  412. "responses": {
  413. "200": {
  414. "description": "OK",
  415. "schema": {
  416. "$ref": "#/definitions/v1.JtContentListResponse"
  417. }
  418. },
  419. "500": {
  420. "description": "Internal Server Error",
  421. "schema": {
  422. "$ref": "#/definitions/base.HTTPError"
  423. }
  424. }
  425. }
  426. }
  427. },
  428. "/api/v1/jt/vision": {
  429. "get": {
  430. "description": "发展愿景信息",
  431. "consumes": [
  432. "application/json"
  433. ],
  434. "produces": [
  435. "application/json"
  436. ],
  437. "tags": [
  438. "发展愿景"
  439. ],
  440. "summary": "发展愿景信息",
  441. "responses": {
  442. "200": {
  443. "description": "OK",
  444. "schema": {
  445. "$ref": "#/definitions/v1.JtContentInfoResponse"
  446. }
  447. },
  448. "500": {
  449. "description": "Internal Server Error",
  450. "schema": {
  451. "$ref": "#/definitions/base.HTTPError"
  452. }
  453. }
  454. }
  455. }
  456. }
  457. },
  458. "definitions": {
  459. "apis.ContactInfoReply": {
  460. "type": "object",
  461. "properties": {
  462. "addr": {
  463. "type": "string"
  464. },
  465. "email": {
  466. "type": "string"
  467. },
  468. "id": {
  469. "type": "integer"
  470. },
  471. "phone": {
  472. "type": "string"
  473. }
  474. }
  475. },
  476. "apis.JtContentItem": {
  477. "type": "object",
  478. "properties": {
  479. "content": {
  480. "type": "string"
  481. },
  482. "created_at": {
  483. "type": "integer"
  484. },
  485. "first_pics": {
  486. "type": "array",
  487. "items": {
  488. "type": "string"
  489. }
  490. },
  491. "id": {
  492. "type": "integer"
  493. },
  494. "publish_status": {
  495. "type": "integer"
  496. },
  497. "title": {
  498. "type": "string"
  499. }
  500. }
  501. },
  502. "apis.JtContentListReply": {
  503. "type": "object",
  504. "properties": {
  505. "list": {
  506. "type": "array",
  507. "items": {
  508. "$ref": "#/definitions/apis.JtContentItem"
  509. }
  510. },
  511. "page": {
  512. "type": "integer"
  513. },
  514. "total": {
  515. "type": "integer"
  516. }
  517. }
  518. },
  519. "apis.PagePicItem": {
  520. "type": "object",
  521. "properties": {
  522. "created_at": {
  523. "type": "integer"
  524. },
  525. "id": {
  526. "type": "integer"
  527. },
  528. "pic": {
  529. "type": "string"
  530. }
  531. }
  532. },
  533. "apis.PagePicListReply": {
  534. "type": "object",
  535. "properties": {
  536. "list": {
  537. "type": "array",
  538. "items": {
  539. "$ref": "#/definitions/apis.PagePicItem"
  540. }
  541. },
  542. "page": {
  543. "type": "integer"
  544. },
  545. "total": {
  546. "type": "integer"
  547. }
  548. }
  549. },
  550. "base.HTTPError": {
  551. "type": "object",
  552. "properties": {
  553. "code": {
  554. "type": "integer",
  555. "format": "int",
  556. "example": 500
  557. },
  558. "message": {
  559. "type": "string",
  560. "example": "status bad request"
  561. }
  562. }
  563. },
  564. "v1.ContactInfoResponse": {
  565. "type": "object",
  566. "properties": {
  567. "code": {
  568. "description": "返回码",
  569. "type": "integer",
  570. "format": "int",
  571. "default": 0
  572. },
  573. "data": {
  574. "type": "object",
  575. "$ref": "#/definitions/apis.ContactInfoReply"
  576. },
  577. "message": {
  578. "description": "消息",
  579. "type": "string",
  580. "default": "success"
  581. }
  582. }
  583. },
  584. "v1.JtContentInfoData": {
  585. "type": "object",
  586. "properties": {
  587. "content": {
  588. "type": "string"
  589. },
  590. "created_at": {
  591. "type": "integer"
  592. },
  593. "first_pics": {
  594. "type": "array",
  595. "items": {
  596. "type": "string"
  597. }
  598. },
  599. "id": {
  600. "type": "integer"
  601. },
  602. "publish_status": {
  603. "description": "1 发布 2 暂不发布",
  604. "type": "integer"
  605. },
  606. "title": {
  607. "type": "string"
  608. }
  609. }
  610. },
  611. "v1.JtContentInfoResponse": {
  612. "type": "object",
  613. "properties": {
  614. "code": {
  615. "description": "返回码",
  616. "type": "integer",
  617. "format": "int",
  618. "default": 0
  619. },
  620. "data": {
  621. "type": "object",
  622. "$ref": "#/definitions/v1.JtContentInfoData"
  623. },
  624. "message": {
  625. "description": "消息",
  626. "type": "string",
  627. "default": "success"
  628. }
  629. }
  630. },
  631. "v1.JtContentListResponse": {
  632. "type": "object",
  633. "properties": {
  634. "code": {
  635. "description": "返回码",
  636. "type": "integer",
  637. "format": "int",
  638. "default": 0
  639. },
  640. "data": {
  641. "type": "object",
  642. "$ref": "#/definitions/apis.JtContentListReply"
  643. },
  644. "message": {
  645. "description": "消息",
  646. "type": "string",
  647. "default": "success"
  648. }
  649. }
  650. },
  651. "v1.PagePicListResponse": {
  652. "type": "object",
  653. "properties": {
  654. "code": {
  655. "description": "返回码",
  656. "type": "integer",
  657. "format": "int",
  658. "default": 0
  659. },
  660. "data": {
  661. "type": "object",
  662. "$ref": "#/definitions/apis.PagePicListReply"
  663. },
  664. "message": {
  665. "description": "消息",
  666. "type": "string",
  667. "default": "success"
  668. }
  669. }
  670. },
  671. "v1.UploadResponse": {
  672. "type": "object",
  673. "properties": {
  674. "code": {
  675. "description": "返回码",
  676. "type": "integer",
  677. "format": "int",
  678. "default": 0
  679. },
  680. "data": {
  681. "type": "string"
  682. },
  683. "message": {
  684. "description": "消息",
  685. "type": "string",
  686. "default": "success"
  687. }
  688. }
  689. }
  690. }
  691. }`
  692. type swaggerInfo struct {
  693. Version string
  694. Host string
  695. BasePath string
  696. Schemes []string
  697. Title string
  698. Description string
  699. }
  700. // SwaggerInfo holds exported Swagger Info so clients can modify it
  701. var SwaggerInfo = swaggerInfo{
  702. Version: "1.1",
  703. Host: "",
  704. BasePath: "",
  705. Schemes: []string{},
  706. Title: "Project xingjia-official-gateway's APIs",
  707. Description: "This is a gateway server. On the page, you can go to do testing for every API.",
  708. }
  709. type s struct{}
  710. func (s *s) ReadDoc() string {
  711. sInfo := SwaggerInfo
  712. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  713. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  714. "marshal": func(v interface{}) string {
  715. a, _ := json.Marshal(v)
  716. return string(a)
  717. },
  718. }).Parse(doc)
  719. if err != nil {
  720. return doc
  721. }
  722. var tpl bytes.Buffer
  723. if err := t.Execute(&tpl, sInfo); err != nil {
  724. return doc
  725. }
  726. return tpl.String()
  727. }
  728. func init() {
  729. swag.Register(swag.Name, &s{})
  730. }