init_api_data.go 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189
  1. package base
  2. import (
  3. "github.com/suyuan32/simple-admin-common/utils/pointy"
  4. "github.com/suyuan32/simple-admin-core/rpc/types/core"
  5. )
  6. func (l *InitDatabaseLogic) insertApiData() (err error) {
  7. // AgentBase
  8. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  9. ServiceName: pointy.GetPointer("Wechat"),
  10. Path: pointy.GetPointer("/agent_base/create"),
  11. Description: pointy.GetPointer("apiDesc.createAgentBase"),
  12. ApiGroup: pointy.GetPointer("agent_base"),
  13. Method: pointy.GetPointer("POST"),
  14. })
  15. if err != nil {
  16. return err
  17. }
  18. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  19. ServiceName: pointy.GetPointer("Wechat"),
  20. Path: pointy.GetPointer("/agent_base/update"),
  21. Description: pointy.GetPointer("apiDesc.updateAgentBase"),
  22. ApiGroup: pointy.GetPointer("agent_base"),
  23. Method: pointy.GetPointer("POST"),
  24. })
  25. if err != nil {
  26. return err
  27. }
  28. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  29. ServiceName: pointy.GetPointer("Wechat"),
  30. Path: pointy.GetPointer("/agent_base/delete"),
  31. Description: pointy.GetPointer("apiDesc.deleteAgentBase"),
  32. ApiGroup: pointy.GetPointer("agent_base"),
  33. Method: pointy.GetPointer("POST"),
  34. })
  35. if err != nil {
  36. return err
  37. }
  38. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  39. ServiceName: pointy.GetPointer("Wechat"),
  40. Path: pointy.GetPointer("/agent_base/list"),
  41. Description: pointy.GetPointer("apiDesc.getAgentBaseList"),
  42. ApiGroup: pointy.GetPointer("agent_base"),
  43. Method: pointy.GetPointer("POST"),
  44. })
  45. if err != nil {
  46. return err
  47. }
  48. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  49. ServiceName: pointy.GetPointer("Wechat"),
  50. Path: pointy.GetPointer("/agent_base"),
  51. Description: pointy.GetPointer("apiDesc.getAgentBaseById"),
  52. ApiGroup: pointy.GetPointer("agent_base"),
  53. Method: pointy.GetPointer("POST"),
  54. })
  55. if err != nil {
  56. return err
  57. }
  58. // Category
  59. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  60. ServiceName: pointy.GetPointer("Wechat"),
  61. Path: pointy.GetPointer("/category/create"),
  62. Description: pointy.GetPointer("apiDesc.createCategory"),
  63. ApiGroup: pointy.GetPointer("category"),
  64. Method: pointy.GetPointer("POST"),
  65. })
  66. if err != nil {
  67. return err
  68. }
  69. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  70. ServiceName: pointy.GetPointer("Wechat"),
  71. Path: pointy.GetPointer("/category/update"),
  72. Description: pointy.GetPointer("apiDesc.updateCategory"),
  73. ApiGroup: pointy.GetPointer("category"),
  74. Method: pointy.GetPointer("POST"),
  75. })
  76. if err != nil {
  77. return err
  78. }
  79. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  80. ServiceName: pointy.GetPointer("Wechat"),
  81. Path: pointy.GetPointer("/category/delete"),
  82. Description: pointy.GetPointer("apiDesc.deleteCategory"),
  83. ApiGroup: pointy.GetPointer("category"),
  84. Method: pointy.GetPointer("POST"),
  85. })
  86. if err != nil {
  87. return err
  88. }
  89. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  90. ServiceName: pointy.GetPointer("Wechat"),
  91. Path: pointy.GetPointer("/category/list"),
  92. Description: pointy.GetPointer("apiDesc.getCategoryList"),
  93. ApiGroup: pointy.GetPointer("category"),
  94. Method: pointy.GetPointer("POST"),
  95. })
  96. if err != nil {
  97. return err
  98. }
  99. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  100. ServiceName: pointy.GetPointer("Wechat"),
  101. Path: pointy.GetPointer("/category"),
  102. Description: pointy.GetPointer("apiDesc.getCategoryById"),
  103. ApiGroup: pointy.GetPointer("category"),
  104. Method: pointy.GetPointer("POST"),
  105. })
  106. if err != nil {
  107. return err
  108. }
  109. // EmployeeConfig
  110. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  111. ServiceName: pointy.GetPointer("Wechat"),
  112. Path: pointy.GetPointer("/employee_config/create"),
  113. Description: pointy.GetPointer("apiDesc.createEmployeeConfig"),
  114. ApiGroup: pointy.GetPointer("employee_config"),
  115. Method: pointy.GetPointer("POST"),
  116. })
  117. if err != nil {
  118. return err
  119. }
  120. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  121. ServiceName: pointy.GetPointer("Wechat"),
  122. Path: pointy.GetPointer("/employee_config/update"),
  123. Description: pointy.GetPointer("apiDesc.updateEmployeeConfig"),
  124. ApiGroup: pointy.GetPointer("employee_config"),
  125. Method: pointy.GetPointer("POST"),
  126. })
  127. if err != nil {
  128. return err
  129. }
  130. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  131. ServiceName: pointy.GetPointer("Wechat"),
  132. Path: pointy.GetPointer("/employee_config/delete"),
  133. Description: pointy.GetPointer("apiDesc.deleteEmployeeConfig"),
  134. ApiGroup: pointy.GetPointer("employee_config"),
  135. Method: pointy.GetPointer("POST"),
  136. })
  137. if err != nil {
  138. return err
  139. }
  140. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  141. ServiceName: pointy.GetPointer("Wechat"),
  142. Path: pointy.GetPointer("/employee_config/list"),
  143. Description: pointy.GetPointer("apiDesc.getEmployeeConfigList"),
  144. ApiGroup: pointy.GetPointer("employee_config"),
  145. Method: pointy.GetPointer("POST"),
  146. })
  147. if err != nil {
  148. return err
  149. }
  150. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  151. ServiceName: pointy.GetPointer("Wechat"),
  152. Path: pointy.GetPointer("/employee_config"),
  153. Description: pointy.GetPointer("apiDesc.getEmployeeConfigById"),
  154. ApiGroup: pointy.GetPointer("employee_config"),
  155. Method: pointy.GetPointer("POST"),
  156. })
  157. if err != nil {
  158. return err
  159. }
  160. // Msg
  161. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  162. ServiceName: pointy.GetPointer("Wechat"),
  163. Path: pointy.GetPointer("/msg/create"),
  164. Description: pointy.GetPointer("apiDesc.createMsg"),
  165. ApiGroup: pointy.GetPointer("msg"),
  166. Method: pointy.GetPointer("POST"),
  167. })
  168. if err != nil {
  169. return err
  170. }
  171. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  172. ServiceName: pointy.GetPointer("Wechat"),
  173. Path: pointy.GetPointer("/msg/update"),
  174. Description: pointy.GetPointer("apiDesc.updateMsg"),
  175. ApiGroup: pointy.GetPointer("msg"),
  176. Method: pointy.GetPointer("POST"),
  177. })
  178. if err != nil {
  179. return err
  180. }
  181. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  182. ServiceName: pointy.GetPointer("Wechat"),
  183. Path: pointy.GetPointer("/msg/delete"),
  184. Description: pointy.GetPointer("apiDesc.deleteMsg"),
  185. ApiGroup: pointy.GetPointer("msg"),
  186. Method: pointy.GetPointer("POST"),
  187. })
  188. if err != nil {
  189. return err
  190. }
  191. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  192. ServiceName: pointy.GetPointer("Wechat"),
  193. Path: pointy.GetPointer("/msg/list"),
  194. Description: pointy.GetPointer("apiDesc.getMsgList"),
  195. ApiGroup: pointy.GetPointer("msg"),
  196. Method: pointy.GetPointer("POST"),
  197. })
  198. if err != nil {
  199. return err
  200. }
  201. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  202. ServiceName: pointy.GetPointer("Wechat"),
  203. Path: pointy.GetPointer("/msg"),
  204. Description: pointy.GetPointer("apiDesc.getMsgById"),
  205. ApiGroup: pointy.GetPointer("msg"),
  206. Method: pointy.GetPointer("POST"),
  207. })
  208. if err != nil {
  209. return err
  210. }
  211. // Token
  212. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  213. ServiceName: pointy.GetPointer("Wechat"),
  214. Path: pointy.GetPointer("/token/create"),
  215. Description: pointy.GetPointer("apiDesc.createToken"),
  216. ApiGroup: pointy.GetPointer("token"),
  217. Method: pointy.GetPointer("POST"),
  218. })
  219. if err != nil {
  220. return err
  221. }
  222. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  223. ServiceName: pointy.GetPointer("Wechat"),
  224. Path: pointy.GetPointer("/token/update"),
  225. Description: pointy.GetPointer("apiDesc.updateToken"),
  226. ApiGroup: pointy.GetPointer("token"),
  227. Method: pointy.GetPointer("POST"),
  228. })
  229. if err != nil {
  230. return err
  231. }
  232. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  233. ServiceName: pointy.GetPointer("Wechat"),
  234. Path: pointy.GetPointer("/token/delete"),
  235. Description: pointy.GetPointer("apiDesc.deleteToken"),
  236. ApiGroup: pointy.GetPointer("token"),
  237. Method: pointy.GetPointer("POST"),
  238. })
  239. if err != nil {
  240. return err
  241. }
  242. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  243. ServiceName: pointy.GetPointer("Wechat"),
  244. Path: pointy.GetPointer("/token/list"),
  245. Description: pointy.GetPointer("apiDesc.getTokenList"),
  246. ApiGroup: pointy.GetPointer("token"),
  247. Method: pointy.GetPointer("POST"),
  248. })
  249. if err != nil {
  250. return err
  251. }
  252. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  253. ServiceName: pointy.GetPointer("Wechat"),
  254. Path: pointy.GetPointer("/token"),
  255. Description: pointy.GetPointer("apiDesc.getTokenById"),
  256. ApiGroup: pointy.GetPointer("token"),
  257. Method: pointy.GetPointer("POST"),
  258. })
  259. if err != nil {
  260. return err
  261. }
  262. // Tutorial
  263. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  264. ServiceName: pointy.GetPointer("Wechat"),
  265. Path: pointy.GetPointer("/tutorial/create"),
  266. Description: pointy.GetPointer("apiDesc.createTutorial"),
  267. ApiGroup: pointy.GetPointer("tutorial"),
  268. Method: pointy.GetPointer("POST"),
  269. })
  270. if err != nil {
  271. return err
  272. }
  273. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  274. ServiceName: pointy.GetPointer("Wechat"),
  275. Path: pointy.GetPointer("/tutorial/update"),
  276. Description: pointy.GetPointer("apiDesc.updateTutorial"),
  277. ApiGroup: pointy.GetPointer("tutorial"),
  278. Method: pointy.GetPointer("POST"),
  279. })
  280. if err != nil {
  281. return err
  282. }
  283. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  284. ServiceName: pointy.GetPointer("Wechat"),
  285. Path: pointy.GetPointer("/tutorial/delete"),
  286. Description: pointy.GetPointer("apiDesc.deleteTutorial"),
  287. ApiGroup: pointy.GetPointer("tutorial"),
  288. Method: pointy.GetPointer("POST"),
  289. })
  290. if err != nil {
  291. return err
  292. }
  293. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  294. ServiceName: pointy.GetPointer("Wechat"),
  295. Path: pointy.GetPointer("/tutorial/list"),
  296. Description: pointy.GetPointer("apiDesc.getTutorialList"),
  297. ApiGroup: pointy.GetPointer("tutorial"),
  298. Method: pointy.GetPointer("POST"),
  299. })
  300. if err != nil {
  301. return err
  302. }
  303. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  304. ServiceName: pointy.GetPointer("Wechat"),
  305. Path: pointy.GetPointer("/tutorial"),
  306. Description: pointy.GetPointer("apiDesc.getTutorialById"),
  307. ApiGroup: pointy.GetPointer("tutorial"),
  308. Method: pointy.GetPointer("POST"),
  309. })
  310. if err != nil {
  311. return err
  312. }
  313. // WorkExperience
  314. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  315. ServiceName: pointy.GetPointer("Wechat"),
  316. Path: pointy.GetPointer("/work_experience/create"),
  317. Description: pointy.GetPointer("apiDesc.createWorkExperience"),
  318. ApiGroup: pointy.GetPointer("work_experience"),
  319. Method: pointy.GetPointer("POST"),
  320. })
  321. if err != nil {
  322. return err
  323. }
  324. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  325. ServiceName: pointy.GetPointer("Wechat"),
  326. Path: pointy.GetPointer("/work_experience/update"),
  327. Description: pointy.GetPointer("apiDesc.updateWorkExperience"),
  328. ApiGroup: pointy.GetPointer("work_experience"),
  329. Method: pointy.GetPointer("POST"),
  330. })
  331. if err != nil {
  332. return err
  333. }
  334. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  335. ServiceName: pointy.GetPointer("Wechat"),
  336. Path: pointy.GetPointer("/work_experience/delete"),
  337. Description: pointy.GetPointer("apiDesc.deleteWorkExperience"),
  338. ApiGroup: pointy.GetPointer("work_experience"),
  339. Method: pointy.GetPointer("POST"),
  340. })
  341. if err != nil {
  342. return err
  343. }
  344. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  345. ServiceName: pointy.GetPointer("Wechat"),
  346. Path: pointy.GetPointer("/work_experience/list"),
  347. Description: pointy.GetPointer("apiDesc.getWorkExperienceList"),
  348. ApiGroup: pointy.GetPointer("work_experience"),
  349. Method: pointy.GetPointer("POST"),
  350. })
  351. if err != nil {
  352. return err
  353. }
  354. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  355. ServiceName: pointy.GetPointer("Wechat"),
  356. Path: pointy.GetPointer("/work_experience"),
  357. Description: pointy.GetPointer("apiDesc.getWorkExperienceById"),
  358. ApiGroup: pointy.GetPointer("work_experience"),
  359. Method: pointy.GetPointer("POST"),
  360. })
  361. if err != nil {
  362. return err
  363. }
  364. // Employee
  365. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  366. ServiceName: pointy.GetPointer("Wechat"),
  367. Path: pointy.GetPointer("/employee/create"),
  368. Description: pointy.GetPointer("apiDesc.createEmployee"),
  369. ApiGroup: pointy.GetPointer("employee"),
  370. Method: pointy.GetPointer("POST"),
  371. })
  372. if err != nil {
  373. return err
  374. }
  375. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  376. ServiceName: pointy.GetPointer("Wechat"),
  377. Path: pointy.GetPointer("/employee/update"),
  378. Description: pointy.GetPointer("apiDesc.updateEmployee"),
  379. ApiGroup: pointy.GetPointer("employee"),
  380. Method: pointy.GetPointer("POST"),
  381. })
  382. if err != nil {
  383. return err
  384. }
  385. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  386. ServiceName: pointy.GetPointer("Wechat"),
  387. Path: pointy.GetPointer("/employee/delete"),
  388. Description: pointy.GetPointer("apiDesc.deleteEmployee"),
  389. ApiGroup: pointy.GetPointer("employee"),
  390. Method: pointy.GetPointer("POST"),
  391. })
  392. if err != nil {
  393. return err
  394. }
  395. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  396. ServiceName: pointy.GetPointer("Wechat"),
  397. Path: pointy.GetPointer("/employee/list"),
  398. Description: pointy.GetPointer("apiDesc.getEmployeeList"),
  399. ApiGroup: pointy.GetPointer("employee"),
  400. Method: pointy.GetPointer("POST"),
  401. })
  402. if err != nil {
  403. return err
  404. }
  405. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  406. ServiceName: pointy.GetPointer("Wechat"),
  407. Path: pointy.GetPointer("/employee"),
  408. Description: pointy.GetPointer("apiDesc.getEmployeeById"),
  409. ApiGroup: pointy.GetPointer("employee"),
  410. Method: pointy.GetPointer("POST"),
  411. })
  412. if err != nil {
  413. return err
  414. }
  415. // Agent
  416. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  417. ServiceName: pointy.GetPointer("Wechat"),
  418. Path: pointy.GetPointer("/agent/create"),
  419. Description: pointy.GetPointer("apiDesc.createAgent"),
  420. ApiGroup: pointy.GetPointer("agent"),
  421. Method: pointy.GetPointer("POST"),
  422. })
  423. if err != nil {
  424. return err
  425. }
  426. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  427. ServiceName: pointy.GetPointer("Wechat"),
  428. Path: pointy.GetPointer("/agent/update"),
  429. Description: pointy.GetPointer("apiDesc.updateAgent"),
  430. ApiGroup: pointy.GetPointer("agent"),
  431. Method: pointy.GetPointer("POST"),
  432. })
  433. if err != nil {
  434. return err
  435. }
  436. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  437. ServiceName: pointy.GetPointer("Wechat"),
  438. Path: pointy.GetPointer("/agent/delete"),
  439. Description: pointy.GetPointer("apiDesc.deleteAgent"),
  440. ApiGroup: pointy.GetPointer("agent"),
  441. Method: pointy.GetPointer("POST"),
  442. })
  443. if err != nil {
  444. return err
  445. }
  446. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  447. ServiceName: pointy.GetPointer("Wechat"),
  448. Path: pointy.GetPointer("/agent/list"),
  449. Description: pointy.GetPointer("apiDesc.getAgentList"),
  450. ApiGroup: pointy.GetPointer("agent"),
  451. Method: pointy.GetPointer("POST"),
  452. })
  453. if err != nil {
  454. return err
  455. }
  456. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  457. ServiceName: pointy.GetPointer("Wechat"),
  458. Path: pointy.GetPointer("/agent"),
  459. Description: pointy.GetPointer("apiDesc.getAgentById"),
  460. ApiGroup: pointy.GetPointer("agent"),
  461. Method: pointy.GetPointer("POST"),
  462. })
  463. if err != nil {
  464. return err
  465. }
  466. // BatchMsg
  467. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  468. ServiceName: pointy.GetPointer("Wechat"),
  469. Path: pointy.GetPointer("/batch_msg/create"),
  470. Description: pointy.GetPointer("apiDesc.createBatchMsg"),
  471. ApiGroup: pointy.GetPointer("batch_msg"),
  472. Method: pointy.GetPointer("POST"),
  473. })
  474. if err != nil {
  475. return err
  476. }
  477. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  478. ServiceName: pointy.GetPointer("Wechat"),
  479. Path: pointy.GetPointer("/batch_msg/update"),
  480. Description: pointy.GetPointer("apiDesc.updateBatchMsg"),
  481. ApiGroup: pointy.GetPointer("batch_msg"),
  482. Method: pointy.GetPointer("POST"),
  483. })
  484. if err != nil {
  485. return err
  486. }
  487. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  488. ServiceName: pointy.GetPointer("Wechat"),
  489. Path: pointy.GetPointer("/batch_msg/delete"),
  490. Description: pointy.GetPointer("apiDesc.deleteBatchMsg"),
  491. ApiGroup: pointy.GetPointer("batch_msg"),
  492. Method: pointy.GetPointer("POST"),
  493. })
  494. if err != nil {
  495. return err
  496. }
  497. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  498. ServiceName: pointy.GetPointer("Wechat"),
  499. Path: pointy.GetPointer("/batch_msg/list"),
  500. Description: pointy.GetPointer("apiDesc.getBatchMsgList"),
  501. ApiGroup: pointy.GetPointer("batch_msg"),
  502. Method: pointy.GetPointer("POST"),
  503. })
  504. if err != nil {
  505. return err
  506. }
  507. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  508. ServiceName: pointy.GetPointer("Wechat"),
  509. Path: pointy.GetPointer("/batch_msg"),
  510. Description: pointy.GetPointer("apiDesc.getBatchMsgById"),
  511. ApiGroup: pointy.GetPointer("batch_msg"),
  512. Method: pointy.GetPointer("POST"),
  513. })
  514. if err != nil {
  515. return err
  516. }
  517. // MessageRecords
  518. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  519. ServiceName: pointy.GetPointer("Wechat"),
  520. Path: pointy.GetPointer("/message_records/create"),
  521. Description: pointy.GetPointer("apiDesc.createMessageRecords"),
  522. ApiGroup: pointy.GetPointer("message_records"),
  523. Method: pointy.GetPointer("POST"),
  524. })
  525. if err != nil {
  526. return err
  527. }
  528. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  529. ServiceName: pointy.GetPointer("Wechat"),
  530. Path: pointy.GetPointer("/message_records/update"),
  531. Description: pointy.GetPointer("apiDesc.updateMessageRecords"),
  532. ApiGroup: pointy.GetPointer("message_records"),
  533. Method: pointy.GetPointer("POST"),
  534. })
  535. if err != nil {
  536. return err
  537. }
  538. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  539. ServiceName: pointy.GetPointer("Wechat"),
  540. Path: pointy.GetPointer("/message_records/delete"),
  541. Description: pointy.GetPointer("apiDesc.deleteMessageRecords"),
  542. ApiGroup: pointy.GetPointer("message_records"),
  543. Method: pointy.GetPointer("POST"),
  544. })
  545. if err != nil {
  546. return err
  547. }
  548. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  549. ServiceName: pointy.GetPointer("Wechat"),
  550. Path: pointy.GetPointer("/message_records/list"),
  551. Description: pointy.GetPointer("apiDesc.getMessageRecordsList"),
  552. ApiGroup: pointy.GetPointer("message_records"),
  553. Method: pointy.GetPointer("POST"),
  554. })
  555. if err != nil {
  556. return err
  557. }
  558. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  559. ServiceName: pointy.GetPointer("Wechat"),
  560. Path: pointy.GetPointer("/message_records"),
  561. Description: pointy.GetPointer("apiDesc.getMessageRecordsById"),
  562. ApiGroup: pointy.GetPointer("message_records"),
  563. Method: pointy.GetPointer("POST"),
  564. })
  565. if err != nil {
  566. return err
  567. }
  568. // SopNode
  569. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  570. ServiceName: pointy.GetPointer("Wechat"),
  571. Path: pointy.GetPointer("/sop_node/create"),
  572. Description: pointy.GetPointer("apiDesc.createSopNode"),
  573. ApiGroup: pointy.GetPointer("sop_node"),
  574. Method: pointy.GetPointer("POST"),
  575. })
  576. if err != nil {
  577. return err
  578. }
  579. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  580. ServiceName: pointy.GetPointer("Wechat"),
  581. Path: pointy.GetPointer("/sop_node/update"),
  582. Description: pointy.GetPointer("apiDesc.updateSopNode"),
  583. ApiGroup: pointy.GetPointer("sop_node"),
  584. Method: pointy.GetPointer("POST"),
  585. })
  586. if err != nil {
  587. return err
  588. }
  589. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  590. ServiceName: pointy.GetPointer("Wechat"),
  591. Path: pointy.GetPointer("/sop_node/delete"),
  592. Description: pointy.GetPointer("apiDesc.deleteSopNode"),
  593. ApiGroup: pointy.GetPointer("sop_node"),
  594. Method: pointy.GetPointer("POST"),
  595. })
  596. if err != nil {
  597. return err
  598. }
  599. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  600. ServiceName: pointy.GetPointer("Wechat"),
  601. Path: pointy.GetPointer("/sop_node/list"),
  602. Description: pointy.GetPointer("apiDesc.getSopNodeList"),
  603. ApiGroup: pointy.GetPointer("sop_node"),
  604. Method: pointy.GetPointer("POST"),
  605. })
  606. if err != nil {
  607. return err
  608. }
  609. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  610. ServiceName: pointy.GetPointer("Wechat"),
  611. Path: pointy.GetPointer("/sop_node"),
  612. Description: pointy.GetPointer("apiDesc.getSopNodeById"),
  613. ApiGroup: pointy.GetPointer("sop_node"),
  614. Method: pointy.GetPointer("POST"),
  615. })
  616. if err != nil {
  617. return err
  618. }
  619. // SopStage
  620. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  621. ServiceName: pointy.GetPointer("Wechat"),
  622. Path: pointy.GetPointer("/sop_stage/create"),
  623. Description: pointy.GetPointer("apiDesc.createSopStage"),
  624. ApiGroup: pointy.GetPointer("sop_stage"),
  625. Method: pointy.GetPointer("POST"),
  626. })
  627. if err != nil {
  628. return err
  629. }
  630. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  631. ServiceName: pointy.GetPointer("Wechat"),
  632. Path: pointy.GetPointer("/sop_stage/update"),
  633. Description: pointy.GetPointer("apiDesc.updateSopStage"),
  634. ApiGroup: pointy.GetPointer("sop_stage"),
  635. Method: pointy.GetPointer("POST"),
  636. })
  637. if err != nil {
  638. return err
  639. }
  640. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  641. ServiceName: pointy.GetPointer("Wechat"),
  642. Path: pointy.GetPointer("/sop_stage/delete"),
  643. Description: pointy.GetPointer("apiDesc.deleteSopStage"),
  644. ApiGroup: pointy.GetPointer("sop_stage"),
  645. Method: pointy.GetPointer("POST"),
  646. })
  647. if err != nil {
  648. return err
  649. }
  650. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  651. ServiceName: pointy.GetPointer("Wechat"),
  652. Path: pointy.GetPointer("/sop_stage/list"),
  653. Description: pointy.GetPointer("apiDesc.getSopStageList"),
  654. ApiGroup: pointy.GetPointer("sop_stage"),
  655. Method: pointy.GetPointer("POST"),
  656. })
  657. if err != nil {
  658. return err
  659. }
  660. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  661. ServiceName: pointy.GetPointer("Wechat"),
  662. Path: pointy.GetPointer("/sop_stage"),
  663. Description: pointy.GetPointer("apiDesc.getSopStageById"),
  664. ApiGroup: pointy.GetPointer("sop_stage"),
  665. Method: pointy.GetPointer("POST"),
  666. })
  667. if err != nil {
  668. return err
  669. }
  670. // SopTask
  671. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  672. ServiceName: pointy.GetPointer("Wechat"),
  673. Path: pointy.GetPointer("/sop_task/create"),
  674. Description: pointy.GetPointer("apiDesc.createSopTask"),
  675. ApiGroup: pointy.GetPointer("sop_task"),
  676. Method: pointy.GetPointer("POST"),
  677. })
  678. if err != nil {
  679. return err
  680. }
  681. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  682. ServiceName: pointy.GetPointer("Wechat"),
  683. Path: pointy.GetPointer("/sop_task/update"),
  684. Description: pointy.GetPointer("apiDesc.updateSopTask"),
  685. ApiGroup: pointy.GetPointer("sop_task"),
  686. Method: pointy.GetPointer("POST"),
  687. })
  688. if err != nil {
  689. return err
  690. }
  691. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  692. ServiceName: pointy.GetPointer("Wechat"),
  693. Path: pointy.GetPointer("/sop_task/delete"),
  694. Description: pointy.GetPointer("apiDesc.deleteSopTask"),
  695. ApiGroup: pointy.GetPointer("sop_task"),
  696. Method: pointy.GetPointer("POST"),
  697. })
  698. if err != nil {
  699. return err
  700. }
  701. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  702. ServiceName: pointy.GetPointer("Wechat"),
  703. Path: pointy.GetPointer("/sop_task/list"),
  704. Description: pointy.GetPointer("apiDesc.getSopTaskList"),
  705. ApiGroup: pointy.GetPointer("sop_task"),
  706. Method: pointy.GetPointer("POST"),
  707. })
  708. if err != nil {
  709. return err
  710. }
  711. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  712. ServiceName: pointy.GetPointer("Wechat"),
  713. Path: pointy.GetPointer("/sop_task"),
  714. Description: pointy.GetPointer("apiDesc.getSopTaskById"),
  715. ApiGroup: pointy.GetPointer("sop_task"),
  716. Method: pointy.GetPointer("POST"),
  717. })
  718. if err != nil {
  719. return err
  720. }
  721. // LabelRelationship
  722. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  723. ServiceName: pointy.GetPointer("Wechat"),
  724. Path: pointy.GetPointer("/label_relationship/create"),
  725. Description: pointy.GetPointer("apiDesc.createLabelRelationship"),
  726. ApiGroup: pointy.GetPointer("label_relationship"),
  727. Method: pointy.GetPointer("POST"),
  728. })
  729. if err != nil {
  730. return err
  731. }
  732. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  733. ServiceName: pointy.GetPointer("Wechat"),
  734. Path: pointy.GetPointer("/label_relationship/update"),
  735. Description: pointy.GetPointer("apiDesc.updateLabelRelationship"),
  736. ApiGroup: pointy.GetPointer("label_relationship"),
  737. Method: pointy.GetPointer("POST"),
  738. })
  739. if err != nil {
  740. return err
  741. }
  742. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  743. ServiceName: pointy.GetPointer("Wechat"),
  744. Path: pointy.GetPointer("/label_relationship/delete"),
  745. Description: pointy.GetPointer("apiDesc.deleteLabelRelationship"),
  746. ApiGroup: pointy.GetPointer("label_relationship"),
  747. Method: pointy.GetPointer("POST"),
  748. })
  749. if err != nil {
  750. return err
  751. }
  752. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  753. ServiceName: pointy.GetPointer("Wechat"),
  754. Path: pointy.GetPointer("/label_relationship/list"),
  755. Description: pointy.GetPointer("apiDesc.getLabelRelationshipList"),
  756. ApiGroup: pointy.GetPointer("label_relationship"),
  757. Method: pointy.GetPointer("POST"),
  758. })
  759. if err != nil {
  760. return err
  761. }
  762. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  763. ServiceName: pointy.GetPointer("Wechat"),
  764. Path: pointy.GetPointer("/label_relationship"),
  765. Description: pointy.GetPointer("apiDesc.getLabelRelationshipById"),
  766. ApiGroup: pointy.GetPointer("label_relationship"),
  767. Method: pointy.GetPointer("POST"),
  768. })
  769. if err != nil {
  770. return err
  771. }
  772. // Label
  773. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  774. ServiceName: pointy.GetPointer("Wechat"),
  775. Path: pointy.GetPointer("/label/create"),
  776. Description: pointy.GetPointer("apiDesc.createLabel"),
  777. ApiGroup: pointy.GetPointer("label"),
  778. Method: pointy.GetPointer("POST"),
  779. })
  780. if err != nil {
  781. return err
  782. }
  783. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  784. ServiceName: pointy.GetPointer("Wechat"),
  785. Path: pointy.GetPointer("/label/update"),
  786. Description: pointy.GetPointer("apiDesc.updateLabel"),
  787. ApiGroup: pointy.GetPointer("label"),
  788. Method: pointy.GetPointer("POST"),
  789. })
  790. if err != nil {
  791. return err
  792. }
  793. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  794. ServiceName: pointy.GetPointer("Wechat"),
  795. Path: pointy.GetPointer("/label/delete"),
  796. Description: pointy.GetPointer("apiDesc.deleteLabel"),
  797. ApiGroup: pointy.GetPointer("label"),
  798. Method: pointy.GetPointer("POST"),
  799. })
  800. if err != nil {
  801. return err
  802. }
  803. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  804. ServiceName: pointy.GetPointer("Wechat"),
  805. Path: pointy.GetPointer("/label/list"),
  806. Description: pointy.GetPointer("apiDesc.getLabelList"),
  807. ApiGroup: pointy.GetPointer("label"),
  808. Method: pointy.GetPointer("POST"),
  809. })
  810. if err != nil {
  811. return err
  812. }
  813. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  814. ServiceName: pointy.GetPointer("Wechat"),
  815. Path: pointy.GetPointer("/label"),
  816. Description: pointy.GetPointer("apiDesc.getLabelById"),
  817. ApiGroup: pointy.GetPointer("label"),
  818. Method: pointy.GetPointer("POST"),
  819. })
  820. if err != nil {
  821. return err
  822. }
  823. // Contact
  824. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  825. ServiceName: pointy.GetPointer("Wechat"),
  826. Path: pointy.GetPointer("/contact/create"),
  827. Description: pointy.GetPointer("apiDesc.createContact"),
  828. ApiGroup: pointy.GetPointer("contact"),
  829. Method: pointy.GetPointer("POST"),
  830. })
  831. if err != nil {
  832. return err
  833. }
  834. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  835. ServiceName: pointy.GetPointer("Wechat"),
  836. Path: pointy.GetPointer("/contact/update"),
  837. Description: pointy.GetPointer("apiDesc.updateContact"),
  838. ApiGroup: pointy.GetPointer("contact"),
  839. Method: pointy.GetPointer("POST"),
  840. })
  841. if err != nil {
  842. return err
  843. }
  844. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  845. ServiceName: pointy.GetPointer("Wechat"),
  846. Path: pointy.GetPointer("/contact/delete"),
  847. Description: pointy.GetPointer("apiDesc.deleteContact"),
  848. ApiGroup: pointy.GetPointer("contact"),
  849. Method: pointy.GetPointer("POST"),
  850. })
  851. if err != nil {
  852. return err
  853. }
  854. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  855. ServiceName: pointy.GetPointer("Wechat"),
  856. Path: pointy.GetPointer("/contact/list"),
  857. Description: pointy.GetPointer("apiDesc.getContactList"),
  858. ApiGroup: pointy.GetPointer("contact"),
  859. Method: pointy.GetPointer("POST"),
  860. })
  861. if err != nil {
  862. return err
  863. }
  864. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  865. ServiceName: pointy.GetPointer("Wechat"),
  866. Path: pointy.GetPointer("/contact"),
  867. Description: pointy.GetPointer("apiDesc.getContactById"),
  868. ApiGroup: pointy.GetPointer("contact"),
  869. Method: pointy.GetPointer("POST"),
  870. })
  871. if err != nil {
  872. return err
  873. }
  874. // Wx
  875. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  876. ServiceName: pointy.GetPointer("Wechat"),
  877. Path: pointy.GetPointer("/wx/create"),
  878. Description: pointy.GetPointer("apiDesc.createWx"),
  879. ApiGroup: pointy.GetPointer("wx"),
  880. Method: pointy.GetPointer("POST"),
  881. })
  882. if err != nil {
  883. return err
  884. }
  885. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  886. ServiceName: pointy.GetPointer("Wechat"),
  887. Path: pointy.GetPointer("/wx/update"),
  888. Description: pointy.GetPointer("apiDesc.updateWx"),
  889. ApiGroup: pointy.GetPointer("wx"),
  890. Method: pointy.GetPointer("POST"),
  891. })
  892. if err != nil {
  893. return err
  894. }
  895. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  896. ServiceName: pointy.GetPointer("Wechat"),
  897. Path: pointy.GetPointer("/wx/delete"),
  898. Description: pointy.GetPointer("apiDesc.deleteWx"),
  899. ApiGroup: pointy.GetPointer("wx"),
  900. Method: pointy.GetPointer("POST"),
  901. })
  902. if err != nil {
  903. return err
  904. }
  905. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  906. ServiceName: pointy.GetPointer("Wechat"),
  907. Path: pointy.GetPointer("/wx/list"),
  908. Description: pointy.GetPointer("apiDesc.getWxList"),
  909. ApiGroup: pointy.GetPointer("wx"),
  910. Method: pointy.GetPointer("POST"),
  911. })
  912. if err != nil {
  913. return err
  914. }
  915. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  916. ServiceName: pointy.GetPointer("Wechat"),
  917. Path: pointy.GetPointer("/wx"),
  918. Description: pointy.GetPointer("apiDesc.getWxById"),
  919. ApiGroup: pointy.GetPointer("wx"),
  920. Method: pointy.GetPointer("POST"),
  921. })
  922. if err != nil {
  923. return err
  924. }
  925. // Server
  926. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  927. ServiceName: pointy.GetPointer("Wechat"),
  928. Path: pointy.GetPointer("/server/create"),
  929. Description: pointy.GetPointer("apiDesc.createServer"),
  930. ApiGroup: pointy.GetPointer("server"),
  931. Method: pointy.GetPointer("POST"),
  932. })
  933. if err != nil {
  934. return err
  935. }
  936. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  937. ServiceName: pointy.GetPointer("Wechat"),
  938. Path: pointy.GetPointer("/server/update"),
  939. Description: pointy.GetPointer("apiDesc.updateServer"),
  940. ApiGroup: pointy.GetPointer("server"),
  941. Method: pointy.GetPointer("POST"),
  942. })
  943. if err != nil {
  944. return err
  945. }
  946. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  947. ServiceName: pointy.GetPointer("Wechat"),
  948. Path: pointy.GetPointer("/server/delete"),
  949. Description: pointy.GetPointer("apiDesc.deleteServer"),
  950. ApiGroup: pointy.GetPointer("server"),
  951. Method: pointy.GetPointer("POST"),
  952. })
  953. if err != nil {
  954. return err
  955. }
  956. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  957. ServiceName: pointy.GetPointer("Wechat"),
  958. Path: pointy.GetPointer("/server/list"),
  959. Description: pointy.GetPointer("apiDesc.getServerList"),
  960. ApiGroup: pointy.GetPointer("server"),
  961. Method: pointy.GetPointer("POST"),
  962. })
  963. if err != nil {
  964. return err
  965. }
  966. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  967. ServiceName: pointy.GetPointer("Wechat"),
  968. Path: pointy.GetPointer("/server"),
  969. Description: pointy.GetPointer("apiDesc.getServerById"),
  970. ApiGroup: pointy.GetPointer("server"),
  971. Method: pointy.GetPointer("POST"),
  972. })
  973. if err != nil {
  974. return err
  975. }
  976. return err
  977. }