广告平台(站长使用)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1006 line
32 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. "/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. "/registerForAgent": {
  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. "description": "用户名密码",
  81. "name": "req",
  82. "in": "body",
  83. "required": true,
  84. "schema": {
  85. "$ref": "#/definitions/md.RegisterForAgentReq"
  86. }
  87. }
  88. ],
  89. "responses": {
  90. "200": {
  91. "description": "success",
  92. "schema": {
  93. "type": "string"
  94. }
  95. },
  96. "400": {
  97. "description": "具体错误",
  98. "schema": {
  99. "$ref": "#/definitions/md.Response"
  100. }
  101. }
  102. }
  103. }
  104. },
  105. "/registerForMedium": {
  106. "post": {
  107. "description": "注册模块-媒体注册",
  108. "consumes": [
  109. "application/json"
  110. ],
  111. "produces": [
  112. "application/json"
  113. ],
  114. "tags": [
  115. "注册模块"
  116. ],
  117. "summary": "媒体注册",
  118. "parameters": [
  119. {
  120. "description": "用户名密码",
  121. "name": "req",
  122. "in": "body",
  123. "required": true,
  124. "schema": {
  125. "$ref": "#/definitions/md.RegisterForMediumReq"
  126. }
  127. }
  128. ],
  129. "responses": {
  130. "200": {
  131. "description": "success",
  132. "schema": {
  133. "type": "string"
  134. }
  135. },
  136. "400": {
  137. "description": "具体错误",
  138. "schema": {
  139. "$ref": "#/definitions/md.Response"
  140. }
  141. }
  142. }
  143. }
  144. },
  145. "/role/addAdmin": {
  146. "post": {
  147. "description": "权限管理-新增管理员",
  148. "consumes": [
  149. "application/json"
  150. ],
  151. "produces": [
  152. "application/json"
  153. ],
  154. "tags": [
  155. "权限管理"
  156. ],
  157. "summary": "新增管理员",
  158. "parameters": [
  159. {
  160. "type": "string",
  161. "description": "验证参数Bearer和token空格拼接",
  162. "name": "Authorization",
  163. "in": "header",
  164. "required": true
  165. },
  166. {
  167. "description": "请求参数",
  168. "name": "args",
  169. "in": "body",
  170. "required": true,
  171. "schema": {
  172. "$ref": "#/definitions/md.AddAdminReq"
  173. }
  174. }
  175. ],
  176. "responses": {
  177. "200": {
  178. "description": "success",
  179. "schema": {
  180. "type": "string"
  181. }
  182. },
  183. "400": {
  184. "description": "具体错误",
  185. "schema": {
  186. "$ref": "#/definitions/md.Response"
  187. }
  188. }
  189. }
  190. }
  191. },
  192. "/role/addRole": {
  193. "post": {
  194. "description": "权限管理-添加角色",
  195. "consumes": [
  196. "application/json"
  197. ],
  198. "produces": [
  199. "application/json"
  200. ],
  201. "tags": [
  202. "权限管理"
  203. ],
  204. "summary": "添加角色",
  205. "parameters": [
  206. {
  207. "type": "string",
  208. "description": "验证参数Bearer和token空格拼接",
  209. "name": "Authorization",
  210. "in": "header",
  211. "required": true
  212. },
  213. {
  214. "description": "请求参数",
  215. "name": "args",
  216. "in": "body",
  217. "required": true,
  218. "schema": {
  219. "$ref": "#/definitions/md.AddRoleReq"
  220. }
  221. }
  222. ],
  223. "responses": {
  224. "200": {
  225. "description": "success",
  226. "schema": {
  227. "type": "string"
  228. }
  229. },
  230. "400": {
  231. "description": "具体错误",
  232. "schema": {
  233. "$ref": "#/definitions/md.Response"
  234. }
  235. }
  236. }
  237. }
  238. },
  239. "/role/adminInfo": {
  240. "get": {
  241. "description": "权限管理-管理员信息",
  242. "consumes": [
  243. "application/json"
  244. ],
  245. "produces": [
  246. "application/json"
  247. ],
  248. "tags": [
  249. "权限管理"
  250. ],
  251. "summary": "管理员信息",
  252. "parameters": [
  253. {
  254. "type": "string",
  255. "description": "验证参数Bearer和token空格拼接",
  256. "name": "Authorization",
  257. "in": "header",
  258. "required": true
  259. },
  260. {
  261. "type": "string",
  262. "description": "管理员id",
  263. "name": "adm_id",
  264. "in": "query",
  265. "required": true
  266. }
  267. ],
  268. "responses": {
  269. "200": {
  270. "description": "具体看返回内容",
  271. "schema": {
  272. "type": "string"
  273. }
  274. },
  275. "400": {
  276. "description": "具体错误",
  277. "schema": {
  278. "$ref": "#/definitions/md.Response"
  279. }
  280. }
  281. }
  282. }
  283. },
  284. "/role/adminList": {
  285. "post": {
  286. "description": "权限管理-管理员列表",
  287. "consumes": [
  288. "application/json"
  289. ],
  290. "produces": [
  291. "application/json"
  292. ],
  293. "tags": [
  294. "权限管理"
  295. ],
  296. "summary": "管理员列表",
  297. "parameters": [
  298. {
  299. "type": "string",
  300. "description": "验证参数Bearer和token空格拼接",
  301. "name": "Authorization",
  302. "in": "header",
  303. "required": true
  304. },
  305. {
  306. "description": "请求参数",
  307. "name": "args",
  308. "in": "body",
  309. "required": true,
  310. "schema": {
  311. "$ref": "#/definitions/md.AdminListReq"
  312. }
  313. }
  314. ],
  315. "responses": {
  316. "200": {
  317. "description": "具体看返回内容",
  318. "schema": {
  319. "type": "string"
  320. }
  321. },
  322. "400": {
  323. "description": "具体错误",
  324. "schema": {
  325. "$ref": "#/definitions/md.Response"
  326. }
  327. }
  328. }
  329. }
  330. },
  331. "/role/bindAdminRole/": {
  332. "post": {
  333. "description": "权限管理-管理员绑定角色",
  334. "consumes": [
  335. "application/json"
  336. ],
  337. "produces": [
  338. "application/json"
  339. ],
  340. "tags": [
  341. "权限管理"
  342. ],
  343. "summary": "管理员绑定角色",
  344. "parameters": [
  345. {
  346. "type": "string",
  347. "description": "验证参数Bearer和token空格拼接",
  348. "name": "Authorization",
  349. "in": "header",
  350. "required": true
  351. },
  352. {
  353. "description": "请求参数",
  354. "name": "args",
  355. "in": "body",
  356. "required": true,
  357. "schema": {
  358. "$ref": "#/definitions/md.BindAdminRoleReq"
  359. }
  360. }
  361. ],
  362. "responses": {
  363. "200": {
  364. "description": "success",
  365. "schema": {
  366. "type": "string"
  367. }
  368. },
  369. "400": {
  370. "description": "具体错误",
  371. "schema": {
  372. "$ref": "#/definitions/md.Response"
  373. }
  374. }
  375. }
  376. }
  377. },
  378. "/role/deleteAdmin/{$adm_id}": {
  379. "delete": {
  380. "description": "权限管理-删除管理员",
  381. "consumes": [
  382. "application/json"
  383. ],
  384. "produces": [
  385. "application/json"
  386. ],
  387. "tags": [
  388. "权限管理"
  389. ],
  390. "summary": "删除管理员",
  391. "parameters": [
  392. {
  393. "type": "string",
  394. "description": "验证参数Bearer和token空格拼接",
  395. "name": "Authorization",
  396. "in": "header",
  397. "required": true
  398. }
  399. ],
  400. "responses": {
  401. "200": {
  402. "description": "success",
  403. "schema": {
  404. "type": "string"
  405. }
  406. },
  407. "400": {
  408. "description": "具体错误",
  409. "schema": {
  410. "$ref": "#/definitions/md.Response"
  411. }
  412. }
  413. }
  414. }
  415. },
  416. "/role/deleteRole/{$id}": {
  417. "delete": {
  418. "description": "权限管理-删除角色",
  419. "consumes": [
  420. "application/json"
  421. ],
  422. "produces": [
  423. "application/json"
  424. ],
  425. "tags": [
  426. "权限管理"
  427. ],
  428. "summary": "删除角色",
  429. "parameters": [
  430. {
  431. "type": "string",
  432. "description": "验证参数Bearer和token空格拼接",
  433. "name": "Authorization",
  434. "in": "header",
  435. "required": true
  436. },
  437. {
  438. "description": "请求参数",
  439. "name": "args",
  440. "in": "body",
  441. "required": true,
  442. "schema": {
  443. "$ref": "#/definitions/md.UpdateRoleStateReq"
  444. }
  445. }
  446. ],
  447. "responses": {
  448. "200": {
  449. "description": "success",
  450. "schema": {
  451. "type": "string"
  452. }
  453. },
  454. "400": {
  455. "description": "具体错误",
  456. "schema": {
  457. "$ref": "#/definitions/md.Response"
  458. }
  459. }
  460. }
  461. }
  462. },
  463. "/role/permissionGroupList": {
  464. "get": {
  465. "description": "权限管理-权限组列表",
  466. "consumes": [
  467. "application/json"
  468. ],
  469. "produces": [
  470. "application/json"
  471. ],
  472. "tags": [
  473. "权限管理"
  474. ],
  475. "summary": "权限组列表",
  476. "parameters": [
  477. {
  478. "type": "string",
  479. "description": "验证参数Bearer和token空格拼接",
  480. "name": "Authorization",
  481. "in": "header",
  482. "required": true
  483. },
  484. {
  485. "type": "string",
  486. "description": "管理员id",
  487. "name": "adm_id",
  488. "in": "query",
  489. "required": true
  490. }
  491. ],
  492. "responses": {
  493. "200": {
  494. "description": "具体看返回内容",
  495. "schema": {
  496. "type": "string"
  497. }
  498. },
  499. "400": {
  500. "description": "具体错误",
  501. "schema": {
  502. "$ref": "#/definitions/md.Response"
  503. }
  504. }
  505. }
  506. }
  507. },
  508. "/role/roleBindPermissionGroup": {
  509. "post": {
  510. "description": "权限管理-角色绑定权限组",
  511. "consumes": [
  512. "application/json"
  513. ],
  514. "produces": [
  515. "application/json"
  516. ],
  517. "tags": [
  518. "权限管理"
  519. ],
  520. "summary": "角色绑定权限组",
  521. "parameters": [
  522. {
  523. "type": "string",
  524. "description": "验证参数Bearer和token空格拼接",
  525. "name": "Authorization",
  526. "in": "header",
  527. "required": true
  528. },
  529. {
  530. "description": "请求参数",
  531. "name": "args",
  532. "in": "body",
  533. "required": true,
  534. "schema": {
  535. "$ref": "#/definitions/md.RoleBindPermissionGroupReq"
  536. }
  537. }
  538. ],
  539. "responses": {
  540. "200": {
  541. "description": "success",
  542. "schema": {
  543. "type": "string"
  544. }
  545. },
  546. "400": {
  547. "description": "具体错误",
  548. "schema": {
  549. "$ref": "#/definitions/md.Response"
  550. }
  551. }
  552. }
  553. }
  554. },
  555. "/role/roleList": {
  556. "get": {
  557. "description": "权限管理-角色列表",
  558. "consumes": [
  559. "application/json"
  560. ],
  561. "produces": [
  562. "application/json"
  563. ],
  564. "tags": [
  565. "权限管理"
  566. ],
  567. "summary": "角色列表",
  568. "parameters": [
  569. {
  570. "type": "string",
  571. "description": "验证参数Bearer和token空格拼接",
  572. "name": "Authorization",
  573. "in": "header",
  574. "required": true
  575. }
  576. ],
  577. "responses": {
  578. "200": {
  579. "description": "具体看返回内容",
  580. "schema": {
  581. "type": "string"
  582. }
  583. },
  584. "400": {
  585. "description": "具体错误",
  586. "schema": {
  587. "$ref": "#/definitions/md.Response"
  588. }
  589. }
  590. }
  591. }
  592. },
  593. "/role/updateAdmin": {
  594. "post": {
  595. "description": "权限管理-修改管理员信息",
  596. "consumes": [
  597. "application/json"
  598. ],
  599. "produces": [
  600. "application/json"
  601. ],
  602. "tags": [
  603. "权限管理"
  604. ],
  605. "summary": "修改管理员信息",
  606. "parameters": [
  607. {
  608. "type": "string",
  609. "description": "验证参数Bearer和token空格拼接",
  610. "name": "Authorization",
  611. "in": "header",
  612. "required": true
  613. },
  614. {
  615. "description": "请求参数",
  616. "name": "args",
  617. "in": "body",
  618. "required": true,
  619. "schema": {
  620. "$ref": "#/definitions/md.UpdateAdminReq"
  621. }
  622. }
  623. ],
  624. "responses": {
  625. "200": {
  626. "description": "success",
  627. "schema": {
  628. "type": "string"
  629. }
  630. },
  631. "400": {
  632. "description": "具体错误",
  633. "schema": {
  634. "$ref": "#/definitions/md.Response"
  635. }
  636. }
  637. }
  638. }
  639. },
  640. "/role/updateAdminState": {
  641. "post": {
  642. "description": "权限管理-修改管理员状态",
  643. "consumes": [
  644. "application/json"
  645. ],
  646. "produces": [
  647. "application/json"
  648. ],
  649. "tags": [
  650. "权限管理"
  651. ],
  652. "summary": "修改管理员状态",
  653. "parameters": [
  654. {
  655. "type": "string",
  656. "description": "验证参数Bearer和token空格拼接",
  657. "name": "Authorization",
  658. "in": "header",
  659. "required": true
  660. },
  661. {
  662. "description": "请求参数",
  663. "name": "args",
  664. "in": "body",
  665. "required": true,
  666. "schema": {
  667. "$ref": "#/definitions/md.UpdateAdminStateReq"
  668. }
  669. }
  670. ],
  671. "responses": {
  672. "200": {
  673. "description": "success",
  674. "schema": {
  675. "type": "string"
  676. }
  677. },
  678. "400": {
  679. "description": "具体错误",
  680. "schema": {
  681. "$ref": "#/definitions/md.Response"
  682. }
  683. }
  684. }
  685. }
  686. },
  687. "/role/updateRole": {
  688. "post": {
  689. "description": "权限管理-修改角色状态",
  690. "consumes": [
  691. "application/json"
  692. ],
  693. "produces": [
  694. "application/json"
  695. ],
  696. "tags": [
  697. "权限管理"
  698. ],
  699. "summary": "修改角色状态",
  700. "parameters": [
  701. {
  702. "type": "string",
  703. "description": "验证参数Bearer和token空格拼接",
  704. "name": "Authorization",
  705. "in": "header",
  706. "required": true
  707. },
  708. {
  709. "description": "请求参数",
  710. "name": "args",
  711. "in": "body",
  712. "required": true,
  713. "schema": {
  714. "$ref": "#/definitions/md.UpdateRoleStateReq"
  715. }
  716. }
  717. ],
  718. "responses": {
  719. "200": {
  720. "description": "success",
  721. "schema": {
  722. "type": "string"
  723. }
  724. },
  725. "400": {
  726. "description": "具体错误",
  727. "schema": {
  728. "$ref": "#/definitions/md.Response"
  729. }
  730. }
  731. }
  732. }
  733. }
  734. },
  735. "definitions": {
  736. "md.AddAdminReq": {
  737. "type": "object",
  738. "required": [
  739. "password",
  740. "username"
  741. ],
  742. "properties": {
  743. "memo": {
  744. "type": "string"
  745. },
  746. "password": {
  747. "type": "string"
  748. },
  749. "username": {
  750. "type": "string"
  751. }
  752. }
  753. },
  754. "md.AddRoleReq": {
  755. "type": "object",
  756. "required": [
  757. "memo",
  758. "name"
  759. ],
  760. "properties": {
  761. "memo": {
  762. "type": "string"
  763. },
  764. "name": {
  765. "type": "string"
  766. }
  767. }
  768. },
  769. "md.AdminListReq": {
  770. "type": "object",
  771. "properties": {
  772. "limit": {
  773. "type": "integer"
  774. },
  775. "page": {
  776. "type": "integer"
  777. },
  778. "state": {
  779. "type": "integer"
  780. },
  781. "username": {
  782. "type": "string"
  783. }
  784. }
  785. },
  786. "md.BindAdminRoleReq": {
  787. "type": "object",
  788. "required": [
  789. "adm_id"
  790. ],
  791. "properties": {
  792. "adm_id": {
  793. "type": "integer"
  794. },
  795. "role_ids": {
  796. "type": "array",
  797. "items": {
  798. "type": "integer"
  799. }
  800. }
  801. }
  802. },
  803. "md.LoginReq": {
  804. "type": "object",
  805. "required": [
  806. "password",
  807. "username"
  808. ],
  809. "properties": {
  810. "code": {
  811. "type": "string",
  812. "example": "验证码"
  813. },
  814. "password": {
  815. "type": "string",
  816. "example": "登录密码"
  817. },
  818. "username": {
  819. "type": "string",
  820. "example": "登录账号"
  821. }
  822. }
  823. },
  824. "md.LoginResponse": {
  825. "type": "object",
  826. "properties": {
  827. "token": {
  828. "type": "string"
  829. }
  830. }
  831. },
  832. "md.RegisterForAgentReq": {
  833. "type": "object",
  834. "required": [
  835. "password",
  836. "phone"
  837. ],
  838. "properties": {
  839. "code": {
  840. "type": "string",
  841. "example": "验证码"
  842. },
  843. "password": {
  844. "type": "string",
  845. "example": "登录密码"
  846. },
  847. "phone": {
  848. "type": "string",
  849. "example": "登录账号"
  850. }
  851. }
  852. },
  853. "md.RegisterForMediumReq": {
  854. "type": "object",
  855. "required": [
  856. "password",
  857. "phone"
  858. ],
  859. "properties": {
  860. "code": {
  861. "type": "string",
  862. "example": "验证码"
  863. },
  864. "password": {
  865. "type": "string",
  866. "example": "登录密码"
  867. },
  868. "phone": {
  869. "type": "string",
  870. "example": "登录账号"
  871. }
  872. }
  873. },
  874. "md.Response": {
  875. "type": "object",
  876. "properties": {
  877. "code": {
  878. "type": "string",
  879. "example": "响应码"
  880. },
  881. "data": {
  882. "description": "内容"
  883. },
  884. "msg": {
  885. "type": "string",
  886. "example": "具体错误原因"
  887. }
  888. }
  889. },
  890. "md.RoleBindPermissionGroupReq": {
  891. "type": "object",
  892. "required": [
  893. "role_id"
  894. ],
  895. "properties": {
  896. "permission_ids": {
  897. "type": "array",
  898. "items": {
  899. "type": "integer"
  900. }
  901. },
  902. "role_id": {
  903. "type": "integer"
  904. }
  905. }
  906. },
  907. "md.UpdateAdminReq": {
  908. "type": "object",
  909. "required": [
  910. "adm_id",
  911. "password",
  912. "username"
  913. ],
  914. "properties": {
  915. "adm_id": {
  916. "type": "integer"
  917. },
  918. "memo": {
  919. "type": "string"
  920. },
  921. "password": {
  922. "type": "string"
  923. },
  924. "username": {
  925. "type": "string"
  926. }
  927. }
  928. },
  929. "md.UpdateAdminStateReq": {
  930. "type": "object",
  931. "required": [
  932. "adm_id",
  933. "state"
  934. ],
  935. "properties": {
  936. "adm_id": {
  937. "type": "integer"
  938. },
  939. "state": {
  940. "type": "integer"
  941. }
  942. }
  943. },
  944. "md.UpdateRoleReq": {
  945. "type": "object",
  946. "required": [
  947. "memo",
  948. "name",
  949. "role_id"
  950. ],
  951. "properties": {
  952. "memo": {
  953. "type": "string"
  954. },
  955. "name": {
  956. "type": "string"
  957. },
  958. "role_id": {
  959. "type": "integer"
  960. }
  961. }
  962. },
  963. "md.UpdateRoleStateReq": {
  964. "type": "object",
  965. "required": [
  966. "role_id",
  967. "state"
  968. ],
  969. "properties": {
  970. "role_id": {
  971. "type": "integer"
  972. },
  973. "state": {
  974. "type": "integer"
  975. }
  976. }
  977. }
  978. },
  979. "securityDefinitions": {
  980. "MasterID": {
  981. "type": "apiKey",
  982. "name": "MasterID",
  983. "in": "header"
  984. }
  985. }
  986. }`
  987. // SwaggerInfo holds exported Swagger Info so clients can modify it
  988. var SwaggerInfo = &swag.Spec{
  989. Version: "1.0",
  990. Host: "localhost:1002 or xxxx.advertisement.dengbiao.top",
  991. BasePath: "",
  992. Schemes: []string{},
  993. Title: "广告联盟-站长平台",
  994. Description: "站长后台接口",
  995. InfoInstanceName: "swagger",
  996. SwaggerTemplate: docTemplate,
  997. }
  998. func init() {
  999. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  1000. }