init_api_data.go 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499
  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. // WxCardVisit
  8. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  9. ServiceName: pointy.GetPointer("Wechat"),
  10. Path: pointy.GetPointer("/wx_card_visit/create"),
  11. Description: pointy.GetPointer("apiDesc.createWxCardVisit"),
  12. ApiGroup: pointy.GetPointer("wx_card_visit"),
  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("/wx_card_visit/update"),
  21. Description: pointy.GetPointer("apiDesc.updateWxCardVisit"),
  22. ApiGroup: pointy.GetPointer("wx_card_visit"),
  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("/wx_card_visit/delete"),
  31. Description: pointy.GetPointer("apiDesc.deleteWxCardVisit"),
  32. ApiGroup: pointy.GetPointer("wx_card_visit"),
  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("/wx_card_visit/list"),
  41. Description: pointy.GetPointer("apiDesc.getWxCardVisitList"),
  42. ApiGroup: pointy.GetPointer("wx_card_visit"),
  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("/wx_card_visit"),
  51. Description: pointy.GetPointer("apiDesc.getWxCardVisitById"),
  52. ApiGroup: pointy.GetPointer("wx_card_visit"),
  53. Method: pointy.GetPointer("POST"),
  54. })
  55. if err != nil {
  56. return err
  57. }
  58. // WxCardUser
  59. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  60. ServiceName: pointy.GetPointer("Wechat"),
  61. Path: pointy.GetPointer("/wx_card_user/create"),
  62. Description: pointy.GetPointer("apiDesc.createWxCardUser"),
  63. ApiGroup: pointy.GetPointer("wx_card_user"),
  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("/wx_card_user/update"),
  72. Description: pointy.GetPointer("apiDesc.updateWxCardUser"),
  73. ApiGroup: pointy.GetPointer("wx_card_user"),
  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("/wx_card_user/delete"),
  82. Description: pointy.GetPointer("apiDesc.deleteWxCardUser"),
  83. ApiGroup: pointy.GetPointer("wx_card_user"),
  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("/wx_card_user/list"),
  92. Description: pointy.GetPointer("apiDesc.getWxCardUserList"),
  93. ApiGroup: pointy.GetPointer("wx_card_user"),
  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("/wx_card_user"),
  102. Description: pointy.GetPointer("apiDesc.getWxCardUserById"),
  103. ApiGroup: pointy.GetPointer("wx_card_user"),
  104. Method: pointy.GetPointer("POST"),
  105. })
  106. if err != nil {
  107. return err
  108. }
  109. // WxCard
  110. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  111. ServiceName: pointy.GetPointer("Wechat"),
  112. Path: pointy.GetPointer("/wx_card/create"),
  113. Description: pointy.GetPointer("apiDesc.createWxCard"),
  114. ApiGroup: pointy.GetPointer("wx_card"),
  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("/wx_card/update"),
  123. Description: pointy.GetPointer("apiDesc.updateWxCard"),
  124. ApiGroup: pointy.GetPointer("wx_card"),
  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("/wx_card/delete"),
  133. Description: pointy.GetPointer("apiDesc.deleteWxCard"),
  134. ApiGroup: pointy.GetPointer("wx_card"),
  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("/wx_card/list"),
  143. Description: pointy.GetPointer("apiDesc.getWxCardList"),
  144. ApiGroup: pointy.GetPointer("wx_card"),
  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("/wx_card"),
  153. Description: pointy.GetPointer("apiDesc.getWxCardById"),
  154. ApiGroup: pointy.GetPointer("wx_card"),
  155. Method: pointy.GetPointer("POST"),
  156. })
  157. if err != nil {
  158. return err
  159. }
  160. // ChatSession
  161. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  162. ServiceName: pointy.GetPointer("Wechat"),
  163. Path: pointy.GetPointer("/chat_session/create"),
  164. Description: pointy.GetPointer("apiDesc.createChatSession"),
  165. ApiGroup: pointy.GetPointer("chat_session"),
  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("/chat_session/update"),
  174. Description: pointy.GetPointer("apiDesc.updateChatSession"),
  175. ApiGroup: pointy.GetPointer("chat_session"),
  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("/chat_session/delete"),
  184. Description: pointy.GetPointer("apiDesc.deleteChatSession"),
  185. ApiGroup: pointy.GetPointer("chat_session"),
  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("/chat_session/list"),
  194. Description: pointy.GetPointer("apiDesc.getChatSessionList"),
  195. ApiGroup: pointy.GetPointer("chat_session"),
  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("/chat_session"),
  204. Description: pointy.GetPointer("apiDesc.getChatSessionById"),
  205. ApiGroup: pointy.GetPointer("chat_session"),
  206. Method: pointy.GetPointer("POST"),
  207. })
  208. if err != nil {
  209. return err
  210. }
  211. // ChatRecords
  212. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  213. ServiceName: pointy.GetPointer("Wechat"),
  214. Path: pointy.GetPointer("/chat_records/create"),
  215. Description: pointy.GetPointer("apiDesc.createChatRecords"),
  216. ApiGroup: pointy.GetPointer("chat_records"),
  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("/chat_records/update"),
  225. Description: pointy.GetPointer("apiDesc.updateChatRecords"),
  226. ApiGroup: pointy.GetPointer("chat_records"),
  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("/chat_records/delete"),
  235. Description: pointy.GetPointer("apiDesc.deleteChatRecords"),
  236. ApiGroup: pointy.GetPointer("chat_records"),
  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("/chat_records/list"),
  245. Description: pointy.GetPointer("apiDesc.getChatRecordsList"),
  246. ApiGroup: pointy.GetPointer("chat_records"),
  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("/chat_records"),
  255. Description: pointy.GetPointer("apiDesc.getChatRecordsById"),
  256. ApiGroup: pointy.GetPointer("chat_records"),
  257. Method: pointy.GetPointer("POST"),
  258. })
  259. if err != nil {
  260. return err
  261. }
  262. // AgentBase
  263. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  264. ServiceName: pointy.GetPointer("Wechat"),
  265. Path: pointy.GetPointer("/agent_base/create"),
  266. Description: pointy.GetPointer("apiDesc.createAgentBase"),
  267. ApiGroup: pointy.GetPointer("agent_base"),
  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("/agent_base/update"),
  276. Description: pointy.GetPointer("apiDesc.updateAgentBase"),
  277. ApiGroup: pointy.GetPointer("agent_base"),
  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("/agent_base/delete"),
  286. Description: pointy.GetPointer("apiDesc.deleteAgentBase"),
  287. ApiGroup: pointy.GetPointer("agent_base"),
  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("/agent_base/list"),
  296. Description: pointy.GetPointer("apiDesc.getAgentBaseList"),
  297. ApiGroup: pointy.GetPointer("agent_base"),
  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("/agent_base"),
  306. Description: pointy.GetPointer("apiDesc.getAgentBaseById"),
  307. ApiGroup: pointy.GetPointer("agent_base"),
  308. Method: pointy.GetPointer("POST"),
  309. })
  310. if err != nil {
  311. return err
  312. }
  313. // Category
  314. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  315. ServiceName: pointy.GetPointer("Wechat"),
  316. Path: pointy.GetPointer("/category/create"),
  317. Description: pointy.GetPointer("apiDesc.createCategory"),
  318. ApiGroup: pointy.GetPointer("category"),
  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("/category/update"),
  327. Description: pointy.GetPointer("apiDesc.updateCategory"),
  328. ApiGroup: pointy.GetPointer("category"),
  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("/category/delete"),
  337. Description: pointy.GetPointer("apiDesc.deleteCategory"),
  338. ApiGroup: pointy.GetPointer("category"),
  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("/category/list"),
  347. Description: pointy.GetPointer("apiDesc.getCategoryList"),
  348. ApiGroup: pointy.GetPointer("category"),
  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("/category"),
  357. Description: pointy.GetPointer("apiDesc.getCategoryById"),
  358. ApiGroup: pointy.GetPointer("category"),
  359. Method: pointy.GetPointer("POST"),
  360. })
  361. if err != nil {
  362. return err
  363. }
  364. // EmployeeConfig
  365. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  366. ServiceName: pointy.GetPointer("Wechat"),
  367. Path: pointy.GetPointer("/employee_config/create"),
  368. Description: pointy.GetPointer("apiDesc.createEmployeeConfig"),
  369. ApiGroup: pointy.GetPointer("employee_config"),
  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_config/update"),
  378. Description: pointy.GetPointer("apiDesc.updateEmployeeConfig"),
  379. ApiGroup: pointy.GetPointer("employee_config"),
  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_config/delete"),
  388. Description: pointy.GetPointer("apiDesc.deleteEmployeeConfig"),
  389. ApiGroup: pointy.GetPointer("employee_config"),
  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_config/list"),
  398. Description: pointy.GetPointer("apiDesc.getEmployeeConfigList"),
  399. ApiGroup: pointy.GetPointer("employee_config"),
  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_config"),
  408. Description: pointy.GetPointer("apiDesc.getEmployeeConfigById"),
  409. ApiGroup: pointy.GetPointer("employee_config"),
  410. Method: pointy.GetPointer("POST"),
  411. })
  412. if err != nil {
  413. return err
  414. }
  415. // Msg
  416. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  417. ServiceName: pointy.GetPointer("Wechat"),
  418. Path: pointy.GetPointer("/msg/create"),
  419. Description: pointy.GetPointer("apiDesc.createMsg"),
  420. ApiGroup: pointy.GetPointer("msg"),
  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("/msg/update"),
  429. Description: pointy.GetPointer("apiDesc.updateMsg"),
  430. ApiGroup: pointy.GetPointer("msg"),
  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("/msg/delete"),
  439. Description: pointy.GetPointer("apiDesc.deleteMsg"),
  440. ApiGroup: pointy.GetPointer("msg"),
  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("/msg/list"),
  449. Description: pointy.GetPointer("apiDesc.getMsgList"),
  450. ApiGroup: pointy.GetPointer("msg"),
  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("/msg"),
  459. Description: pointy.GetPointer("apiDesc.getMsgById"),
  460. ApiGroup: pointy.GetPointer("msg"),
  461. Method: pointy.GetPointer("POST"),
  462. })
  463. if err != nil {
  464. return err
  465. }
  466. // Token
  467. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  468. ServiceName: pointy.GetPointer("Wechat"),
  469. Path: pointy.GetPointer("/token/create"),
  470. Description: pointy.GetPointer("apiDesc.createToken"),
  471. ApiGroup: pointy.GetPointer("token"),
  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("/token/update"),
  480. Description: pointy.GetPointer("apiDesc.updateToken"),
  481. ApiGroup: pointy.GetPointer("token"),
  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("/token/delete"),
  490. Description: pointy.GetPointer("apiDesc.deleteToken"),
  491. ApiGroup: pointy.GetPointer("token"),
  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("/token/list"),
  500. Description: pointy.GetPointer("apiDesc.getTokenList"),
  501. ApiGroup: pointy.GetPointer("token"),
  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("/token"),
  510. Description: pointy.GetPointer("apiDesc.getTokenById"),
  511. ApiGroup: pointy.GetPointer("token"),
  512. Method: pointy.GetPointer("POST"),
  513. })
  514. if err != nil {
  515. return err
  516. }
  517. // Tutorial
  518. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  519. ServiceName: pointy.GetPointer("Wechat"),
  520. Path: pointy.GetPointer("/tutorial/create"),
  521. Description: pointy.GetPointer("apiDesc.createTutorial"),
  522. ApiGroup: pointy.GetPointer("tutorial"),
  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("/tutorial/update"),
  531. Description: pointy.GetPointer("apiDesc.updateTutorial"),
  532. ApiGroup: pointy.GetPointer("tutorial"),
  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("/tutorial/delete"),
  541. Description: pointy.GetPointer("apiDesc.deleteTutorial"),
  542. ApiGroup: pointy.GetPointer("tutorial"),
  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("/tutorial/list"),
  551. Description: pointy.GetPointer("apiDesc.getTutorialList"),
  552. ApiGroup: pointy.GetPointer("tutorial"),
  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("/tutorial"),
  561. Description: pointy.GetPointer("apiDesc.getTutorialById"),
  562. ApiGroup: pointy.GetPointer("tutorial"),
  563. Method: pointy.GetPointer("POST"),
  564. })
  565. if err != nil {
  566. return err
  567. }
  568. // WorkExperience
  569. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  570. ServiceName: pointy.GetPointer("Wechat"),
  571. Path: pointy.GetPointer("/work_experience/create"),
  572. Description: pointy.GetPointer("apiDesc.createWorkExperience"),
  573. ApiGroup: pointy.GetPointer("work_experience"),
  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("/work_experience/update"),
  582. Description: pointy.GetPointer("apiDesc.updateWorkExperience"),
  583. ApiGroup: pointy.GetPointer("work_experience"),
  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("/work_experience/delete"),
  592. Description: pointy.GetPointer("apiDesc.deleteWorkExperience"),
  593. ApiGroup: pointy.GetPointer("work_experience"),
  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("/work_experience/list"),
  602. Description: pointy.GetPointer("apiDesc.getWorkExperienceList"),
  603. ApiGroup: pointy.GetPointer("work_experience"),
  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("/work_experience"),
  612. Description: pointy.GetPointer("apiDesc.getWorkExperienceById"),
  613. ApiGroup: pointy.GetPointer("work_experience"),
  614. Method: pointy.GetPointer("POST"),
  615. })
  616. if err != nil {
  617. return err
  618. }
  619. // Employee
  620. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  621. ServiceName: pointy.GetPointer("Wechat"),
  622. Path: pointy.GetPointer("/employee/create"),
  623. Description: pointy.GetPointer("apiDesc.createEmployee"),
  624. ApiGroup: pointy.GetPointer("employee"),
  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("/employee/update"),
  633. Description: pointy.GetPointer("apiDesc.updateEmployee"),
  634. ApiGroup: pointy.GetPointer("employee"),
  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("/employee/delete"),
  643. Description: pointy.GetPointer("apiDesc.deleteEmployee"),
  644. ApiGroup: pointy.GetPointer("employee"),
  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("/employee/list"),
  653. Description: pointy.GetPointer("apiDesc.getEmployeeList"),
  654. ApiGroup: pointy.GetPointer("employee"),
  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("/employee"),
  663. Description: pointy.GetPointer("apiDesc.getEmployeeById"),
  664. ApiGroup: pointy.GetPointer("employee"),
  665. Method: pointy.GetPointer("POST"),
  666. })
  667. if err != nil {
  668. return err
  669. }
  670. // Agent
  671. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  672. ServiceName: pointy.GetPointer("Wechat"),
  673. Path: pointy.GetPointer("/agent/create"),
  674. Description: pointy.GetPointer("apiDesc.createAgent"),
  675. ApiGroup: pointy.GetPointer("agent"),
  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("/agent/update"),
  684. Description: pointy.GetPointer("apiDesc.updateAgent"),
  685. ApiGroup: pointy.GetPointer("agent"),
  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("/agent/delete"),
  694. Description: pointy.GetPointer("apiDesc.deleteAgent"),
  695. ApiGroup: pointy.GetPointer("agent"),
  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("/agent/list"),
  704. Description: pointy.GetPointer("apiDesc.getAgentList"),
  705. ApiGroup: pointy.GetPointer("agent"),
  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("/agent"),
  714. Description: pointy.GetPointer("apiDesc.getAgentById"),
  715. ApiGroup: pointy.GetPointer("agent"),
  716. Method: pointy.GetPointer("POST"),
  717. })
  718. if err != nil {
  719. return err
  720. }
  721. // BatchMsg
  722. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  723. ServiceName: pointy.GetPointer("Wechat"),
  724. Path: pointy.GetPointer("/batch_msg/create"),
  725. Description: pointy.GetPointer("apiDesc.createBatchMsg"),
  726. ApiGroup: pointy.GetPointer("batch_msg"),
  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("/batch_msg/update"),
  735. Description: pointy.GetPointer("apiDesc.updateBatchMsg"),
  736. ApiGroup: pointy.GetPointer("batch_msg"),
  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("/batch_msg/delete"),
  745. Description: pointy.GetPointer("apiDesc.deleteBatchMsg"),
  746. ApiGroup: pointy.GetPointer("batch_msg"),
  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("/batch_msg/list"),
  755. Description: pointy.GetPointer("apiDesc.getBatchMsgList"),
  756. ApiGroup: pointy.GetPointer("batch_msg"),
  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("/batch_msg"),
  765. Description: pointy.GetPointer("apiDesc.getBatchMsgById"),
  766. ApiGroup: pointy.GetPointer("batch_msg"),
  767. Method: pointy.GetPointer("POST"),
  768. })
  769. if err != nil {
  770. return err
  771. }
  772. // MessageRecords
  773. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  774. ServiceName: pointy.GetPointer("Wechat"),
  775. Path: pointy.GetPointer("/message_records/create"),
  776. Description: pointy.GetPointer("apiDesc.createMessageRecords"),
  777. ApiGroup: pointy.GetPointer("message_records"),
  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("/message_records/update"),
  786. Description: pointy.GetPointer("apiDesc.updateMessageRecords"),
  787. ApiGroup: pointy.GetPointer("message_records"),
  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("/message_records/delete"),
  796. Description: pointy.GetPointer("apiDesc.deleteMessageRecords"),
  797. ApiGroup: pointy.GetPointer("message_records"),
  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("/message_records/list"),
  806. Description: pointy.GetPointer("apiDesc.getMessageRecordsList"),
  807. ApiGroup: pointy.GetPointer("message_records"),
  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("/message_records"),
  816. Description: pointy.GetPointer("apiDesc.getMessageRecordsById"),
  817. ApiGroup: pointy.GetPointer("message_records"),
  818. Method: pointy.GetPointer("POST"),
  819. })
  820. if err != nil {
  821. return err
  822. }
  823. // SopNode
  824. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  825. ServiceName: pointy.GetPointer("Wechat"),
  826. Path: pointy.GetPointer("/sop_node/create"),
  827. Description: pointy.GetPointer("apiDesc.createSopNode"),
  828. ApiGroup: pointy.GetPointer("sop_node"),
  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("/sop_node/update"),
  837. Description: pointy.GetPointer("apiDesc.updateSopNode"),
  838. ApiGroup: pointy.GetPointer("sop_node"),
  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("/sop_node/delete"),
  847. Description: pointy.GetPointer("apiDesc.deleteSopNode"),
  848. ApiGroup: pointy.GetPointer("sop_node"),
  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("/sop_node/list"),
  857. Description: pointy.GetPointer("apiDesc.getSopNodeList"),
  858. ApiGroup: pointy.GetPointer("sop_node"),
  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("/sop_node"),
  867. Description: pointy.GetPointer("apiDesc.getSopNodeById"),
  868. ApiGroup: pointy.GetPointer("sop_node"),
  869. Method: pointy.GetPointer("POST"),
  870. })
  871. if err != nil {
  872. return err
  873. }
  874. // SopStage
  875. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  876. ServiceName: pointy.GetPointer("Wechat"),
  877. Path: pointy.GetPointer("/sop_stage/create"),
  878. Description: pointy.GetPointer("apiDesc.createSopStage"),
  879. ApiGroup: pointy.GetPointer("sop_stage"),
  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("/sop_stage/update"),
  888. Description: pointy.GetPointer("apiDesc.updateSopStage"),
  889. ApiGroup: pointy.GetPointer("sop_stage"),
  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("/sop_stage/delete"),
  898. Description: pointy.GetPointer("apiDesc.deleteSopStage"),
  899. ApiGroup: pointy.GetPointer("sop_stage"),
  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("/sop_stage/list"),
  908. Description: pointy.GetPointer("apiDesc.getSopStageList"),
  909. ApiGroup: pointy.GetPointer("sop_stage"),
  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("/sop_stage"),
  918. Description: pointy.GetPointer("apiDesc.getSopStageById"),
  919. ApiGroup: pointy.GetPointer("sop_stage"),
  920. Method: pointy.GetPointer("POST"),
  921. })
  922. if err != nil {
  923. return err
  924. }
  925. // SopTask
  926. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  927. ServiceName: pointy.GetPointer("Wechat"),
  928. Path: pointy.GetPointer("/sop_task/create"),
  929. Description: pointy.GetPointer("apiDesc.createSopTask"),
  930. ApiGroup: pointy.GetPointer("sop_task"),
  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("/sop_task/update"),
  939. Description: pointy.GetPointer("apiDesc.updateSopTask"),
  940. ApiGroup: pointy.GetPointer("sop_task"),
  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("/sop_task/delete"),
  949. Description: pointy.GetPointer("apiDesc.deleteSopTask"),
  950. ApiGroup: pointy.GetPointer("sop_task"),
  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("/sop_task/list"),
  959. Description: pointy.GetPointer("apiDesc.getSopTaskList"),
  960. ApiGroup: pointy.GetPointer("sop_task"),
  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("/sop_task"),
  969. Description: pointy.GetPointer("apiDesc.getSopTaskById"),
  970. ApiGroup: pointy.GetPointer("sop_task"),
  971. Method: pointy.GetPointer("POST"),
  972. })
  973. if err != nil {
  974. return err
  975. }
  976. // LabelRelationship
  977. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  978. ServiceName: pointy.GetPointer("Wechat"),
  979. Path: pointy.GetPointer("/label_relationship/create"),
  980. Description: pointy.GetPointer("apiDesc.createLabelRelationship"),
  981. ApiGroup: pointy.GetPointer("label_relationship"),
  982. Method: pointy.GetPointer("POST"),
  983. })
  984. if err != nil {
  985. return err
  986. }
  987. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  988. ServiceName: pointy.GetPointer("Wechat"),
  989. Path: pointy.GetPointer("/label_relationship/update"),
  990. Description: pointy.GetPointer("apiDesc.updateLabelRelationship"),
  991. ApiGroup: pointy.GetPointer("label_relationship"),
  992. Method: pointy.GetPointer("POST"),
  993. })
  994. if err != nil {
  995. return err
  996. }
  997. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  998. ServiceName: pointy.GetPointer("Wechat"),
  999. Path: pointy.GetPointer("/label_relationship/delete"),
  1000. Description: pointy.GetPointer("apiDesc.deleteLabelRelationship"),
  1001. ApiGroup: pointy.GetPointer("label_relationship"),
  1002. Method: pointy.GetPointer("POST"),
  1003. })
  1004. if err != nil {
  1005. return err
  1006. }
  1007. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1008. ServiceName: pointy.GetPointer("Wechat"),
  1009. Path: pointy.GetPointer("/label_relationship/list"),
  1010. Description: pointy.GetPointer("apiDesc.getLabelRelationshipList"),
  1011. ApiGroup: pointy.GetPointer("label_relationship"),
  1012. Method: pointy.GetPointer("POST"),
  1013. })
  1014. if err != nil {
  1015. return err
  1016. }
  1017. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1018. ServiceName: pointy.GetPointer("Wechat"),
  1019. Path: pointy.GetPointer("/label_relationship"),
  1020. Description: pointy.GetPointer("apiDesc.getLabelRelationshipById"),
  1021. ApiGroup: pointy.GetPointer("label_relationship"),
  1022. Method: pointy.GetPointer("POST"),
  1023. })
  1024. if err != nil {
  1025. return err
  1026. }
  1027. // Label
  1028. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1029. ServiceName: pointy.GetPointer("Wechat"),
  1030. Path: pointy.GetPointer("/label/create"),
  1031. Description: pointy.GetPointer("apiDesc.createLabel"),
  1032. ApiGroup: pointy.GetPointer("label"),
  1033. Method: pointy.GetPointer("POST"),
  1034. })
  1035. if err != nil {
  1036. return err
  1037. }
  1038. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1039. ServiceName: pointy.GetPointer("Wechat"),
  1040. Path: pointy.GetPointer("/label/update"),
  1041. Description: pointy.GetPointer("apiDesc.updateLabel"),
  1042. ApiGroup: pointy.GetPointer("label"),
  1043. Method: pointy.GetPointer("POST"),
  1044. })
  1045. if err != nil {
  1046. return err
  1047. }
  1048. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1049. ServiceName: pointy.GetPointer("Wechat"),
  1050. Path: pointy.GetPointer("/label/delete"),
  1051. Description: pointy.GetPointer("apiDesc.deleteLabel"),
  1052. ApiGroup: pointy.GetPointer("label"),
  1053. Method: pointy.GetPointer("POST"),
  1054. })
  1055. if err != nil {
  1056. return err
  1057. }
  1058. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1059. ServiceName: pointy.GetPointer("Wechat"),
  1060. Path: pointy.GetPointer("/label/list"),
  1061. Description: pointy.GetPointer("apiDesc.getLabelList"),
  1062. ApiGroup: pointy.GetPointer("label"),
  1063. Method: pointy.GetPointer("POST"),
  1064. })
  1065. if err != nil {
  1066. return err
  1067. }
  1068. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1069. ServiceName: pointy.GetPointer("Wechat"),
  1070. Path: pointy.GetPointer("/label"),
  1071. Description: pointy.GetPointer("apiDesc.getLabelById"),
  1072. ApiGroup: pointy.GetPointer("label"),
  1073. Method: pointy.GetPointer("POST"),
  1074. })
  1075. if err != nil {
  1076. return err
  1077. }
  1078. // Contact
  1079. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1080. ServiceName: pointy.GetPointer("Wechat"),
  1081. Path: pointy.GetPointer("/contact/create"),
  1082. Description: pointy.GetPointer("apiDesc.createContact"),
  1083. ApiGroup: pointy.GetPointer("contact"),
  1084. Method: pointy.GetPointer("POST"),
  1085. })
  1086. if err != nil {
  1087. return err
  1088. }
  1089. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1090. ServiceName: pointy.GetPointer("Wechat"),
  1091. Path: pointy.GetPointer("/contact/update"),
  1092. Description: pointy.GetPointer("apiDesc.updateContact"),
  1093. ApiGroup: pointy.GetPointer("contact"),
  1094. Method: pointy.GetPointer("POST"),
  1095. })
  1096. if err != nil {
  1097. return err
  1098. }
  1099. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1100. ServiceName: pointy.GetPointer("Wechat"),
  1101. Path: pointy.GetPointer("/contact/delete"),
  1102. Description: pointy.GetPointer("apiDesc.deleteContact"),
  1103. ApiGroup: pointy.GetPointer("contact"),
  1104. Method: pointy.GetPointer("POST"),
  1105. })
  1106. if err != nil {
  1107. return err
  1108. }
  1109. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1110. ServiceName: pointy.GetPointer("Wechat"),
  1111. Path: pointy.GetPointer("/contact/list"),
  1112. Description: pointy.GetPointer("apiDesc.getContactList"),
  1113. ApiGroup: pointy.GetPointer("contact"),
  1114. Method: pointy.GetPointer("POST"),
  1115. })
  1116. if err != nil {
  1117. return err
  1118. }
  1119. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1120. ServiceName: pointy.GetPointer("Wechat"),
  1121. Path: pointy.GetPointer("/contact"),
  1122. Description: pointy.GetPointer("apiDesc.getContactById"),
  1123. ApiGroup: pointy.GetPointer("contact"),
  1124. Method: pointy.GetPointer("POST"),
  1125. })
  1126. if err != nil {
  1127. return err
  1128. }
  1129. // Wx
  1130. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1131. ServiceName: pointy.GetPointer("Wechat"),
  1132. Path: pointy.GetPointer("/wx/create"),
  1133. Description: pointy.GetPointer("apiDesc.createWx"),
  1134. ApiGroup: pointy.GetPointer("wx"),
  1135. Method: pointy.GetPointer("POST"),
  1136. })
  1137. if err != nil {
  1138. return err
  1139. }
  1140. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1141. ServiceName: pointy.GetPointer("Wechat"),
  1142. Path: pointy.GetPointer("/wx/update"),
  1143. Description: pointy.GetPointer("apiDesc.updateWx"),
  1144. ApiGroup: pointy.GetPointer("wx"),
  1145. Method: pointy.GetPointer("POST"),
  1146. })
  1147. if err != nil {
  1148. return err
  1149. }
  1150. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1151. ServiceName: pointy.GetPointer("Wechat"),
  1152. Path: pointy.GetPointer("/wx/delete"),
  1153. Description: pointy.GetPointer("apiDesc.deleteWx"),
  1154. ApiGroup: pointy.GetPointer("wx"),
  1155. Method: pointy.GetPointer("POST"),
  1156. })
  1157. if err != nil {
  1158. return err
  1159. }
  1160. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1161. ServiceName: pointy.GetPointer("Wechat"),
  1162. Path: pointy.GetPointer("/wx/list"),
  1163. Description: pointy.GetPointer("apiDesc.getWxList"),
  1164. ApiGroup: pointy.GetPointer("wx"),
  1165. Method: pointy.GetPointer("POST"),
  1166. })
  1167. if err != nil {
  1168. return err
  1169. }
  1170. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1171. ServiceName: pointy.GetPointer("Wechat"),
  1172. Path: pointy.GetPointer("/wx"),
  1173. Description: pointy.GetPointer("apiDesc.getWxById"),
  1174. ApiGroup: pointy.GetPointer("wx"),
  1175. Method: pointy.GetPointer("POST"),
  1176. })
  1177. if err != nil {
  1178. return err
  1179. }
  1180. // Server
  1181. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1182. ServiceName: pointy.GetPointer("Wechat"),
  1183. Path: pointy.GetPointer("/server/create"),
  1184. Description: pointy.GetPointer("apiDesc.createServer"),
  1185. ApiGroup: pointy.GetPointer("server"),
  1186. Method: pointy.GetPointer("POST"),
  1187. })
  1188. if err != nil {
  1189. return err
  1190. }
  1191. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1192. ServiceName: pointy.GetPointer("Wechat"),
  1193. Path: pointy.GetPointer("/server/update"),
  1194. Description: pointy.GetPointer("apiDesc.updateServer"),
  1195. ApiGroup: pointy.GetPointer("server"),
  1196. Method: pointy.GetPointer("POST"),
  1197. })
  1198. if err != nil {
  1199. return err
  1200. }
  1201. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1202. ServiceName: pointy.GetPointer("Wechat"),
  1203. Path: pointy.GetPointer("/server/delete"),
  1204. Description: pointy.GetPointer("apiDesc.deleteServer"),
  1205. ApiGroup: pointy.GetPointer("server"),
  1206. Method: pointy.GetPointer("POST"),
  1207. })
  1208. if err != nil {
  1209. return err
  1210. }
  1211. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1212. ServiceName: pointy.GetPointer("Wechat"),
  1213. Path: pointy.GetPointer("/server/list"),
  1214. Description: pointy.GetPointer("apiDesc.getServerList"),
  1215. ApiGroup: pointy.GetPointer("server"),
  1216. Method: pointy.GetPointer("POST"),
  1217. })
  1218. if err != nil {
  1219. return err
  1220. }
  1221. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1222. ServiceName: pointy.GetPointer("Wechat"),
  1223. Path: pointy.GetPointer("/server"),
  1224. Description: pointy.GetPointer("apiDesc.getServerById"),
  1225. ApiGroup: pointy.GetPointer("server"),
  1226. Method: pointy.GetPointer("POST"),
  1227. })
  1228. if err != nil {
  1229. return err
  1230. }
  1231. return err
  1232. }