|
@@ -6,6 +6,68 @@ import (
|
|
|
)
|
|
|
|
|
|
func (l *InitDatabaseLogic) insertApiData() (err error) {
|
|
|
+ // Msg
|
|
|
+
|
|
|
+ _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
|
|
|
+ ServiceName: pointy.GetPointer("Wechat"),
|
|
|
+ Path: pointy.GetPointer("/msg/create"),
|
|
|
+ Description: pointy.GetPointer("apiDesc.createMsg"),
|
|
|
+ ApiGroup: pointy.GetPointer("msg"),
|
|
|
+ Method: pointy.GetPointer("POST"),
|
|
|
+ })
|
|
|
+
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+
|
|
|
+ _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
|
|
|
+ ServiceName: pointy.GetPointer("Wechat"),
|
|
|
+ Path: pointy.GetPointer("/msg/update"),
|
|
|
+ Description: pointy.GetPointer("apiDesc.updateMsg"),
|
|
|
+ ApiGroup: pointy.GetPointer("msg"),
|
|
|
+ Method: pointy.GetPointer("POST"),
|
|
|
+ })
|
|
|
+
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+
|
|
|
+ _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
|
|
|
+ ServiceName: pointy.GetPointer("Wechat"),
|
|
|
+ Path: pointy.GetPointer("/msg/delete"),
|
|
|
+ Description: pointy.GetPointer("apiDesc.deleteMsg"),
|
|
|
+ ApiGroup: pointy.GetPointer("msg"),
|
|
|
+ Method: pointy.GetPointer("POST"),
|
|
|
+ })
|
|
|
+
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+
|
|
|
+ _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
|
|
|
+ ServiceName: pointy.GetPointer("Wechat"),
|
|
|
+ Path: pointy.GetPointer("/msg/list"),
|
|
|
+ Description: pointy.GetPointer("apiDesc.getMsgList"),
|
|
|
+ ApiGroup: pointy.GetPointer("msg"),
|
|
|
+ Method: pointy.GetPointer("POST"),
|
|
|
+ })
|
|
|
+
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+
|
|
|
+ _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
|
|
|
+ ServiceName: pointy.GetPointer("Wechat"),
|
|
|
+ Path: pointy.GetPointer("/msg"),
|
|
|
+ Description: pointy.GetPointer("apiDesc.getMsgById"),
|
|
|
+ ApiGroup: pointy.GetPointer("msg"),
|
|
|
+ Method: pointy.GetPointer("POST"),
|
|
|
+ })
|
|
|
+
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+
|
|
|
// Token
|
|
|
|
|
|
_, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
|