init_api_data.go 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809
  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. // PayRecharge
  8. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  9. ServiceName: pointy.GetPointer("Wechat"),
  10. Path: pointy.GetPointer("/pay_recharge/create"),
  11. Description: pointy.GetPointer("apiDesc.createPayRecharge"),
  12. ApiGroup: pointy.GetPointer("pay_recharge"),
  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("/pay_recharge/update"),
  21. Description: pointy.GetPointer("apiDesc.updatePayRecharge"),
  22. ApiGroup: pointy.GetPointer("pay_recharge"),
  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("/pay_recharge/delete"),
  31. Description: pointy.GetPointer("apiDesc.deletePayRecharge"),
  32. ApiGroup: pointy.GetPointer("pay_recharge"),
  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("/pay_recharge/list"),
  41. Description: pointy.GetPointer("apiDesc.getPayRechargeList"),
  42. ApiGroup: pointy.GetPointer("pay_recharge"),
  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("/pay_recharge"),
  51. Description: pointy.GetPointer("apiDesc.getPayRechargeById"),
  52. ApiGroup: pointy.GetPointer("pay_recharge"),
  53. Method: pointy.GetPointer("POST"),
  54. })
  55. if err != nil {
  56. return err
  57. }
  58. // CreditUsage
  59. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  60. ServiceName: pointy.GetPointer("Wechat"),
  61. Path: pointy.GetPointer("/credit_usage/create"),
  62. Description: pointy.GetPointer("apiDesc.createCreditUsage"),
  63. ApiGroup: pointy.GetPointer("credit_usage"),
  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("/credit_usage/update"),
  72. Description: pointy.GetPointer("apiDesc.updateCreditUsage"),
  73. ApiGroup: pointy.GetPointer("credit_usage"),
  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("/credit_usage/delete"),
  82. Description: pointy.GetPointer("apiDesc.deleteCreditUsage"),
  83. ApiGroup: pointy.GetPointer("credit_usage"),
  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("/credit_usage/list"),
  92. Description: pointy.GetPointer("apiDesc.getCreditUsageList"),
  93. ApiGroup: pointy.GetPointer("credit_usage"),
  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("/credit_usage"),
  102. Description: pointy.GetPointer("apiDesc.getCreditUsageById"),
  103. ApiGroup: pointy.GetPointer("credit_usage"),
  104. Method: pointy.GetPointer("POST"),
  105. })
  106. if err != nil {
  107. return err
  108. }
  109. // CreditBalance
  110. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  111. ServiceName: pointy.GetPointer("Wechat"),
  112. Path: pointy.GetPointer("/credit_balance/create"),
  113. Description: pointy.GetPointer("apiDesc.createCreditBalance"),
  114. ApiGroup: pointy.GetPointer("credit_balance"),
  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("/credit_balance/update"),
  123. Description: pointy.GetPointer("apiDesc.updateCreditBalance"),
  124. ApiGroup: pointy.GetPointer("credit_balance"),
  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("/credit_balance/delete"),
  133. Description: pointy.GetPointer("apiDesc.deleteCreditBalance"),
  134. ApiGroup: pointy.GetPointer("credit_balance"),
  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("/credit_balance/list"),
  143. Description: pointy.GetPointer("apiDesc.getCreditBalanceList"),
  144. ApiGroup: pointy.GetPointer("credit_balance"),
  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("/credit_balance"),
  153. Description: pointy.GetPointer("apiDesc.getCreditBalanceById"),
  154. ApiGroup: pointy.GetPointer("credit_balance"),
  155. Method: pointy.GetPointer("POST"),
  156. })
  157. if err != nil {
  158. return err
  159. }
  160. // AllocAgent
  161. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  162. ServiceName: pointy.GetPointer("Wechat"),
  163. Path: pointy.GetPointer("/alloc_agent/create"),
  164. Description: pointy.GetPointer("apiDesc.createAllocAgent"),
  165. ApiGroup: pointy.GetPointer("alloc_agent"),
  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("/alloc_agent/update"),
  174. Description: pointy.GetPointer("apiDesc.updateAllocAgent"),
  175. ApiGroup: pointy.GetPointer("alloc_agent"),
  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("/alloc_agent/delete"),
  184. Description: pointy.GetPointer("apiDesc.deleteAllocAgent"),
  185. ApiGroup: pointy.GetPointer("alloc_agent"),
  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("/alloc_agent/list"),
  194. Description: pointy.GetPointer("apiDesc.getAllocAgentList"),
  195. ApiGroup: pointy.GetPointer("alloc_agent"),
  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("/alloc_agent"),
  204. Description: pointy.GetPointer("apiDesc.getAllocAgentById"),
  205. ApiGroup: pointy.GetPointer("alloc_agent"),
  206. Method: pointy.GetPointer("POST"),
  207. })
  208. if err != nil {
  209. return err
  210. }
  211. // AliyunAvatar
  212. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  213. ServiceName: pointy.GetPointer("Wechat"),
  214. Path: pointy.GetPointer("/aliyun_avatar/create"),
  215. Description: pointy.GetPointer("apiDesc.createAliyunAvatar"),
  216. ApiGroup: pointy.GetPointer("aliyun_avatar"),
  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("/aliyun_avatar/update"),
  225. Description: pointy.GetPointer("apiDesc.updateAliyunAvatar"),
  226. ApiGroup: pointy.GetPointer("aliyun_avatar"),
  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("/aliyun_avatar/delete"),
  235. Description: pointy.GetPointer("apiDesc.deleteAliyunAvatar"),
  236. ApiGroup: pointy.GetPointer("aliyun_avatar"),
  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("/aliyun_avatar/list"),
  245. Description: pointy.GetPointer("apiDesc.getAliyunAvatarList"),
  246. ApiGroup: pointy.GetPointer("aliyun_avatar"),
  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("/aliyun_avatar"),
  255. Description: pointy.GetPointer("apiDesc.getAliyunAvatarById"),
  256. ApiGroup: pointy.GetPointer("aliyun_avatar"),
  257. Method: pointy.GetPointer("POST"),
  258. })
  259. if err != nil {
  260. return err
  261. }
  262. // WxCardVisit
  263. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  264. ServiceName: pointy.GetPointer("Wechat"),
  265. Path: pointy.GetPointer("/wx_card_visit/create"),
  266. Description: pointy.GetPointer("apiDesc.createWxCardVisit"),
  267. ApiGroup: pointy.GetPointer("wx_card_visit"),
  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("/wx_card_visit/update"),
  276. Description: pointy.GetPointer("apiDesc.updateWxCardVisit"),
  277. ApiGroup: pointy.GetPointer("wx_card_visit"),
  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("/wx_card_visit/delete"),
  286. Description: pointy.GetPointer("apiDesc.deleteWxCardVisit"),
  287. ApiGroup: pointy.GetPointer("wx_card_visit"),
  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("/wx_card_visit/list"),
  296. Description: pointy.GetPointer("apiDesc.getWxCardVisitList"),
  297. ApiGroup: pointy.GetPointer("wx_card_visit"),
  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("/wx_card_visit"),
  306. Description: pointy.GetPointer("apiDesc.getWxCardVisitById"),
  307. ApiGroup: pointy.GetPointer("wx_card_visit"),
  308. Method: pointy.GetPointer("POST"),
  309. })
  310. if err != nil {
  311. return err
  312. }
  313. // WxCardUser
  314. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  315. ServiceName: pointy.GetPointer("Wechat"),
  316. Path: pointy.GetPointer("/wx_card_user/create"),
  317. Description: pointy.GetPointer("apiDesc.createWxCardUser"),
  318. ApiGroup: pointy.GetPointer("wx_card_user"),
  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("/wx_card_user/update"),
  327. Description: pointy.GetPointer("apiDesc.updateWxCardUser"),
  328. ApiGroup: pointy.GetPointer("wx_card_user"),
  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("/wx_card_user/delete"),
  337. Description: pointy.GetPointer("apiDesc.deleteWxCardUser"),
  338. ApiGroup: pointy.GetPointer("wx_card_user"),
  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("/wx_card_user/list"),
  347. Description: pointy.GetPointer("apiDesc.getWxCardUserList"),
  348. ApiGroup: pointy.GetPointer("wx_card_user"),
  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("/wx_card_user"),
  357. Description: pointy.GetPointer("apiDesc.getWxCardUserById"),
  358. ApiGroup: pointy.GetPointer("wx_card_user"),
  359. Method: pointy.GetPointer("POST"),
  360. })
  361. if err != nil {
  362. return err
  363. }
  364. // WxCard
  365. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  366. ServiceName: pointy.GetPointer("Wechat"),
  367. Path: pointy.GetPointer("/wx_card/create"),
  368. Description: pointy.GetPointer("apiDesc.createWxCard"),
  369. ApiGroup: pointy.GetPointer("wx_card"),
  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("/wx_card/update"),
  378. Description: pointy.GetPointer("apiDesc.updateWxCard"),
  379. ApiGroup: pointy.GetPointer("wx_card"),
  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("/wx_card/delete"),
  388. Description: pointy.GetPointer("apiDesc.deleteWxCard"),
  389. ApiGroup: pointy.GetPointer("wx_card"),
  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("/wx_card/list"),
  398. Description: pointy.GetPointer("apiDesc.getWxCardList"),
  399. ApiGroup: pointy.GetPointer("wx_card"),
  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("/wx_card"),
  408. Description: pointy.GetPointer("apiDesc.getWxCardById"),
  409. ApiGroup: pointy.GetPointer("wx_card"),
  410. Method: pointy.GetPointer("POST"),
  411. })
  412. if err != nil {
  413. return err
  414. }
  415. // ChatSession
  416. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  417. ServiceName: pointy.GetPointer("Wechat"),
  418. Path: pointy.GetPointer("/chat_session/create"),
  419. Description: pointy.GetPointer("apiDesc.createChatSession"),
  420. ApiGroup: pointy.GetPointer("chat_session"),
  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("/chat_session/update"),
  429. Description: pointy.GetPointer("apiDesc.updateChatSession"),
  430. ApiGroup: pointy.GetPointer("chat_session"),
  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("/chat_session/delete"),
  439. Description: pointy.GetPointer("apiDesc.deleteChatSession"),
  440. ApiGroup: pointy.GetPointer("chat_session"),
  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("/chat_session/list"),
  449. Description: pointy.GetPointer("apiDesc.getChatSessionList"),
  450. ApiGroup: pointy.GetPointer("chat_session"),
  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("/chat_session"),
  459. Description: pointy.GetPointer("apiDesc.getChatSessionById"),
  460. ApiGroup: pointy.GetPointer("chat_session"),
  461. Method: pointy.GetPointer("POST"),
  462. })
  463. if err != nil {
  464. return err
  465. }
  466. // ChatRecords
  467. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  468. ServiceName: pointy.GetPointer("Wechat"),
  469. Path: pointy.GetPointer("/chat_records/create"),
  470. Description: pointy.GetPointer("apiDesc.createChatRecords"),
  471. ApiGroup: pointy.GetPointer("chat_records"),
  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("/chat_records/update"),
  480. Description: pointy.GetPointer("apiDesc.updateChatRecords"),
  481. ApiGroup: pointy.GetPointer("chat_records"),
  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("/chat_records/delete"),
  490. Description: pointy.GetPointer("apiDesc.deleteChatRecords"),
  491. ApiGroup: pointy.GetPointer("chat_records"),
  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("/chat_records/list"),
  500. Description: pointy.GetPointer("apiDesc.getChatRecordsList"),
  501. ApiGroup: pointy.GetPointer("chat_records"),
  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("/chat_records"),
  510. Description: pointy.GetPointer("apiDesc.getChatRecordsById"),
  511. ApiGroup: pointy.GetPointer("chat_records"),
  512. Method: pointy.GetPointer("POST"),
  513. })
  514. if err != nil {
  515. return err
  516. }
  517. // AgentBase
  518. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  519. ServiceName: pointy.GetPointer("Wechat"),
  520. Path: pointy.GetPointer("/agent_base/create"),
  521. Description: pointy.GetPointer("apiDesc.createAgentBase"),
  522. ApiGroup: pointy.GetPointer("agent_base"),
  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("/agent_base/update"),
  531. Description: pointy.GetPointer("apiDesc.updateAgentBase"),
  532. ApiGroup: pointy.GetPointer("agent_base"),
  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("/agent_base/delete"),
  541. Description: pointy.GetPointer("apiDesc.deleteAgentBase"),
  542. ApiGroup: pointy.GetPointer("agent_base"),
  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("/agent_base/list"),
  551. Description: pointy.GetPointer("apiDesc.getAgentBaseList"),
  552. ApiGroup: pointy.GetPointer("agent_base"),
  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("/agent_base"),
  561. Description: pointy.GetPointer("apiDesc.getAgentBaseById"),
  562. ApiGroup: pointy.GetPointer("agent_base"),
  563. Method: pointy.GetPointer("POST"),
  564. })
  565. if err != nil {
  566. return err
  567. }
  568. // Category
  569. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  570. ServiceName: pointy.GetPointer("Wechat"),
  571. Path: pointy.GetPointer("/category/create"),
  572. Description: pointy.GetPointer("apiDesc.createCategory"),
  573. ApiGroup: pointy.GetPointer("category"),
  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("/category/update"),
  582. Description: pointy.GetPointer("apiDesc.updateCategory"),
  583. ApiGroup: pointy.GetPointer("category"),
  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("/category/delete"),
  592. Description: pointy.GetPointer("apiDesc.deleteCategory"),
  593. ApiGroup: pointy.GetPointer("category"),
  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("/category/list"),
  602. Description: pointy.GetPointer("apiDesc.getCategoryList"),
  603. ApiGroup: pointy.GetPointer("category"),
  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("/category"),
  612. Description: pointy.GetPointer("apiDesc.getCategoryById"),
  613. ApiGroup: pointy.GetPointer("category"),
  614. Method: pointy.GetPointer("POST"),
  615. })
  616. if err != nil {
  617. return err
  618. }
  619. // EmployeeConfig
  620. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  621. ServiceName: pointy.GetPointer("Wechat"),
  622. Path: pointy.GetPointer("/employee_config/create"),
  623. Description: pointy.GetPointer("apiDesc.createEmployeeConfig"),
  624. ApiGroup: pointy.GetPointer("employee_config"),
  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_config/update"),
  633. Description: pointy.GetPointer("apiDesc.updateEmployeeConfig"),
  634. ApiGroup: pointy.GetPointer("employee_config"),
  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_config/delete"),
  643. Description: pointy.GetPointer("apiDesc.deleteEmployeeConfig"),
  644. ApiGroup: pointy.GetPointer("employee_config"),
  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_config/list"),
  653. Description: pointy.GetPointer("apiDesc.getEmployeeConfigList"),
  654. ApiGroup: pointy.GetPointer("employee_config"),
  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_config"),
  663. Description: pointy.GetPointer("apiDesc.getEmployeeConfigById"),
  664. ApiGroup: pointy.GetPointer("employee_config"),
  665. Method: pointy.GetPointer("POST"),
  666. })
  667. if err != nil {
  668. return err
  669. }
  670. // Msg
  671. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  672. ServiceName: pointy.GetPointer("Wechat"),
  673. Path: pointy.GetPointer("/msg/create"),
  674. Description: pointy.GetPointer("apiDesc.createMsg"),
  675. ApiGroup: pointy.GetPointer("msg"),
  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("/msg/update"),
  684. Description: pointy.GetPointer("apiDesc.updateMsg"),
  685. ApiGroup: pointy.GetPointer("msg"),
  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("/msg/delete"),
  694. Description: pointy.GetPointer("apiDesc.deleteMsg"),
  695. ApiGroup: pointy.GetPointer("msg"),
  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("/msg/list"),
  704. Description: pointy.GetPointer("apiDesc.getMsgList"),
  705. ApiGroup: pointy.GetPointer("msg"),
  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("/msg"),
  714. Description: pointy.GetPointer("apiDesc.getMsgById"),
  715. ApiGroup: pointy.GetPointer("msg"),
  716. Method: pointy.GetPointer("POST"),
  717. })
  718. if err != nil {
  719. return err
  720. }
  721. // Token
  722. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  723. ServiceName: pointy.GetPointer("Wechat"),
  724. Path: pointy.GetPointer("/token/create"),
  725. Description: pointy.GetPointer("apiDesc.createToken"),
  726. ApiGroup: pointy.GetPointer("token"),
  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("/token/update"),
  735. Description: pointy.GetPointer("apiDesc.updateToken"),
  736. ApiGroup: pointy.GetPointer("token"),
  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("/token/delete"),
  745. Description: pointy.GetPointer("apiDesc.deleteToken"),
  746. ApiGroup: pointy.GetPointer("token"),
  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("/token/list"),
  755. Description: pointy.GetPointer("apiDesc.getTokenList"),
  756. ApiGroup: pointy.GetPointer("token"),
  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("/token"),
  765. Description: pointy.GetPointer("apiDesc.getTokenById"),
  766. ApiGroup: pointy.GetPointer("token"),
  767. Method: pointy.GetPointer("POST"),
  768. })
  769. if err != nil {
  770. return err
  771. }
  772. // Tutorial
  773. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  774. ServiceName: pointy.GetPointer("Wechat"),
  775. Path: pointy.GetPointer("/tutorial/create"),
  776. Description: pointy.GetPointer("apiDesc.createTutorial"),
  777. ApiGroup: pointy.GetPointer("tutorial"),
  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("/tutorial/update"),
  786. Description: pointy.GetPointer("apiDesc.updateTutorial"),
  787. ApiGroup: pointy.GetPointer("tutorial"),
  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("/tutorial/delete"),
  796. Description: pointy.GetPointer("apiDesc.deleteTutorial"),
  797. ApiGroup: pointy.GetPointer("tutorial"),
  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("/tutorial/list"),
  806. Description: pointy.GetPointer("apiDesc.getTutorialList"),
  807. ApiGroup: pointy.GetPointer("tutorial"),
  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("/tutorial"),
  816. Description: pointy.GetPointer("apiDesc.getTutorialById"),
  817. ApiGroup: pointy.GetPointer("tutorial"),
  818. Method: pointy.GetPointer("POST"),
  819. })
  820. if err != nil {
  821. return err
  822. }
  823. // WorkExperience
  824. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  825. ServiceName: pointy.GetPointer("Wechat"),
  826. Path: pointy.GetPointer("/work_experience/create"),
  827. Description: pointy.GetPointer("apiDesc.createWorkExperience"),
  828. ApiGroup: pointy.GetPointer("work_experience"),
  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("/work_experience/update"),
  837. Description: pointy.GetPointer("apiDesc.updateWorkExperience"),
  838. ApiGroup: pointy.GetPointer("work_experience"),
  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("/work_experience/delete"),
  847. Description: pointy.GetPointer("apiDesc.deleteWorkExperience"),
  848. ApiGroup: pointy.GetPointer("work_experience"),
  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("/work_experience/list"),
  857. Description: pointy.GetPointer("apiDesc.getWorkExperienceList"),
  858. ApiGroup: pointy.GetPointer("work_experience"),
  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("/work_experience"),
  867. Description: pointy.GetPointer("apiDesc.getWorkExperienceById"),
  868. ApiGroup: pointy.GetPointer("work_experience"),
  869. Method: pointy.GetPointer("POST"),
  870. })
  871. if err != nil {
  872. return err
  873. }
  874. // Employee
  875. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  876. ServiceName: pointy.GetPointer("Wechat"),
  877. Path: pointy.GetPointer("/employee/create"),
  878. Description: pointy.GetPointer("apiDesc.createEmployee"),
  879. ApiGroup: pointy.GetPointer("employee"),
  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("/employee/update"),
  888. Description: pointy.GetPointer("apiDesc.updateEmployee"),
  889. ApiGroup: pointy.GetPointer("employee"),
  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("/employee/delete"),
  898. Description: pointy.GetPointer("apiDesc.deleteEmployee"),
  899. ApiGroup: pointy.GetPointer("employee"),
  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("/employee/list"),
  908. Description: pointy.GetPointer("apiDesc.getEmployeeList"),
  909. ApiGroup: pointy.GetPointer("employee"),
  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("/employee"),
  918. Description: pointy.GetPointer("apiDesc.getEmployeeById"),
  919. ApiGroup: pointy.GetPointer("employee"),
  920. Method: pointy.GetPointer("POST"),
  921. })
  922. if err != nil {
  923. return err
  924. }
  925. // Agent
  926. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  927. ServiceName: pointy.GetPointer("Wechat"),
  928. Path: pointy.GetPointer("/agent/create"),
  929. Description: pointy.GetPointer("apiDesc.createAgent"),
  930. ApiGroup: pointy.GetPointer("agent"),
  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("/agent/update"),
  939. Description: pointy.GetPointer("apiDesc.updateAgent"),
  940. ApiGroup: pointy.GetPointer("agent"),
  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("/agent/delete"),
  949. Description: pointy.GetPointer("apiDesc.deleteAgent"),
  950. ApiGroup: pointy.GetPointer("agent"),
  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("/agent/list"),
  959. Description: pointy.GetPointer("apiDesc.getAgentList"),
  960. ApiGroup: pointy.GetPointer("agent"),
  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("/agent"),
  969. Description: pointy.GetPointer("apiDesc.getAgentById"),
  970. ApiGroup: pointy.GetPointer("agent"),
  971. Method: pointy.GetPointer("POST"),
  972. })
  973. if err != nil {
  974. return err
  975. }
  976. // BatchMsg
  977. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  978. ServiceName: pointy.GetPointer("Wechat"),
  979. Path: pointy.GetPointer("/batch_msg/create"),
  980. Description: pointy.GetPointer("apiDesc.createBatchMsg"),
  981. ApiGroup: pointy.GetPointer("batch_msg"),
  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("/batch_msg/update"),
  990. Description: pointy.GetPointer("apiDesc.updateBatchMsg"),
  991. ApiGroup: pointy.GetPointer("batch_msg"),
  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("/batch_msg/delete"),
  1000. Description: pointy.GetPointer("apiDesc.deleteBatchMsg"),
  1001. ApiGroup: pointy.GetPointer("batch_msg"),
  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("/batch_msg/list"),
  1010. Description: pointy.GetPointer("apiDesc.getBatchMsgList"),
  1011. ApiGroup: pointy.GetPointer("batch_msg"),
  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("/batch_msg"),
  1020. Description: pointy.GetPointer("apiDesc.getBatchMsgById"),
  1021. ApiGroup: pointy.GetPointer("batch_msg"),
  1022. Method: pointy.GetPointer("POST"),
  1023. })
  1024. if err != nil {
  1025. return err
  1026. }
  1027. // MessageRecords
  1028. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1029. ServiceName: pointy.GetPointer("Wechat"),
  1030. Path: pointy.GetPointer("/message_records/create"),
  1031. Description: pointy.GetPointer("apiDesc.createMessageRecords"),
  1032. ApiGroup: pointy.GetPointer("message_records"),
  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("/message_records/update"),
  1041. Description: pointy.GetPointer("apiDesc.updateMessageRecords"),
  1042. ApiGroup: pointy.GetPointer("message_records"),
  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("/message_records/delete"),
  1051. Description: pointy.GetPointer("apiDesc.deleteMessageRecords"),
  1052. ApiGroup: pointy.GetPointer("message_records"),
  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("/message_records/list"),
  1061. Description: pointy.GetPointer("apiDesc.getMessageRecordsList"),
  1062. ApiGroup: pointy.GetPointer("message_records"),
  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("/message_records"),
  1071. Description: pointy.GetPointer("apiDesc.getMessageRecordsById"),
  1072. ApiGroup: pointy.GetPointer("message_records"),
  1073. Method: pointy.GetPointer("POST"),
  1074. })
  1075. if err != nil {
  1076. return err
  1077. }
  1078. // SopNode
  1079. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1080. ServiceName: pointy.GetPointer("Wechat"),
  1081. Path: pointy.GetPointer("/sop_node/create"),
  1082. Description: pointy.GetPointer("apiDesc.createSopNode"),
  1083. ApiGroup: pointy.GetPointer("sop_node"),
  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("/sop_node/update"),
  1092. Description: pointy.GetPointer("apiDesc.updateSopNode"),
  1093. ApiGroup: pointy.GetPointer("sop_node"),
  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("/sop_node/delete"),
  1102. Description: pointy.GetPointer("apiDesc.deleteSopNode"),
  1103. ApiGroup: pointy.GetPointer("sop_node"),
  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("/sop_node/list"),
  1112. Description: pointy.GetPointer("apiDesc.getSopNodeList"),
  1113. ApiGroup: pointy.GetPointer("sop_node"),
  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("/sop_node"),
  1122. Description: pointy.GetPointer("apiDesc.getSopNodeById"),
  1123. ApiGroup: pointy.GetPointer("sop_node"),
  1124. Method: pointy.GetPointer("POST"),
  1125. })
  1126. if err != nil {
  1127. return err
  1128. }
  1129. // SopStage
  1130. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1131. ServiceName: pointy.GetPointer("Wechat"),
  1132. Path: pointy.GetPointer("/sop_stage/create"),
  1133. Description: pointy.GetPointer("apiDesc.createSopStage"),
  1134. ApiGroup: pointy.GetPointer("sop_stage"),
  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("/sop_stage/update"),
  1143. Description: pointy.GetPointer("apiDesc.updateSopStage"),
  1144. ApiGroup: pointy.GetPointer("sop_stage"),
  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("/sop_stage/delete"),
  1153. Description: pointy.GetPointer("apiDesc.deleteSopStage"),
  1154. ApiGroup: pointy.GetPointer("sop_stage"),
  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("/sop_stage/list"),
  1163. Description: pointy.GetPointer("apiDesc.getSopStageList"),
  1164. ApiGroup: pointy.GetPointer("sop_stage"),
  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("/sop_stage"),
  1173. Description: pointy.GetPointer("apiDesc.getSopStageById"),
  1174. ApiGroup: pointy.GetPointer("sop_stage"),
  1175. Method: pointy.GetPointer("POST"),
  1176. })
  1177. if err != nil {
  1178. return err
  1179. }
  1180. // SopTask
  1181. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1182. ServiceName: pointy.GetPointer("Wechat"),
  1183. Path: pointy.GetPointer("/sop_task/create"),
  1184. Description: pointy.GetPointer("apiDesc.createSopTask"),
  1185. ApiGroup: pointy.GetPointer("sop_task"),
  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("/sop_task/update"),
  1194. Description: pointy.GetPointer("apiDesc.updateSopTask"),
  1195. ApiGroup: pointy.GetPointer("sop_task"),
  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("/sop_task/delete"),
  1204. Description: pointy.GetPointer("apiDesc.deleteSopTask"),
  1205. ApiGroup: pointy.GetPointer("sop_task"),
  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("/sop_task/list"),
  1214. Description: pointy.GetPointer("apiDesc.getSopTaskList"),
  1215. ApiGroup: pointy.GetPointer("sop_task"),
  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("/sop_task"),
  1224. Description: pointy.GetPointer("apiDesc.getSopTaskById"),
  1225. ApiGroup: pointy.GetPointer("sop_task"),
  1226. Method: pointy.GetPointer("POST"),
  1227. })
  1228. if err != nil {
  1229. return err
  1230. }
  1231. // LabelRelationship
  1232. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1233. ServiceName: pointy.GetPointer("Wechat"),
  1234. Path: pointy.GetPointer("/label_relationship/create"),
  1235. Description: pointy.GetPointer("apiDesc.createLabelRelationship"),
  1236. ApiGroup: pointy.GetPointer("label_relationship"),
  1237. Method: pointy.GetPointer("POST"),
  1238. })
  1239. if err != nil {
  1240. return err
  1241. }
  1242. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1243. ServiceName: pointy.GetPointer("Wechat"),
  1244. Path: pointy.GetPointer("/label_relationship/update"),
  1245. Description: pointy.GetPointer("apiDesc.updateLabelRelationship"),
  1246. ApiGroup: pointy.GetPointer("label_relationship"),
  1247. Method: pointy.GetPointer("POST"),
  1248. })
  1249. if err != nil {
  1250. return err
  1251. }
  1252. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1253. ServiceName: pointy.GetPointer("Wechat"),
  1254. Path: pointy.GetPointer("/label_relationship/delete"),
  1255. Description: pointy.GetPointer("apiDesc.deleteLabelRelationship"),
  1256. ApiGroup: pointy.GetPointer("label_relationship"),
  1257. Method: pointy.GetPointer("POST"),
  1258. })
  1259. if err != nil {
  1260. return err
  1261. }
  1262. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1263. ServiceName: pointy.GetPointer("Wechat"),
  1264. Path: pointy.GetPointer("/label_relationship/list"),
  1265. Description: pointy.GetPointer("apiDesc.getLabelRelationshipList"),
  1266. ApiGroup: pointy.GetPointer("label_relationship"),
  1267. Method: pointy.GetPointer("POST"),
  1268. })
  1269. if err != nil {
  1270. return err
  1271. }
  1272. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1273. ServiceName: pointy.GetPointer("Wechat"),
  1274. Path: pointy.GetPointer("/label_relationship"),
  1275. Description: pointy.GetPointer("apiDesc.getLabelRelationshipById"),
  1276. ApiGroup: pointy.GetPointer("label_relationship"),
  1277. Method: pointy.GetPointer("POST"),
  1278. })
  1279. if err != nil {
  1280. return err
  1281. }
  1282. // Label
  1283. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1284. ServiceName: pointy.GetPointer("Wechat"),
  1285. Path: pointy.GetPointer("/label/create"),
  1286. Description: pointy.GetPointer("apiDesc.createLabel"),
  1287. ApiGroup: pointy.GetPointer("label"),
  1288. Method: pointy.GetPointer("POST"),
  1289. })
  1290. if err != nil {
  1291. return err
  1292. }
  1293. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1294. ServiceName: pointy.GetPointer("Wechat"),
  1295. Path: pointy.GetPointer("/label/update"),
  1296. Description: pointy.GetPointer("apiDesc.updateLabel"),
  1297. ApiGroup: pointy.GetPointer("label"),
  1298. Method: pointy.GetPointer("POST"),
  1299. })
  1300. if err != nil {
  1301. return err
  1302. }
  1303. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1304. ServiceName: pointy.GetPointer("Wechat"),
  1305. Path: pointy.GetPointer("/label/delete"),
  1306. Description: pointy.GetPointer("apiDesc.deleteLabel"),
  1307. ApiGroup: pointy.GetPointer("label"),
  1308. Method: pointy.GetPointer("POST"),
  1309. })
  1310. if err != nil {
  1311. return err
  1312. }
  1313. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1314. ServiceName: pointy.GetPointer("Wechat"),
  1315. Path: pointy.GetPointer("/label/list"),
  1316. Description: pointy.GetPointer("apiDesc.getLabelList"),
  1317. ApiGroup: pointy.GetPointer("label"),
  1318. Method: pointy.GetPointer("POST"),
  1319. })
  1320. if err != nil {
  1321. return err
  1322. }
  1323. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1324. ServiceName: pointy.GetPointer("Wechat"),
  1325. Path: pointy.GetPointer("/label"),
  1326. Description: pointy.GetPointer("apiDesc.getLabelById"),
  1327. ApiGroup: pointy.GetPointer("label"),
  1328. Method: pointy.GetPointer("POST"),
  1329. })
  1330. if err != nil {
  1331. return err
  1332. }
  1333. // Contact
  1334. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1335. ServiceName: pointy.GetPointer("Wechat"),
  1336. Path: pointy.GetPointer("/contact/create"),
  1337. Description: pointy.GetPointer("apiDesc.createContact"),
  1338. ApiGroup: pointy.GetPointer("contact"),
  1339. Method: pointy.GetPointer("POST"),
  1340. })
  1341. if err != nil {
  1342. return err
  1343. }
  1344. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1345. ServiceName: pointy.GetPointer("Wechat"),
  1346. Path: pointy.GetPointer("/contact/update"),
  1347. Description: pointy.GetPointer("apiDesc.updateContact"),
  1348. ApiGroup: pointy.GetPointer("contact"),
  1349. Method: pointy.GetPointer("POST"),
  1350. })
  1351. if err != nil {
  1352. return err
  1353. }
  1354. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1355. ServiceName: pointy.GetPointer("Wechat"),
  1356. Path: pointy.GetPointer("/contact/delete"),
  1357. Description: pointy.GetPointer("apiDesc.deleteContact"),
  1358. ApiGroup: pointy.GetPointer("contact"),
  1359. Method: pointy.GetPointer("POST"),
  1360. })
  1361. if err != nil {
  1362. return err
  1363. }
  1364. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1365. ServiceName: pointy.GetPointer("Wechat"),
  1366. Path: pointy.GetPointer("/contact/list"),
  1367. Description: pointy.GetPointer("apiDesc.getContactList"),
  1368. ApiGroup: pointy.GetPointer("contact"),
  1369. Method: pointy.GetPointer("POST"),
  1370. })
  1371. if err != nil {
  1372. return err
  1373. }
  1374. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1375. ServiceName: pointy.GetPointer("Wechat"),
  1376. Path: pointy.GetPointer("/contact"),
  1377. Description: pointy.GetPointer("apiDesc.getContactById"),
  1378. ApiGroup: pointy.GetPointer("contact"),
  1379. Method: pointy.GetPointer("POST"),
  1380. })
  1381. if err != nil {
  1382. return err
  1383. }
  1384. // Wx
  1385. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1386. ServiceName: pointy.GetPointer("Wechat"),
  1387. Path: pointy.GetPointer("/wx/create"),
  1388. Description: pointy.GetPointer("apiDesc.createWx"),
  1389. ApiGroup: pointy.GetPointer("wx"),
  1390. Method: pointy.GetPointer("POST"),
  1391. })
  1392. if err != nil {
  1393. return err
  1394. }
  1395. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1396. ServiceName: pointy.GetPointer("Wechat"),
  1397. Path: pointy.GetPointer("/wx/update"),
  1398. Description: pointy.GetPointer("apiDesc.updateWx"),
  1399. ApiGroup: pointy.GetPointer("wx"),
  1400. Method: pointy.GetPointer("POST"),
  1401. })
  1402. if err != nil {
  1403. return err
  1404. }
  1405. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1406. ServiceName: pointy.GetPointer("Wechat"),
  1407. Path: pointy.GetPointer("/wx/delete"),
  1408. Description: pointy.GetPointer("apiDesc.deleteWx"),
  1409. ApiGroup: pointy.GetPointer("wx"),
  1410. Method: pointy.GetPointer("POST"),
  1411. })
  1412. if err != nil {
  1413. return err
  1414. }
  1415. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1416. ServiceName: pointy.GetPointer("Wechat"),
  1417. Path: pointy.GetPointer("/wx/list"),
  1418. Description: pointy.GetPointer("apiDesc.getWxList"),
  1419. ApiGroup: pointy.GetPointer("wx"),
  1420. Method: pointy.GetPointer("POST"),
  1421. })
  1422. if err != nil {
  1423. return err
  1424. }
  1425. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1426. ServiceName: pointy.GetPointer("Wechat"),
  1427. Path: pointy.GetPointer("/wx"),
  1428. Description: pointy.GetPointer("apiDesc.getWxById"),
  1429. ApiGroup: pointy.GetPointer("wx"),
  1430. Method: pointy.GetPointer("POST"),
  1431. })
  1432. if err != nil {
  1433. return err
  1434. }
  1435. // Server
  1436. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1437. ServiceName: pointy.GetPointer("Wechat"),
  1438. Path: pointy.GetPointer("/server/create"),
  1439. Description: pointy.GetPointer("apiDesc.createServer"),
  1440. ApiGroup: pointy.GetPointer("server"),
  1441. Method: pointy.GetPointer("POST"),
  1442. })
  1443. if err != nil {
  1444. return err
  1445. }
  1446. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1447. ServiceName: pointy.GetPointer("Wechat"),
  1448. Path: pointy.GetPointer("/server/update"),
  1449. Description: pointy.GetPointer("apiDesc.updateServer"),
  1450. ApiGroup: pointy.GetPointer("server"),
  1451. Method: pointy.GetPointer("POST"),
  1452. })
  1453. if err != nil {
  1454. return err
  1455. }
  1456. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1457. ServiceName: pointy.GetPointer("Wechat"),
  1458. Path: pointy.GetPointer("/server/delete"),
  1459. Description: pointy.GetPointer("apiDesc.deleteServer"),
  1460. ApiGroup: pointy.GetPointer("server"),
  1461. Method: pointy.GetPointer("POST"),
  1462. })
  1463. if err != nil {
  1464. return err
  1465. }
  1466. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1467. ServiceName: pointy.GetPointer("Wechat"),
  1468. Path: pointy.GetPointer("/server/list"),
  1469. Description: pointy.GetPointer("apiDesc.getServerList"),
  1470. ApiGroup: pointy.GetPointer("server"),
  1471. Method: pointy.GetPointer("POST"),
  1472. })
  1473. if err != nil {
  1474. return err
  1475. }
  1476. _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
  1477. ServiceName: pointy.GetPointer("Wechat"),
  1478. Path: pointy.GetPointer("/server"),
  1479. Description: pointy.GetPointer("apiDesc.getServerById"),
  1480. ApiGroup: pointy.GetPointer("server"),
  1481. Method: pointy.GetPointer("POST"),
  1482. })
  1483. if err != nil {
  1484. return err
  1485. }
  1486. return err
  1487. }