广告平台(总站长使用)
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

884 lines
28 KiB

  1. // Code generated by swaggo/swag. DO NOT EDIT.
  2. package docs
  3. import "github.com/swaggo/swag"
  4. const docTemplate = `{
  5. "schemes": {{ marshal .Schemes }},
  6. "swagger": "2.0",
  7. "info": {
  8. "description": "{{escape .Description}}",
  9. "title": "{{.Title}}",
  10. "termsOfService": "http://swagger.io/terms/",
  11. "contact": {
  12. "name": "dengbiao",
  13. "url": "http://www.swagger.io/support",
  14. "email": "1239118001@qq.com"
  15. },
  16. "license": {
  17. "name": "Apache 2.0",
  18. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  19. },
  20. "version": "{{.Version}}"
  21. },
  22. "host": "{{.Host}}",
  23. "basePath": "{{.BasePath}}",
  24. "paths": {
  25. "/admin/login": {
  26. "post": {
  27. "description": "登入",
  28. "consumes": [
  29. "application/json"
  30. ],
  31. "produces": [
  32. "application/json"
  33. ],
  34. "tags": [
  35. "登录注册"
  36. ],
  37. "summary": "登陆",
  38. "parameters": [
  39. {
  40. "description": "用户名密码",
  41. "name": "req",
  42. "in": "body",
  43. "required": true,
  44. "schema": {
  45. "$ref": "#/definitions/md.LoginReq"
  46. }
  47. }
  48. ],
  49. "responses": {
  50. "200": {
  51. "description": "token",
  52. "schema": {
  53. "$ref": "#/definitions/md.LoginResponse"
  54. }
  55. },
  56. "400": {
  57. "description": "具体错误",
  58. "schema": {
  59. "$ref": "#/definitions/md.Response"
  60. }
  61. }
  62. }
  63. }
  64. },
  65. "/role/addAdmin": {
  66. "post": {
  67. "description": "权限管理-新增管理员",
  68. "consumes": [
  69. "application/json"
  70. ],
  71. "produces": [
  72. "application/json"
  73. ],
  74. "tags": [
  75. "权限管理"
  76. ],
  77. "summary": "新增管理员",
  78. "parameters": [
  79. {
  80. "type": "string",
  81. "description": "验证参数Bearer和token空格拼接",
  82. "name": "Authorization",
  83. "in": "header",
  84. "required": true
  85. },
  86. {
  87. "description": "请求参数",
  88. "name": "args",
  89. "in": "body",
  90. "required": true,
  91. "schema": {
  92. "$ref": "#/definitions/md.AddAdminReq"
  93. }
  94. }
  95. ],
  96. "responses": {
  97. "200": {
  98. "description": "success",
  99. "schema": {
  100. "type": "string"
  101. }
  102. },
  103. "400": {
  104. "description": "具体错误",
  105. "schema": {
  106. "$ref": "#/definitions/md.Response"
  107. }
  108. }
  109. }
  110. }
  111. },
  112. "/role/addRole": {
  113. "post": {
  114. "description": "权限管理-添加角色",
  115. "consumes": [
  116. "application/json"
  117. ],
  118. "produces": [
  119. "application/json"
  120. ],
  121. "tags": [
  122. "权限管理"
  123. ],
  124. "summary": "添加角色",
  125. "parameters": [
  126. {
  127. "type": "string",
  128. "description": "验证参数Bearer和token空格拼接",
  129. "name": "Authorization",
  130. "in": "header",
  131. "required": true
  132. },
  133. {
  134. "description": "请求参数",
  135. "name": "args",
  136. "in": "body",
  137. "required": true,
  138. "schema": {
  139. "$ref": "#/definitions/md.AddRoleReq"
  140. }
  141. }
  142. ],
  143. "responses": {
  144. "200": {
  145. "description": "success",
  146. "schema": {
  147. "type": "string"
  148. }
  149. },
  150. "400": {
  151. "description": "具体错误",
  152. "schema": {
  153. "$ref": "#/definitions/md.Response"
  154. }
  155. }
  156. }
  157. }
  158. },
  159. "/role/adminInfo": {
  160. "get": {
  161. "description": "权限管理-管理员信息",
  162. "consumes": [
  163. "application/json"
  164. ],
  165. "produces": [
  166. "application/json"
  167. ],
  168. "tags": [
  169. "权限管理"
  170. ],
  171. "summary": "管理员信息",
  172. "parameters": [
  173. {
  174. "type": "string",
  175. "description": "验证参数Bearer和token空格拼接",
  176. "name": "Authorization",
  177. "in": "header",
  178. "required": true
  179. },
  180. {
  181. "type": "string",
  182. "description": "管理员id",
  183. "name": "adm_id",
  184. "in": "query",
  185. "required": true
  186. }
  187. ],
  188. "responses": {
  189. "200": {
  190. "description": "具体看返回内容",
  191. "schema": {
  192. "type": "string"
  193. }
  194. },
  195. "400": {
  196. "description": "具体错误",
  197. "schema": {
  198. "$ref": "#/definitions/md.Response"
  199. }
  200. }
  201. }
  202. }
  203. },
  204. "/role/adminList": {
  205. "post": {
  206. "description": "权限管理-管理员列表",
  207. "consumes": [
  208. "application/json"
  209. ],
  210. "produces": [
  211. "application/json"
  212. ],
  213. "tags": [
  214. "权限管理"
  215. ],
  216. "summary": "管理员列表",
  217. "parameters": [
  218. {
  219. "type": "string",
  220. "description": "验证参数Bearer和token空格拼接",
  221. "name": "Authorization",
  222. "in": "header",
  223. "required": true
  224. },
  225. {
  226. "description": "请求参数",
  227. "name": "args",
  228. "in": "body",
  229. "required": true,
  230. "schema": {
  231. "$ref": "#/definitions/md.AdminListReq"
  232. }
  233. }
  234. ],
  235. "responses": {
  236. "200": {
  237. "description": "具体看返回内容",
  238. "schema": {
  239. "type": "string"
  240. }
  241. },
  242. "400": {
  243. "description": "具体错误",
  244. "schema": {
  245. "$ref": "#/definitions/md.Response"
  246. }
  247. }
  248. }
  249. }
  250. },
  251. "/role/bindAdminRole/": {
  252. "post": {
  253. "description": "权限管理-管理员绑定角色",
  254. "consumes": [
  255. "application/json"
  256. ],
  257. "produces": [
  258. "application/json"
  259. ],
  260. "tags": [
  261. "权限管理"
  262. ],
  263. "summary": "管理员绑定角色",
  264. "parameters": [
  265. {
  266. "type": "string",
  267. "description": "验证参数Bearer和token空格拼接",
  268. "name": "Authorization",
  269. "in": "header",
  270. "required": true
  271. },
  272. {
  273. "description": "请求参数",
  274. "name": "args",
  275. "in": "body",
  276. "required": true,
  277. "schema": {
  278. "$ref": "#/definitions/md.BindAdminRoleReq"
  279. }
  280. }
  281. ],
  282. "responses": {
  283. "200": {
  284. "description": "success",
  285. "schema": {
  286. "type": "string"
  287. }
  288. },
  289. "400": {
  290. "description": "具体错误",
  291. "schema": {
  292. "$ref": "#/definitions/md.Response"
  293. }
  294. }
  295. }
  296. }
  297. },
  298. "/role/deleteAdmin/{$adm_id}": {
  299. "delete": {
  300. "description": "权限管理-删除管理员",
  301. "consumes": [
  302. "application/json"
  303. ],
  304. "produces": [
  305. "application/json"
  306. ],
  307. "tags": [
  308. "权限管理"
  309. ],
  310. "summary": "删除管理员",
  311. "parameters": [
  312. {
  313. "type": "string",
  314. "description": "验证参数Bearer和token空格拼接",
  315. "name": "Authorization",
  316. "in": "header",
  317. "required": true
  318. }
  319. ],
  320. "responses": {
  321. "200": {
  322. "description": "success",
  323. "schema": {
  324. "type": "string"
  325. }
  326. },
  327. "400": {
  328. "description": "具体错误",
  329. "schema": {
  330. "$ref": "#/definitions/md.Response"
  331. }
  332. }
  333. }
  334. }
  335. },
  336. "/role/deleteRole/{$id}": {
  337. "delete": {
  338. "description": "权限管理-删除角色",
  339. "consumes": [
  340. "application/json"
  341. ],
  342. "produces": [
  343. "application/json"
  344. ],
  345. "tags": [
  346. "权限管理"
  347. ],
  348. "summary": "删除角色",
  349. "parameters": [
  350. {
  351. "type": "string",
  352. "description": "验证参数Bearer和token空格拼接",
  353. "name": "Authorization",
  354. "in": "header",
  355. "required": true
  356. },
  357. {
  358. "description": "请求参数",
  359. "name": "args",
  360. "in": "body",
  361. "required": true,
  362. "schema": {
  363. "$ref": "#/definitions/md.UpdateRoleStateReq"
  364. }
  365. }
  366. ],
  367. "responses": {
  368. "200": {
  369. "description": "success",
  370. "schema": {
  371. "type": "string"
  372. }
  373. },
  374. "400": {
  375. "description": "具体错误",
  376. "schema": {
  377. "$ref": "#/definitions/md.Response"
  378. }
  379. }
  380. }
  381. }
  382. },
  383. "/role/permissionGroupList": {
  384. "get": {
  385. "description": "权限管理-权限组列表",
  386. "consumes": [
  387. "application/json"
  388. ],
  389. "produces": [
  390. "application/json"
  391. ],
  392. "tags": [
  393. "权限管理"
  394. ],
  395. "summary": "权限组列表",
  396. "parameters": [
  397. {
  398. "type": "string",
  399. "description": "验证参数Bearer和token空格拼接",
  400. "name": "Authorization",
  401. "in": "header",
  402. "required": true
  403. },
  404. {
  405. "type": "string",
  406. "description": "管理员id",
  407. "name": "adm_id",
  408. "in": "query",
  409. "required": true
  410. }
  411. ],
  412. "responses": {
  413. "200": {
  414. "description": "具体看返回内容",
  415. "schema": {
  416. "type": "string"
  417. }
  418. },
  419. "400": {
  420. "description": "具体错误",
  421. "schema": {
  422. "$ref": "#/definitions/md.Response"
  423. }
  424. }
  425. }
  426. }
  427. },
  428. "/role/roleBindPermissionGroup": {
  429. "post": {
  430. "description": "权限管理-角色绑定权限组",
  431. "consumes": [
  432. "application/json"
  433. ],
  434. "produces": [
  435. "application/json"
  436. ],
  437. "tags": [
  438. "权限管理"
  439. ],
  440. "summary": "角色绑定权限组",
  441. "parameters": [
  442. {
  443. "type": "string",
  444. "description": "验证参数Bearer和token空格拼接",
  445. "name": "Authorization",
  446. "in": "header",
  447. "required": true
  448. },
  449. {
  450. "description": "请求参数",
  451. "name": "args",
  452. "in": "body",
  453. "required": true,
  454. "schema": {
  455. "$ref": "#/definitions/md.RoleBindPermissionGroupReq"
  456. }
  457. }
  458. ],
  459. "responses": {
  460. "200": {
  461. "description": "success",
  462. "schema": {
  463. "type": "string"
  464. }
  465. },
  466. "400": {
  467. "description": "具体错误",
  468. "schema": {
  469. "$ref": "#/definitions/md.Response"
  470. }
  471. }
  472. }
  473. }
  474. },
  475. "/role/roleList": {
  476. "get": {
  477. "description": "权限管理-角色列表",
  478. "consumes": [
  479. "application/json"
  480. ],
  481. "produces": [
  482. "application/json"
  483. ],
  484. "tags": [
  485. "权限管理"
  486. ],
  487. "summary": "角色列表",
  488. "parameters": [
  489. {
  490. "type": "string",
  491. "description": "验证参数Bearer和token空格拼接",
  492. "name": "Authorization",
  493. "in": "header",
  494. "required": true
  495. }
  496. ],
  497. "responses": {
  498. "200": {
  499. "description": "具体看返回内容",
  500. "schema": {
  501. "type": "string"
  502. }
  503. },
  504. "400": {
  505. "description": "具体错误",
  506. "schema": {
  507. "$ref": "#/definitions/md.Response"
  508. }
  509. }
  510. }
  511. }
  512. },
  513. "/role/updateAdmin": {
  514. "post": {
  515. "description": "权限管理-修改管理员信息",
  516. "consumes": [
  517. "application/json"
  518. ],
  519. "produces": [
  520. "application/json"
  521. ],
  522. "tags": [
  523. "权限管理"
  524. ],
  525. "summary": "修改管理员信息",
  526. "parameters": [
  527. {
  528. "type": "string",
  529. "description": "验证参数Bearer和token空格拼接",
  530. "name": "Authorization",
  531. "in": "header",
  532. "required": true
  533. },
  534. {
  535. "description": "请求参数",
  536. "name": "args",
  537. "in": "body",
  538. "required": true,
  539. "schema": {
  540. "$ref": "#/definitions/md.UpdateAdminReq"
  541. }
  542. }
  543. ],
  544. "responses": {
  545. "200": {
  546. "description": "success",
  547. "schema": {
  548. "type": "string"
  549. }
  550. },
  551. "400": {
  552. "description": "具体错误",
  553. "schema": {
  554. "$ref": "#/definitions/md.Response"
  555. }
  556. }
  557. }
  558. }
  559. },
  560. "/role/updateAdminState": {
  561. "post": {
  562. "description": "权限管理-修改管理员状态",
  563. "consumes": [
  564. "application/json"
  565. ],
  566. "produces": [
  567. "application/json"
  568. ],
  569. "tags": [
  570. "权限管理"
  571. ],
  572. "summary": "修改管理员状态",
  573. "parameters": [
  574. {
  575. "type": "string",
  576. "description": "验证参数Bearer和token空格拼接",
  577. "name": "Authorization",
  578. "in": "header",
  579. "required": true
  580. },
  581. {
  582. "description": "请求参数",
  583. "name": "args",
  584. "in": "body",
  585. "required": true,
  586. "schema": {
  587. "$ref": "#/definitions/md.UpdateAdminStateReq"
  588. }
  589. }
  590. ],
  591. "responses": {
  592. "200": {
  593. "description": "success",
  594. "schema": {
  595. "type": "string"
  596. }
  597. },
  598. "400": {
  599. "description": "具体错误",
  600. "schema": {
  601. "$ref": "#/definitions/md.Response"
  602. }
  603. }
  604. }
  605. }
  606. },
  607. "/role/updateRole": {
  608. "post": {
  609. "description": "权限管理-修改角色状态",
  610. "consumes": [
  611. "application/json"
  612. ],
  613. "produces": [
  614. "application/json"
  615. ],
  616. "tags": [
  617. "权限管理"
  618. ],
  619. "summary": "修改角色状态",
  620. "parameters": [
  621. {
  622. "type": "string",
  623. "description": "验证参数Bearer和token空格拼接",
  624. "name": "Authorization",
  625. "in": "header",
  626. "required": true
  627. },
  628. {
  629. "description": "请求参数",
  630. "name": "args",
  631. "in": "body",
  632. "required": true,
  633. "schema": {
  634. "$ref": "#/definitions/md.UpdateRoleStateReq"
  635. }
  636. }
  637. ],
  638. "responses": {
  639. "200": {
  640. "description": "success",
  641. "schema": {
  642. "type": "string"
  643. }
  644. },
  645. "400": {
  646. "description": "具体错误",
  647. "schema": {
  648. "$ref": "#/definitions/md.Response"
  649. }
  650. }
  651. }
  652. }
  653. }
  654. },
  655. "definitions": {
  656. "md.AddAdminReq": {
  657. "type": "object",
  658. "required": [
  659. "password",
  660. "username"
  661. ],
  662. "properties": {
  663. "memo": {
  664. "type": "string"
  665. },
  666. "password": {
  667. "type": "string"
  668. },
  669. "username": {
  670. "type": "string"
  671. }
  672. }
  673. },
  674. "md.AddRoleReq": {
  675. "type": "object",
  676. "required": [
  677. "memo",
  678. "name"
  679. ],
  680. "properties": {
  681. "memo": {
  682. "type": "string"
  683. },
  684. "name": {
  685. "type": "string"
  686. }
  687. }
  688. },
  689. "md.AdminListReq": {
  690. "type": "object",
  691. "properties": {
  692. "limit": {
  693. "type": "integer"
  694. },
  695. "page": {
  696. "type": "integer"
  697. },
  698. "state": {
  699. "type": "integer"
  700. },
  701. "username": {
  702. "type": "string"
  703. }
  704. }
  705. },
  706. "md.BindAdminRoleReq": {
  707. "type": "object",
  708. "required": [
  709. "adm_id"
  710. ],
  711. "properties": {
  712. "adm_id": {
  713. "type": "integer"
  714. },
  715. "role_ids": {
  716. "type": "array",
  717. "items": {
  718. "type": "integer"
  719. }
  720. }
  721. }
  722. },
  723. "md.LoginReq": {
  724. "type": "object",
  725. "required": [
  726. "password",
  727. "username"
  728. ],
  729. "properties": {
  730. "code": {
  731. "type": "string",
  732. "example": "验证码"
  733. },
  734. "password": {
  735. "type": "string",
  736. "example": "登录密码"
  737. },
  738. "username": {
  739. "type": "string",
  740. "example": "登录账号"
  741. }
  742. }
  743. },
  744. "md.LoginResponse": {
  745. "type": "object",
  746. "properties": {
  747. "token": {
  748. "type": "string"
  749. }
  750. }
  751. },
  752. "md.Response": {
  753. "type": "object",
  754. "properties": {
  755. "code": {
  756. "type": "string",
  757. "example": "响应码"
  758. },
  759. "data": {
  760. "description": "内容"
  761. },
  762. "msg": {
  763. "type": "string",
  764. "example": "具体错误原因"
  765. }
  766. }
  767. },
  768. "md.RoleBindPermissionGroupReq": {
  769. "type": "object",
  770. "required": [
  771. "role_id"
  772. ],
  773. "properties": {
  774. "permission_ids": {
  775. "type": "array",
  776. "items": {
  777. "type": "integer"
  778. }
  779. },
  780. "role_id": {
  781. "type": "integer"
  782. }
  783. }
  784. },
  785. "md.UpdateAdminReq": {
  786. "type": "object",
  787. "required": [
  788. "adm_id",
  789. "password",
  790. "username"
  791. ],
  792. "properties": {
  793. "adm_id": {
  794. "type": "integer"
  795. },
  796. "memo": {
  797. "type": "string"
  798. },
  799. "password": {
  800. "type": "string"
  801. },
  802. "username": {
  803. "type": "string"
  804. }
  805. }
  806. },
  807. "md.UpdateAdminStateReq": {
  808. "type": "object",
  809. "required": [
  810. "adm_id",
  811. "state"
  812. ],
  813. "properties": {
  814. "adm_id": {
  815. "type": "integer"
  816. },
  817. "state": {
  818. "type": "integer"
  819. }
  820. }
  821. },
  822. "md.UpdateRoleReq": {
  823. "type": "object",
  824. "required": [
  825. "memo",
  826. "name",
  827. "role_id"
  828. ],
  829. "properties": {
  830. "memo": {
  831. "type": "string"
  832. },
  833. "name": {
  834. "type": "string"
  835. },
  836. "role_id": {
  837. "type": "integer"
  838. }
  839. }
  840. },
  841. "md.UpdateRoleStateReq": {
  842. "type": "object",
  843. "required": [
  844. "role_id",
  845. "state"
  846. ],
  847. "properties": {
  848. "role_id": {
  849. "type": "integer"
  850. },
  851. "state": {
  852. "type": "integer"
  853. }
  854. }
  855. }
  856. },
  857. "securityDefinitions": {
  858. "MasterID": {
  859. "type": "apiKey",
  860. "name": "MasterID",
  861. "in": "header"
  862. }
  863. }
  864. }`
  865. // SwaggerInfo holds exported Swagger Info so clients can modify it
  866. var SwaggerInfo = &swag.Spec{
  867. Version: "1.0",
  868. Host: "localhost:1001 or advertisement.dengbiao.top",
  869. BasePath: "",
  870. Schemes: []string{},
  871. Title: "广告联盟-总站长平台",
  872. Description: "总站长后台接口",
  873. InfoInstanceName: "swagger",
  874. SwaggerTemplate: docTemplate,
  875. }
  876. func init() {
  877. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  878. }