From 4bbed3156cd313303c192bcca40ca2d63aa39d06 Mon Sep 17 00:00:00 2001 From: yanweidong Date: Sun, 9 Aug 2026 15:10:19 +0800 Subject: [PATCH] refactor: centralize protobuf and remove go-zero --- .gitignore | 1 + README.md | 14 +- cmd/go.mod | 111 +- cmd/go.sum | 325 +- go.work | 2 + go.work.sum | 717 +++- module/base/ads/go.mod | 1 - module/base/ads/go.sum | 2 - module/base/ads/internal/models/ads_item.go | 2 +- module/base/ads/internal/models/ads_pos.go | 2 +- .../base/ads/internal/server/fetch_server.go | 2 +- module/base/ads/internal/server/new.go | 2 +- module/base/ads/pb/ads.pb.go | 70 +- module/base/ads/pb/ads.pb.gw.go | 2 +- module/base/ads/pb/ads_grpc.pb.go | 24 +- module/base/ads/proto/ads.proto | 2 +- module/base/cloud/go.mod | 1 - module/base/cloud/go.sum | 2 - .../internal/logic/album/create_album.go | 2 +- .../internal/logic/album/upload_photo.go | 2 +- .../logic/bookmark/create_bookmark.go | 2 +- .../logic/bookmark/import_bookmarks.go | 2 +- .../cloud/internal/logic/disk/copy_file.go | 2 +- .../cloud/internal/logic/disk/create_dir.go | 2 +- .../cloud/internal/logic/disk/upload_file.go | 2 +- .../cloud/internal/logic/note/create_note.go | 2 +- .../logic/private/create_private_data.go | 2 +- .../internal/logic/share/create_share.go | 2 +- module/base/cloud/internal/logic/space/get.go | 2 +- .../base/cloud/internal/models/cloud_album.go | 2 +- .../cloud/internal/models/cloud_bookmark.go | 2 +- .../cloud/internal/models/cloud_disk_dir.go | 2 +- .../cloud/internal/models/cloud_disk_file.go | 2 +- .../base/cloud/internal/models/cloud_note.go | 2 +- .../base/cloud/internal/models/cloud_photo.go | 2 +- .../cloud/internal/models/cloud_private.go | 2 +- .../base/cloud/internal/models/cloud_share.go | 2 +- .../base/cloud/internal/models/cloud_space.go | 2 +- .../cloud/internal/server/album_server.go | 2 +- .../cloud/internal/server/bookmark_server.go | 2 +- .../base/cloud/internal/server/disk_server.go | 2 +- module/base/cloud/internal/server/new.go | 2 +- .../base/cloud/internal/server/note_server.go | 2 +- .../cloud/internal/server/private_server.go | 2 +- .../cloud/internal/server/share_server.go | 2 +- .../cloud/internal/server/space_server.go | 2 +- module/base/cloud/pb/album.pb.go | 170 +- module/base/cloud/pb/album.pb.gw.go | 27 +- module/base/cloud/pb/album_grpc.pb.go | 179 +- module/base/cloud/pb/blocks.pb.go | 605 --- module/base/cloud/pb/blocks_compat.go | 13 + module/base/cloud/pb/bookmark.pb.go | 112 +- module/base/cloud/pb/bookmark.pb.gw.go | 15 +- module/base/cloud/pb/bookmark_grpc.pb.go | 99 +- module/base/cloud/pb/disk.pb.go | 199 +- module/base/cloud/pb/disk.pb.gw.go | 35 +- module/base/cloud/pb/disk_grpc.pb.go | 219 +- module/base/cloud/pb/note.pb.go | 149 +- module/base/cloud/pb/note.pb.gw.go | 27 +- module/base/cloud/pb/note_grpc.pb.go | 157 +- module/base/cloud/pb/private.pb.go | 124 +- module/base/cloud/pb/private.pb.gw.go | 23 +- module/base/cloud/pb/private_grpc.pb.go | 139 +- module/base/cloud/pb/share.pb.go | 108 +- module/base/cloud/pb/share.pb.gw.go | 15 +- module/base/cloud/pb/share_grpc.pb.go | 87 +- module/base/cloud/pb/space.pb.go | 102 +- module/base/cloud/pb/space.pb.gw.go | 11 +- module/base/cloud/pb/space_grpc.pb.go | 47 +- module/base/cloud/proto/album.proto | 32 +- module/base/cloud/proto/blocks.proto | 58 - module/base/cloud/proto/bookmark.proto | 16 +- module/base/cloud/proto/disk.proto | 38 +- module/base/cloud/proto/note.proto | 26 +- module/base/cloud/proto/private.proto | 22 +- module/base/cloud/proto/share.proto | 14 +- module/base/cloud/proto/space.proto | 24 +- module/base/cms/Makefile | 251 -- module/base/cms/pb/blocks.pb.go | 750 ---- module/base/cms/pb/blocks_compat.go | 13 + module/base/cms/pb/category.pb.go | 196 +- module/base/cms/pb/category.pb.gw.go | 11 +- module/base/cms/pb/category_grpc.pb.go | 63 +- module/base/cms/pb/pages.pb.go | 168 +- module/base/cms/pb/pages.pb.gw.go | 7 +- module/base/cms/pb/pages_grpc.pb.go | 51 +- module/base/cms/pb/post.pb.go | 319 +- module/base/cms/pb/post.pb.gw.go | 11 +- module/base/cms/pb/post_grpc.pb.go | 173 +- module/base/cms/pb/site.pb.go | 100 +- module/base/cms/pb/site.pb.gw.go | 15 +- module/base/cms/pb/site_grpc.pb.go | 75 +- module/base/cms/pb/tags.pb.go | 105 +- module/base/cms/pb/tags.pb.gw.go | 19 +- module/base/cms/pb/tags_grpc.pb.go | 71 +- module/base/cms/proto/blocks.proto | 73 - module/base/cms/proto/category.proto | 18 +- module/base/cms/proto/pages.proto | 14 +- module/base/cms/proto/post.proto | 40 +- module/base/cms/proto/site.proto | 14 +- module/base/cms/proto/tags.proto | 14 +- module/base/feedback/go.mod | 1 - module/base/feedback/go.sum | 2 - .../feedback/internal/logic/method/delete.go | 4 +- .../feedback/internal/logic/method/get.go | 6 +- .../feedback/internal/logic/method/modify.go | 4 +- .../feedback/internal/logic/method/remark.go | 4 +- .../feedback/internal/server/method_server.go | 2 +- module/base/feedback/internal/server/new.go | 2 +- module/base/feedback/pb/feedback.pb.go | 137 +- module/base/feedback/pb/feedback.pb.gw.go | 2 +- module/base/feedback/pb/feedback_grpc.pb.go | 30 +- module/base/feedback/proto/feedback.proto | 14 +- module/base/fts/CHANGELOG.md | 70 - module/base/fts/Dockerfile | 59 - module/base/fts/Makefile | 167 - module/base/fts/docker-compose.yml | 95 - module/base/fts/internal/logic/fetch.go | 1 - module/base/initial/CHANGELOG.md | 166 - module/base/initial/Dockerfile | 73 - module/base/initial/Makefile | 211 -- module/base/initial/docker-compose.yml | 101 - module/base/initial/pb/check.pb.go | 94 +- module/base/initial/pb/check.pb.gw.go | 2 +- module/base/initial/pb/check_grpc.pb.go | 24 +- module/base/initial/pb/data.pb.go | 101 +- module/base/initial/pb/data.pb.gw.go | 2 +- module/base/initial/pb/data_grpc.pb.go | 24 +- module/base/initial/proto/check.proto | 10 +- module/base/initial/proto/data.proto | 12 +- module/base/passport/CHANGELOG.md | 237 -- module/base/passport/Dockerfile | 73 - module/base/passport/Makefile | 261 -- module/base/passport/docker-compose.yml | 180 - module/base/passport/pb/account.pb.go | 147 +- module/base/passport/pb/account.pb.gw.go | 11 +- module/base/passport/pb/account_grpc.pb.go | 73 +- module/base/passport/pb/blocks.pb.go | 493 --- module/base/passport/pb/blocks_compat.go | 11 + module/base/passport/pb/forget.pb.go | 81 +- module/base/passport/pb/forget.pb.gw.go | 2 +- module/base/passport/pb/forget_grpc.pb.go | 37 +- module/base/passport/pb/login.pb.go | 93 +- module/base/passport/pb/login.pb.gw.go | 2 +- module/base/passport/pb/login_grpc.pb.go | 16 +- module/base/passport/pb/register.pb.go | 85 +- module/base/passport/pb/register.pb.gw.go | 2 +- module/base/passport/pb/register_grpc.pb.go | 16 +- module/base/passport/pb/verify.pb.go | 101 +- module/base/passport/pb/verify.pb.gw.go | 2 +- module/base/passport/pb/verify_grpc.pb.go | 37 +- module/base/passport/proto/account.proto | 18 +- module/base/passport/proto/blocks.proto | 43 - module/base/passport/proto/forget.proto | 8 +- module/base/passport/proto/login.proto | 14 +- module/base/passport/proto/register.proto | 10 +- module/base/passport/proto/verify.proto | 8 +- module/base/sender/CHANGELOG.md | 57 - module/base/sender/Dockerfile | 73 - module/base/sender/Makefile | 215 -- module/base/sender/docker-compose.yml | 114 - module/base/sender/pb/mail.pb.go | 66 +- module/base/sender/pb/mail.pb.gw.go | 2 +- module/base/sender/pb/mail_grpc.pb.go | 20 +- module/base/sender/pb/push_xiaomi.pb.go | 553 --- module/base/sender/pb/push_xiaomi_grpc.pb.go | 284 -- module/base/sender/pb/sms.pb.go | 71 +- module/base/sender/pb/sms.pb.gw.go | 2 +- module/base/sender/pb/sms_grpc.pb.go | 22 +- module/base/sender/proto/mail.proto | 2 +- module/base/sender/proto/sms.proto | 2 +- module/ec/address/pb/address.pb.go | 100 +- module/ec/address/pb/address.pb.gw.go | 17 +- module/ec/address/pb/address_grpc.pb.go | 28 +- module/ec/address/proto/address.proto | 4 +- module/ec/delivery/cmd/main.go | 49 +- module/ec/delivery/external/client/car/car.go | 6 +- .../delivery/external/client/member/member.go | 6 +- .../ec/delivery/external/client/team/team.go | 6 +- .../external/pb/delivery/blocks_compat.go | 10 + .../delivery/external/pb/delivery/car.pb.go | 271 ++ .../external/pb/delivery/car.pb.gw.go | 422 +++ .../external/pb/delivery/car_grpc.pb.go | 286 ++ .../external/pb/delivery/delivery.pb.go | 1199 ------ .../external/pb/delivery/delivery_grpc.pb.go | 763 ---- .../external/pb/delivery/member.pb.go | 255 ++ .../external/pb/delivery/member.pb.gw.go | 422 +++ .../external/pb/delivery/member_grpc.pb.go | 286 ++ .../delivery/external/pb/delivery/team.pb.go | 253 ++ .../external/pb/delivery/team.pb.gw.go} | 197 +- .../external/pb/delivery/team_grpc.pb.go | 286 ++ module/ec/delivery/go.mod | 124 +- module/ec/delivery/go.sum | 409 +- module/ec/delivery/internal/config/config.go | 54 +- module/ec/delivery/internal/impl/cache.go | 32 - module/ec/delivery/internal/impl/impl.go | 34 +- module/ec/delivery/internal/impl/model.go | 21 +- module/ec/delivery/internal/impl/mq.go | 24 - .../internal/logic/car/car_add_logic.go | 30 +- .../internal/logic/car/car_del_logic.go | 16 +- .../internal/logic/car/car_get_logic.go | 18 +- .../internal/logic/car/car_list_logic.go | 16 +- .../internal/logic/car/car_set_logic.go | 30 +- .../internal/logic/member/member_add_logic.go | 26 +- .../internal/logic/member/member_del_logic.go | 16 +- .../internal/logic/member/member_get_logic.go | 18 +- .../logic/member/member_list_logic.go | 16 +- .../internal/logic/member/member_set_logic.go | 26 +- .../internal/logic/team/team_add_logic.go | 26 +- .../internal/logic/team/team_del_logic.go | 16 +- .../internal/logic/team/team_get_logic.go | 18 +- .../internal/logic/team/team_list_logic.go | 16 +- .../internal/logic/team/team_set_logic.go | 26 +- module/ec/delivery/internal/models/impl.go | 11 +- module/ec/delivery/proto/blocks.proto | 35 - module/ec/delivery/proto/car.proto | 26 +- module/ec/delivery/proto/member.proto | 24 +- module/ec/delivery/proto/team.proto | 18 +- module/ec/delivery/test/rpc/basic.go | 2 +- module/ec/mall/pb/ads.pb.go | 104 +- module/ec/mall/pb/ads.pb.gw.go | 11 +- module/ec/mall/pb/ads_grpc.pb.go | 79 +- module/ec/mall/pb/blocks.pb.go | 518 --- module/ec/mall/pb/blocks_compat.go | 11 + module/ec/mall/pb/category.pb.go | 98 +- module/ec/mall/pb/category.pb.gw.go | 7 +- module/ec/mall/pb/category_grpc.pb.go | 77 +- module/ec/mall/pb/freight.pb.go | 150 +- module/ec/mall/pb/freight.pb.gw.go | 23 +- module/ec/mall/pb/freight_grpc.pb.go | 141 +- module/ec/mall/pb/notice.pb.go | 96 +- module/ec/mall/pb/notice.pb.gw.go | 11 +- module/ec/mall/pb/notice_grpc.pb.go | 73 +- module/ec/mall/pb/product.pb.go | 321 +- module/ec/mall/pb/product.pb.gw.go | 43 +- module/ec/mall/pb/product_grpc.pb.go | 279 +- module/ec/mall/pb/staff.pb.go | 128 +- module/ec/mall/pb/staff.pb.gw.go | 15 +- module/ec/mall/pb/staff_grpc.pb.go | 101 +- module/ec/mall/pb/store.pb.go | 166 +- module/ec/mall/pb/store.pb.gw.go | 15 +- module/ec/mall/pb/store_grpc.pb.go | 125 +- module/ec/mall/proto/ads.proto | 12 +- module/ec/mall/proto/blocks.proto | 46 - module/ec/mall/proto/category.proto | 10 +- module/ec/mall/proto/freight.proto | 22 +- module/ec/mall/proto/notice.proto | 14 +- module/ec/mall/proto/product.proto | 42 +- module/ec/mall/proto/staff.proto | 20 +- module/ec/mall/proto/store.proto | 22 +- module/ec/market/pb/agency.pb.go | 143 +- module/ec/market/pb/agency.pb.gw.go | 46 +- module/ec/market/pb/agency_grpc.pb.go | 141 +- module/ec/market/pb/blocks.pb.go | 622 --- module/ec/market/pb/blocks_compat.go | 12 + module/ec/market/pb/data.pb.go | 110 +- module/ec/market/pb/data.pb.gw.go | 38 +- module/ec/market/pb/data_grpc.pb.go | 89 +- module/ec/market/pb/supply.pb.go | 101 +- module/ec/market/pb/supply.pb.gw.go | 30 +- module/ec/market/pb/supply_grpc.pb.go | 87 +- module/ec/market/proto/agency.proto | 28 +- module/ec/market/proto/blocks.proto | 53 - module/ec/market/proto/data.proto | 14 +- module/ec/market/proto/supply.proto | 20 +- module/ec/order/pb/blocks.pb.go | 932 ----- module/ec/order/pb/blocks_compat.go | 10 + module/ec/order/pb/cart.pb.go | 127 +- module/ec/order/pb/cart.pb.gw.go | 14 +- module/ec/order/pb/cart_grpc.pb.go | 57 +- module/ec/order/pb/coupon.pb.go | 71 +- module/ec/order/pb/coupon.pb.gw.go | 5 +- module/ec/order/pb/coupon_grpc.pb.go | 20 +- module/ec/order/pb/mgt.pb.go | 164 +- module/ec/order/pb/mgt.pb.gw.go | 44 +- module/ec/order/pb/mgt_grpc.pb.go | 111 +- module/ec/order/pb/summary.pb.go | 204 +- module/ec/order/pb/summary.pb.gw.go | 45 +- module/ec/order/pb/summary_grpc.pb.go | 129 +- module/ec/order/proto/blocks.proto | 94 - module/ec/order/proto/cart.proto | 12 +- module/ec/order/proto/coupon.proto | 5 +- module/ec/order/proto/mgt.proto | 22 +- module/ec/order/proto/summary.proto | 30 +- module/finance/wallet/pb/alipay.pb.go | 101 +- module/finance/wallet/pb/alipay.pb.gw.go | 2 +- module/finance/wallet/pb/alipay_grpc.pb.go | 42 +- module/finance/wallet/pb/blocks.pb.go | 408 -- module/finance/wallet/pb/blocks_compat.go | 10 + module/finance/wallet/pb/payment.pb.go | 137 +- module/finance/wallet/pb/payment.pb.gw.go | 11 +- module/finance/wallet/pb/payment_grpc.pb.go | 85 +- module/finance/wallet/pb/wallet.pb.go | 165 +- module/finance/wallet/pb/wallet.pb.gw.go | 2 +- module/finance/wallet/pb/wallet_grpc.pb.go | 117 +- module/finance/wallet/pb/wechat.pb.go | 125 +- module/finance/wallet/pb/wechat.pb.gw.go | 2 +- module/finance/wallet/pb/wechat_grpc.pb.go | 48 +- module/finance/wallet/proto/alipay.proto | 2 +- module/finance/wallet/proto/blocks.proto | 35 - module/finance/wallet/proto/payment.proto | 18 +- module/finance/wallet/proto/wallet.proto | 20 +- module/finance/wallet/proto/wechat.proto | 2 +- module/social/feed/pb/blocks.pb.go | 706 ---- module/social/feed/pb/blocks_compat.go | 14 + module/social/feed/pb/post.pb.go | 133 +- module/social/feed/pb/post.pb.gw.go | 27 +- module/social/feed/pb/post_grpc.pb.go | 137 +- module/social/feed/pb/setting.pb.go | 52 +- module/social/feed/pb/setting.pb.gw.go | 11 +- module/social/feed/pb/setting_grpc.pb.go | 51 +- module/social/feed/pb/tag.pb.go | 110 +- module/social/feed/pb/tag.pb.gw.go | 11 +- module/social/feed/pb/tag_grpc.pb.go | 61 +- module/social/feed/pb/timeline.pb.go | 66 +- module/social/feed/pb/timeline.pb.gw.go | 19 +- module/social/feed/pb/timeline_grpc.pb.go | 83 +- module/social/feed/proto/blocks.proto | 66 - module/social/feed/proto/post.proto | 30 +- module/social/feed/proto/setting.proto | 8 +- module/social/feed/proto/tag.proto | 12 +- module/social/feed/proto/timeline.proto | 16 +- module/social/group/pb/blocks.pb.go | 707 ---- module/social/group/pb/blocks_compat.go | 14 + module/social/group/pb/group.pb.go | 106 +- module/social/group/pb/group.pb.gw.go | 19 +- module/social/group/pb/group_grpc.pb.go | 125 +- module/social/group/pb/member.pb.go | 146 +- module/social/group/pb/member.pb.gw.go | 11 +- module/social/group/pb/member_grpc.pb.go | 135 +- module/social/group/proto/blocks.proto | 67 - module/social/group/proto/group.proto | 18 +- module/social/group/proto/member.proto | 20 +- module/social/relation/pb/blocks.pb.go | 604 --- module/social/relation/pb/blocks_compat.go | 12 + module/social/relation/pb/follow.pb.go | 69 +- module/social/relation/pb/follow.pb.gw.go | 19 +- module/social/relation/pb/follow_grpc.pb.go | 83 +- module/social/relation/pb/friend.pb.go | 317 +- module/social/relation/pb/friend.pb.gw.go | 47 +- module/social/relation/pb/friend_grpc.pb.go | 323 +- module/social/relation/pb/match.pb.go | 73 +- module/social/relation/pb/match.pb.gw.go | 19 +- module/social/relation/pb/match_grpc.pb.go | 83 +- module/social/relation/proto/blocks.proto | 53 - module/social/relation/proto/follow.proto | 12 +- module/social/relation/proto/friend.proto | 46 +- module/social/relation/proto/match.proto | 12 +- protobuf/blocks.pb.go | 3368 +++++++++++++++++ protobuf/blocks.proto | 327 ++ protobuf/go.mod | 7 + protobuf/go.sum | 4 + scripts/generate-protobuf.sh | 76 + shared/go.mod | 15 + shared/go.sum | 38 + shared/grpcconn/provider.go | 9 + shared/logging/context.go | 13 + 357 files changed, 14208 insertions(+), 19903 deletions(-) delete mode 100644 module/base/cloud/pb/blocks.pb.go create mode 100644 module/base/cloud/pb/blocks_compat.go delete mode 100644 module/base/cloud/proto/blocks.proto delete mode 100644 module/base/cms/Makefile delete mode 100644 module/base/cms/pb/blocks.pb.go create mode 100644 module/base/cms/pb/blocks_compat.go delete mode 100644 module/base/cms/proto/blocks.proto delete mode 100644 module/base/fts/CHANGELOG.md delete mode 100644 module/base/fts/Dockerfile delete mode 100644 module/base/fts/Makefile delete mode 100644 module/base/fts/docker-compose.yml delete mode 100644 module/base/initial/CHANGELOG.md delete mode 100644 module/base/initial/Dockerfile delete mode 100644 module/base/initial/Makefile delete mode 100644 module/base/initial/docker-compose.yml delete mode 100644 module/base/passport/CHANGELOG.md delete mode 100644 module/base/passport/Dockerfile delete mode 100644 module/base/passport/Makefile delete mode 100644 module/base/passport/docker-compose.yml delete mode 100644 module/base/passport/pb/blocks.pb.go create mode 100644 module/base/passport/pb/blocks_compat.go delete mode 100644 module/base/passport/proto/blocks.proto delete mode 100644 module/base/sender/CHANGELOG.md delete mode 100644 module/base/sender/Dockerfile delete mode 100644 module/base/sender/Makefile delete mode 100644 module/base/sender/docker-compose.yml delete mode 100644 module/base/sender/pb/push_xiaomi.pb.go delete mode 100644 module/base/sender/pb/push_xiaomi_grpc.pb.go create mode 100644 module/ec/delivery/external/pb/delivery/blocks_compat.go create mode 100644 module/ec/delivery/external/pb/delivery/car.pb.go create mode 100644 module/ec/delivery/external/pb/delivery/car.pb.gw.go create mode 100644 module/ec/delivery/external/pb/delivery/car_grpc.pb.go delete mode 100644 module/ec/delivery/external/pb/delivery/delivery.pb.go delete mode 100644 module/ec/delivery/external/pb/delivery/delivery_grpc.pb.go create mode 100644 module/ec/delivery/external/pb/delivery/member.pb.go create mode 100644 module/ec/delivery/external/pb/delivery/member.pb.gw.go create mode 100644 module/ec/delivery/external/pb/delivery/member_grpc.pb.go create mode 100644 module/ec/delivery/external/pb/delivery/team.pb.go rename module/{base/sender/pb/push_xiaomi.pb.gw.go => ec/delivery/external/pb/delivery/team.pb.gw.go} (58%) create mode 100644 module/ec/delivery/external/pb/delivery/team_grpc.pb.go delete mode 100644 module/ec/delivery/internal/impl/cache.go delete mode 100644 module/ec/delivery/internal/impl/mq.go delete mode 100644 module/ec/delivery/proto/blocks.proto delete mode 100644 module/ec/mall/pb/blocks.pb.go create mode 100644 module/ec/mall/pb/blocks_compat.go delete mode 100644 module/ec/mall/proto/blocks.proto delete mode 100644 module/ec/market/pb/blocks.pb.go create mode 100644 module/ec/market/pb/blocks_compat.go delete mode 100644 module/ec/market/proto/blocks.proto delete mode 100644 module/ec/order/pb/blocks.pb.go create mode 100644 module/ec/order/pb/blocks_compat.go delete mode 100644 module/ec/order/proto/blocks.proto delete mode 100644 module/finance/wallet/pb/blocks.pb.go create mode 100644 module/finance/wallet/pb/blocks_compat.go delete mode 100644 module/finance/wallet/proto/blocks.proto delete mode 100644 module/social/feed/pb/blocks.pb.go create mode 100644 module/social/feed/pb/blocks_compat.go delete mode 100644 module/social/feed/proto/blocks.proto delete mode 100644 module/social/group/pb/blocks.pb.go create mode 100644 module/social/group/pb/blocks_compat.go delete mode 100644 module/social/group/proto/blocks.proto delete mode 100644 module/social/relation/pb/blocks.pb.go create mode 100644 module/social/relation/pb/blocks_compat.go delete mode 100644 module/social/relation/proto/blocks.proto create mode 100644 protobuf/blocks.pb.go create mode 100644 protobuf/blocks.proto create mode 100644 protobuf/go.mod create mode 100644 protobuf/go.sum create mode 100644 scripts/generate-protobuf.sh create mode 100644 shared/go.mod create mode 100644 shared/go.sum create mode 100644 shared/grpcconn/provider.go create mode 100644 shared/logging/context.go diff --git a/.gitignore b/.gitignore index cd86c9a..c3e0c55 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Build artifacts /builds/ /dist/ +/.tools/ *.test *.out coverage.txt diff --git a/README.md b/README.md index e202304..ecc057a 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,10 @@ BSM 后端服务的 Go workspace,包含基础能力、电商、财务、社交 | `module/ec` | address、delivery、mall、market、order | | `module/finance` | wallet | | `module/social` | feed、group、relation | +| `protobuf` | 跨服务共享的 protobuf 定义,目前包含 `blocks.proto` | +| `shared` | 跨模块复用的轻量公共代码(日志与 gRPC 连接抽象) | | `cmd` | 聚合上述服务的单体启动器 | -| `go.work` | 20 个 Go 模块的 workspace 定义 | +| `go.work` | 22 个 Go 模块的 workspace 定义 | 各服务的接口、配置和部署细节见对应 `module/**/README.md`。 @@ -20,7 +22,7 @@ BSM 后端服务的 Go workspace,包含基础能力、电商、财务、社交 - Go 1.26.5 - Git - 按所运行服务准备 PostgreSQL、Redis、etcd、MQ 或对象存储等外部依赖 -- 重新生成 protobuf 时,按服务目录中的生成脚本或团队约定的 `protoc` 命令安装相应生成器 +- 重新生成 protobuf 时可使用仓库内 `.tools/` 的工具,或在 `PATH` 中安装 `protoc`、`protoc-gen-go`、`protoc-gen-go-grpc` 和 `protoc-gen-grpc-gateway` 确认工具链: @@ -29,6 +31,14 @@ go version go work sync ``` +统一重新生成 protobuf: + +```bash +bash scripts/generate-protobuf.sh +``` + +脚本以根目录 `protobuf/blocks.proto` 为共享定义,并为各服务生成 protobuf、gRPC 和 grpc-gateway 代码。生成后的兼容别名继续保留旧模块中的公共类型名。 + 更新所有 workspace 模块的依赖: ```bash diff --git a/cmd/go.mod b/cmd/go.mod index 7683a67..e1b4bbe 100644 --- a/cmd/go.mod +++ b/cmd/go.mod @@ -23,68 +23,42 @@ require ( require ( filippo.io/edwards25519 v1.2.0 // indirect - git.apinb.com/bsm-sdk/core v0.2.0 // indirect - git.apinb.com/bsm-sdk/engine v1.3.2 // indirect - github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.2 // indirect - github.com/AthenZ/athenz v1.11.66 // indirect - github.com/DataDog/zstd v1.5.6 // indirect - github.com/FishGoddess/cachego v0.6.1 // indirect + git.apinb.com/bsm-sdk/core v0.2.1 // indirect github.com/KyleBanks/depth v1.2.1 // indirect github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.5 // indirect - github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.12 // indirect + github.com/alibabacloud-go/darabonba-openapi/v2 v2.2.4 // indirect github.com/alibabacloud-go/debug v1.0.1 // indirect - github.com/alibabacloud-go/dysmsapi-20180501/v2 v2.0.7 // indirect - github.com/alibabacloud-go/tea v1.3.13 // indirect - github.com/alibabacloud-go/tea-utils/v2 v2.0.7 // indirect - github.com/aliyun/credentials-go v1.4.7 // indirect - github.com/apache/pulsar-client-go v0.14.0 // indirect - github.com/ardielle/ardielle-go v1.5.2 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/bits-and-blooms/bitset v1.14.3 // indirect + github.com/alibabacloud-go/dysmsapi-20180501/v2 v2.0.8 // indirect + github.com/alibabacloud-go/tea v1.5.3 // indirect + github.com/alibabacloud-go/tea-utils/v2 v2.0.9 // indirect + github.com/aliyun/credentials-go v1.4.12 // indirect github.com/bytedance/gopkg v0.1.4 // indirect github.com/bytedance/sonic v1.15.2 // indirect github.com/bytedance/sonic/loader v0.5.2 // indirect - github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/clbanning/mxj/v2 v2.7.0 // indirect github.com/cloudwego/base64x v0.1.7 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.7.0 // indirect - github.com/danieljoos/wincred v1.2.2 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.7.0 // indirect - github.com/emicklei/go-restful/v3 v3.12.1 // indirect - github.com/fatih/color v1.17.0 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.15 // indirect github.com/gin-contrib/cors v1.7.7 // indirect github.com/gin-contrib/sessions v1.1.0 // indirect github.com/gin-contrib/sse v1.1.1 // indirect github.com/gin-gonic/gin v1.12.0 // indirect - github.com/go-ini/ini v1.67.0 // indirect - github.com/go-jose/go-jose/v4 v4.1.4 // indirect - github.com/go-logr/logr v1.4.4 // indirect - github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v1.0.0 // indirect github.com/go-openapi/jsonreference v1.0.0 // indirect github.com/go-openapi/spec v0.22.9 // indirect - github.com/go-openapi/swag v0.28.0 // indirect - github.com/go-openapi/swag/cmdutils v0.28.0 // indirect github.com/go-openapi/swag/conv v0.28.0 // indirect - github.com/go-openapi/swag/fileutils v0.28.0 // indirect github.com/go-openapi/swag/jsonutils v0.28.0 // indirect github.com/go-openapi/swag/loading v0.28.0 // indirect - github.com/go-openapi/swag/mangling v0.28.0 // indirect - github.com/go-openapi/swag/netutils v0.28.0 // indirect github.com/go-openapi/swag/pools v0.28.0 // indirect github.com/go-openapi/swag/stringutils v0.28.0 // indirect github.com/go-openapi/swag/typeutils v0.28.0 // indirect github.com/go-openapi/swag/yamlutils v0.28.0 // indirect github.com/go-pay/crypto v0.0.1 // indirect github.com/go-pay/errgroup v0.0.3 // indirect - github.com/go-pay/gopay v1.5.114 // indirect + github.com/go-pay/gopay v1.5.122 // indirect github.com/go-pay/smap v0.0.2 // indirect github.com/go-pay/util v0.0.4 // indirect github.com/go-pay/xlog v0.0.3 // indirect @@ -95,24 +69,14 @@ require ( github.com/go-sql-driver/mysql v1.10.0 // indirect github.com/goccy/go-json v0.10.6 // indirect github.com/goccy/go-yaml v1.19.2 // indirect - github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect - github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.3.1 // indirect - github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.7.0 // indirect - github.com/google/gofuzz v1.2.0 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/context v1.1.2 // indirect github.com/gorilla/securecookie v1.1.2 // indirect github.com/gorilla/sessions v1.4.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect - github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/hamba/avro/v2 v2.26.0 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/pgx/v5 v5.10.0 // indirect @@ -122,100 +86,59 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.19.2 // indirect github.com/klauspost/cpuid/v2 v2.4.0 // indirect + github.com/klauspost/crc32 v1.3.0 // indirect github.com/leodido/go-urn v1.5.0 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.24 // indirect github.com/minio/crc64nvme v1.1.1 // indirect github.com/minio/md5-simd v1.1.2 // indirect - github.com/minio/minio-go/v7 v7.0.95 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/minio/minio-go/v7 v7.2.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mtibben/percent v0.2.1 // indirect - github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/oklog/ulid/v2 v2.1.2 // indirect - github.com/openzipkin/zipkin-go v0.4.3 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/pelletier/go-toml/v2 v2.4.3 // indirect github.com/philhofer/fwd v1.2.0 // indirect - github.com/pierrec/lz4 v2.6.1+incompatible // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.23.2 // indirect - github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.67.5 // indirect - github.com/prometheus/procfs v0.16.1 // indirect github.com/quic-go/qpack v0.6.0 // indirect github.com/quic-go/quic-go v0.61.0 // indirect github.com/redis/go-redis/v9 v9.22.0 // indirect github.com/rs/xid v1.6.0 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect - github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/swaggo/files v1.0.1 // indirect github.com/swaggo/gin-swagger v1.6.1 // indirect github.com/swaggo/swag v1.16.6 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.39 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.1.0 // indirect - github.com/tinylib/msgp v1.4.0 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.154 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.3.93 // indirect + github.com/tinylib/msgp v1.6.4 // indirect github.com/tjfoc/gmsm v1.4.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.3.2 // indirect - github.com/x448/float16 v0.8.4 // indirect - github.com/zeromicro/go-zero v1.7.2 // indirect + github.com/zeebo/xxh3 v1.1.0 // indirect go.etcd.io/etcd/api/v3 v3.7.1 // indirect go.etcd.io/etcd/client/pkg/v3 v3.7.1 // indirect go.etcd.io/etcd/client/v3 v3.7.1 // indirect go.mongodb.org/mongo-driver/v2 v2.8.0 // indirect - go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/otel v1.45.0 // indirect - go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.45.0 // indirect - go.opentelemetry.io/otel/exporters/zipkin v1.30.0 // indirect - go.opentelemetry.io/otel/metric v1.45.0 // indirect - go.opentelemetry.io/otel/sdk v1.45.0 // indirect - go.opentelemetry.io/otel/trace v1.45.0 // indirect - go.opentelemetry.io/proto/otlp v1.9.0 // indirect go.uber.org/atomic v1.11.0 // indirect - go.uber.org/automaxprocs v1.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.28.0 // indirect - go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/arch v0.30.0 // indirect golang.org/x/crypto v0.54.0 // indirect - golang.org/x/mod v0.37.0 // indirect + golang.org/x/mod v0.38.0 // indirect golang.org/x/net v0.57.0 // indirect - golang.org/x/oauth2 v0.36.0 // indirect golang.org/x/sync v0.22.0 // indirect golang.org/x/sys v0.47.0 // indirect - golang.org/x/term v0.45.0 // indirect golang.org/x/text v0.40.0 // indirect - golang.org/x/time v0.7.0 // indirect - golang.org/x/tools v0.47.0 // indirect + golang.org/x/tools v0.48.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20260807164820-c8921c73eeea // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260807164820-c8921c73eeea // indirect google.golang.org/grpc v1.83.0 // indirect google.golang.org/protobuf v1.36.11 // indirect - gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/ini.v1 v1.67.3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gorm.io/driver/mysql v1.6.0 // indirect gorm.io/driver/postgres v1.6.2 // indirect gorm.io/gorm v1.31.2 // indirect - k8s.io/api v0.31.1 // indirect - k8s.io/apimachinery v0.31.1 // indirect - k8s.io/client-go v0.31.1 // indirect - k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect - k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect - sigs.k8s.io/yaml v1.6.0 // indirect ) replace ( diff --git a/cmd/go.sum b/cmd/go.sum index 891873b..37a5481 100644 --- a/cmd/go.sum +++ b/cmd/go.sum @@ -1,29 +1,9 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= -dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo= filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc= -git.apinb.com/bsm-sdk/engine v1.3.2 h1:QJ20jveUIHcn3Tu0ktrkZI9zGRaPuJRZ+YTbSa1Zj1w= -git.apinb.com/bsm-sdk/engine v1.3.2/go.mod h1:OXRlO6Cdidqagw+LJjCngvpuuX1rwhxDwZlL/MhwiKQ= -github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= -github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= -github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= -github.com/AthenZ/athenz v1.11.66 h1:ws1CGlIlxCzwzxmAImBBljDPVP8rda0ZvRRVqBukX5s= -github.com/AthenZ/athenz v1.11.66/go.mod h1:KiYVBbyVesOggJa8Ycghoc1RM2q+wgwEdc9zySrfevs= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/zstd v1.5.6 h1:LbEglqepa/ipmmQJUDnSsfvA8e8IStVcGaFWDuxvGOY= -github.com/DataDog/zstd v1.5.6/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/FishGoddess/cachego v0.6.1 h1:mbytec3loqw5dcO177LyRGyStKG0AngP5g2GR3SzSh0= -github.com/FishGoddess/cachego v0.6.1/go.mod h1:VLSMwWRlRPazjGYer8pq+4aDrIe1Otj3Yy9HAb0eo3c= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= -github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= -github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/Microsoft/hcsshim v0.11.5 h1:haEcLNpj9Ka1gd3B3tAEs9CpE0c+1IhoL59w/exYU38= -github.com/Microsoft/hcsshim v0.11.5/go.mod h1:MV8xMfmECjl5HdO7U/3/hFVnkmSBjAjmA09d4bExKcU= github.com/alibabacloud-go/alibabacloud-gateway-pop v0.0.6 h1:eIf+iGJxdU4U9ypaUfbtOWCsZSbTb8AUHvyPrxu6mAA= github.com/alibabacloud-go/alibabacloud-gateway-pop v0.0.6/go.mod h1:4EUIoxs/do24zMOGGqYVWgw0s9NtiylnJglOeEB5UJo= github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4/go.mod h1:sCavSAvdzOjul4cEqeVtvlSaSScfNsTQ+46HwlTL1hc= @@ -35,9 +15,9 @@ github.com/alibabacloud-go/darabonba-encode-util v0.0.2 h1:1uJGrbsGEVqWcWxrS9MyC github.com/alibabacloud-go/darabonba-encode-util v0.0.2/go.mod h1:JiW9higWHYXm7F4PKuMgEUETNZasrDM6vqVr/Can7H8= github.com/alibabacloud-go/darabonba-map v0.0.2 h1:qvPnGB4+dJbJIxOOfawxzF3hzMnIpjmafa0qOTp6udc= github.com/alibabacloud-go/darabonba-map v0.0.2/go.mod h1:28AJaX8FOE/ym8OUFWga+MtEzBunJwQGceGQlvaPGPc= -github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.9/go.mod h1:kgnXaV74AVjM3ZWJu1GhyXGuCtxljJ677oUfz6MyJOE= -github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.12 h1:e2yCrhtWd6Qcsy4he2OL+jIAU+93Lx9OcLlPRoFLT1w= -github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.12/go.mod h1:f2wDpbM7hK9SvLIH09zSKVU1TsyemUNOqErMscMMl7c= +github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.13/go.mod h1:lxFGfobinVsQ49ntjpgWghXmIF0/Sm4+wvBJ1h5RtaE= +github.com/alibabacloud-go/darabonba-openapi/v2 v2.2.4 h1:o6veen0IZ/Fe1JawwhwQMZcbw67CVDY1pQwXcNWPyQo= +github.com/alibabacloud-go/darabonba-openapi/v2 v2.2.4/go.mod h1:eHjVxrT9g8uVYN/nyAwOFQEfkVA154ChiqRc2XnNKYU= github.com/alibabacloud-go/darabonba-signature-util v0.0.7 h1:UzCnKvsjPFzApvODDNEYqBHMFt1w98wC7FOo0InLyxg= github.com/alibabacloud-go/darabonba-signature-util v0.0.7/go.mod h1:oUzCYV2fcCH797xKdL6BDH8ADIHlzrtKVjeRtunBNTQ= github.com/alibabacloud-go/darabonba-string v1.0.2 h1:E714wms5ibdzCqGeYJ9JCFywE5nDyvIXIIQbZVFkkqo= @@ -46,8 +26,8 @@ github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68/go.mod h1:6p github.com/alibabacloud-go/debug v1.0.0/go.mod h1:8gfgZCCAC3+SCzjWtY053FrOcd4/qlH6IHTI4QyICOc= github.com/alibabacloud-go/debug v1.0.1 h1:MsW9SmUtbb1Fnt3ieC6NNZi6aEwrXfDksD4QA6GSbPg= github.com/alibabacloud-go/debug v1.0.1/go.mod h1:8gfgZCCAC3+SCzjWtY053FrOcd4/qlH6IHTI4QyICOc= -github.com/alibabacloud-go/dysmsapi-20180501/v2 v2.0.7 h1:xqn/zCWwy5T8kYz9VlmHm9dbLscT5gA4d/BjVgNufio= -github.com/alibabacloud-go/dysmsapi-20180501/v2 v2.0.7/go.mod h1:m/ZasERkFizmz30MYL7b3pjtltFFPju1AitpJlJ9rWc= +github.com/alibabacloud-go/dysmsapi-20180501/v2 v2.0.8 h1:aDPyz6C+nenypx24N5qEt09NjpS6mu7Cu1A+wf9UTaY= +github.com/alibabacloud-go/dysmsapi-20180501/v2 v2.0.8/go.mod h1:e/vWJ5gLVnraPROSh+3oMSodf5ukaUlqNgH0IIcnz98= github.com/alibabacloud-go/endpoint-util v1.1.0 h1:r/4D3VSw888XGaeNpP994zDUaxdgTSHBbVfZlzf6b5Q= github.com/alibabacloud-go/endpoint-util v1.1.0/go.mod h1:O5FuCALmCKs2Ff7JFJMudHs0I5EBgecXXxZRyswlEjE= github.com/alibabacloud-go/openapi-util v0.1.0 h1:0z75cIULkDrdEhkLWgi9tnLe+KhAFE/r5Pb3312/eAY= @@ -59,34 +39,23 @@ github.com/alibabacloud-go/tea v1.1.11/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/Ke github.com/alibabacloud-go/tea v1.1.17/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A= github.com/alibabacloud-go/tea v1.1.20/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A= github.com/alibabacloud-go/tea v1.2.2/go.mod h1:CF3vOzEMAG+bR4WOql8gc2G9H3EkH3ZLAQdpmpXMgwk= -github.com/alibabacloud-go/tea v1.3.10/go.mod h1:A560v/JTQ1n5zklt2BEpurJzZTI8TUT+Psg2drWlxRg= -github.com/alibabacloud-go/tea v1.3.12/go.mod h1:A560v/JTQ1n5zklt2BEpurJzZTI8TUT+Psg2drWlxRg= -github.com/alibabacloud-go/tea v1.3.13 h1:WhGy6LIXaMbBM6VBYcsDCz6K/TPsT1Ri2hPmmZffZ94= github.com/alibabacloud-go/tea v1.3.13/go.mod h1:A560v/JTQ1n5zklt2BEpurJzZTI8TUT+Psg2drWlxRg= +github.com/alibabacloud-go/tea v1.5.2/go.mod h1:hgSs82CkOiehSQMoiFN79dL6zsGX7pVGvnn9SIEs8/0= +github.com/alibabacloud-go/tea v1.5.3 h1:UMJTBcO48w7Zz1nlFe9bmRsHwgB7AjF8DBQzcvHhIp8= +github.com/alibabacloud-go/tea v1.5.3/go.mod h1:hgSs82CkOiehSQMoiFN79dL6zsGX7pVGvnn9SIEs8/0= github.com/alibabacloud-go/tea-utils v1.3.1/go.mod h1:EI/o33aBfj3hETm4RLiAxF/ThQdSngxrpF8rKUDJjPE= github.com/alibabacloud-go/tea-utils v1.4.5 h1:h0/6Xd2f3bPE4XHTvkpjwxowIwRCJAJOqY6Eq8f3zfA= github.com/alibabacloud-go/tea-utils v1.4.5/go.mod h1:KNcT0oXlZZxOXINnZBs6YvgOd5aYp9U67G+E3R8fcQw= github.com/alibabacloud-go/tea-utils/v2 v2.0.5/go.mod h1:dL6vbUT35E4F4bFTHL845eUloqaerYBYPsdWR2/jhe4= -github.com/alibabacloud-go/tea-utils/v2 v2.0.7 h1:WDx5qW3Xa5ZgJ1c8NfqJkF6w+AU5wB8835UdhPr6Ax0= github.com/alibabacloud-go/tea-utils/v2 v2.0.7/go.mod h1:qxn986l+q33J5VkialKMqT/TTs3E+U9MJpd001iWQ9I= -github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 h1:uvdUDbHQHO85qeSydJtItA4T55Pw6BtAejd0APRJOCE= -github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= -github.com/alicebob/miniredis/v2 v2.33.0 h1:uvTF0EDeu9RLnUEG27Db5I68ESoIxTiXbNUiji6lZrA= -github.com/alicebob/miniredis/v2 v2.33.0/go.mod h1:MhP4a3EU7aENRi9aO+tHfTBZicLqQevyi/DJpoj6mi0= +github.com/alibabacloud-go/tea-utils/v2 v2.0.9 h1:y6pUIlhjxbZl9ObDAcmA1H3c21eaAxADHTDQmBnAIgA= +github.com/alibabacloud-go/tea-utils/v2 v2.0.9/go.mod h1:qxn986l+q33J5VkialKMqT/TTs3E+U9MJpd001iWQ9I= github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw= github.com/aliyun/credentials-go v1.3.1/go.mod h1:8jKYhQuDawt8x2+fusqa1Y6mPxemTsBEN04dgcAcYz0= github.com/aliyun/credentials-go v1.3.6/go.mod h1:1LxUuX7L5YrZUWzBrRyk0SwSdH4OmPrib8NVePL3fxM= github.com/aliyun/credentials-go v1.4.5/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U= -github.com/aliyun/credentials-go v1.4.7 h1:T17dLqEtPUFvjDRRb5giVvLh6dFT8IcNFJJb7MeyCxw= -github.com/aliyun/credentials-go v1.4.7/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U= -github.com/apache/pulsar-client-go v0.14.0 h1:P7yfAQhQ52OCAu8yVmtdbNQ81vV8bF54S2MLmCPJC9w= -github.com/apache/pulsar-client-go v0.14.0/go.mod h1:PNUE29x9G1EHMvm41Bs2vcqwgv7N8AEjeej+nEVYbX8= -github.com/ardielle/ardielle-go v1.5.2 h1:TilHTpHIQJ27R1Tl/iITBzMwiUGSlVfiVhwDNGM3Zj4= -github.com/ardielle/ardielle-go v1.5.2/go.mod h1:I4hy1n795cUhaVt/ojz83SNVCYIGsAFAONtv2Dr7HUI= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bits-and-blooms/bitset v1.14.3 h1:Gd2c8lSNf9pKXom5JtD7AaKO8o7fGQ2LtFj1436qilA= -github.com/bits-and-blooms/bitset v1.14.3/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/aliyun/credentials-go v1.4.12 h1:7D8eXGotNwthZuUEgAMgBoqxmIHwfaPVwW+/04LIJSQ= +github.com/aliyun/credentials-go v1.4.12/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= @@ -97,8 +66,6 @@ github.com/bytedance/sonic v1.15.2 h1:90H+rcF/FwLXwfB1cudOLq/je83n683Utf4Cbp0xHC github.com/bytedance/sonic v1.15.2/go.mod h1:mT2NbXunuaEbnZ+mRIX/vYqKISmgEuHFDI4UzmKx2SA= github.com/bytedance/sonic/loader v0.5.2 h1:0QtP1gevc1OZ6/H8Lb9BRZiCXd1Ftjd3OKuj1T1lBIo= github.com/bytedance/sonic/loader v0.5.2/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -108,53 +75,21 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudwego/base64x v0.1.7 h1:NppS+Fgzg5ovhn4NkUXaDT3x9jldgH5ToMCqzBSi2zI= github.com/cloudwego/base64x v0.1.7/go.mod h1:Cu1PV9zfrSf7ET2tIbWbbEy7jO7HHJ13q4X2SQ8aWYg= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/containerd/containerd v1.7.18 h1:jqjZTQNfXGoEaZdW1WwPU0RqSn1Bm2Ay/KJPUuO8nao= -github.com/containerd/containerd v1.7.18/go.mod h1:IYEk9/IO6wAPUz2bCMVUbsfXjzw5UNP5fLz4PsUygQ4= -github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= -github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0= -github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= -github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA= github.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7Ybq9o0BQhMwD0w= -github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= -github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= -github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0= -github.com/danieljoos/wincred v1.2.2/go.mod h1:w7w4Utbrz8lqeMbDAK0lkNJUv5sAOkFi7nd/ogr0Uh8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= -github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0= -github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= -github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= -github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= -github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= -github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= -github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= -github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= -github.com/felixge/httpsnoop v1.1.0 h1:3YtUj32ZZkqZtt3sZZsClsymw/QDuVfpNhoA31zeORc= -github.com/felixge/httpsnoop v1.1.0/go.mod h1:Zqxgdd+1Rkcz8euOqdr7lqgCRJztwr5hp9vDSi5UZCE= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/gabriel-vasile/mimetype v1.4.15 h1:05iP/CYtZ/w455R/KZM6rZ5ieAdh99UPtd+d3YzLmaI= github.com/gabriel-vasile/mimetype v1.4.15/go.mod h1:azpTcoLcDZRNgFou5j+APrqQx9HqVPWa6ijYQIIVswQ= github.com/gin-contrib/cors v1.7.7 h1:Oh9joP463x7Mw72vhvJ61YQm8ODh9b04YR7vsOErD0Q= @@ -167,17 +102,10 @@ github.com/gin-contrib/sse v1.1.1 h1:uGYpNwTacv5R68bSGMapo62iLTRa9l5zxGCps4hK6ko github.com/gin-contrib/sse v1.1.1/go.mod h1:QXzuVkA0YO7o/gun03UI1Q+FTI8ZV/n5t03kIQAI89s= github.com/gin-gonic/gin v1.12.0 h1:b3YAbrZtnf8N//yjKeU2+MQsh2mY5htkZidOM7O0wG8= github.com/gin-gonic/gin v1.12.0/go.mod h1:VxccKfsSllpKshkBWgVgRniFFAzFb9csfngsqANjnLc= -github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= -github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA= -github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= -github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/jsonpointer v1.0.0 h1:kR9tHqY0CtZaOPVFm622dPVNhrvYpwr4uCxgL3h1H8s= github.com/go-openapi/jsonpointer v1.0.0/go.mod h1:Z3rw7dWu1p9IgitXCFamSlA5lmDiklEB6vkaxcNZW5Y= github.com/go-openapi/jsonreference v1.0.0 h1:jlmTr6torcd1YgDQvSfNmRtKzYDO4FGBkrAdlAVWnpY= @@ -185,23 +113,14 @@ github.com/go-openapi/jsonreference v1.0.0/go.mod h1:jtwdyGbJk0Xhe5Y+rwtglQP6Sb1 github.com/go-openapi/spec v0.22.9 h1:/vKIFDcGKp0ktZWGbym/tJEWbk6/XOEmAVU0kqKMH+w= github.com/go-openapi/spec v0.22.9/go.mod h1:b/mNUYIOQOyIiUzUzXEE8xzyZqf93KvM9hQGP91yfl0= github.com/go-openapi/swag v0.28.0 h1:xkgbOSKj6DZziNpyqRRAOt3GJGtgjgsd2RoyT30VWuw= -github.com/go-openapi/swag v0.28.0/go.mod h1:4qYnT3Cqr1p1VknOdPo70evN4rgQnAg6jwApHyxSGIg= -github.com/go-openapi/swag/cmdutils v0.28.0 h1:7TOeNtkYru1SG8Y34tDh9WBbLsMqGnptuxWiHREPZ4Q= -github.com/go-openapi/swag/cmdutils v0.28.0/go.mod h1:Sm1MVFMkF6guJJ+pQqHnQA3N0j9qALV3NxzDSv6bETM= github.com/go-openapi/swag/conv v0.28.0 h1:GtqqbyFe7vR5Y7ehxG9W6/OvrSFdf1OLeTGp40TqxH8= github.com/go-openapi/swag/conv v0.28.0/go.mod h1:mbUE+mzctnhxi864m0Q07SpN8OowD9JhxmxuYvZZD/k= -github.com/go-openapi/swag/fileutils v0.28.0 h1:Z04XWQD7R8Eq+7GnOrjovBxPPmZzsS4gt2H2GPGIViU= -github.com/go-openapi/swag/fileutils v0.28.0/go.mod h1:VvJFZLTZS0AI854gEQz5tk7dBESdLjiNUMSZ/th2ry8= github.com/go-openapi/swag/jsonutils v0.28.0 h1:YIch6FwO7RXzeAnbO8Tu7dWBZeUEH+4nA0HXltVTnv4= github.com/go-openapi/swag/jsonutils v0.28.0/go.mod h1:CYM3WlTUcagR2ZoHdz54di/cbBqt82tuxuXgAjxw+mg= github.com/go-openapi/swag/jsonutils/fixtures_test v0.28.0 h1:qV+VVUAx5Oro8WjVWpZeql7YReTKhT4smR4zhcOQZr0= github.com/go-openapi/swag/jsonutils/fixtures_test v0.28.0/go.mod h1:mofwUWx70wvskwESqRJ//k/9kURmCgyJl5m5Ppoh5kY= github.com/go-openapi/swag/loading v0.28.0 h1:td8QZdZC9MIYGGSnSPKShKiK22I2tU5UQvuUhIBPRLU= github.com/go-openapi/swag/loading v0.28.0/go.mod h1:rXB0QiQX5mMveXEA7ouM4KiiM9jVJe4K6BVbwhD1M4k= -github.com/go-openapi/swag/mangling v0.28.0 h1:pH8eyeNO9SLYsTMWJrurnNfKmDa28XrlA+HePVD53VM= -github.com/go-openapi/swag/mangling v0.28.0/go.mod h1:jtBE2+V+3pILxOR7Vgce+Cwp6A2PgZbvVqfNntbVs0w= -github.com/go-openapi/swag/netutils v0.28.0 h1:YXN6TALEi2pzts8/8GNm6T61HTAZsieukGZidap989k= -github.com/go-openapi/swag/netutils v0.28.0/go.mod h1:J+WYyFMLtvtCGqa6jLv+YNUmIKI3ZRQRrvfNDMoQoEQ= github.com/go-openapi/swag/pools v0.28.0 h1:HPMZWSAfce3rdVTFcjFiCIBtDg9h4x2QlRrHipwhxeU= github.com/go-openapi/swag/pools v0.28.0/go.mod h1:kVQefhSK5RWuRe7BXsL8htgBPAMpN7HDGpGEknqugeE= github.com/go-openapi/swag/stringutils v0.28.0 h1:ixsc9iYgDPubHL/8nSkbnryEHpD2VRlBMLKpQyPXcDU= @@ -218,8 +137,8 @@ github.com/go-pay/crypto v0.0.1 h1:B6InT8CLfSLc6nGRVx9VMJRBBazFMjr293+jl0lLXUY= github.com/go-pay/crypto v0.0.1/go.mod h1:41oEIvHMKbNcYlWUlRWtsnC6+ASgh7u29z0gJXe5bes= github.com/go-pay/errgroup v0.0.3 h1:DB4s8e8oWYDyETKQ1y1riMJ7y29zE1uIsMCSjEOFSbU= github.com/go-pay/errgroup v0.0.3/go.mod h1:0+4b8mvFMS71MIzsaC+gVvB4x37I93lRb2dqrwuU8x8= -github.com/go-pay/gopay v1.5.114 h1:jNYpcylr7WJev6i/MBeer0Z58E0x5NyqG4FfZrar3pQ= -github.com/go-pay/gopay v1.5.114/go.mod h1:p48xvWeepPolZuakAjCeucWynWwW7msoXsqahcoJpKE= +github.com/go-pay/gopay v1.5.122 h1:kuOz2qBQXGF+o4v6IOGfdFB05fquhEa32dVW98gk/bI= +github.com/go-pay/gopay v1.5.122/go.mod h1:RzP9+1bPzIMAXGRL5RvYsZjib7wV2fhA3JxT5sjoi2w= github.com/go-pay/smap v0.0.2 h1:kKflYor5T5FgZltPFBMTFfjJvqYMHr5VnIFSEyhVTcA= github.com/go-pay/smap v0.0.2/go.mod h1:HW9oAo0okuyDYsbpbj5fJFxnNj/BZorRGFw26SxrNWw= github.com/go-pay/util v0.0.4 h1:TuwSU9o3Qd7m9v1PbzFuIA/8uO9FJnA6P7neG/NwPyk= @@ -238,23 +157,14 @@ github.com/go-playground/validator/v10 v10.30.3 h1:4MU6YkEwx7GbcPJOZxrtbu+QfF3pJ github.com/go-playground/validator/v10 v10.30.3/go.mod h1:4Axh7oCNGcoGkqLoE4YWt6n20mcEIsPRlB7vPk3lpyc= github.com/go-sql-driver/mysql v1.10.0 h1:Q+1LV8DkHJvSYAdR83XzuhDaTykuDx0l6fkXxoWCWfw= github.com/go-sql-driver/mysql v1.10.0/go.mod h1:M+cqaI7+xxXGG9swrdeUIoPG3Y3KCkF0pZej+SK+nWk= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= -github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/goccy/go-json v0.10.6 h1:p8HrPJzOakx/mn/bQtjgNjdTcN+/S6FcG2CTtQOrHVU= github.com/goccy/go-json v0.10.6/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY= github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= @@ -266,23 +176,16 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -293,19 +196,10 @@ github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kX github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo= github.com/gorilla/sessions v1.4.0 h1:kpIYOp/oi6MG/p5PgxApU8srsSw9tuFbt46Lt7auzqQ= github.com/gorilla/sessions v1.4.0/go.mod h1:FLWm50oby91+hl7p/wRxDth9bWSuk0qVL2emc7lT5ik= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 h1:/Tnpcb2E0Pz/tN9s3bfEY2Q8ePCEX9iuS+cneUwncnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0/go.mod h1:zOBXOsUaBSjKgmH4OGzV1esUpR3oUSCPYVd2cUBjKYY= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= -github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= -github.com/hamba/avro/v2 v2.26.0 h1:IaT5l6W3zh7K67sMrT2+RreJyDTllBGVJm4+Hedk9qE= -github.com/hamba/avro/v2 v2.26.0/go.mod h1:I8glyswHnpED3Nlx2ZdUe+4LJnCOOyiCzLMno9i/Uu0= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= @@ -322,30 +216,21 @@ github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.19.2 h1:hMRETovs/pu/dVWN7zIT1PGG8t509MwT6bO7XSi26R8= github.com/klauspost/compress v1.19.2/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.4.0 h1:S6Hrbc7+ywsr0r+RLapfGBHfyefhCTwEh3A0tV913Dw= github.com/klauspost/cpuid/v2 v2.4.0/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU= +github.com/klauspost/crc32 v1.3.0 h1:sSmTt3gUt81RP655XGZPElI0PelVTZ6YwCRnPSupoFM= +github.com/klauspost/crc32 v1.3.0/go.mod h1:D7kQaZhnkX/Y0tstFGf8VUzv2UofNGqCjnC3zdHB0Hw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.5.0 h1:pLqT2kq1zpHW/1D18QMjMpdtX7cekxqtJJjg5ANyWw0= github.com/leodido/go-urn v1.5.0/go.mod h1:9BORnCDhdPBJNDEX+w1bJisa8yOKYi116VeO96s4ifE= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= @@ -354,20 +239,8 @@ github.com/minio/crc64nvme v1.1.1 h1:8dwx/Pz49suywbO+auHCBpCtlW1OfpcLN7wYgVR6wAI github.com/minio/crc64nvme v1.1.1/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.95 h1:ywOUPg+PebTMTzn9VDsoFJy32ZuARN9zhB+K3IYEvYU= -github.com/minio/minio-go/v7 v7.0.95/go.mod h1:wOOX3uxS334vImCNRVyIDdXX9OsXDm89ToynKgqUKlo= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= -github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= -github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= -github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= -github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= -github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= -github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= -github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= -github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= -github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/minio/minio-go/v7 v7.2.1 h1:PfBfwvKB/MmqyN8Vb1G9voWisaM9OrLv+WwOvMwS9Dw= +github.com/minio/minio-go/v7 v7.2.1/go.mod h1:EU9hENAStx/xXduNdrGO5e4X5vk19NtgB+RIPjZO8o0= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -375,29 +248,9 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= -github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid/v2 v2.1.2 h1:IEclFb9JNvzYA6MW2SCxbLzcHTVsfqm3PrqGQJH5zec= github.com/oklog/ulid/v2 v2.1.2/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= -github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= -github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= -github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg= -github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= @@ -405,26 +258,10 @@ github.com/pelletier/go-toml/v2 v2.4.3 h1:GTRvJQutkOSftxIFD5xw9aepkYNuPWmVJpffdD github.com/pelletier/go-toml/v2 v2.4.3/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM= github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= -github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= -github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= -github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= -github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= -github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4= -github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= -github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= -github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/quic-go/go-ossfuzz-seeds v0.1.0 h1:APacT+iIaNF6fd8AGEiN3bT/Jtkd2jz4v4TzM7MFjy0= github.com/quic-go/go-ossfuzz-seeds v0.1.0/go.mod h1:3IOHRbJIc+L6YKMwfDtJAM9Vj9k0YY4muhuyUYk5tbk= github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= @@ -437,29 +274,17 @@ github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0t github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU= github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= -github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= -github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4= -github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= @@ -476,41 +301,27 @@ github.com/swaggo/gin-swagger v1.6.1 h1:Ri06G4gc9N4t4k8hekMigJ9zKTFSlqj/9paAQCQs github.com/swaggo/gin-swagger v1.6.1/go.mod h1:LQ+hJStHakCWRiK/YNYtJOu4mR2FP+pxLnILT/qNiTw= github.com/swaggo/swag v1.16.6 h1:qBNcx53ZaX+M5dxVyTrgQ0PJ/ACK+NzhwcbieTt+9yI= github.com/swaggo/swag v1.16.6/go.mod h1:ngP2etMK5a0P3QBizic5MEwpRmluJZPHjXcMoj4Xesg= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.0/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.39 h1:D7qtbjv0+L8r+Wrenk+SAsAwLVPRUkePROGWUrZY5QE= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.39/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.1.0 h1:vPYUpMS+ZpBosaPvD/qFhy7m3LVEcJkUPxf90QHodwI= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.1.0/go.mod h1:cVlZISIgfgYzoXidDBwgieSYYf9dtpIqVLLOCV0BqOc= -github.com/testcontainers/testcontainers-go v0.32.0 h1:ug1aK08L3gCHdhknlTTwWjPHPS+/alvLJU/DRxTD/ME= -github.com/testcontainers/testcontainers-go v0.32.0/go.mod h1:CRHrzHLQhlXUsa5gXjTOfqIEJcrK5+xMDmBr/WMI88E= -github.com/tinylib/msgp v1.4.0 h1:SYOeDRiydzOw9kSiwdYp9UcBgPFtLU2WDHaJXyHruf8= -github.com/tinylib/msgp v1.4.0/go.mod h1:cvjFkb4RiC8qSBOPMGPSzSAx47nAsfhLVTCZZNuHv5o= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.93/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.154 h1:aQFGuNTo9j60M967s/HhnoZdSD8HhGyCRHLuC9szDgw= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.154/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.3.93 h1:+HmyErvypBJGp0sxVM+e9g9/MtqKZoWXzZtndpHRUwo= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.3.93/go.mod h1:TAQeguxskl7xDfyGWDJyUGuy1NfG2lyLEuALJQ6x1zE= +github.com/tinylib/msgp v1.6.4 h1:mOwYbyYDLPj35mkA2BjjYejgJk9BuHxDdvRnb6v2ZcQ= +github.com/tinylib/msgp v1.6.4/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77roAqEA= github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tjfoc/gmsm v1.4.1 h1:aMe1GlZb+0bLjn+cKTPEvvn9oUEBlJitaZiiBwsbgho= github.com/tjfoc/gmsm v1.4.1/go.mod h1:j4INPkHWMrhJb38G+J6W4Tw0AbuN8Thu3PbdVYhVcTE= -github.com/tklauser/go-sysconf v0.4.0 h1:7H0uAN+7RkwWRaxhYXDLqa5V3LPrJeV8wmD9dRUgPQU= -github.com/tklauser/go-sysconf v0.4.0/go.mod h1:8mTNWyog7H+MpKijp4VmKJAd2bbYQ2zuUwkYRbUArPI= -github.com/tklauser/numcpus v0.12.0 h1:NR85qdvHA9pFse3x3weVZ0r0ST8R6l5RHbZrlRaqob4= -github.com/tklauser/numcpus v0.12.0/go.mod h1:ABHeXzJnr/qqwguhClkZKT1/8VABcYrsyUiUGobwWJg= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v1.3.2 h1:zkEASHHyEClGeURfgNT9PJZVfAbs9oEX9QXggwWNJbc= github.com/ugorji/go/codec v1.3.2/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= -github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.30/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= -github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= -github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= -github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= -github.com/zeromicro/go-zero v1.7.2 h1:a8lyVOG3KXG4LrAy6ZmtJTJtisX4Ostc4Pst4fE704I= -github.com/zeromicro/go-zero v1.7.2/go.mod h1:WFXfF92Exw0O7WECifS6r99JSzv4KEN49x9RhAfgkMc= go.etcd.io/etcd/api/v3 v3.7.1 h1:KJG0/DcWGfe3Y1otDf/fsBf0TSSgpxZ5RO/L8SFt73E= go.etcd.io/etcd/api/v3 v3.7.1/go.mod h1:8bXIpCMeV7E3/XL0Ix123ATn3dB+0V7d9zklHbB0m78= go.etcd.io/etcd/client/pkg/v3 v3.7.1 h1:rKYsj3pRkR0eK3yjT3XOgrhqfmIfj9pzNgxjh7mfFv4= @@ -521,22 +332,8 @@ go.mongodb.org/mongo-driver/v2 v2.8.0 h1:CxWDGQYY8QQwNjAl/aq2sfWakdnWZynnqJ9F4Dh go.mongodb.org/mongo-driver/v2 v2.8.0/go.mod h1:yOI9kBsufol30iFsl1slpdq1I0eHPzybRWdyYUs8K/0= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0 h1:LMuyCAyfalSjDyjdC65nK6N0zoTT63+E/u95X0JovZI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0/go.mod h1:085m8qbm4hgc8rZWGDEa4vmyyo2c3nPxUslYUKUIU04= go.opentelemetry.io/otel v1.45.0 h1:pdrWmLHofpubmArBv1LgFSv1Z0Ie/ppdZzu+kUN5EeU= go.opentelemetry.io/otel v1.45.0/go.mod h1:XZxIqPapzEYnhNSScF5DIqXhm/rYi0FzCe2XddAwZfQ= -go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= -go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 h1:lsInsfvhVIfOI6qHVyysXMNDnjO9Npvl7tlDPJFBVd4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0/go.mod h1:KQsVNh4OjgjTG0G6EiNi1jVpnaeeKsKMRwbLN+f1+8M= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 h1:m0yTiGDLUvVYaTFbAvCkVYIYcvwKt3G7OLoN77NUs/8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0/go.mod h1:wBQbT4UekBfegL2nx0Xk1vBcnzyBPsIVm9hRG4fYcr4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 h1:umZgi92IyxfXd/l4kaDhnKgY8rnN/cZcF1LKc6I8OQ8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0/go.mod h1:4lVs6obhSVRb1EW5FhOuBTyiQhtRtAnnva9vD3yRfq8= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.45.0 h1:lsA/S1bxgdbyFGkTj+3meEdJ6ADVU7QoFstV6MXgE68= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.45.0/go.mod h1:L7u+MirGoB1bjeLH66+xDykF4RC8C3RN7lIFpBiewUo= -go.opentelemetry.io/otel/exporters/zipkin v1.30.0 h1:1uYaSfxiCLdJATlGEtYjQe4jZYfqCjVwxeSTMXe8VF4= -go.opentelemetry.io/otel/exporters/zipkin v1.30.0/go.mod h1:r/4BhMc3kiKxD61wGh9J3NVQ3/cZ45F2NHkQgVnql48= go.opentelemetry.io/otel/metric v1.45.0 h1:7Eg1uH7CJ5cXv9is6tnBe1FI6rj1nwUdbFypRm3br/M= go.opentelemetry.io/otel/metric v1.45.0/go.mod h1:HAPbm1nd3p1PmFH7v2dR+6BjXxw+Lq4a2+pndMAm08s= go.opentelemetry.io/otel/sdk v1.45.0 h1:4VVSMgQ83dUgW2aoX5f6JgLvHwIvzcuLnF9lUdCSpCw= @@ -545,12 +342,8 @@ go.opentelemetry.io/otel/sdk/metric v1.45.0 h1:oVFszMfyj1Am6s24Vtc7wBb8BKLcwepJj go.opentelemetry.io/otel/sdk/metric v1.45.0/go.mod h1:vUWUxDZvu1WVRj8JA8S0AdhsPrZoDpA2DdZauIh4mDA= go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOyVhxag= go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= -go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= -go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= -go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= @@ -559,8 +352,6 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo= go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q= -go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= -go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/arch v0.30.0 h1:sB9h+1gRGa2+LauFSV0tm8bK1J2yo1bx6/Uyi/P6DTU= @@ -586,15 +377,13 @@ golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ= -golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0= +golang.org/x/mod v0.38.0 h1:MECBjubtXD7yj4HrhIUcywNaGeNVUdfVnxmPajOk4yk= +golang.org/x/mod v0.38.0/go.mod h1:V6Xz0pq8TQ3dGqVQ1FVHuelZpAL0uNhSkk9ogYP3c40= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -604,9 +393,7 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -621,15 +408,11 @@ golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE= golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= -golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= @@ -644,13 +427,9 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -674,8 +453,6 @@ golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= -golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0= -golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -688,8 +465,6 @@ golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs= golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY= -golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= -golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -698,19 +473,15 @@ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/tools v0.47.0 h1:7Kn5x/d1svx/PzryTsqeoZN4TZwqeH5pGWjefhLi/1Q= -golang.org/x/tools v0.47.0/go.mod h1:dFHnyTvFWY212G+h7ZY4Vsp/K3U4/7W9TyVaAul8uCA= +golang.org/x/tools v0.48.0 h1:3+hClM1aLL5mjMKm5ovokw9epgRXPuu2tILgismM6RE= +golang.org/x/tools v0.48.0/go.mod h1:08xX0orndb/F7jJxGDicx061tyd5pcMto75YMAXr6lk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -737,22 +508,14 @@ google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBN google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= -gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/ini.v1 v1.67.3 h1:iM9Lhz5MRSGhHVGGwCuzG9KO8PoirCXj/m/qTmOJJQw= +gopkg.in/ini.v1 v1.67.3/go.mod h1:x/cyOwCgZqOkJoDIJ3c1KNHMo10+nLGAhh+kn3Zizss= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -766,21 +529,3 @@ gorm.io/gorm v1.31.2 h1:3o8FXNo9v9S858gil+3LlZA1LkCOzgb4g5BL64FgaCo= gorm.io/gorm v1.31.2/go.mod h1:XyQVbO2k6YkOis7C2437jSit3SsDK72s7n7rsSHd+Gs= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= -k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= -k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= -k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= -k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= -k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= -k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo= -k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= -k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= -k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= -sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/go.work b/go.work index ba31f27..c6c9751 100644 --- a/go.work +++ b/go.work @@ -21,4 +21,6 @@ use ( ./module/social/feed ./module/social/group ./module/social/relation + ./protobuf + ./shared ) diff --git a/go.work.sum b/go.work.sum index 806ad9d..5e6c248 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,80 +1,239 @@ +4d63.com/gocheckcompilerdirectives v1.3.0/go.mod h1:ofsJ4zx2QAuIP/NO/NAh1ig6R1Fb18/GI7RVMwz7kAY= +4d63.com/gochecknoglobals v0.2.2/go.mod h1:lLxwTQjL5eIesRbvnzIP3jZtG140FnTdz+AlMa+ogt0= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230802163732-1c33ebd9ecfa.1/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.6-20250425153114-8976f5be98c1.1/go.mod h1:avRlCjnFzl98VPaeCtJ24RrV/wwHFzB8sWXhj26+n/U= +buf.build/go/protovalidate v0.12.0/go.mod h1:q3PFfbzI05LeqxSwq+begW2syjy2Z6hLxZSkP1OH/D0= cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= cel.dev/expr v0.25.2/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= +charm.land/lipgloss/v2 v2.0.3/go.mod h1:7myLU9iG/3xluAWzpY/fSxYYHCgoKTie7laxk6ATwXA= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.112.2/go.mod h1:iEqjp//KquGIJV/m+Pk3xecgKNhV+ry+vVTsy4TbDms= cloud.google.com/go/auth v0.9.3/go.mod h1:7z6VY+7h3KUdRov5F1i8NDP5ZzWKYmEPO842BgCsmTk= cloud.google.com/go/auth v0.18.2/go.mod h1:xD+oY7gcahcu7G2SG2DsBerfFxgPAJz17zz2joOFF3M= cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/compute v1.23.4/go.mod h1:/EJMj55asU6kAFnuZET8zqgwgJ9FvXWXOkkfQZa4ioI= cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/iam v1.2.0/go.mod h1:zITGuWgsLZxd8OwAlX+eMFgZDXzBm7icj1PVTYG766Q= +cloud.google.com/go/longrunning v0.5.6/go.mod h1:vUaDrWYOMKRuhiv6JBnn49YxCPz2Ayn9GqyjaBT8/mA= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/secretmanager v1.14.1/go.mod h1:L+gO+u2JA9CCyXpSR8gDH0o8EV7i/f0jdBOrUXcIV0U= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/translate v1.10.3/go.mod h1:GW0vC1qvPtd3pgtypCv4k4U8B7EdgK9/QEF2aJEUovs= +codeberg.org/chavacava/garif v0.2.0/go.mod h1:P2BPbVbT4QcvLZrORc2T29szK3xEOlnl0GiPTJmEqBQ= codeberg.org/go-fonts/liberation v0.5.0/go.mod h1:zS/2e1354/mJ4pGzIIaEtm/59VFCFnYC7YV6YdGl5GU= codeberg.org/go-latex/latex v0.1.0/go.mod h1:LA0q/AyWIYrqVd+A9Upkgsb+IqPcmSTKc9Dny04MHMw= codeberg.org/go-pdf/fpdf v0.10.0/go.mod h1:Y0DGRAdZ0OmnZPvjbMp/1bYxmIPxm0ws4tfoPOc4LjU= +codeberg.org/polyfloyd/go-errorlint v1.9.0/go.mod h1:GPRRu2LzVijNn4YkrZYJfatQIdS+TrcK8rL5Xs24qw8= +dev.gaijin.team/go/exhaustruct/v4 v4.0.0/go.mod h1:aZ/k2o4Y05aMJtiux15x8iXaumE88YdiB0Ai4fXOzPI= +dev.gaijin.team/go/golib v0.6.0/go.mod h1:uY1mShx8Z/aNHWDyAkZTkX+uCi5PdX7KsG1eDQa2AVE= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= git.sr.ht/~sbinet/gg v0.6.0/go.mod h1:uucygbfC9wVPQIfrmwM2et0imr8L7KQWywX0xpFMm94= +github.com/4meepo/tagalign v1.4.3/go.mod h1:00WwRjiuSbrRJnSVeGWPLp2epS5Q/l4UEy0apLLS37c= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= +github.com/Abirdcfly/dupword v0.1.7/go.mod h1:K0DkBeOebJ4VyOICFdppB23Q0YMOgVafM0zYW0n9lF4= +github.com/AdminBenni/iota-mixing v1.0.0/go.mod h1:i4+tpAaB+qMVIV9OK3m4/DAynOd5bQFaOu+2AhtBCNY= +github.com/AlwxSin/noinlineerr v1.0.5/go.mod h1:+QgkkoYrMH7RHvcdxdlI7vYYEdgeoFOVjU9sUhw/rQc= +github.com/Antonboom/errname v1.1.1/go.mod h1:gjhe24xoxXp0ScLtHzjiXp0Exi1RFLKJb0bVBtWKCWQ= +github.com/Antonboom/nilnil v1.1.1/go.mod h1:yCyAmSw3doopbOWhJlVci+HuyNRuHJKIv6V2oYQa8II= +github.com/Antonboom/testifylint v1.6.4/go.mod h1:YO33FROXX2OoUfwjz8g+gUxQXio5i9qpVy7nXGbxDD4= +github.com/AthenZ/athenz v1.11.66/go.mod h1:KiYVBbyVesOggJa8Ycghoc1RM2q+wgwEdc9zySrfevs= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/ClickHouse/clickhouse-go-linter v1.2.0/go.mod h1:pLorS7ffPTfuUV9M0SJgfHA/h/WQPQUk2FWG9x74cQ4= +github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= +github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= +github.com/DataDog/zstd v1.5.6/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/Djarvur/go-err113 v0.1.1/go.mod h1:IaWJdYFLg76t2ihfflPZnM1LIQszWOsFDh2hhhAVF6k= +github.com/FishGoddess/cachego v0.6.1/go.mod h1:VLSMwWRlRPazjGYer8pq+4aDrIe1Otj3Yy9HAb0eo3c= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.33.0/go.mod h1:pJTkW8hEUIIi3Pf65lPZOnn4Y81yCllX6IWk2jNXdkM= github.com/IBM/sarama v1.43.1/go.mod h1:GG5q1RURtDNPz8xxJs3mgX6Ytak8Z9eLhAkJPObe2xE= +github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= +github.com/Masterminds/semver/v3 v3.5.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/MirrexOne/unqueryvet v1.5.4/go.mod h1:fs9Zq6eh1LRIhsDIsxf9PONVUjYdFHdtkHIgZdJnyPU= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/OpenPeeDeeP/depguard/v2 v2.2.1/go.mod h1:q4DKzC4UcVaAvcfd41CZh0PWpGgzrVxUYBlgKNGquUo= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= +github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= +github.com/alecthomas/chroma/v2 v2.24.1/go.mod h1:l+ohZ9xRXIbGe7cIW+YZgOGbvuVLjMps/FYN/CwuabI= +github.com/alecthomas/go-check-sumtype v0.3.1/go.mod h1:A8TSiN3UPRw3laIgWEUOHHLPa6/r9MtoigdlP5h3K/E= github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= +github.com/alexkohler/nakedret/v2 v2.0.6/go.mod h1:l3RKju/IzOMQHmsEvXwkqMDzHHvurNQfAgE1eVmT40Q= +github.com/alexkohler/prealloc v1.1.0/go.mod h1:fT39Jge3bQrfA7nPMDngUfvUbQGQeJyGQnR+913SCig= +github.com/alfatraining/structtag v1.0.0/go.mod h1:p3Xi5SwzTi+Ryj64DqjLWz7XurHxbGsq6y3ubePJPus= +github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= +github.com/alingse/nilnesserr v0.2.0/go.mod h1:1xJPrXonEtX7wyTq8Dytns5P2hNzoWymVUIaKm4HNFg= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= +github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/antonlindstrom/pgstore v0.0.0-20220421113606-e3a6e3fed12a/go.mod h1:Sdr/tmSOLEnncCuXS5TwZRxuk7deH1WXVY8cve3eVBM= +github.com/apache/pulsar-client-go v0.14.0/go.mod h1:PNUE29x9G1EHMvm41Bs2vcqwgv7N8AEjeej+nEVYbX8= github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= +github.com/ardielle/ardielle-go v1.5.2/go.mod h1:I4hy1n795cUhaVt/ojz83SNVCYIGsAFAONtv2Dr7HUI= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/ashanbrown/forbidigo/v2 v2.3.1/go.mod h1:2QDkLTzU6TV937eFROamXrW92M3paehdae4HCDCOZCM= +github.com/ashanbrown/makezero/v2 v2.2.1/go.mod h1:aEGT/9q3S8DHeE57C88z2a6xydvgx8J5hgXIGWgo0MY= github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bits-and-blooms/bitset v1.14.3/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.24.4/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bkielbasa/cyclop v1.2.3/go.mod h1:kHTwA9Q0uZqOADdupvcFJQtp/ksSnytRMe8ztxG8Fuo= +github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q= github.com/boj/redistore v1.4.1/go.mod h1:c0Tvw6aMjslog4jHIAcNv6EtJM849YoOAhMY7JBbWpI= +github.com/bombsimon/wsl/v4 v4.7.0/go.mod h1:uV/+6BkffuzSAVYD+yGyld1AChO7/EuLrCF/8xTiapg= +github.com/bombsimon/wsl/v5 v5.8.0/go.mod h1:AbOLsulgkqP4ZnitHf9gwPtCOGlrzkk0jb0uNxRSY0o= github.com/bradfitz/gomemcache v0.0.0-20250403215159-8d39553ac7cf/go.mod h1:r5xuitiExdLAJ09PR7vBVENGvp4ZuTBeWTGtxuX3K+c= github.com/bradleypeabody/gorilla-sessions-memcache v0.0.0-20240916143655-c0e34fd2f304/go.mod h1:dkChI7Tbtx7H1Tj7TqGSZMOeGpMP5gLHtjroHd4agiI= +github.com/breml/bidichk v0.3.3/go.mod h1:ISbsut8OnjB367j5NseXEGGgO/th206dVa427kR8YTE= +github.com/breml/errchkjson v0.4.1/go.mod h1:a23OvR6Qvcl7DG/Z4o0el6BRAjKnaReoPQFciAl9U3s= github.com/bufbuild/protocompile v0.10.0/go.mod h1:G9qQIQo0xZ6Uyj6CMNz0saGmx2so+KONo8/KrELABiY= github.com/bufbuild/protovalidate-go v0.2.1/go.mod h1:e7XXDtlxj5vlEyAgsrxpzayp4cEMKCSSb8ZCkin+MVA= +github.com/butuzov/ireturn v0.4.1/go.mod h1:q+DXKzTDV5guNuXLnIab9fKXizTn2miZHLhxH7V/GB4= +github.com/butuzov/mirror v1.3.0/go.mod h1:AEij0Z8YMALaq4yQj9CPPVYOyJQyiexpQEQgihajRfI= github.com/bytedance/sonic v1.15.0/go.mod h1:tFkWrPz0/CUCLEF4ri4UkHekCIcdnkqXw9VduqpJh0k= github.com/bytedance/sonic/loader v0.5.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= +github.com/catenacyber/perfsprint v0.10.1/go.mod h1:DJTGsi/Zufpuus6XPGJyKOTMELe347o6akPvWG9Zcsc= +github.com/ccojocar/zxcvbn-go v1.0.4/go.mod h1:3GxGX+rHmueTUMvm5ium7irpyjmm7ikxYFOSJB21Das= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charithe/durationcheck v0.0.11/go.mod h1:x5iZaixRNl8ctbM+3B2RrPG5t856TxRyVQEnbIEM2X4= +github.com/charmbracelet/colorprofile v0.4.3/go.mod h1:/zT4BhpD5aGFpqQQqw7a+VtHCzu+zrQtt1zhMt9mR4Q= +github.com/charmbracelet/ultraviolet v0.0.0-20251205161215-1948445e3318/go.mod h1:Y6kE2GzHfkyQQVCSL9r2hwokSrIlHGzZG+71+wDYSZI= +github.com/charmbracelet/x/ansi v0.11.7/go.mod h1:9qGpnAVYz+8ACONkZBUWPtL7lulP9No6p1epAihUZwQ= +github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI= +github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo= +github.com/charmbracelet/x/windows v0.2.2/go.mod h1:/8XtdKZzedat74NQFn0NGlGL4soHB0YQZrETF96h75k= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/ckaznocha/intrange v0.3.1/go.mod h1:QVepyz1AkUoFQkpEqksSYpNpUo3c5W7nWh/s6SHIJJk= +github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0= +github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2/go.mod h1:qwXFYgsP6T7XnJtbKlf1HP8AjxZZyzxMmc+Lq5GjlU4= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/curioswitch/go-reassign v0.3.0/go.mod h1:nApPCCTtqLJN/s8HfItCcKV0jIPwluBOvZP+dsJGA88= +github.com/daixiang0/gci v0.13.7/go.mod h1:812WVN6JLFY9S6Tv76twqmNqevN0pa3SX3nih0brVzQ= +github.com/danieljoos/wincred v1.2.2/go.mod h1:w7w4Utbrz8lqeMbDAK0lkNJUv5sAOkFi7nd/ogr0Uh8= +github.com/dave/dst v0.27.3/go.mod h1:jHh6EOibnHgcUW3WjKHisiooEkYwqpHLBSX1iOBhEyc= +github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.6.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/elastic/elastic-transport-go/v8 v8.9.0/go.mod h1:ssMTvNS2hwf7CaiGsRRsx4gQHFZ/jS/DkLcISxekWzc= +github.com/elastic/elastic-transport-go/v8 v8.11.0/go.mod h1:DZQ0szCNywc9F+C9l/Kkd4n69SvJVj0I3yK1Of7s3l8= github.com/elastic/go-elasticsearch/v8 v8.17.1/go.mod h1:MVJCtL+gJJ7x5jFeUmA20O7rvipX8GcQmo5iBcmaJn4= github.com/elastic/go-elasticsearch/v9 v9.4.1/go.mod h1:IKW8WkW++PW8If95XqfMffGjoFrzHCpsKmWgYk5j3fQ= +github.com/elastic/go-elasticsearch/v9 v9.5.0/go.mod h1:EbZnYlTlbhNqRt98YW+QSM2SEKplN5o8J+G6d9STOVo= +github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.14.0/go.mod h1:NcS5X47pLl/hfqxU70yPwL9ZMkUlwlKxtAohpi2wBEU= github.com/envoyproxy/go-control-plane/envoy v1.37.0/go.mod h1:DReE9MMrmecPy+YvQOAOHNYMALuowAnbjjEMkkWOi6A= github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4= github.com/envoyproxy/protoc-gen-validate v1.3.3/go.mod h1:TsndJ/ngyIdQRhMcVVGDDHINPLWB7C82oDArY51KfB0= github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= +github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/firefart/nonamedreturns v1.0.6/go.mod h1:R8NisJnSIpvPWheCq0mNRXJok6D8h7fagJTF8EMEwCo= +github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fullstorydev/grpcurl v1.9.1/go.mod h1:i8gKLIC6s93WdU3LSmkE5vtsCxyRmihUj5FK1cNW5EM= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= +github.com/ghostiam/protogetter v0.3.20/go.mod h1:FjIu5Yfs6FT391m+Fjp3fbAYJ6rkL/J6ySpZBfnODuI= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-critic/go-critic v0.14.3/go.mod h1:xwntfW6SYAd7h1OqDzmN6hBX/JxsEKl5up/Y2bsxgVQ= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-openapi/analysis v0.25.5/go.mod h1:d3UGtQC5uq5Kqqqis2VH09Km/v3vwsWrYkbp4gdm+Rc= github.com/go-openapi/errors v0.22.8/go.mod h1:BuUoHcYrU6E7V9gfj1I5wLQqgtIHnup/alXZ8KdgQ0w= github.com/go-openapi/loads v0.25.0/go.mod h1:JFBw4SIB9+PTIFHDfcXuSSy5h6aWzjtUCrPYyx3qWU8= github.com/go-openapi/runtime v0.33.0/go.mod h1:+rsupH3+TFKqmFysqkmgBOTxpVJV8eV+j9myvvea2Xw= github.com/go-openapi/runtime/server-middleware v0.30.0/go.mod h1:OYNT/TxNvB/VK5oe4htM2jDTwlEXuejVJmu0DVZfAMs= github.com/go-openapi/strfmt v0.27.0/go.mod h1:s/qhDqfY72irigXUGJmtgid2Rm+3tnz3k8hZaRmvWYc= +github.com/go-openapi/swag v0.28.0/go.mod h1:4qYnT3Cqr1p1VknOdPo70evN4rgQnAg6jwApHyxSGIg= +github.com/go-openapi/swag/cmdutils v0.28.0/go.mod h1:Sm1MVFMkF6guJJ+pQqHnQA3N0j9qALV3NxzDSv6bETM= github.com/go-openapi/swag/conv v0.27.3/go.mod h1:nPRmN6jgNme99hpf+nM0auDZGALWIqlwhisKPK/bQhQ= +github.com/go-openapi/swag/fileutils v0.28.0/go.mod h1:VvJFZLTZS0AI854gEQz5tk7dBESdLjiNUMSZ/th2ry8= github.com/go-openapi/swag/jsonutils v0.27.3/go.mod h1:qiDCoQvzkMxrV3G8FLEdIU5L+EFYc0zcDOHWT3Yofvo= github.com/go-openapi/swag/loading v0.27.3/go.mod h1:rJ0NeaKsF4CVPnMGjPQl7JlSHzvD0bc2DKXLss1hiuE= +github.com/go-openapi/swag/mangling v0.28.0/go.mod h1:jtBE2+V+3pILxOR7Vgce+Cwp6A2PgZbvVqfNntbVs0w= +github.com/go-openapi/swag/netutils v0.28.0/go.mod h1:J+WYyFMLtvtCGqa6jLv+YNUmIKI3ZRQRrvfNDMoQoEQ= github.com/go-openapi/swag/pools v0.27.3/go.mod h1:kVQefhSK5RWuRe7BXsL8htgBPAMpN7HDGpGEknqugeE= github.com/go-openapi/swag/stringutils v0.27.3/go.mod h1:lzRN95CxXmA03XcDWHLOb6nOMcxCqR5rGY0lOgsfRoM= github.com/go-openapi/swag/typeutils v0.27.3/go.mod h1:Srm0xFNRZ1Y+vCxJclo5qzx8aj+1pAKda/YfFPrG0dQ= @@ -82,31 +241,112 @@ github.com/go-openapi/swag/yamlutils v0.27.3/go.mod h1:6JYBGj8sw/NawMllyZY+cTA8M github.com/go-openapi/validate v0.26.1/go.mod h1:B8UMgXiQiwwQWIbmuROlwJZDPGlikPuh7iHV1vPX9Oo= github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= +github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= +github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= +github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= +github.com/go-toolsmith/astequal v1.2.0/go.mod h1:c8NZ3+kSFtFY/8lPso4v8LuJjdJiUFVnSuU3s0qrrDY= +github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= +github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= +github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-xmlfmt/xmlfmt v1.1.3/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/goccmack/gocc v1.0.2/go.mod h1:LXX2tFVUggS/Zgx/ICPOr3MLyusuM7EcbfkPvNsjdO8= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godoc-lint/godoc-lint v0.11.2/go.mod h1:iVpGdL1JCikNH2gGeAn3Hh+AgN5Gx/I/cxV+91L41jo= +github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/asciicheck v0.5.0/go.mod h1:5RMNAInbNFw2krqN6ibBxN/zfRFa9S6tA1nPdM0l8qQ= +github.com/golangci/dupl v0.0.0-20260401084720-c99c5cf5c202/go.mod h1:NUw9Zr2Sy7+HxzdjIULge71wI6yEg1lWQr7Evcu8K0E= +github.com/golangci/go-printf-func-name v0.1.1/go.mod h1:Es64MpWEZbh0UBtTAICOZiB+miW53w/K9Or/4QogJss= +github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d/go.mod h1:ivJ9QDg0XucIkmwhzCDsqcnxxlDStoTl89jDMIoNxKY= +github.com/golangci/golangci-lint/v2 v2.12.2/go.mod h1:opqHHuIcTG2R+4akzWMd4o1BnD9/1LcjICWOujr91U8= +github.com/golangci/golines v0.15.0/go.mod h1:AZjXd23tbHMpowhtnGlj9KCNsysj72aeZVVHnVcZx10= +github.com/golangci/misspell v0.8.0/go.mod h1:WZyyI2P3hxPY2UVHs3cS8YcllAeyfquQcKfdeE9AFVg= +github.com/golangci/plugin-module-register v0.1.2/go.mod h1:1+QGTsKBvAIvPvoY/os+G5eoqxWn70HYDm2uvUyGuVw= +github.com/golangci/revgrep v0.8.0/go.mod h1:U4R/s9dlXZsg8uJmaR1GrloUr14D7qDl8gi2iPXJH8k= +github.com/golangci/rowserrcheck v0.0.0-20260419091836-c5f79b8a11ba/go.mod h1:sCBNcpRmhJCtbFGz49+IM3ETTFf7QdJ30AeYCd43NKk= +github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e/go.mod h1:Vrn4B5oR9qRwM+f54koyeH3yzphlecwERs0el27Fr/s= +github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e/go.mod h1:h+wZwLjUTJnm/P2rwlbJdRPZXOzaT36/FwnPnY2inzc= +github.com/gomarkdown/markdown v0.0.0-20240328165702-4d01890c35c0/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= github.com/gomodule/redigo v1.9.2/go.mod h1:KsU3hiK/Ay8U42qpaJk+kuNa3C+spxapWpM+ywhcgtw= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/cel-go v0.17.1/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= +github.com/google/cel-go v0.25.0/go.mod h1:hjEb6r5SuOSlhCHmFoLzu8HGCERvIsDAbxDAyNU/MmI= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-pkcs11 v0.3.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/googleapis/enterprise-certificate-proxy v0.3.3/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= github.com/googleapis/enterprise-certificate-proxy v0.3.11/go.mod h1:RFV7MUdlb7AgEq2v7FmMCfeSMCllAzWxFgRdusoGks8= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= github.com/googleapis/gax-go/v2 v2.17.0/go.mod h1:mzaqghpQp4JDh3HvADwrat+6M3MOIDp5YKHhb9PAgDY= +github.com/gordonklaus/ineffassign v0.2.0/go.mod h1:TIpymnagPSexySzs7F9FnO1XFTy8IT3a59vmZp5Y9Lw= +github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= +github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/comment v1.5.0/go.mod h1:V6eb3gpCv9GNVqb6amXzEUX3jXLVK/AdA+IrAMSqvEc= +github.com/gostaticanalysis/forcetypeassert v0.2.0/go.mod h1:M5iPavzE9pPqWyeiVXSFghQjljW1+l/Uke3PXHS6ILY= +github.com/gostaticanalysis/nilerr v0.1.2/go.mod h1:A19UHhoY3y8ahoL7YKz6sdjDtduwTSI4CsymaC2htPA= +github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1/go.mod h1:lXGCsh6c22WGtjr+qGHj1otzZpV/1kwTMAqkwZsnWRU= github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0/go.mod h1:hM2alZsMUni80N33RBe6J0e423LB+odMj7d3EMP9l20= @@ -115,10 +355,26 @@ github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.3/go.mod h1:NbCUVmiS4foBGBH github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/hamba/avro/v2 v2.26.0/go.mod h1:I8glyswHnpED3Nlx2ZdUe+4LJnCOOyiCzLMno9i/Uu0= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-immutable-radix/v2 v2.1.0/go.mod h1:hgdqLXA4f6NIjRVisM1TJ9aOJVNRqKZj+xDGF6m7PBw= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.9.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/jackc/pgx/v5 v5.6.0/go.mod h1:DNZ/vlrUnhWCoFGxHAG8U2ljioxukquj7utPDgtQdTw= github.com/jawher/mow.cli v1.2.0/go.mod h1:y+pcA3jBAdo/GIZx/0rFjw/K2bVEODP9rfZOfaiq8Ko= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= @@ -126,112 +382,361 @@ github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7 github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/jgautheron/goconst v1.10.0/go.mod h1:0p+wv1lFOiUr0IlNNT1nrm6+8DB8u2sU6KHGzFRXHDc= github.com/jhump/protoreflect v1.16.0/go.mod h1:oYPd7nPvcBw/5wlDfm/AVmU9zH9BgqGCI469pGxfj/8= +github.com/jjti/go-spancheck v0.6.5/go.mod h1:aEogkeatBrbYsyW6y5TgDfihCulDYciL1B7rG2vSsrU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jordanlewis/gcassert v0.0.0-20250430164644-389ef753e22e/go.mod h1:ZybsQk6DWyN5t7An1MuPm1gtSZ1xDaTXS9ZjIOxvQrk= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/julz/importas v0.2.0/go.mod h1:pThlt589EnCYtMnmhmRYY/qn9lCf/frPOK+WMx3xiJY= +github.com/karamaru-alpha/copyloopvar v1.2.2/go.mod h1:oY4rGZqZ879JkJMtX3RRkcXRkmUvH0x35ykgaKgsgJY= +github.com/kataras/blocks v0.0.8/go.mod h1:9Jm5zx6BB+06NwA+OhTbHW1xkMOYxahnqTN5DveZ2Yg= +github.com/kataras/golog v0.1.11/go.mod h1:mAkt1vbPowFUuUGvexyQ5NFW6djEgGyxQBIARJ0AH4A= +github.com/kataras/iris/v12 v12.2.11/go.mod h1:uMAeX8OqG9vqdhyrIPv8Lajo/wXTtAF43wchP9WHt2w= +github.com/kataras/pio v0.0.13/go.mod h1:k3HNuSw+eJ8Pm2lA4lRhg3DiCjVgHlP8hmXApSej3oM= +github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= +github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= github.com/kidstuff/mongostore v0.0.0-20181113001930-e650cd85ee4b/go.mod h1:g2nVr8KZVXJSS97Jo8pJ0jgq29P6H7dG0oplUA86MQw= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.10.0/go.mod h1:kQxWMMVZgIkDq7U8xtG/n2juOjbLgZtedi0D+/VL/i8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkHAIKE/contextcheck v1.1.6/go.mod h1:3dDbMRNBFaq8HFXWC1JyvDSPm43CmE6IuHam8Wr0rkg= github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/klauspost/compress v1.18.6/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8= github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= +github.com/klauspost/cpuid/v2 v2.2.11/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kulti/thelper v0.7.1/go.mod h1:NsMjfQEy6sd+9Kfw8kCP61W1I0nerGSYSFnGaxQkcbs= +github.com/kunwardeep/paralleltest v1.0.15/go.mod h1:di4moFqtfz3ToSKxhNjhOZL+696QtJGCFe132CbBLGk= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/labstack/echo/v4 v4.15.1/go.mod h1:xmw1clThob0BSVRX1CRQkGQ/vjwcpOMjQZSZa9fKA/c= +github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU= +github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI= github.com/laziness-coders/mongostore v0.0.14/go.mod h1:Rh+yJax2Vxc2QY62clIM/kRnLk+TxivgSLHOXENXPtk= +github.com/ldez/exptostd v0.4.5/go.mod h1:QRjHRMXJrCTIm9WxVNH6VW7oN7KrGSht69bIRwvdFsM= +github.com/ldez/gomoddirectives v0.8.0/go.mod h1:jutzamvZR4XYJLr0d5Honycp4Gy6GEg2mS9+2YX3F1Q= +github.com/ldez/grignotin v0.10.1/go.mod h1:UlDbXFCARrXbWGNGP3S5vsysNXAPhnSuBufpTEbwOas= +github.com/ldez/structtags v0.6.1/go.mod h1:YDxVSgDy/MON6ariaxLF2X09bh19qL7MtGBN5MrvbdY= +github.com/ldez/tagliatelle v0.7.2/go.mod h1:PtGgm163ZplJfZMZ2sf5nhUT170rSuPgBimoyYtdaSI= +github.com/ldez/usetesting v0.5.0/go.mod h1:Spnb4Qppf8JTuRgblLrEWb7IE6rDmUpGvxY3iRrzvDQ= +github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lyft/protoc-gen-star/v2 v2.0.4/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= +github.com/macabu/inamedparam v0.2.0/go.mod h1:+Pee9/YfGe5LJ62pYXqB89lJ+0k5bsR8Wgz/C0Zlq3U= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= +github.com/manuelarte/embeddedstructfieldcheck v0.4.0/go.mod h1:z8dFSyXqp+fC6NLDSljRJeNQJJDWnY7RoWFzV3PC6UM= +github.com/manuelarte/funcorder v0.6.0/go.mod h1:id3NDhXdQBmeqXH7eVC6Z89xS6JxvZ8kF9xUxpArU/g= +github.com/maratori/testableexamples v1.0.1/go.mod h1:XE2F/nQs7B9N08JgyRmdGjYVGqxWwClLPCGSQhXQSrQ= +github.com/maratori/testpackage v1.1.2/go.mod h1:8F24GdVDFW5Ew43Et02jamrVMNXLUNaOynhDssITGfc= +github.com/matoous/godox v1.1.0/go.mod h1:jgE/3fUXiTurkdHOLT5WEkThTSuE7yxHv5iWPa80afs= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/memcachier/mc v2.0.1+incompatible/go.mod h1:7bkvFE61leUBvXz+yxsOnGBQSZpBSPIMUQSmmSHvuXc= github.com/memcachier/mc/v3 v3.0.3/go.mod h1:GzjocBahcXPxt2cmqzknrgqCOmMxiSzhVKPOe90Tpug= +github.com/mgechev/revive v1.15.0/go.mod h1:LlAKO3QQe9OJ0pVZzI2GPa8CbXGZ/9lNpCGvK4T/a8A= +github.com/microcosm-cc/bluemonday v1.0.26/go.mod h1:JyzOCs9gkyQyjs+6h10UEVSe02CGwkhd72Xdqh78TWs= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= +github.com/moricho/tparallel v0.3.2/go.mod h1:OQ+K3b4Ln3l2TZveGCywybl68glfLEwFGqvnjok8b+U= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= github.com/nats-io/nats.go v1.52.0/go.mod h1:26HypzazeOkyO3/mqd1zZd53STJN0EjCYF9Uy2ZOBno= github.com/nats-io/nkeys v0.4.15/go.mod h1:CpMchTXC9fxA5zrMo4KpySxNjiDVvr8ANOSZdiNfUrs= +github.com/nats-io/nkeys v0.4.16/go.mod h1:llLgWoI0o4z/Q57q2R1kHfmocyhGV6VG/U18Glg1Afs= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= +github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= +github.com/nunnatsa/ginkgolinter v0.23.0/go.mod h1:9qN1+0akwXEccwV1CAcCDfcoBlWXHB+ML9884pL4SZ4= +github.com/oapi-codegen/nullable v1.1.0/go.mod h1:KUZ3vUzkmEKY90ksAmit2+5juDIhIZhfDl+0PwOQlFY= github.com/oapi-codegen/runtime v1.6.0/go.mod h1:GwV7hC2hviaMzj+ITfHVRESK5J2W/GefVwIND/bMGvU= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.3.1/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= +github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= +github.com/quasilyte/go-ruleguard v0.4.5/go.mod h1:Vl05zJ538vcEEwu16V/Hdu7IYZWyKSwIy4c88Ro1kRE= +github.com/quasilyte/go-ruleguard/dsl v0.3.23/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b/go.mod h1:wTPjTepVu7uJBYgZ0SdWHQlIas582j6cn2jgk4DDdlg= github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= github.com/rabbitmq/amqp091-go v1.9.0/go.mod h1:+jPrT9iY2eLjRaMSRHUhc3z14E/l85kv/f+6luSD3pc= +github.com/raeperd/recvcheck v0.2.0/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtzBnWNocnYU= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/redis/go-redis/v9 v9.19.0/go.mod h1:v/M13XI1PVCDcm01VtPFOADfZtHf8YW3baQf57KlIkA= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.4.1/go.mod h1:qnMJwV1hX9m+YJseXEBhd2s90+1Xn6x9dLz11ualI1I= +github.com/ryancurrah/gomodguard/v2 v2.1.3/go.mod h1:CQicdLGatWMxLX53JzoBjYlsNZhHbmLv2AVa0s2aivU= +github.com/ryanrolds/sqlclosecheck v0.6.0/go.mod h1:xyX16hsDaCMXHrMJ3JMzGf5OpDfHTOTTQrT7HOFUmeU= +github.com/sanposhiho/wastedassign/v2 v2.1.0/go.mod h1:+oSmSC+9bQ+VUAxA66nBb0Z7N8CK7mscKTDYC6aIek4= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= +github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= +github.com/sashamelentyev/usestdlibvars v1.29.0/go.mod h1:8PpnjHMk5VdeWlVb4wCdrB8PNbLqZ3wBZTZWkrpZZL8= +github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= +github.com/securego/gosec/v2 v2.26.1/go.mod h1:57UW4p0uoP3kxoTkhoo3axLdVAi+OWrLg/Ax/kdqtPE= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= +github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= +github.com/sonatard/noctx v0.5.1/go.mod h1:64XdbzFb18XL4LporKXp8poqZtPKbCrqQ402CV+kJas= +github.com/sourcegraph/go-diff v0.8.0/go.mod h1:hWlcO7Al+UZStZAP8rBumHpCK5ZHQ5BXsMls8p4+F5E= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs= github.com/spiffe/go-spiffe/v2 v2.7.0/go.mod h1:47Q0Q9/AqGha8QLHp+kxpH4Wca7X7EnOtlIJy3mxZ3U= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= +github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/stbenjam/no-sprintf-host-port v0.3.1/go.mod h1:ODbZesTCHMVKthBHskvUUexdcNHAQRXk9NpSsL8p/HQ= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/tdewolff/minify/v2 v2.20.19/go.mod h1:ulkFoeAVWMLEyjuDz1ZIWOA31g5aWOawCFRp9R/MudM= +github.com/tdewolff/parse/v2 v2.7.12/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W1aghka0soA= +github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= +github.com/tetafro/godot v1.5.6/go.mod h1:eOkMrVQurDui411nBY2FA05EYH01r14LuWY/NrVDVcU= +github.com/timakin/bodyclose v0.0.0-20260129054331-73d1f95b84b4/go.mod h1:sDHLK7rb/59v/ZxZ7KtymgcoxuUMxjXq8gtu9VMOK8M= +github.com/timonwong/loggercheck v0.11.0/go.mod h1:HEAWU8djynujaAVX7QI65Myb8qgfcZ1uKbdpg3ZzKl8= +github.com/tinylib/msgp v1.6.1/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77roAqEA= +github.com/tomarrell/wrapcheck/v2 v2.12.0/go.mod h1:AQhQuZd0p7b6rfW+vUwHm5OMCGgp63moQ9Qr/0BpIWo= +github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/ultraware/funlen v0.2.0/go.mod h1:ZE0q4TsJ8T1SQcjmkhN/w+MceuatI6pBFSxxyteHIJA= +github.com/ultraware/whitespace v0.2.0/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/uudashr/gocognit v1.2.1/go.mod h1:acaubQc6xYlXFEMb9nWX2dYBzJ/bIjEkc1zzvyIZg5Q= +github.com/uudashr/iface v1.4.2/go.mod h1:pbeBPlbuU2qkNDn0mmfrxP2X+wjPMIQAy+r1MBXSXtg= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/wader/gormstore/v2 v2.0.3/go.mod h1:sr3N3a8F1+PBc3fHoKaphFqDXLRJ9Oe6Yow0HxKFbbg= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.2.0/go.mod h1:3dlrS0iBaWKYVt2ZfA4cj48umJZ+cAEbR6/SjLA88I8= github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= +github.com/xen0n/gosmopolitan v1.3.0/go.mod h1:rckfr5T6o4lBtM1ga7mLGKZmLxswUoH1zxHgNXOsEt4= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= +github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= +github.com/yeya24/promlinter v0.3.0/go.mod h1:cDfJQQYv9uYciW60QT0eeHlFodotkYZlL+YcPQN+mW4= +github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= +github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI= -github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= +github.com/zeromicro/go-zero v1.7.2/go.mod h1:WFXfF92Exw0O7WECifS6r99JSzv4KEN49x9RhAfgkMc= +gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8= +go-simpler.org/musttag v0.14.0/go.mod h1:uP8EymctQjJ4Z1kUnjX0u2l60WfUdQxCwSNKzE1JEOE= +go-simpler.org/sloglint v0.12.0/go.mod h1:jBjjC2bm8rYrs88oTRlFX497kWjJsyZWYoNaXkGRI6I= +go.augendre.info/arangolint v0.4.0/go.mod h1:l+f/b4plABuFISuKnTGD4RioXiCCgghv2xqst/xOvAA= +go.augendre.info/fatcontext v0.9.0/go.mod h1:L94brOAT1OOUNue6ph/2HnwxoNlds9aXDF2FcUntbNw= go.etcd.io/etcd/api/v3 v3.6.11/go.mod h1:HYfTh0jyh+uFgp6gMbxJteIDYY97yMuYz85Rnw6Gy9o= go.etcd.io/etcd/client/pkg/v3 v3.6.11/go.mod h1:DysuMe/inqRyC/1tjRR6hReH/VV9Lufs27YKSKBWWJg= go.etcd.io/etcd/client/v3 v3.6.11/go.mod h1:vOTDMCo+fGPEClJqcFEFSqZ+8e7WKV7AyqJjX//HR2w= go.mongodb.org/mongo-driver v1.17.3 h1:TQyXhnsWfWtgAhMtOgtYHMTkZIfBTpMTsMnd9ZBeHxQ= go.mongodb.org/mongo-driver v1.17.3/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.mongodb.org/mongo-driver/v2 v2.5.0/go.mod h1:yOI9kBsufol30iFsl1slpdq1I0eHPzybRWdyYUs8K/0= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/detectors/gcp v1.42.0/go.mod h1:W9zQ439utxymRrXsUOzZbFX4JhLxXU4+ZnCt8GG7yA8= go.opentelemetry.io/contrib/detectors/gcp v1.44.0/go.mod h1:tNAsgd8avTGke1+MndXlU5Cru4PQ9Ai/cCNWQv/ZJ/s= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0/go.mod h1:DqEFwLumhzMBDQv9PcWbyoDxHI/4lAk6CM4nJBH39sc= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= +go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0/go.mod h1:KQsVNh4OjgjTG0G6EiNi1jVpnaeeKsKMRwbLN+f1+8M= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0/go.mod h1:wBQbT4UekBfegL2nx0Xk1vBcnzyBPsIVm9hRG4fYcr4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0/go.mod h1:4lVs6obhSVRb1EW5FhOuBTyiQhtRtAnnva9vD3yRfq8= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.45.0/go.mod h1:L7u+MirGoB1bjeLH66+xDykF4RC8C3RN7lIFpBiewUo= +go.opentelemetry.io/otel/exporters/zipkin v1.30.0/go.mod h1:r/4BhMc3kiKxD61wGh9J3NVQ3/cZ45F2NHkQgVnql48= go.opentelemetry.io/otel/metric/x v0.67.0/go.mod h1:FBjCWZe6wgcqxcMtjdGiClDKXb2YxxXii0CXftE4QtI= -go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= golang.org/x/crypto v0.51.0/go.mod h1:8AdwkbraGNABw2kOX6YFPs3WM22XqI4EXEd8g+x7Oc8= +golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= @@ -241,16 +746,66 @@ golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw= golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs= golang.org/x/net v0.54.0/go.mod h1:Sj4oj8jK6XmHpBZU/zWHw3BV3abl4Kvi+Ut7cQcY+cQ= golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -269,8 +824,13 @@ golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/telemetry v0.0.0-20260409153401-be6f6cb8b1fa/go.mod h1:kHjTxDEnAu6/Nl9lDkzjWpR+bmKfxeiRuSDlsMb70gE= golang.org/x/telemetry v0.0.0-20260508192327-42602be52be6/go.mod h1:Eqhaxk/wZsWEH8CRxLwj6xzEJbz7k1EFGqx7nyCoabE= golang.org/x/telemetry v0.0.0-20260625142307-59b4966ccb57/go.mod h1:3AWMyWHS+caVoiEXpiq6+tzKA40J4vQT3MYr80ZtQpc= +golang.org/x/telemetry v0.0.0-20260708182218-49f421fb7959/go.mod h1:LV7u5Oco+Z/g6XI7PqN+EUUUGGkEcmB1uj2ceI0fOVg= golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc= golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y= +golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= @@ -280,21 +840,120 @@ golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI= golang.org/x/tools v0.45.0 h1:18qN3FAooORvApf5XjCXgsuayZOEtXf6JK18I3+ONa8= golang.org/x/tools v0.45.0/go.mod h1:LuUGqqaXcXMEFEruIVJVm5mgDD8vww/z/SR1gQ4uE/0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/plot v0.15.2/go.mod h1:DX+x+DWso3LTha+AdkJEv5Txvi+Tql3KAGkehP0/Ubg= gonum.org/v1/tools v0.0.0-20200318103217-c168b003ce8c/go.mod h1:fy6Otjqbk477ELp8IXTpw1cObQtLbRCBVonY+bTTfcM= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/api v0.196.0/go.mod h1:g9IL21uGkYgvQ5BZg6BAtoGJQIm8r6EgaAbpNey5wBE= +google.golang.org/api v0.264.0/go.mod h1:fAU1xtNNisHgOF5JooAs8rRaTkl2rT3uaoNGo9NS3R8= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 h1:BulPr26Jqjnd4eYDVe+YvyR7Yc2vJGkO5/0UxD0/jZU= google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:hL97c3SYopEHblzpxRL4lSs523++l8DYxGM1FQiYmb4= google.golang.org/genproto v0.0.0-20260128011058-8636f8732409 h1:VQZ/yAbAtjkHgH80teYd2em3xtIkkHd7ZhqfH2N9CsM= +google.golang.org/genproto v0.0.0-20260128011058-8636f8732409/go.mod h1:rxKD3IEILWEu3P44seeNOAwZN4SaoKaQ/2eTg4mM6EM= google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5/go.mod h1:j3QtIyytwqGr1JUDtYXwtMXWPKsEa5LtzIFN1Wn5WvE= google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto= google.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478/go.mod h1:C6ADNqOxbgdUUeRTU+LCHDPB9ttAMCTff6auwCVa4uc= @@ -306,22 +965,68 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20260523011958-0a33c5d7ca68/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20260610212136-7ab31c22f7ad/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/genproto/googleapis/rpc v0.0.0-20260729162451-8efbd57d26e0/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/genproto/googleapis/rpc v0.0.0-20260803160001-6ac0973c030d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4= google.golang.org/grpc v1.81.0/go.mod h1:xGH9GfzOyMTGIOXBJmXt+BX/V0kcdQbdcuwQ/zNw42I= google.golang.org/grpc v1.82.1/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA= google.golang.org/grpc/examples v0.0.0-20250407062114-b368379ef8f6/go.mod h1:6ytKWczdvnpnO+m+JiG9NjEDzR1FJfsnmJdG7B8QVZ8= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.67.2/go.mod h1:x/cyOwCgZqOkJoDIJ3c1KNHMo10+nLGAhh+kn3Zizss= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gorm.io/gorm v1.30.0/go.mod h1:8Z33v652h4//uMA76KjeDH8mJXPm1QNCYrMeatR0DOE= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.7.0/go.mod h1:pm29oPxeP3P82ISxZDgIYeOaf9ta6Pi0EWvCFoLG2vc= inet.af/peercred v0.0.0-20210906144145-0893ea02156a/go.mod h1:FjawnflS/udxX+SvpsMgZfdqx2aykOlkISeAsADi5IU= +k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= +k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= k8s.io/gengo/v2 v2.0.0-20240826214909-a7b603a56eb7/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= +k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +mvdan.cc/gofumpt v0.9.2/go.mod h1:iB7Hn+ai8lPvofHd9ZFGVg2GOr8sBUw1QUWjNbmIL/s= +mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15/go.mod h1:4M5MMXl2kW6fivUT6yRGpLLPNfuGtU2Z0cPvFquGDYU= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/module/base/ads/go.mod b/module/base/ads/go.mod index 551b4d3..33e0661 100644 --- a/module/base/ads/go.mod +++ b/module/base/ads/go.mod @@ -15,7 +15,6 @@ tool ( require ( git.apinb.com/bsm-sdk/core v0.2.0 - git.apinb.com/bsm-sdk/engine v1.3.2 github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 github.com/patrickmn/go-cache v2.1.0+incompatible go.etcd.io/etcd/client/v3 v3.7.1 diff --git a/module/base/ads/go.sum b/module/base/ads/go.sum index a2eb5b2..09a9a51 100644 --- a/module/base/ads/go.sum +++ b/module/base/ads/go.sum @@ -1,7 +1,5 @@ filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo= filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc= -git.apinb.com/bsm-sdk/engine v1.3.2 h1:QJ20jveUIHcn3Tu0ktrkZI9zGRaPuJRZ+YTbSa1Zj1w= -git.apinb.com/bsm-sdk/engine v1.3.2/go.mod h1:OXRlO6Cdidqagw+LJjCngvpuuX1rwhxDwZlL/MhwiKQ= git.apinb.com/bsm-tools/protoc-gen-markdown v0.0.0-20250907131213-6c1694ce6bcb h1:GoXhkGzI5vZ9JMXCVsSRw/AGsJY0tM2aEv76YaUg2wM= git.apinb.com/bsm-tools/protoc-gen-markdown v0.0.0-20250907131213-6c1694ce6bcb/go.mod h1:l+84zWPM4F40Ppar+jLapgjRNt6XWDsr+l0vN4Jjlm4= git.apinb.com/bsm-tools/protoc-gen-slc v0.0.13 h1:RGg2R2kHz6IAD7scH6So2FlZYctFUDxqWR8i/+fMfOU= diff --git a/module/base/ads/internal/models/ads_item.go b/module/base/ads/internal/models/ads_item.go index dee72a6..6d9dbd1 100644 --- a/module/base/ads/internal/models/ads_item.go +++ b/module/base/ads/internal/models/ads_item.go @@ -9,7 +9,7 @@ package models import ( "git.apinb.com/bsm-sdk/core/database" - "git.apinb.com/bsm-sdk/engine/types" + "git.apinb.com/bsm-sdk/core/types" "gorm.io/gorm" ) diff --git a/module/base/ads/internal/models/ads_pos.go b/module/base/ads/internal/models/ads_pos.go index dd37d7f..9a76dae 100644 --- a/module/base/ads/internal/models/ads_pos.go +++ b/module/base/ads/internal/models/ads_pos.go @@ -9,7 +9,7 @@ package models import ( "git.apinb.com/bsm-sdk/core/database" - "git.apinb.com/bsm-sdk/engine/types" + "git.apinb.com/bsm-sdk/core/types" ) type AdsPos struct { diff --git a/module/base/ads/internal/server/fetch_server.go b/module/base/ads/internal/server/fetch_server.go index 646177c..f262cf0 100644 --- a/module/base/ads/internal/server/fetch_server.go +++ b/module/base/ads/internal/server/fetch_server.go @@ -2,9 +2,9 @@ package server import ( - "context" "bsm/full/module/base/ads/internal/logic/fetch" pb "bsm/full/module/base/ads/pb" + "context" ) type FetchServer struct { diff --git a/module/base/ads/internal/server/new.go b/module/base/ads/internal/server/new.go index 511a709..96675b8 100644 --- a/module/base/ads/internal/server/new.go +++ b/module/base/ads/internal/server/new.go @@ -2,8 +2,8 @@ package server import ( - "context" pb "bsm/full/module/base/ads/pb" + "context" "git.apinb.com/bsm-sdk/core/vars" gwRuntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "google.golang.org/grpc" diff --git a/module/base/ads/pb/ads.pb.go b/module/base/ads/pb/ads.pb.go index 61f9475..76facf3 100644 --- a/module/base/ads/pb/ads.pb.go +++ b/module/base/ads/pb/ads.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: ads.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/base/ads/proto/ads.proto package ads @@ -30,7 +30,7 @@ type ByPosRequest struct { func (x *ByPosRequest) Reset() { *x = ByPosRequest{} - mi := &file_ads_proto_msgTypes[0] + mi := &file_module_base_ads_proto_ads_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -42,7 +42,7 @@ func (x *ByPosRequest) String() string { func (*ByPosRequest) ProtoMessage() {} func (x *ByPosRequest) ProtoReflect() protoreflect.Message { - mi := &file_ads_proto_msgTypes[0] + mi := &file_module_base_ads_proto_ads_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55,7 +55,7 @@ func (x *ByPosRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ByPosRequest.ProtoReflect.Descriptor instead. func (*ByPosRequest) Descriptor() ([]byte, []int) { - return file_ads_proto_rawDescGZIP(), []int{0} + return file_module_base_ads_proto_ads_proto_rawDescGZIP(), []int{0} } func (x *ByPosRequest) GetKey() string { @@ -74,7 +74,7 @@ type ByPosReply struct { func (x *ByPosReply) Reset() { *x = ByPosReply{} - mi := &file_ads_proto_msgTypes[1] + mi := &file_module_base_ads_proto_ads_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -86,7 +86,7 @@ func (x *ByPosReply) String() string { func (*ByPosReply) ProtoMessage() {} func (x *ByPosReply) ProtoReflect() protoreflect.Message { - mi := &file_ads_proto_msgTypes[1] + mi := &file_module_base_ads_proto_ads_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -99,7 +99,7 @@ func (x *ByPosReply) ProtoReflect() protoreflect.Message { // Deprecated: Use ByPosReply.ProtoReflect.Descriptor instead. func (*ByPosReply) Descriptor() ([]byte, []int) { - return file_ads_proto_rawDescGZIP(), []int{1} + return file_module_base_ads_proto_ads_proto_rawDescGZIP(), []int{1} } func (x *ByPosReply) GetData() []*AdsItem { @@ -123,7 +123,7 @@ type AdsItem struct { func (x *AdsItem) Reset() { *x = AdsItem{} - mi := &file_ads_proto_msgTypes[2] + mi := &file_module_base_ads_proto_ads_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -135,7 +135,7 @@ func (x *AdsItem) String() string { func (*AdsItem) ProtoMessage() {} func (x *AdsItem) ProtoReflect() protoreflect.Message { - mi := &file_ads_proto_msgTypes[2] + mi := &file_module_base_ads_proto_ads_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -148,7 +148,7 @@ func (x *AdsItem) ProtoReflect() protoreflect.Message { // Deprecated: Use AdsItem.ProtoReflect.Descriptor instead. func (*AdsItem) Descriptor() ([]byte, []int) { - return file_ads_proto_rawDescGZIP(), []int{2} + return file_module_base_ads_proto_ads_proto_rawDescGZIP(), []int{2} } func (x *AdsItem) GetId() int64 { @@ -193,11 +193,11 @@ func (x *AdsItem) GetCreated() string { return "" } -var File_ads_proto protoreflect.FileDescriptor +var File_module_base_ads_proto_ads_proto protoreflect.FileDescriptor -const file_ads_proto_rawDesc = "" + +const file_module_base_ads_proto_ads_proto_rawDesc = "" + "\n" + - "\x12base/ads/ads.proto\x12\x03ads\" \n" + + "\x1fmodule/base/ads/proto/ads.proto\x12\x03ads\" \n" + "\fByPosRequest\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\".\n" + "\n" + @@ -211,27 +211,27 @@ const file_ads_proto_rawDesc = "" + "\x05toUrl\x18\x05 \x01(\tR\x05toUrl\x12\x18\n" + "\acreated\x18\x06 \x01(\tR\acreated26\n" + "\x05Fetch\x12-\n" + - "\x05ByPos\x12\x11.ads.ByPosRequest\x1a\x0f.ads.ByPosReply\"\x00B\aZ\x05.;adsb\x06proto3" + "\x05ByPos\x12\x11.ads.ByPosRequest\x1a\x0f.ads.ByPosReply\"\x00B!Z\x1fbsm/full/module/base/ads/pb;adsb\x06proto3" var ( - file_ads_proto_rawDescOnce sync.Once - file_ads_proto_rawDescData []byte + file_module_base_ads_proto_ads_proto_rawDescOnce sync.Once + file_module_base_ads_proto_ads_proto_rawDescData []byte ) -func file_ads_proto_rawDescGZIP() []byte { - file_ads_proto_rawDescOnce.Do(func() { - file_ads_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ads_proto_rawDesc), len(file_ads_proto_rawDesc))) +func file_module_base_ads_proto_ads_proto_rawDescGZIP() []byte { + file_module_base_ads_proto_ads_proto_rawDescOnce.Do(func() { + file_module_base_ads_proto_ads_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_ads_proto_ads_proto_rawDesc), len(file_module_base_ads_proto_ads_proto_rawDesc))) }) - return file_ads_proto_rawDescData + return file_module_base_ads_proto_ads_proto_rawDescData } -var file_ads_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_ads_proto_goTypes = []any{ +var file_module_base_ads_proto_ads_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_module_base_ads_proto_ads_proto_goTypes = []any{ (*ByPosRequest)(nil), // 0: ads.ByPosRequest (*ByPosReply)(nil), // 1: ads.ByPosReply (*AdsItem)(nil), // 2: ads.AdsItem } -var file_ads_proto_depIdxs = []int32{ +var file_module_base_ads_proto_ads_proto_depIdxs = []int32{ 2, // 0: ads.ByPosReply.data:type_name -> ads.AdsItem 0, // 1: ads.Fetch.ByPos:input_type -> ads.ByPosRequest 1, // 2: ads.Fetch.ByPos:output_type -> ads.ByPosReply @@ -242,26 +242,26 @@ var file_ads_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_ads_proto_init() } -func file_ads_proto_init() { - if File_ads_proto != nil { +func init() { file_module_base_ads_proto_ads_proto_init() } +func file_module_base_ads_proto_ads_proto_init() { + if File_module_base_ads_proto_ads_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_ads_proto_rawDesc), len(file_ads_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_ads_proto_ads_proto_rawDesc), len(file_module_base_ads_proto_ads_proto_rawDesc)), NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_ads_proto_goTypes, - DependencyIndexes: file_ads_proto_depIdxs, - MessageInfos: file_ads_proto_msgTypes, + GoTypes: file_module_base_ads_proto_ads_proto_goTypes, + DependencyIndexes: file_module_base_ads_proto_ads_proto_depIdxs, + MessageInfos: file_module_base_ads_proto_ads_proto_msgTypes, }.Build() - File_ads_proto = out.File - file_ads_proto_goTypes = nil - file_ads_proto_depIdxs = nil + File_module_base_ads_proto_ads_proto = out.File + file_module_base_ads_proto_ads_proto_goTypes = nil + file_module_base_ads_proto_ads_proto_depIdxs = nil } diff --git a/module/base/ads/pb/ads.pb.gw.go b/module/base/ads/pb/ads.pb.gw.go index 41aedab..34a75b3 100644 --- a/module/base/ads/pb/ads.pb.gw.go +++ b/module/base/ads/pb/ads.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: ads.proto +// source: module/base/ads/proto/ads.proto /* Package ads is a reverse proxy. diff --git a/module/base/ads/pb/ads_grpc.pb.go b/module/base/ads/pb/ads_grpc.pb.go index e6ca24a..22c86a2 100644 --- a/module/base/ads/pb/ads_grpc.pb.go +++ b/module/base/ads/pb/ads_grpc.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: ads.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/ads/proto/ads.proto package ads @@ -28,7 +28,7 @@ const ( // // 广告子系统 type FetchClient interface { - //通过广告位获取广告信息 + // 通过广告位获取广告信息 ByPos(ctx context.Context, in *ByPosRequest, opts ...grpc.CallOption) (*ByPosReply, error) } @@ -51,17 +51,16 @@ func (c *fetchClient) ByPos(ctx context.Context, in *ByPosRequest, opts ...grpc. } // FetchServer is the server API for Fetch service. -// All implementations must embed UnimplementedFetchServer +// All implementations should embed UnimplementedFetchServer // for forward compatibility. // // 广告子系统 type FetchServer interface { - //通过广告位获取广告信息 + // 通过广告位获取广告信息 ByPos(context.Context, *ByPosRequest) (*ByPosReply, error) - mustEmbedUnimplementedFetchServer() } -// UnimplementedFetchServer must be embedded to have +// UnimplementedFetchServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -69,10 +68,9 @@ type FetchServer interface { type UnimplementedFetchServer struct{} func (UnimplementedFetchServer) ByPos(context.Context, *ByPosRequest) (*ByPosReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ByPos not implemented") + return nil, status.Error(codes.Unimplemented, "method ByPos not implemented") } -func (UnimplementedFetchServer) mustEmbedUnimplementedFetchServer() {} -func (UnimplementedFetchServer) testEmbeddedByValue() {} +func (UnimplementedFetchServer) testEmbeddedByValue() {} // UnsafeFetchServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to FetchServer will @@ -82,7 +80,7 @@ type UnsafeFetchServer interface { } func RegisterFetchServer(s grpc.ServiceRegistrar, srv FetchServer) { - // If the following call pancis, it indicates UnimplementedFetchServer was + // If the following call panics, it indicates UnimplementedFetchServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -123,5 +121,5 @@ var Fetch_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "ads.proto", + Metadata: "module/base/ads/proto/ads.proto", } diff --git a/module/base/ads/proto/ads.proto b/module/base/ads/proto/ads.proto index 7e9dcf9..e31c4e0 100644 --- a/module/base/ads/proto/ads.proto +++ b/module/base/ads/proto/ads.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package ads; -option go_package = ".;ads"; +option go_package = "bsm/full/module/base/ads/pb;ads"; //广告子系统 service Fetch{ diff --git a/module/base/cloud/go.mod b/module/base/cloud/go.mod index e6add3f..66d4ff5 100644 --- a/module/base/cloud/go.mod +++ b/module/base/cloud/go.mod @@ -15,7 +15,6 @@ tool ( require ( git.apinb.com/bsm-sdk/core v0.2.0 - git.apinb.com/bsm-sdk/engine v1.3.2 github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 github.com/patrickmn/go-cache v2.1.0+incompatible go.etcd.io/etcd/client/v3 v3.7.1 diff --git a/module/base/cloud/go.sum b/module/base/cloud/go.sum index a2eb5b2..09a9a51 100644 --- a/module/base/cloud/go.sum +++ b/module/base/cloud/go.sum @@ -1,7 +1,5 @@ filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo= filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc= -git.apinb.com/bsm-sdk/engine v1.3.2 h1:QJ20jveUIHcn3Tu0ktrkZI9zGRaPuJRZ+YTbSa1Zj1w= -git.apinb.com/bsm-sdk/engine v1.3.2/go.mod h1:OXRlO6Cdidqagw+LJjCngvpuuX1rwhxDwZlL/MhwiKQ= git.apinb.com/bsm-tools/protoc-gen-markdown v0.0.0-20250907131213-6c1694ce6bcb h1:GoXhkGzI5vZ9JMXCVsSRw/AGsJY0tM2aEv76YaUg2wM= git.apinb.com/bsm-tools/protoc-gen-markdown v0.0.0-20250907131213-6c1694ce6bcb/go.mod h1:l+84zWPM4F40Ppar+jLapgjRNt6XWDsr+l0vN4Jjlm4= git.apinb.com/bsm-tools/protoc-gen-slc v0.0.13 h1:RGg2R2kHz6IAD7scH6So2FlZYctFUDxqWR8i/+fMfOU= diff --git a/module/base/cloud/internal/logic/album/create_album.go b/module/base/cloud/internal/logic/album/create_album.go index 264606e..1976f0f 100644 --- a/module/base/cloud/internal/logic/album/create_album.go +++ b/module/base/cloud/internal/logic/album/create_album.go @@ -11,8 +11,8 @@ import ( "git.apinb.com/bsm-sdk/core/errcode" "git.apinb.com/bsm-sdk/core/printer" "git.apinb.com/bsm-sdk/core/service" + "git.apinb.com/bsm-sdk/core/types" "git.apinb.com/bsm-sdk/core/utils" - "git.apinb.com/bsm-sdk/engine/types" ) // 创建相册 diff --git a/module/base/cloud/internal/logic/album/upload_photo.go b/module/base/cloud/internal/logic/album/upload_photo.go index 2a59c9b..c55f1b6 100644 --- a/module/base/cloud/internal/logic/album/upload_photo.go +++ b/module/base/cloud/internal/logic/album/upload_photo.go @@ -11,8 +11,8 @@ import ( "git.apinb.com/bsm-sdk/core/errcode" "git.apinb.com/bsm-sdk/core/printer" "git.apinb.com/bsm-sdk/core/service" + "git.apinb.com/bsm-sdk/core/types" "git.apinb.com/bsm-sdk/core/utils" - "git.apinb.com/bsm-sdk/engine/types" ) // 上传照片 diff --git a/module/base/cloud/internal/logic/bookmark/create_bookmark.go b/module/base/cloud/internal/logic/bookmark/create_bookmark.go index 897116c..fcd71ec 100644 --- a/module/base/cloud/internal/logic/bookmark/create_bookmark.go +++ b/module/base/cloud/internal/logic/bookmark/create_bookmark.go @@ -11,8 +11,8 @@ import ( "git.apinb.com/bsm-sdk/core/errcode" "git.apinb.com/bsm-sdk/core/printer" "git.apinb.com/bsm-sdk/core/service" + "git.apinb.com/bsm-sdk/core/types" "git.apinb.com/bsm-sdk/core/utils" - "git.apinb.com/bsm-sdk/engine/types" ) // 创建书签 diff --git a/module/base/cloud/internal/logic/bookmark/import_bookmarks.go b/module/base/cloud/internal/logic/bookmark/import_bookmarks.go index 65c657a..bdc8e7c 100644 --- a/module/base/cloud/internal/logic/bookmark/import_bookmarks.go +++ b/module/base/cloud/internal/logic/bookmark/import_bookmarks.go @@ -12,9 +12,9 @@ import ( "git.apinb.com/bsm-sdk/core/errcode" "git.apinb.com/bsm-sdk/core/printer" "git.apinb.com/bsm-sdk/core/service" + "git.apinb.com/bsm-sdk/core/types" "git.apinb.com/bsm-sdk/core/utils" "git.apinb.com/bsm-sdk/core/vars" - "git.apinb.com/bsm-sdk/engine/types" ) // 导入书签 diff --git a/module/base/cloud/internal/logic/disk/copy_file.go b/module/base/cloud/internal/logic/disk/copy_file.go index 55cbfe4..68ffd61 100644 --- a/module/base/cloud/internal/logic/disk/copy_file.go +++ b/module/base/cloud/internal/logic/disk/copy_file.go @@ -11,8 +11,8 @@ import ( "git.apinb.com/bsm-sdk/core/errcode" "git.apinb.com/bsm-sdk/core/printer" "git.apinb.com/bsm-sdk/core/service" + "git.apinb.com/bsm-sdk/core/types" "git.apinb.com/bsm-sdk/core/utils" - "git.apinb.com/bsm-sdk/engine/types" ) // 复制文件 diff --git a/module/base/cloud/internal/logic/disk/create_dir.go b/module/base/cloud/internal/logic/disk/create_dir.go index a8ab5cc..3221aff 100644 --- a/module/base/cloud/internal/logic/disk/create_dir.go +++ b/module/base/cloud/internal/logic/disk/create_dir.go @@ -12,8 +12,8 @@ import ( "git.apinb.com/bsm-sdk/core/errcode" "git.apinb.com/bsm-sdk/core/printer" "git.apinb.com/bsm-sdk/core/service" + "git.apinb.com/bsm-sdk/core/types" "git.apinb.com/bsm-sdk/core/utils" - "git.apinb.com/bsm-sdk/engine/types" ) // 创建目录 diff --git a/module/base/cloud/internal/logic/disk/upload_file.go b/module/base/cloud/internal/logic/disk/upload_file.go index 34335bc..5ddbf61 100644 --- a/module/base/cloud/internal/logic/disk/upload_file.go +++ b/module/base/cloud/internal/logic/disk/upload_file.go @@ -11,8 +11,8 @@ import ( "git.apinb.com/bsm-sdk/core/errcode" "git.apinb.com/bsm-sdk/core/printer" "git.apinb.com/bsm-sdk/core/service" + "git.apinb.com/bsm-sdk/core/types" "git.apinb.com/bsm-sdk/core/utils" - "git.apinb.com/bsm-sdk/engine/types" ) // 上传文件 diff --git a/module/base/cloud/internal/logic/note/create_note.go b/module/base/cloud/internal/logic/note/create_note.go index 0b7e14b..db58a10 100644 --- a/module/base/cloud/internal/logic/note/create_note.go +++ b/module/base/cloud/internal/logic/note/create_note.go @@ -11,8 +11,8 @@ import ( "git.apinb.com/bsm-sdk/core/errcode" "git.apinb.com/bsm-sdk/core/printer" "git.apinb.com/bsm-sdk/core/service" + "git.apinb.com/bsm-sdk/core/types" "git.apinb.com/bsm-sdk/core/utils" - "git.apinb.com/bsm-sdk/engine/types" ) // 创建笔记 diff --git a/module/base/cloud/internal/logic/private/create_private_data.go b/module/base/cloud/internal/logic/private/create_private_data.go index 50055f0..14598cd 100644 --- a/module/base/cloud/internal/logic/private/create_private_data.go +++ b/module/base/cloud/internal/logic/private/create_private_data.go @@ -11,8 +11,8 @@ import ( "git.apinb.com/bsm-sdk/core/errcode" "git.apinb.com/bsm-sdk/core/printer" "git.apinb.com/bsm-sdk/core/service" + "git.apinb.com/bsm-sdk/core/types" "git.apinb.com/bsm-sdk/core/utils" - "git.apinb.com/bsm-sdk/engine/types" ) // 创建隐私数据 diff --git a/module/base/cloud/internal/logic/share/create_share.go b/module/base/cloud/internal/logic/share/create_share.go index 96e3dff..7cd6581 100644 --- a/module/base/cloud/internal/logic/share/create_share.go +++ b/module/base/cloud/internal/logic/share/create_share.go @@ -11,8 +11,8 @@ import ( "git.apinb.com/bsm-sdk/core/errcode" "git.apinb.com/bsm-sdk/core/printer" "git.apinb.com/bsm-sdk/core/service" + "git.apinb.com/bsm-sdk/core/types" "git.apinb.com/bsm-sdk/core/utils" - "git.apinb.com/bsm-sdk/engine/types" ) // 创建分享 diff --git a/module/base/cloud/internal/logic/space/get.go b/module/base/cloud/internal/logic/space/get.go index a452004..1eccabf 100644 --- a/module/base/cloud/internal/logic/space/get.go +++ b/module/base/cloud/internal/logic/space/get.go @@ -9,7 +9,7 @@ import ( pb "bsm/full/module/base/cloud/pb" "git.apinb.com/bsm-sdk/core/printer" "git.apinb.com/bsm-sdk/core/service" - "git.apinb.com/bsm-sdk/engine/types" + "git.apinb.com/bsm-sdk/core/types" ) // 获取空间数据 diff --git a/module/base/cloud/internal/models/cloud_album.go b/module/base/cloud/internal/models/cloud_album.go index 54ce01d..dd2ade2 100644 --- a/module/base/cloud/internal/models/cloud_album.go +++ b/module/base/cloud/internal/models/cloud_album.go @@ -2,7 +2,7 @@ package models import ( "git.apinb.com/bsm-sdk/core/database" - "git.apinb.com/bsm-sdk/engine/types" + "git.apinb.com/bsm-sdk/core/types" ) // 相册模型 diff --git a/module/base/cloud/internal/models/cloud_bookmark.go b/module/base/cloud/internal/models/cloud_bookmark.go index 75e61a5..eb6a9b9 100644 --- a/module/base/cloud/internal/models/cloud_bookmark.go +++ b/module/base/cloud/internal/models/cloud_bookmark.go @@ -2,7 +2,7 @@ package models import ( "git.apinb.com/bsm-sdk/core/database" - "git.apinb.com/bsm-sdk/engine/types" + "git.apinb.com/bsm-sdk/core/types" ) // 网址收藏夹模型 diff --git a/module/base/cloud/internal/models/cloud_disk_dir.go b/module/base/cloud/internal/models/cloud_disk_dir.go index f8b2f04..3b5f63d 100644 --- a/module/base/cloud/internal/models/cloud_disk_dir.go +++ b/module/base/cloud/internal/models/cloud_disk_dir.go @@ -2,7 +2,7 @@ package models import ( "git.apinb.com/bsm-sdk/core/database" - "git.apinb.com/bsm-sdk/engine/types" + "git.apinb.com/bsm-sdk/core/types" ) // 云盘目录模型 diff --git a/module/base/cloud/internal/models/cloud_disk_file.go b/module/base/cloud/internal/models/cloud_disk_file.go index 79e17a5..c132958 100644 --- a/module/base/cloud/internal/models/cloud_disk_file.go +++ b/module/base/cloud/internal/models/cloud_disk_file.go @@ -2,7 +2,7 @@ package models import ( "git.apinb.com/bsm-sdk/core/database" - "git.apinb.com/bsm-sdk/engine/types" + "git.apinb.com/bsm-sdk/core/types" ) // 云盘文件 diff --git a/module/base/cloud/internal/models/cloud_note.go b/module/base/cloud/internal/models/cloud_note.go index 8cea3fe..42b6a09 100644 --- a/module/base/cloud/internal/models/cloud_note.go +++ b/module/base/cloud/internal/models/cloud_note.go @@ -2,7 +2,7 @@ package models import ( "git.apinb.com/bsm-sdk/core/database" - "git.apinb.com/bsm-sdk/engine/types" + "git.apinb.com/bsm-sdk/core/types" ) // 知识笔记模型 diff --git a/module/base/cloud/internal/models/cloud_photo.go b/module/base/cloud/internal/models/cloud_photo.go index a2a7975..19337b8 100644 --- a/module/base/cloud/internal/models/cloud_photo.go +++ b/module/base/cloud/internal/models/cloud_photo.go @@ -4,7 +4,7 @@ import ( "time" "git.apinb.com/bsm-sdk/core/database" - "git.apinb.com/bsm-sdk/engine/types" + "git.apinb.com/bsm-sdk/core/types" ) // 照片模型 diff --git a/module/base/cloud/internal/models/cloud_private.go b/module/base/cloud/internal/models/cloud_private.go index 702135d..f9ce75d 100644 --- a/module/base/cloud/internal/models/cloud_private.go +++ b/module/base/cloud/internal/models/cloud_private.go @@ -2,7 +2,7 @@ package models import ( "git.apinb.com/bsm-sdk/core/database" - "git.apinb.com/bsm-sdk/engine/types" + "git.apinb.com/bsm-sdk/core/types" ) // 个人隐私数据模型 diff --git a/module/base/cloud/internal/models/cloud_share.go b/module/base/cloud/internal/models/cloud_share.go index 03ea630..6d1da9e 100644 --- a/module/base/cloud/internal/models/cloud_share.go +++ b/module/base/cloud/internal/models/cloud_share.go @@ -4,7 +4,7 @@ import ( "time" "git.apinb.com/bsm-sdk/core/database" - "git.apinb.com/bsm-sdk/engine/types" + "git.apinb.com/bsm-sdk/core/types" ) // 分享系统模型 diff --git a/module/base/cloud/internal/models/cloud_space.go b/module/base/cloud/internal/models/cloud_space.go index dad1274..10bf89a 100644 --- a/module/base/cloud/internal/models/cloud_space.go +++ b/module/base/cloud/internal/models/cloud_space.go @@ -2,7 +2,7 @@ package models import ( "git.apinb.com/bsm-sdk/core/database" - "git.apinb.com/bsm-sdk/engine/types" + "git.apinb.com/bsm-sdk/core/types" ) // 系统统计和配置模型 diff --git a/module/base/cloud/internal/server/album_server.go b/module/base/cloud/internal/server/album_server.go index 4447c5d..d462b63 100644 --- a/module/base/cloud/internal/server/album_server.go +++ b/module/base/cloud/internal/server/album_server.go @@ -2,9 +2,9 @@ package server import ( - "context" "bsm/full/module/base/cloud/internal/logic/album" pb "bsm/full/module/base/cloud/pb" + "context" ) type AlbumServer struct { diff --git a/module/base/cloud/internal/server/bookmark_server.go b/module/base/cloud/internal/server/bookmark_server.go index c33ac7e..e439826 100644 --- a/module/base/cloud/internal/server/bookmark_server.go +++ b/module/base/cloud/internal/server/bookmark_server.go @@ -2,9 +2,9 @@ package server import ( - "context" "bsm/full/module/base/cloud/internal/logic/bookmark" pb "bsm/full/module/base/cloud/pb" + "context" ) type BookmarkServer struct { diff --git a/module/base/cloud/internal/server/disk_server.go b/module/base/cloud/internal/server/disk_server.go index 91d4a26..d972fe8 100644 --- a/module/base/cloud/internal/server/disk_server.go +++ b/module/base/cloud/internal/server/disk_server.go @@ -2,9 +2,9 @@ package server import ( - "context" "bsm/full/module/base/cloud/internal/logic/disk" pb "bsm/full/module/base/cloud/pb" + "context" ) type DiskServer struct { diff --git a/module/base/cloud/internal/server/new.go b/module/base/cloud/internal/server/new.go index ffb7891..f6d10ad 100644 --- a/module/base/cloud/internal/server/new.go +++ b/module/base/cloud/internal/server/new.go @@ -2,8 +2,8 @@ package server import ( - "context" pb "bsm/full/module/base/cloud/pb" + "context" "git.apinb.com/bsm-sdk/core/vars" gwRuntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "google.golang.org/grpc" diff --git a/module/base/cloud/internal/server/note_server.go b/module/base/cloud/internal/server/note_server.go index cb59e6a..2331619 100644 --- a/module/base/cloud/internal/server/note_server.go +++ b/module/base/cloud/internal/server/note_server.go @@ -2,9 +2,9 @@ package server import ( - "context" "bsm/full/module/base/cloud/internal/logic/note" pb "bsm/full/module/base/cloud/pb" + "context" ) type NoteServer struct { diff --git a/module/base/cloud/internal/server/private_server.go b/module/base/cloud/internal/server/private_server.go index 99d5f8d..bdf1a48 100644 --- a/module/base/cloud/internal/server/private_server.go +++ b/module/base/cloud/internal/server/private_server.go @@ -2,9 +2,9 @@ package server import ( - "context" "bsm/full/module/base/cloud/internal/logic/private" pb "bsm/full/module/base/cloud/pb" + "context" ) type PrivateServer struct { diff --git a/module/base/cloud/internal/server/share_server.go b/module/base/cloud/internal/server/share_server.go index 1f846f5..3d71662 100644 --- a/module/base/cloud/internal/server/share_server.go +++ b/module/base/cloud/internal/server/share_server.go @@ -2,9 +2,9 @@ package server import ( - "context" "bsm/full/module/base/cloud/internal/logic/share" pb "bsm/full/module/base/cloud/pb" + "context" ) type ShareServer struct { diff --git a/module/base/cloud/internal/server/space_server.go b/module/base/cloud/internal/server/space_server.go index 2a86b2f..2c6a99b 100644 --- a/module/base/cloud/internal/server/space_server.go +++ b/module/base/cloud/internal/server/space_server.go @@ -2,9 +2,9 @@ package server import ( - "context" "bsm/full/module/base/cloud/internal/logic/space" pb "bsm/full/module/base/cloud/pb" + "context" ) type SpaceServer struct { diff --git a/module/base/cloud/pb/album.pb.go b/module/base/cloud/pb/album.pb.go index c713135..387ffbf 100644 --- a/module/base/cloud/pb/album.pb.go +++ b/module/base/cloud/pb/album.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: album.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/base/cloud/proto/album.proto package cloud import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -36,7 +37,7 @@ type CreateAlbumRequest struct { func (x *CreateAlbumRequest) Reset() { *x = CreateAlbumRequest{} - mi := &file_album_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -48,7 +49,7 @@ func (x *CreateAlbumRequest) String() string { func (*CreateAlbumRequest) ProtoMessage() {} func (x *CreateAlbumRequest) ProtoReflect() protoreflect.Message { - mi := &file_album_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61,7 +62,7 @@ func (x *CreateAlbumRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateAlbumRequest.ProtoReflect.Descriptor instead. func (*CreateAlbumRequest) Descriptor() ([]byte, []int) { - return file_album_proto_rawDescGZIP(), []int{0} + return file_module_base_cloud_proto_album_proto_rawDescGZIP(), []int{0} } func (x *CreateAlbumRequest) GetCloudId() uint64 { @@ -116,7 +117,7 @@ type ListAlbumsResponse struct { func (x *ListAlbumsResponse) Reset() { *x = ListAlbumsResponse{} - mi := &file_album_proto_msgTypes[1] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -128,7 +129,7 @@ func (x *ListAlbumsResponse) String() string { func (*ListAlbumsResponse) ProtoMessage() {} func (x *ListAlbumsResponse) ProtoReflect() protoreflect.Message { - mi := &file_album_proto_msgTypes[1] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -141,7 +142,7 @@ func (x *ListAlbumsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAlbumsResponse.ProtoReflect.Descriptor instead. func (*ListAlbumsResponse) Descriptor() ([]byte, []int) { - return file_album_proto_rawDescGZIP(), []int{1} + return file_module_base_cloud_proto_album_proto_rawDescGZIP(), []int{1} } func (x *ListAlbumsResponse) GetAlbums() []*CloudAlbumItem { @@ -168,7 +169,7 @@ type SetCoverPhotoRequest struct { func (x *SetCoverPhotoRequest) Reset() { *x = SetCoverPhotoRequest{} - mi := &file_album_proto_msgTypes[2] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -180,7 +181,7 @@ func (x *SetCoverPhotoRequest) String() string { func (*SetCoverPhotoRequest) ProtoMessage() {} func (x *SetCoverPhotoRequest) ProtoReflect() protoreflect.Message { - mi := &file_album_proto_msgTypes[2] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -193,7 +194,7 @@ func (x *SetCoverPhotoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetCoverPhotoRequest.ProtoReflect.Descriptor instead. func (*SetCoverPhotoRequest) Descriptor() ([]byte, []int) { - return file_album_proto_rawDescGZIP(), []int{2} + return file_module_base_cloud_proto_album_proto_rawDescGZIP(), []int{2} } func (x *SetCoverPhotoRequest) GetAlbumId() uint64 { @@ -229,7 +230,7 @@ type CloudAlbumItem struct { func (x *CloudAlbumItem) Reset() { *x = CloudAlbumItem{} - mi := &file_album_proto_msgTypes[3] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -241,7 +242,7 @@ func (x *CloudAlbumItem) String() string { func (*CloudAlbumItem) ProtoMessage() {} func (x *CloudAlbumItem) ProtoReflect() protoreflect.Message { - mi := &file_album_proto_msgTypes[3] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -254,7 +255,7 @@ func (x *CloudAlbumItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CloudAlbumItem.ProtoReflect.Descriptor instead. func (*CloudAlbumItem) Descriptor() ([]byte, []int) { - return file_album_proto_rawDescGZIP(), []int{3} + return file_module_base_cloud_proto_album_proto_rawDescGZIP(), []int{3} } func (x *CloudAlbumItem) GetId() uint64 { @@ -330,7 +331,7 @@ type ListPhotosResponse struct { func (x *ListPhotosResponse) Reset() { *x = ListPhotosResponse{} - mi := &file_album_proto_msgTypes[4] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -342,7 +343,7 @@ func (x *ListPhotosResponse) String() string { func (*ListPhotosResponse) ProtoMessage() {} func (x *ListPhotosResponse) ProtoReflect() protoreflect.Message { - mi := &file_album_proto_msgTypes[4] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -355,7 +356,7 @@ func (x *ListPhotosResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPhotosResponse.ProtoReflect.Descriptor instead. func (*ListPhotosResponse) Descriptor() ([]byte, []int) { - return file_album_proto_rawDescGZIP(), []int{4} + return file_module_base_cloud_proto_album_proto_rawDescGZIP(), []int{4} } func (x *ListPhotosResponse) GetPhotos() []*CloudPhotoItem { @@ -382,7 +383,7 @@ type MovePhotoRequest struct { func (x *MovePhotoRequest) Reset() { *x = MovePhotoRequest{} - mi := &file_album_proto_msgTypes[5] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -394,7 +395,7 @@ func (x *MovePhotoRequest) String() string { func (*MovePhotoRequest) ProtoMessage() {} func (x *MovePhotoRequest) ProtoReflect() protoreflect.Message { - mi := &file_album_proto_msgTypes[5] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -407,7 +408,7 @@ func (x *MovePhotoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MovePhotoRequest.ProtoReflect.Descriptor instead. func (*MovePhotoRequest) Descriptor() ([]byte, []int) { - return file_album_proto_rawDescGZIP(), []int{5} + return file_module_base_cloud_proto_album_proto_rawDescGZIP(), []int{5} } func (x *MovePhotoRequest) GetPhotoId() uint64 { @@ -450,7 +451,7 @@ type CloudPhotoItem struct { func (x *CloudPhotoItem) Reset() { *x = CloudPhotoItem{} - mi := &file_album_proto_msgTypes[6] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -462,7 +463,7 @@ func (x *CloudPhotoItem) String() string { func (*CloudPhotoItem) ProtoMessage() {} func (x *CloudPhotoItem) ProtoReflect() protoreflect.Message { - mi := &file_album_proto_msgTypes[6] + mi := &file_module_base_cloud_proto_album_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -475,7 +476,7 @@ func (x *CloudPhotoItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CloudPhotoItem.ProtoReflect.Descriptor instead. func (*CloudPhotoItem) Descriptor() ([]byte, []int) { - return file_album_proto_rawDescGZIP(), []int{6} + return file_module_base_cloud_proto_album_proto_rawDescGZIP(), []int{6} } func (x *CloudPhotoItem) GetId() uint64 { @@ -590,11 +591,11 @@ func (x *CloudPhotoItem) GetAlbum() *CloudAlbumItem { return nil } -var File_album_proto protoreflect.FileDescriptor +var File_module_base_cloud_proto_album_proto protoreflect.FileDescriptor -const file_album_proto_rawDesc = "" + +const file_module_base_cloud_proto_album_proto_rawDesc = "" + "\n" + - "\x16base/cloud/album.proto\x12\x05cloud\x1a\x12cloud/blocks.proto\"\xcc\x01\n" + + "#module/base/cloud/proto/album.proto\x12\x05cloud\x1a\x15protobuf/blocks.proto\"\xcc\x01\n" + "\x12CreateAlbumRequest\x12\x19\n" + "\bcloud_id\x18\x01 \x01(\x04R\acloudId\x12%\n" + "\x0ecloud_identity\x18\x02 \x01(\tR\rcloudIdentity\x12\x12\n" + @@ -650,77 +651,77 @@ const file_album_proto_rawDesc = "" + "created_at\x18\x0e \x01(\tR\tcreatedAt\x12\x1d\n" + "\n" + "updated_at\x18\x0f \x01(\tR\tupdatedAt\x12+\n" + - "\x05album\x18\x10 \x01(\v2\x15.cloud.CloudAlbumItemR\x05album2\xcb\x05\n" + - "\x05Album\x12<\n" + - "\vCreateAlbum\x12\x19.cloud.CreateAlbumRequest\x1a\x12.cloud.StatusReply\x126\n" + - "\bGetAlbum\x12\x13.cloud.IdentRequest\x1a\x15.cloud.CloudAlbumItem\x128\n" + - "\vUpdateAlbum\x12\x15.cloud.CloudAlbumItem\x1a\x12.cloud.StatusReply\x126\n" + - "\vDeleteAlbum\x12\x13.cloud.IdentRequest\x1a\x12.cloud.StatusReply\x12<\n" + + "\x05album\x18\x10 \x01(\v2\x15.cloud.CloudAlbumItemR\x05album2\xd9\x05\n" + + "\x05Album\x12=\n" + + "\vCreateAlbum\x12\x19.cloud.CreateAlbumRequest\x1a\x13.blocks.StatusReply\x127\n" + + "\bGetAlbum\x12\x14.blocks.IdentRequest\x1a\x15.cloud.CloudAlbumItem\x129\n" + + "\vUpdateAlbum\x12\x15.cloud.CloudAlbumItem\x1a\x13.blocks.StatusReply\x128\n" + + "\vDeleteAlbum\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\x12=\n" + "\n" + - "ListAlbums\x12\x13.cloud.FetchRequest\x1a\x19.cloud.ListAlbumsResponse\x12@\n" + - "\rSetCoverPhoto\x12\x1b.cloud.SetCoverPhotoRequest\x1a\x12.cloud.StatusReply\x128\n" + - "\vUploadPhoto\x12\x15.cloud.CloudPhotoItem\x1a\x12.cloud.StatusReply\x126\n" + - "\bGetPhoto\x12\x13.cloud.IdentRequest\x1a\x15.cloud.CloudPhotoItem\x128\n" + - "\vUpdatePhoto\x12\x15.cloud.CloudPhotoItem\x1a\x12.cloud.StatusReply\x126\n" + - "\vDeletePhoto\x12\x13.cloud.IdentRequest\x1a\x12.cloud.StatusReply\x12<\n" + + "ListAlbums\x12\x14.blocks.FetchRequest\x1a\x19.cloud.ListAlbumsResponse\x12A\n" + + "\rSetCoverPhoto\x12\x1b.cloud.SetCoverPhotoRequest\x1a\x13.blocks.StatusReply\x129\n" + + "\vUploadPhoto\x12\x15.cloud.CloudPhotoItem\x1a\x13.blocks.StatusReply\x127\n" + + "\bGetPhoto\x12\x14.blocks.IdentRequest\x1a\x15.cloud.CloudPhotoItem\x129\n" + + "\vUpdatePhoto\x12\x15.cloud.CloudPhotoItem\x1a\x13.blocks.StatusReply\x128\n" + + "\vDeletePhoto\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\x12=\n" + "\n" + - "ListPhotos\x12\x13.cloud.FetchRequest\x1a\x19.cloud.ListPhotosResponse\x128\n" + - "\tMovePhoto\x12\x17.cloud.MovePhotoRequest\x1a\x12.cloud.StatusReplyB\tZ\a.;cloudb\x06proto3" + "ListPhotos\x12\x14.blocks.FetchRequest\x1a\x19.cloud.ListPhotosResponse\x129\n" + + "\tMovePhoto\x12\x17.cloud.MovePhotoRequest\x1a\x13.blocks.StatusReplyB%Z#bsm/full/module/base/cloud/pb;cloudb\x06proto3" var ( - file_album_proto_rawDescOnce sync.Once - file_album_proto_rawDescData []byte + file_module_base_cloud_proto_album_proto_rawDescOnce sync.Once + file_module_base_cloud_proto_album_proto_rawDescData []byte ) -func file_album_proto_rawDescGZIP() []byte { - file_album_proto_rawDescOnce.Do(func() { - file_album_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_album_proto_rawDesc), len(file_album_proto_rawDesc))) +func file_module_base_cloud_proto_album_proto_rawDescGZIP() []byte { + file_module_base_cloud_proto_album_proto_rawDescOnce.Do(func() { + file_module_base_cloud_proto_album_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_album_proto_rawDesc), len(file_module_base_cloud_proto_album_proto_rawDesc))) }) - return file_album_proto_rawDescData + return file_module_base_cloud_proto_album_proto_rawDescData } -var file_album_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_album_proto_goTypes = []any{ - (*CreateAlbumRequest)(nil), // 0: cloud.CreateAlbumRequest - (*ListAlbumsResponse)(nil), // 1: cloud.ListAlbumsResponse - (*SetCoverPhotoRequest)(nil), // 2: cloud.SetCoverPhotoRequest - (*CloudAlbumItem)(nil), // 3: cloud.CloudAlbumItem - (*ListPhotosResponse)(nil), // 4: cloud.ListPhotosResponse - (*MovePhotoRequest)(nil), // 5: cloud.MovePhotoRequest - (*CloudPhotoItem)(nil), // 6: cloud.CloudPhotoItem - (*IdentRequest)(nil), // 7: cloud.IdentRequest - (*FetchRequest)(nil), // 8: cloud.FetchRequest - (*StatusReply)(nil), // 9: cloud.StatusReply +var file_module_base_cloud_proto_album_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_module_base_cloud_proto_album_proto_goTypes = []any{ + (*CreateAlbumRequest)(nil), // 0: cloud.CreateAlbumRequest + (*ListAlbumsResponse)(nil), // 1: cloud.ListAlbumsResponse + (*SetCoverPhotoRequest)(nil), // 2: cloud.SetCoverPhotoRequest + (*CloudAlbumItem)(nil), // 3: cloud.CloudAlbumItem + (*ListPhotosResponse)(nil), // 4: cloud.ListPhotosResponse + (*MovePhotoRequest)(nil), // 5: cloud.MovePhotoRequest + (*CloudPhotoItem)(nil), // 6: cloud.CloudPhotoItem + (*protobuf.IdentRequest)(nil), // 7: blocks.IdentRequest + (*protobuf.FetchRequest)(nil), // 8: blocks.FetchRequest + (*protobuf.StatusReply)(nil), // 9: blocks.StatusReply } -var file_album_proto_depIdxs = []int32{ +var file_module_base_cloud_proto_album_proto_depIdxs = []int32{ 3, // 0: cloud.ListAlbumsResponse.albums:type_name -> cloud.CloudAlbumItem 6, // 1: cloud.CloudAlbumItem.photos:type_name -> cloud.CloudPhotoItem 6, // 2: cloud.ListPhotosResponse.photos:type_name -> cloud.CloudPhotoItem 3, // 3: cloud.CloudPhotoItem.album:type_name -> cloud.CloudAlbumItem 0, // 4: cloud.Album.CreateAlbum:input_type -> cloud.CreateAlbumRequest - 7, // 5: cloud.Album.GetAlbum:input_type -> cloud.IdentRequest + 7, // 5: cloud.Album.GetAlbum:input_type -> blocks.IdentRequest 3, // 6: cloud.Album.UpdateAlbum:input_type -> cloud.CloudAlbumItem - 7, // 7: cloud.Album.DeleteAlbum:input_type -> cloud.IdentRequest - 8, // 8: cloud.Album.ListAlbums:input_type -> cloud.FetchRequest + 7, // 7: cloud.Album.DeleteAlbum:input_type -> blocks.IdentRequest + 8, // 8: cloud.Album.ListAlbums:input_type -> blocks.FetchRequest 2, // 9: cloud.Album.SetCoverPhoto:input_type -> cloud.SetCoverPhotoRequest 6, // 10: cloud.Album.UploadPhoto:input_type -> cloud.CloudPhotoItem - 7, // 11: cloud.Album.GetPhoto:input_type -> cloud.IdentRequest + 7, // 11: cloud.Album.GetPhoto:input_type -> blocks.IdentRequest 6, // 12: cloud.Album.UpdatePhoto:input_type -> cloud.CloudPhotoItem - 7, // 13: cloud.Album.DeletePhoto:input_type -> cloud.IdentRequest - 8, // 14: cloud.Album.ListPhotos:input_type -> cloud.FetchRequest + 7, // 13: cloud.Album.DeletePhoto:input_type -> blocks.IdentRequest + 8, // 14: cloud.Album.ListPhotos:input_type -> blocks.FetchRequest 5, // 15: cloud.Album.MovePhoto:input_type -> cloud.MovePhotoRequest - 9, // 16: cloud.Album.CreateAlbum:output_type -> cloud.StatusReply + 9, // 16: cloud.Album.CreateAlbum:output_type -> blocks.StatusReply 3, // 17: cloud.Album.GetAlbum:output_type -> cloud.CloudAlbumItem - 9, // 18: cloud.Album.UpdateAlbum:output_type -> cloud.StatusReply - 9, // 19: cloud.Album.DeleteAlbum:output_type -> cloud.StatusReply + 9, // 18: cloud.Album.UpdateAlbum:output_type -> blocks.StatusReply + 9, // 19: cloud.Album.DeleteAlbum:output_type -> blocks.StatusReply 1, // 20: cloud.Album.ListAlbums:output_type -> cloud.ListAlbumsResponse - 9, // 21: cloud.Album.SetCoverPhoto:output_type -> cloud.StatusReply - 9, // 22: cloud.Album.UploadPhoto:output_type -> cloud.StatusReply + 9, // 21: cloud.Album.SetCoverPhoto:output_type -> blocks.StatusReply + 9, // 22: cloud.Album.UploadPhoto:output_type -> blocks.StatusReply 6, // 23: cloud.Album.GetPhoto:output_type -> cloud.CloudPhotoItem - 9, // 24: cloud.Album.UpdatePhoto:output_type -> cloud.StatusReply - 9, // 25: cloud.Album.DeletePhoto:output_type -> cloud.StatusReply + 9, // 24: cloud.Album.UpdatePhoto:output_type -> blocks.StatusReply + 9, // 25: cloud.Album.DeletePhoto:output_type -> blocks.StatusReply 4, // 26: cloud.Album.ListPhotos:output_type -> cloud.ListPhotosResponse - 9, // 27: cloud.Album.MovePhoto:output_type -> cloud.StatusReply + 9, // 27: cloud.Album.MovePhoto:output_type -> blocks.StatusReply 16, // [16:28] is the sub-list for method output_type 4, // [4:16] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name @@ -728,27 +729,26 @@ var file_album_proto_depIdxs = []int32{ 0, // [0:4] is the sub-list for field type_name } -func init() { file_album_proto_init() } -func file_album_proto_init() { - if File_album_proto != nil { +func init() { file_module_base_cloud_proto_album_proto_init() } +func file_module_base_cloud_proto_album_proto_init() { + if File_module_base_cloud_proto_album_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_album_proto_rawDesc), len(file_album_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_album_proto_rawDesc), len(file_module_base_cloud_proto_album_proto_rawDesc)), NumEnums: 0, NumMessages: 7, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_album_proto_goTypes, - DependencyIndexes: file_album_proto_depIdxs, - MessageInfos: file_album_proto_msgTypes, + GoTypes: file_module_base_cloud_proto_album_proto_goTypes, + DependencyIndexes: file_module_base_cloud_proto_album_proto_depIdxs, + MessageInfos: file_module_base_cloud_proto_album_proto_msgTypes, }.Build() - File_album_proto = out.File - file_album_proto_goTypes = nil - file_album_proto_depIdxs = nil + File_module_base_cloud_proto_album_proto = out.File + file_module_base_cloud_proto_album_proto_goTypes = nil + file_module_base_cloud_proto_album_proto_depIdxs = nil } diff --git a/module/base/cloud/pb/album.pb.gw.go b/module/base/cloud/pb/album.pb.gw.go index eb85b8b..f5046bd 100644 --- a/module/base/cloud/pb/album.pb.gw.go +++ b/module/base/cloud/pb/album.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: album.proto +// source: module/base/cloud/proto/album.proto /* Package cloud is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package cloud import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -64,7 +65,7 @@ func local_request_Album_CreateAlbum_0(ctx context.Context, marshaler runtime.Ma func request_Album_GetAlbum_0(ctx context.Context, marshaler runtime.Marshaler, client AlbumClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Album_GetAlbum_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Album_GetAlbum_0(ctx context.Context, marshaler runtime.Marshaler, server AlbumServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -118,7 +119,7 @@ func local_request_Album_UpdateAlbum_0(ctx context.Context, marshaler runtime.Ma func request_Album_DeleteAlbum_0(ctx context.Context, marshaler runtime.Marshaler, client AlbumClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Album_DeleteAlbum_0(ctx context.Context, marshaler runtime.Marshale func local_request_Album_DeleteAlbum_0(ctx context.Context, marshaler runtime.Marshaler, server AlbumServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -145,7 +146,7 @@ func local_request_Album_DeleteAlbum_0(ctx context.Context, marshaler runtime.Ma func request_Album_ListAlbums_0(ctx context.Context, marshaler runtime.Marshaler, client AlbumClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -160,7 +161,7 @@ func request_Album_ListAlbums_0(ctx context.Context, marshaler runtime.Marshaler func local_request_Album_ListAlbums_0(ctx context.Context, marshaler runtime.Marshaler, server AlbumServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -226,7 +227,7 @@ func local_request_Album_UploadPhoto_0(ctx context.Context, marshaler runtime.Ma func request_Album_GetPhoto_0(ctx context.Context, marshaler runtime.Marshaler, client AlbumClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -241,7 +242,7 @@ func request_Album_GetPhoto_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Album_GetPhoto_0(ctx context.Context, marshaler runtime.Marshaler, server AlbumServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -280,7 +281,7 @@ func local_request_Album_UpdatePhoto_0(ctx context.Context, marshaler runtime.Ma func request_Album_DeletePhoto_0(ctx context.Context, marshaler runtime.Marshaler, client AlbumClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -295,7 +296,7 @@ func request_Album_DeletePhoto_0(ctx context.Context, marshaler runtime.Marshale func local_request_Album_DeletePhoto_0(ctx context.Context, marshaler runtime.Marshaler, server AlbumServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -307,7 +308,7 @@ func local_request_Album_DeletePhoto_0(ctx context.Context, marshaler runtime.Ma func request_Album_ListPhotos_0(ctx context.Context, marshaler runtime.Marshaler, client AlbumClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -322,7 +323,7 @@ func request_Album_ListPhotos_0(ctx context.Context, marshaler runtime.Marshaler func local_request_Album_ListPhotos_0(ctx context.Context, marshaler runtime.Marshaler, server AlbumServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/base/cloud/pb/album_grpc.pb.go b/module/base/cloud/pb/album_grpc.pb.go index 87f8bc3..f40d7a9 100644 --- a/module/base/cloud/pb/album_grpc.pb.go +++ b/module/base/cloud/pb/album_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: album.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/cloud/proto/album.proto package cloud import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -40,29 +41,29 @@ const ( // 相册服务 type AlbumClient interface { // 创建相册 - CreateAlbum(ctx context.Context, in *CreateAlbumRequest, opts ...grpc.CallOption) (*StatusReply, error) + CreateAlbum(ctx context.Context, in *CreateAlbumRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取相册详情 - GetAlbum(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudAlbumItem, error) + GetAlbum(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudAlbumItem, error) // 更新相册 - UpdateAlbum(ctx context.Context, in *CloudAlbumItem, opts ...grpc.CallOption) (*StatusReply, error) + UpdateAlbum(ctx context.Context, in *CloudAlbumItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除相册 - DeleteAlbum(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + DeleteAlbum(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取相册列表 - ListAlbums(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListAlbumsResponse, error) + ListAlbums(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListAlbumsResponse, error) // 设置封面照片 - SetCoverPhoto(ctx context.Context, in *SetCoverPhotoRequest, opts ...grpc.CallOption) (*StatusReply, error) + SetCoverPhoto(ctx context.Context, in *SetCoverPhotoRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 上传照片 - UploadPhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*StatusReply, error) + UploadPhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取照片详情 - GetPhoto(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudPhotoItem, error) + GetPhoto(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudPhotoItem, error) // 更新照片 - UpdatePhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*StatusReply, error) + UpdatePhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除照片 - DeletePhoto(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + DeletePhoto(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取照片列表 - ListPhotos(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListPhotosResponse, error) + ListPhotos(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPhotosResponse, error) // 移动照片到其他相册 - MovePhoto(ctx context.Context, in *MovePhotoRequest, opts ...grpc.CallOption) (*StatusReply, error) + MovePhoto(ctx context.Context, in *MovePhotoRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type albumClient struct { @@ -73,9 +74,9 @@ func NewAlbumClient(cc grpc.ClientConnInterface) AlbumClient { return &albumClient{cc} } -func (c *albumClient) CreateAlbum(ctx context.Context, in *CreateAlbumRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *albumClient) CreateAlbum(ctx context.Context, in *CreateAlbumRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Album_CreateAlbum_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -83,7 +84,7 @@ func (c *albumClient) CreateAlbum(ctx context.Context, in *CreateAlbumRequest, o return out, nil } -func (c *albumClient) GetAlbum(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudAlbumItem, error) { +func (c *albumClient) GetAlbum(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudAlbumItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CloudAlbumItem) err := c.cc.Invoke(ctx, Album_GetAlbum_FullMethodName, in, out, cOpts...) @@ -93,9 +94,9 @@ func (c *albumClient) GetAlbum(ctx context.Context, in *IdentRequest, opts ...gr return out, nil } -func (c *albumClient) UpdateAlbum(ctx context.Context, in *CloudAlbumItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *albumClient) UpdateAlbum(ctx context.Context, in *CloudAlbumItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Album_UpdateAlbum_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -103,9 +104,9 @@ func (c *albumClient) UpdateAlbum(ctx context.Context, in *CloudAlbumItem, opts return out, nil } -func (c *albumClient) DeleteAlbum(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *albumClient) DeleteAlbum(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Album_DeleteAlbum_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -113,7 +114,7 @@ func (c *albumClient) DeleteAlbum(ctx context.Context, in *IdentRequest, opts .. return out, nil } -func (c *albumClient) ListAlbums(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListAlbumsResponse, error) { +func (c *albumClient) ListAlbums(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListAlbumsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListAlbumsResponse) err := c.cc.Invoke(ctx, Album_ListAlbums_FullMethodName, in, out, cOpts...) @@ -123,9 +124,9 @@ func (c *albumClient) ListAlbums(ctx context.Context, in *FetchRequest, opts ... return out, nil } -func (c *albumClient) SetCoverPhoto(ctx context.Context, in *SetCoverPhotoRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *albumClient) SetCoverPhoto(ctx context.Context, in *SetCoverPhotoRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Album_SetCoverPhoto_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -133,9 +134,9 @@ func (c *albumClient) SetCoverPhoto(ctx context.Context, in *SetCoverPhotoReques return out, nil } -func (c *albumClient) UploadPhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *albumClient) UploadPhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Album_UploadPhoto_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -143,7 +144,7 @@ func (c *albumClient) UploadPhoto(ctx context.Context, in *CloudPhotoItem, opts return out, nil } -func (c *albumClient) GetPhoto(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudPhotoItem, error) { +func (c *albumClient) GetPhoto(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudPhotoItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CloudPhotoItem) err := c.cc.Invoke(ctx, Album_GetPhoto_FullMethodName, in, out, cOpts...) @@ -153,9 +154,9 @@ func (c *albumClient) GetPhoto(ctx context.Context, in *IdentRequest, opts ...gr return out, nil } -func (c *albumClient) UpdatePhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *albumClient) UpdatePhoto(ctx context.Context, in *CloudPhotoItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Album_UpdatePhoto_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -163,9 +164,9 @@ func (c *albumClient) UpdatePhoto(ctx context.Context, in *CloudPhotoItem, opts return out, nil } -func (c *albumClient) DeletePhoto(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *albumClient) DeletePhoto(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Album_DeletePhoto_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -173,7 +174,7 @@ func (c *albumClient) DeletePhoto(ctx context.Context, in *IdentRequest, opts .. return out, nil } -func (c *albumClient) ListPhotos(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListPhotosResponse, error) { +func (c *albumClient) ListPhotos(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPhotosResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPhotosResponse) err := c.cc.Invoke(ctx, Album_ListPhotos_FullMethodName, in, out, cOpts...) @@ -183,9 +184,9 @@ func (c *albumClient) ListPhotos(ctx context.Context, in *FetchRequest, opts ... return out, nil } -func (c *albumClient) MovePhoto(ctx context.Context, in *MovePhotoRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *albumClient) MovePhoto(ctx context.Context, in *MovePhotoRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Album_MovePhoto_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -194,83 +195,81 @@ func (c *albumClient) MovePhoto(ctx context.Context, in *MovePhotoRequest, opts } // AlbumServer is the server API for Album service. -// All implementations must embed UnimplementedAlbumServer +// All implementations should embed UnimplementedAlbumServer // for forward compatibility. // // 相册服务 type AlbumServer interface { // 创建相册 - CreateAlbum(context.Context, *CreateAlbumRequest) (*StatusReply, error) + CreateAlbum(context.Context, *CreateAlbumRequest) (*protobuf.StatusReply, error) // 获取相册详情 - GetAlbum(context.Context, *IdentRequest) (*CloudAlbumItem, error) + GetAlbum(context.Context, *protobuf.IdentRequest) (*CloudAlbumItem, error) // 更新相册 - UpdateAlbum(context.Context, *CloudAlbumItem) (*StatusReply, error) + UpdateAlbum(context.Context, *CloudAlbumItem) (*protobuf.StatusReply, error) // 删除相册 - DeleteAlbum(context.Context, *IdentRequest) (*StatusReply, error) + DeleteAlbum(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) // 获取相册列表 - ListAlbums(context.Context, *FetchRequest) (*ListAlbumsResponse, error) + ListAlbums(context.Context, *protobuf.FetchRequest) (*ListAlbumsResponse, error) // 设置封面照片 - SetCoverPhoto(context.Context, *SetCoverPhotoRequest) (*StatusReply, error) + SetCoverPhoto(context.Context, *SetCoverPhotoRequest) (*protobuf.StatusReply, error) // 上传照片 - UploadPhoto(context.Context, *CloudPhotoItem) (*StatusReply, error) + UploadPhoto(context.Context, *CloudPhotoItem) (*protobuf.StatusReply, error) // 获取照片详情 - GetPhoto(context.Context, *IdentRequest) (*CloudPhotoItem, error) + GetPhoto(context.Context, *protobuf.IdentRequest) (*CloudPhotoItem, error) // 更新照片 - UpdatePhoto(context.Context, *CloudPhotoItem) (*StatusReply, error) + UpdatePhoto(context.Context, *CloudPhotoItem) (*protobuf.StatusReply, error) // 删除照片 - DeletePhoto(context.Context, *IdentRequest) (*StatusReply, error) + DeletePhoto(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) // 获取照片列表 - ListPhotos(context.Context, *FetchRequest) (*ListPhotosResponse, error) + ListPhotos(context.Context, *protobuf.FetchRequest) (*ListPhotosResponse, error) // 移动照片到其他相册 - MovePhoto(context.Context, *MovePhotoRequest) (*StatusReply, error) - mustEmbedUnimplementedAlbumServer() + MovePhoto(context.Context, *MovePhotoRequest) (*protobuf.StatusReply, error) } -// UnimplementedAlbumServer must be embedded to have +// UnimplementedAlbumServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedAlbumServer struct{} -func (UnimplementedAlbumServer) CreateAlbum(context.Context, *CreateAlbumRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateAlbum not implemented") +func (UnimplementedAlbumServer) CreateAlbum(context.Context, *CreateAlbumRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CreateAlbum not implemented") } -func (UnimplementedAlbumServer) GetAlbum(context.Context, *IdentRequest) (*CloudAlbumItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAlbum not implemented") +func (UnimplementedAlbumServer) GetAlbum(context.Context, *protobuf.IdentRequest) (*CloudAlbumItem, error) { + return nil, status.Error(codes.Unimplemented, "method GetAlbum not implemented") } -func (UnimplementedAlbumServer) UpdateAlbum(context.Context, *CloudAlbumItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateAlbum not implemented") +func (UnimplementedAlbumServer) UpdateAlbum(context.Context, *CloudAlbumItem) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateAlbum not implemented") } -func (UnimplementedAlbumServer) DeleteAlbum(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteAlbum not implemented") +func (UnimplementedAlbumServer) DeleteAlbum(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteAlbum not implemented") } -func (UnimplementedAlbumServer) ListAlbums(context.Context, *FetchRequest) (*ListAlbumsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListAlbums not implemented") +func (UnimplementedAlbumServer) ListAlbums(context.Context, *protobuf.FetchRequest) (*ListAlbumsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListAlbums not implemented") } -func (UnimplementedAlbumServer) SetCoverPhoto(context.Context, *SetCoverPhotoRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetCoverPhoto not implemented") +func (UnimplementedAlbumServer) SetCoverPhoto(context.Context, *SetCoverPhotoRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SetCoverPhoto not implemented") } -func (UnimplementedAlbumServer) UploadPhoto(context.Context, *CloudPhotoItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UploadPhoto not implemented") +func (UnimplementedAlbumServer) UploadPhoto(context.Context, *CloudPhotoItem) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method UploadPhoto not implemented") } -func (UnimplementedAlbumServer) GetPhoto(context.Context, *IdentRequest) (*CloudPhotoItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPhoto not implemented") +func (UnimplementedAlbumServer) GetPhoto(context.Context, *protobuf.IdentRequest) (*CloudPhotoItem, error) { + return nil, status.Error(codes.Unimplemented, "method GetPhoto not implemented") } -func (UnimplementedAlbumServer) UpdatePhoto(context.Context, *CloudPhotoItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdatePhoto not implemented") +func (UnimplementedAlbumServer) UpdatePhoto(context.Context, *CloudPhotoItem) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method UpdatePhoto not implemented") } -func (UnimplementedAlbumServer) DeletePhoto(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeletePhoto not implemented") +func (UnimplementedAlbumServer) DeletePhoto(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DeletePhoto not implemented") } -func (UnimplementedAlbumServer) ListPhotos(context.Context, *FetchRequest) (*ListPhotosResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListPhotos not implemented") +func (UnimplementedAlbumServer) ListPhotos(context.Context, *protobuf.FetchRequest) (*ListPhotosResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListPhotos not implemented") } -func (UnimplementedAlbumServer) MovePhoto(context.Context, *MovePhotoRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MovePhoto not implemented") +func (UnimplementedAlbumServer) MovePhoto(context.Context, *MovePhotoRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method MovePhoto not implemented") } -func (UnimplementedAlbumServer) mustEmbedUnimplementedAlbumServer() {} -func (UnimplementedAlbumServer) testEmbeddedByValue() {} +func (UnimplementedAlbumServer) testEmbeddedByValue() {} // UnsafeAlbumServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AlbumServer will @@ -280,7 +279,7 @@ type UnsafeAlbumServer interface { } func RegisterAlbumServer(s grpc.ServiceRegistrar, srv AlbumServer) { - // If the following call pancis, it indicates UnimplementedAlbumServer was + // If the following call panics, it indicates UnimplementedAlbumServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -309,7 +308,7 @@ func _Album_CreateAlbum_Handler(srv interface{}, ctx context.Context, dec func(i } func _Album_GetAlbum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -321,7 +320,7 @@ func _Album_GetAlbum_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Album_GetAlbum_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AlbumServer).GetAlbum(ctx, req.(*IdentRequest)) + return srv.(AlbumServer).GetAlbum(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -345,7 +344,7 @@ func _Album_UpdateAlbum_Handler(srv interface{}, ctx context.Context, dec func(i } func _Album_DeleteAlbum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -357,13 +356,13 @@ func _Album_DeleteAlbum_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: Album_DeleteAlbum_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AlbumServer).DeleteAlbum(ctx, req.(*IdentRequest)) + return srv.(AlbumServer).DeleteAlbum(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Album_ListAlbums_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -375,7 +374,7 @@ func _Album_ListAlbums_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: Album_ListAlbums_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AlbumServer).ListAlbums(ctx, req.(*FetchRequest)) + return srv.(AlbumServer).ListAlbums(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -417,7 +416,7 @@ func _Album_UploadPhoto_Handler(srv interface{}, ctx context.Context, dec func(i } func _Album_GetPhoto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -429,7 +428,7 @@ func _Album_GetPhoto_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Album_GetPhoto_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AlbumServer).GetPhoto(ctx, req.(*IdentRequest)) + return srv.(AlbumServer).GetPhoto(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -453,7 +452,7 @@ func _Album_UpdatePhoto_Handler(srv interface{}, ctx context.Context, dec func(i } func _Album_DeletePhoto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -465,13 +464,13 @@ func _Album_DeletePhoto_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: Album_DeletePhoto_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AlbumServer).DeletePhoto(ctx, req.(*IdentRequest)) + return srv.(AlbumServer).DeletePhoto(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Album_ListPhotos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -483,7 +482,7 @@ func _Album_ListPhotos_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: Album_ListPhotos_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AlbumServer).ListPhotos(ctx, req.(*FetchRequest)) + return srv.(AlbumServer).ListPhotos(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -563,5 +562,5 @@ var Album_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "album.proto", + Metadata: "module/base/cloud/proto/album.proto", } diff --git a/module/base/cloud/pb/blocks.pb.go b/module/base/cloud/pb/blocks.pb.go deleted file mode 100644 index 137dd30..0000000 --- a/module/base/cloud/pb/blocks.pb.go +++ /dev/null @@ -1,605 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: blocks.proto - -package cloud - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// 通用响应消息 -type Empty struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Empty) Reset() { - *x = Empty{} - mi := &file_blocks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Empty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Empty) ProtoMessage() {} - -func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{0} -} - -// 通用ID请求 -type IDRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IDRequest) Reset() { - *x = IDRequest{} - mi := &file_blocks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IDRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IDRequest) ProtoMessage() {} - -func (x *IDRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IDRequest.ProtoReflect.Descriptor instead. -func (*IDRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{1} -} - -func (x *IDRequest) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - -type IdentRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IdentRequest) Reset() { - *x = IdentRequest{} - mi := &file_blocks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IdentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IdentRequest) ProtoMessage() {} - -func (x *IdentRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. -func (*IdentRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{2} -} - -func (x *IdentRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *IdentRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -// 通用ID列表请求 -type IDListRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Ids []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IDListRequest) Reset() { - *x = IDListRequest{} - mi := &file_blocks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IDListRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IDListRequest) ProtoMessage() {} - -func (x *IDListRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IDListRequest.ProtoReflect.Descriptor instead. -func (*IDListRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{3} -} - -func (x *IDListRequest) GetIds() []uint64 { - if x != nil { - return x.Ids - } - return nil -} - -// 列表请求参数 -type FetchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PageNo int64 `protobuf:"varint,1,opt,name=page_no,proto3" json:"page_no,omitempty"` // 页数 - PageSize int64 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // 每页记录数 - Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:category_id=?,vlaue=11 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchRequest) Reset() { - *x = FetchRequest{} - mi := &file_blocks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRequest) ProtoMessage() {} - -func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. -func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{4} -} - -func (x *FetchRequest) GetPageNo() int64 { - if x != nil { - return x.PageNo - } - return 0 -} - -func (x *FetchRequest) GetPageSize() int64 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *FetchRequest) GetParams() map[string]string { - if x != nil { - return x.Params - } - return nil -} - -// 基础时间戳和ID结构 -type StdIicuds struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - CreatedAt string `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt string `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - DeletedAt string `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StdIicuds) Reset() { - *x = StdIicuds{} - mi := &file_blocks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StdIicuds) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StdIicuds) ProtoMessage() {} - -func (x *StdIicuds) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StdIicuds.ProtoReflect.Descriptor instead. -func (*StdIicuds) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{5} -} - -func (x *StdIicuds) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *StdIicuds) GetCreatedAt() string { - if x != nil { - return x.CreatedAt - } - return "" -} - -func (x *StdIicuds) GetUpdatedAt() string { - if x != nil { - return x.UpdatedAt - } - return "" -} - -func (x *StdIicuds) GetDeletedAt() string { - if x != nil { - return x.DeletedAt - } - return "" -} - -// 用户身份信息 -type StdPassport struct { - state protoimpl.MessageState `protogen:"open.v1"` - PassportId uint64 `protobuf:"varint,1,opt,name=passport_id,json=passportId,proto3" json:"passport_id,omitempty"` - PassportIdentity string `protobuf:"bytes,2,opt,name=passport_identity,json=passportIdentity,proto3" json:"passport_identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StdPassport) Reset() { - *x = StdPassport{} - mi := &file_blocks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StdPassport) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StdPassport) ProtoMessage() {} - -func (x *StdPassport) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StdPassport.ProtoReflect.Descriptor instead. -func (*StdPassport) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{6} -} - -func (x *StdPassport) GetPassportId() uint64 { - if x != nil { - return x.PassportId - } - return 0 -} - -func (x *StdPassport) GetPassportIdentity() string { - if x != nil { - return x.PassportIdentity - } - return "" -} - -// 云盘基础信息 -type CloudBase struct { - state protoimpl.MessageState `protogen:"open.v1"` - CloudId uint64 `protobuf:"varint,1,opt,name=cloud_id,json=cloudId,proto3" json:"cloud_id,omitempty"` - CloudIdentity string `protobuf:"bytes,2,opt,name=cloud_identity,json=cloudIdentity,proto3" json:"cloud_identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CloudBase) Reset() { - *x = CloudBase{} - mi := &file_blocks_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CloudBase) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CloudBase) ProtoMessage() {} - -func (x *CloudBase) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CloudBase.ProtoReflect.Descriptor instead. -func (*CloudBase) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{7} -} - -func (x *CloudBase) GetCloudId() uint64 { - if x != nil { - return x.CloudId - } - return 0 -} - -func (x *CloudBase) GetCloudIdentity() string { - if x != nil { - return x.CloudIdentity - } - return "" -} - -// 状态回复 -type StatusReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // 状态码 - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 状态说明 - Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` // 数据 - Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusReply) Reset() { - *x = StatusReply{} - mi := &file_blocks_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusReply) ProtoMessage() {} - -func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. -func (*StatusReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{8} -} - -func (x *StatusReply) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *StatusReply) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *StatusReply) GetDetails() string { - if x != nil { - return x.Details - } - return "" -} - -func (x *StatusReply) GetTimeseq() int64 { - if x != nil { - return x.Timeseq - } - return 0 -} - -var File_blocks_proto protoreflect.FileDescriptor - -const file_blocks_proto_rawDesc = "" + - "\n" + - "\x12cloud/blocks.proto\x12\x05cloud\"\a\n" + - "\x05Empty\"\x1b\n" + - "\tIDRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x04R\x02id\":\n" + - "\fIdentRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\"!\n" + - "\rIDListRequest\x12\x10\n" + - "\x03ids\x18\x01 \x03(\x04R\x03ids\"\xba\x01\n" + - "\fFetchRequest\x12\x18\n" + - "\apage_no\x18\x01 \x01(\x03R\apage_no\x12\x1c\n" + - "\tpage_size\x18\x02 \x01(\x03R\tpage_size\x127\n" + - "\x06params\x18\x03 \x03(\v2\x1f.cloud.FetchRequest.ParamsEntryR\x06params\x1a9\n" + - "\vParamsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"x\n" + - "\tStdIicuds\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x04R\x02id\x12\x1d\n" + - "\n" + - "created_at\x18\x02 \x01(\tR\tcreatedAt\x12\x1d\n" + - "\n" + - "updated_at\x18\x03 \x01(\tR\tupdatedAt\x12\x1d\n" + - "\n" + - "deleted_at\x18\x04 \x01(\tR\tdeletedAt\"[\n" + - "\vStdPassport\x12\x1f\n" + - "\vpassport_id\x18\x01 \x01(\x04R\n" + - "passportId\x12+\n" + - "\x11passport_identity\x18\x02 \x01(\tR\x10passportIdentity\"M\n" + - "\tCloudBase\x12\x19\n" + - "\bcloud_id\x18\x01 \x01(\x04R\acloudId\x12%\n" + - "\x0ecloud_identity\x18\x02 \x01(\tR\rcloudIdentity\"o\n" + - "\vStatusReply\x12\x12\n" + - "\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessage\x12\x18\n" + - "\adetails\x18\x03 \x01(\tR\adetails\x12\x18\n" + - "\atimeseq\x18\x04 \x01(\x03R\atimeseqB\tZ\a.;cloudb\x06proto3" - -var ( - file_blocks_proto_rawDescOnce sync.Once - file_blocks_proto_rawDescData []byte -) - -func file_blocks_proto_rawDescGZIP() []byte { - file_blocks_proto_rawDescOnce.Do(func() { - file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc))) - }) - return file_blocks_proto_rawDescData -} - -var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_blocks_proto_goTypes = []any{ - (*Empty)(nil), // 0: cloud.Empty - (*IDRequest)(nil), // 1: cloud.IDRequest - (*IdentRequest)(nil), // 2: cloud.IdentRequest - (*IDListRequest)(nil), // 3: cloud.IDListRequest - (*FetchRequest)(nil), // 4: cloud.FetchRequest - (*StdIicuds)(nil), // 5: cloud.StdIicuds - (*StdPassport)(nil), // 6: cloud.StdPassport - (*CloudBase)(nil), // 7: cloud.CloudBase - (*StatusReply)(nil), // 8: cloud.StatusReply - nil, // 9: cloud.FetchRequest.ParamsEntry -} -var file_blocks_proto_depIdxs = []int32{ - 9, // 0: cloud.FetchRequest.params:type_name -> cloud.FetchRequest.ParamsEntry - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_blocks_proto_init() } -func file_blocks_proto_init() { - if File_blocks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_blocks_proto_goTypes, - DependencyIndexes: file_blocks_proto_depIdxs, - MessageInfos: file_blocks_proto_msgTypes, - }.Build() - File_blocks_proto = out.File - file_blocks_proto_goTypes = nil - file_blocks_proto_depIdxs = nil -} diff --git a/module/base/cloud/pb/blocks_compat.go b/module/base/cloud/pb/blocks_compat.go new file mode 100644 index 0000000..fefbbc3 --- /dev/null +++ b/module/base/cloud/pb/blocks_compat.go @@ -0,0 +1,13 @@ +package cloud + +import blocks "bsm/full/protobuf" + +type Empty = blocks.Empty +type FetchRequest = blocks.FetchRequest +type IdentRequest = blocks.IdentRequest +type StatusReply = blocks.StatusReply +type IDRequest = blocks.IDRequest +type IDListRequest = blocks.IDListRequest +type StdIicuds = blocks.StdIicuds +type StdPassport = blocks.StdPassport +type CloudBase = blocks.CloudBase diff --git a/module/base/cloud/pb/bookmark.pb.go b/module/base/cloud/pb/bookmark.pb.go index 623e58f..7c71413 100644 --- a/module/base/cloud/pb/bookmark.pb.go +++ b/module/base/cloud/pb/bookmark.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: bookmark.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/base/cloud/proto/bookmark.proto package cloud import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -38,7 +39,7 @@ type CreateBookmarkRequest struct { func (x *CreateBookmarkRequest) Reset() { *x = CreateBookmarkRequest{} - mi := &file_bookmark_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_bookmark_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -50,7 +51,7 @@ func (x *CreateBookmarkRequest) String() string { func (*CreateBookmarkRequest) ProtoMessage() {} func (x *CreateBookmarkRequest) ProtoReflect() protoreflect.Message { - mi := &file_bookmark_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_bookmark_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63,7 +64,7 @@ func (x *CreateBookmarkRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateBookmarkRequest.ProtoReflect.Descriptor instead. func (*CreateBookmarkRequest) Descriptor() ([]byte, []int) { - return file_bookmark_proto_rawDescGZIP(), []int{0} + return file_module_base_cloud_proto_bookmark_proto_rawDescGZIP(), []int{0} } func (x *CreateBookmarkRequest) GetCloudId() uint64 { @@ -139,7 +140,7 @@ type ListBookmarksResponse struct { func (x *ListBookmarksResponse) Reset() { *x = ListBookmarksResponse{} - mi := &file_bookmark_proto_msgTypes[1] + mi := &file_module_base_cloud_proto_bookmark_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -151,7 +152,7 @@ func (x *ListBookmarksResponse) String() string { func (*ListBookmarksResponse) ProtoMessage() {} func (x *ListBookmarksResponse) ProtoReflect() protoreflect.Message { - mi := &file_bookmark_proto_msgTypes[1] + mi := &file_module_base_cloud_proto_bookmark_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -164,7 +165,7 @@ func (x *ListBookmarksResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListBookmarksResponse.ProtoReflect.Descriptor instead. func (*ListBookmarksResponse) Descriptor() ([]byte, []int) { - return file_bookmark_proto_rawDescGZIP(), []int{1} + return file_module_base_cloud_proto_bookmark_proto_rawDescGZIP(), []int{1} } func (x *ListBookmarksResponse) GetBookmarks() []*CloudBookmarkItem { @@ -191,7 +192,7 @@ type ImportBookmarksRequest struct { func (x *ImportBookmarksRequest) Reset() { *x = ImportBookmarksRequest{} - mi := &file_bookmark_proto_msgTypes[2] + mi := &file_module_base_cloud_proto_bookmark_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -203,7 +204,7 @@ func (x *ImportBookmarksRequest) String() string { func (*ImportBookmarksRequest) ProtoMessage() {} func (x *ImportBookmarksRequest) ProtoReflect() protoreflect.Message { - mi := &file_bookmark_proto_msgTypes[2] + mi := &file_module_base_cloud_proto_bookmark_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -216,7 +217,7 @@ func (x *ImportBookmarksRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ImportBookmarksRequest.ProtoReflect.Descriptor instead. func (*ImportBookmarksRequest) Descriptor() ([]byte, []int) { - return file_bookmark_proto_rawDescGZIP(), []int{2} + return file_module_base_cloud_proto_bookmark_proto_rawDescGZIP(), []int{2} } func (x *ImportBookmarksRequest) GetData() string { @@ -253,7 +254,7 @@ type CloudBookmarkItem struct { func (x *CloudBookmarkItem) Reset() { *x = CloudBookmarkItem{} - mi := &file_bookmark_proto_msgTypes[3] + mi := &file_module_base_cloud_proto_bookmark_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -265,7 +266,7 @@ func (x *CloudBookmarkItem) String() string { func (*CloudBookmarkItem) ProtoMessage() {} func (x *CloudBookmarkItem) ProtoReflect() protoreflect.Message { - mi := &file_bookmark_proto_msgTypes[3] + mi := &file_module_base_cloud_proto_bookmark_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -278,7 +279,7 @@ func (x *CloudBookmarkItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CloudBookmarkItem.ProtoReflect.Descriptor instead. func (*CloudBookmarkItem) Descriptor() ([]byte, []int) { - return file_bookmark_proto_rawDescGZIP(), []int{3} + return file_module_base_cloud_proto_bookmark_proto_rawDescGZIP(), []int{3} } func (x *CloudBookmarkItem) GetId() uint64 { @@ -358,11 +359,11 @@ func (x *CloudBookmarkItem) GetUpdatedAt() string { return "" } -var File_bookmark_proto protoreflect.FileDescriptor +var File_module_base_cloud_proto_bookmark_proto protoreflect.FileDescriptor -const file_bookmark_proto_rawDesc = "" + +const file_module_base_cloud_proto_bookmark_proto_rawDesc = "" + "\n" + - "\x19base/cloud/bookmark.proto\x12\x05cloud\x1a\x12cloud/blocks.proto\"\x86\x02\n" + + "&module/base/cloud/proto/bookmark.proto\x12\x05cloud\x1a\x15protobuf/blocks.proto\"\x86\x02\n" + "\x15CreateBookmarkRequest\x12\x19\n" + "\bcloud_id\x18\x01 \x01(\x04R\acloudId\x12%\n" + "\x0ecloud_identity\x18\x02 \x01(\tR\rcloudIdentity\x12\x14\n" + @@ -395,51 +396,51 @@ const file_bookmark_proto_rawDesc = "" + "created_at\x18\n" + " \x01(\tR\tcreatedAt\x12\x1d\n" + "\n" + - "updated_at\x18\v \x01(\tR\tupdatedAt2\x8b\x03\n" + - "\bBookmark\x12B\n" + - "\x0eCreateBookmark\x12\x1c.cloud.CreateBookmarkRequest\x1a\x12.cloud.StatusReply\x129\n" + - "\vGetBookmark\x12\x10.cloud.IDRequest\x1a\x18.cloud.CloudBookmarkItem\x12>\n" + - "\x0eUpdateBookmark\x12\x18.cloud.CloudBookmarkItem\x1a\x12.cloud.StatusReply\x126\n" + - "\x0eDeleteBookmark\x12\x10.cloud.IDRequest\x1a\x12.cloud.StatusReply\x12B\n" + - "\rListBookmarks\x12\x13.cloud.FetchRequest\x1a\x1c.cloud.ListBookmarksResponse\x12D\n" + - "\x0fImportBookmarks\x12\x1d.cloud.ImportBookmarksRequest\x1a\x12.cloud.StatusReplyB\tZ\a.;cloudb\x06proto3" + "updated_at\x18\v \x01(\tR\tupdatedAt2\x92\x03\n" + + "\bBookmark\x12C\n" + + "\x0eCreateBookmark\x12\x1c.cloud.CreateBookmarkRequest\x1a\x13.blocks.StatusReply\x12:\n" + + "\vGetBookmark\x12\x11.blocks.IDRequest\x1a\x18.cloud.CloudBookmarkItem\x12?\n" + + "\x0eUpdateBookmark\x12\x18.cloud.CloudBookmarkItem\x1a\x13.blocks.StatusReply\x128\n" + + "\x0eDeleteBookmark\x12\x11.blocks.IDRequest\x1a\x13.blocks.StatusReply\x12C\n" + + "\rListBookmarks\x12\x14.blocks.FetchRequest\x1a\x1c.cloud.ListBookmarksResponse\x12E\n" + + "\x0fImportBookmarks\x12\x1d.cloud.ImportBookmarksRequest\x1a\x13.blocks.StatusReplyB%Z#bsm/full/module/base/cloud/pb;cloudb\x06proto3" var ( - file_bookmark_proto_rawDescOnce sync.Once - file_bookmark_proto_rawDescData []byte + file_module_base_cloud_proto_bookmark_proto_rawDescOnce sync.Once + file_module_base_cloud_proto_bookmark_proto_rawDescData []byte ) -func file_bookmark_proto_rawDescGZIP() []byte { - file_bookmark_proto_rawDescOnce.Do(func() { - file_bookmark_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_bookmark_proto_rawDesc), len(file_bookmark_proto_rawDesc))) +func file_module_base_cloud_proto_bookmark_proto_rawDescGZIP() []byte { + file_module_base_cloud_proto_bookmark_proto_rawDescOnce.Do(func() { + file_module_base_cloud_proto_bookmark_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_bookmark_proto_rawDesc), len(file_module_base_cloud_proto_bookmark_proto_rawDesc))) }) - return file_bookmark_proto_rawDescData + return file_module_base_cloud_proto_bookmark_proto_rawDescData } -var file_bookmark_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_bookmark_proto_goTypes = []any{ +var file_module_base_cloud_proto_bookmark_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_module_base_cloud_proto_bookmark_proto_goTypes = []any{ (*CreateBookmarkRequest)(nil), // 0: cloud.CreateBookmarkRequest (*ListBookmarksResponse)(nil), // 1: cloud.ListBookmarksResponse (*ImportBookmarksRequest)(nil), // 2: cloud.ImportBookmarksRequest (*CloudBookmarkItem)(nil), // 3: cloud.CloudBookmarkItem - (*IDRequest)(nil), // 4: cloud.IDRequest - (*FetchRequest)(nil), // 5: cloud.FetchRequest - (*StatusReply)(nil), // 6: cloud.StatusReply + (*protobuf.IDRequest)(nil), // 4: blocks.IDRequest + (*protobuf.FetchRequest)(nil), // 5: blocks.FetchRequest + (*protobuf.StatusReply)(nil), // 6: blocks.StatusReply } -var file_bookmark_proto_depIdxs = []int32{ +var file_module_base_cloud_proto_bookmark_proto_depIdxs = []int32{ 3, // 0: cloud.ListBookmarksResponse.bookmarks:type_name -> cloud.CloudBookmarkItem 0, // 1: cloud.Bookmark.CreateBookmark:input_type -> cloud.CreateBookmarkRequest - 4, // 2: cloud.Bookmark.GetBookmark:input_type -> cloud.IDRequest + 4, // 2: cloud.Bookmark.GetBookmark:input_type -> blocks.IDRequest 3, // 3: cloud.Bookmark.UpdateBookmark:input_type -> cloud.CloudBookmarkItem - 4, // 4: cloud.Bookmark.DeleteBookmark:input_type -> cloud.IDRequest - 5, // 5: cloud.Bookmark.ListBookmarks:input_type -> cloud.FetchRequest + 4, // 4: cloud.Bookmark.DeleteBookmark:input_type -> blocks.IDRequest + 5, // 5: cloud.Bookmark.ListBookmarks:input_type -> blocks.FetchRequest 2, // 6: cloud.Bookmark.ImportBookmarks:input_type -> cloud.ImportBookmarksRequest - 6, // 7: cloud.Bookmark.CreateBookmark:output_type -> cloud.StatusReply + 6, // 7: cloud.Bookmark.CreateBookmark:output_type -> blocks.StatusReply 3, // 8: cloud.Bookmark.GetBookmark:output_type -> cloud.CloudBookmarkItem - 6, // 9: cloud.Bookmark.UpdateBookmark:output_type -> cloud.StatusReply - 6, // 10: cloud.Bookmark.DeleteBookmark:output_type -> cloud.StatusReply + 6, // 9: cloud.Bookmark.UpdateBookmark:output_type -> blocks.StatusReply + 6, // 10: cloud.Bookmark.DeleteBookmark:output_type -> blocks.StatusReply 1, // 11: cloud.Bookmark.ListBookmarks:output_type -> cloud.ListBookmarksResponse - 6, // 12: cloud.Bookmark.ImportBookmarks:output_type -> cloud.StatusReply + 6, // 12: cloud.Bookmark.ImportBookmarks:output_type -> blocks.StatusReply 7, // [7:13] is the sub-list for method output_type 1, // [1:7] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -447,27 +448,26 @@ var file_bookmark_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_bookmark_proto_init() } -func file_bookmark_proto_init() { - if File_bookmark_proto != nil { +func init() { file_module_base_cloud_proto_bookmark_proto_init() } +func file_module_base_cloud_proto_bookmark_proto_init() { + if File_module_base_cloud_proto_bookmark_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_bookmark_proto_rawDesc), len(file_bookmark_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_bookmark_proto_rawDesc), len(file_module_base_cloud_proto_bookmark_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_bookmark_proto_goTypes, - DependencyIndexes: file_bookmark_proto_depIdxs, - MessageInfos: file_bookmark_proto_msgTypes, + GoTypes: file_module_base_cloud_proto_bookmark_proto_goTypes, + DependencyIndexes: file_module_base_cloud_proto_bookmark_proto_depIdxs, + MessageInfos: file_module_base_cloud_proto_bookmark_proto_msgTypes, }.Build() - File_bookmark_proto = out.File - file_bookmark_proto_goTypes = nil - file_bookmark_proto_depIdxs = nil + File_module_base_cloud_proto_bookmark_proto = out.File + file_module_base_cloud_proto_bookmark_proto_goTypes = nil + file_module_base_cloud_proto_bookmark_proto_depIdxs = nil } diff --git a/module/base/cloud/pb/bookmark.pb.gw.go b/module/base/cloud/pb/bookmark.pb.gw.go index 14ef465..ffdcd7b 100644 --- a/module/base/cloud/pb/bookmark.pb.gw.go +++ b/module/base/cloud/pb/bookmark.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: bookmark.proto +// source: module/base/cloud/proto/bookmark.proto /* Package cloud is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package cloud import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -64,7 +65,7 @@ func local_request_Bookmark_CreateBookmark_0(ctx context.Context, marshaler runt func request_Bookmark_GetBookmark_0(ctx context.Context, marshaler runtime.Marshaler, client BookmarkClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IDRequest + protoReq blocks.IDRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Bookmark_GetBookmark_0(ctx context.Context, marshaler runtime.Marsh func local_request_Bookmark_GetBookmark_0(ctx context.Context, marshaler runtime.Marshaler, server BookmarkServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IDRequest + protoReq blocks.IDRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -118,7 +119,7 @@ func local_request_Bookmark_UpdateBookmark_0(ctx context.Context, marshaler runt func request_Bookmark_DeleteBookmark_0(ctx context.Context, marshaler runtime.Marshaler, client BookmarkClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IDRequest + protoReq blocks.IDRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Bookmark_DeleteBookmark_0(ctx context.Context, marshaler runtime.Ma func local_request_Bookmark_DeleteBookmark_0(ctx context.Context, marshaler runtime.Marshaler, server BookmarkServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IDRequest + protoReq blocks.IDRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -145,7 +146,7 @@ func local_request_Bookmark_DeleteBookmark_0(ctx context.Context, marshaler runt func request_Bookmark_ListBookmarks_0(ctx context.Context, marshaler runtime.Marshaler, client BookmarkClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -160,7 +161,7 @@ func request_Bookmark_ListBookmarks_0(ctx context.Context, marshaler runtime.Mar func local_request_Bookmark_ListBookmarks_0(ctx context.Context, marshaler runtime.Marshaler, server BookmarkServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/base/cloud/pb/bookmark_grpc.pb.go b/module/base/cloud/pb/bookmark_grpc.pb.go index dd6d9ec..6f0004e 100644 --- a/module/base/cloud/pb/bookmark_grpc.pb.go +++ b/module/base/cloud/pb/bookmark_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: bookmark.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/cloud/proto/bookmark.proto package cloud import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -34,17 +35,17 @@ const ( // 书签服务 type BookmarkClient interface { // 创建书签 - CreateBookmark(ctx context.Context, in *CreateBookmarkRequest, opts ...grpc.CallOption) (*StatusReply, error) + CreateBookmark(ctx context.Context, in *CreateBookmarkRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取书签详情 - GetBookmark(ctx context.Context, in *IDRequest, opts ...grpc.CallOption) (*CloudBookmarkItem, error) + GetBookmark(ctx context.Context, in *protobuf.IDRequest, opts ...grpc.CallOption) (*CloudBookmarkItem, error) // 更新书签 - UpdateBookmark(ctx context.Context, in *CloudBookmarkItem, opts ...grpc.CallOption) (*StatusReply, error) + UpdateBookmark(ctx context.Context, in *CloudBookmarkItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除书签 - DeleteBookmark(ctx context.Context, in *IDRequest, opts ...grpc.CallOption) (*StatusReply, error) + DeleteBookmark(ctx context.Context, in *protobuf.IDRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取书签列表 - ListBookmarks(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListBookmarksResponse, error) + ListBookmarks(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListBookmarksResponse, error) // 导入书签 - ImportBookmarks(ctx context.Context, in *ImportBookmarksRequest, opts ...grpc.CallOption) (*StatusReply, error) + ImportBookmarks(ctx context.Context, in *ImportBookmarksRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type bookmarkClient struct { @@ -55,9 +56,9 @@ func NewBookmarkClient(cc grpc.ClientConnInterface) BookmarkClient { return &bookmarkClient{cc} } -func (c *bookmarkClient) CreateBookmark(ctx context.Context, in *CreateBookmarkRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *bookmarkClient) CreateBookmark(ctx context.Context, in *CreateBookmarkRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Bookmark_CreateBookmark_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -65,7 +66,7 @@ func (c *bookmarkClient) CreateBookmark(ctx context.Context, in *CreateBookmarkR return out, nil } -func (c *bookmarkClient) GetBookmark(ctx context.Context, in *IDRequest, opts ...grpc.CallOption) (*CloudBookmarkItem, error) { +func (c *bookmarkClient) GetBookmark(ctx context.Context, in *protobuf.IDRequest, opts ...grpc.CallOption) (*CloudBookmarkItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CloudBookmarkItem) err := c.cc.Invoke(ctx, Bookmark_GetBookmark_FullMethodName, in, out, cOpts...) @@ -75,9 +76,9 @@ func (c *bookmarkClient) GetBookmark(ctx context.Context, in *IDRequest, opts .. return out, nil } -func (c *bookmarkClient) UpdateBookmark(ctx context.Context, in *CloudBookmarkItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *bookmarkClient) UpdateBookmark(ctx context.Context, in *CloudBookmarkItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Bookmark_UpdateBookmark_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -85,9 +86,9 @@ func (c *bookmarkClient) UpdateBookmark(ctx context.Context, in *CloudBookmarkIt return out, nil } -func (c *bookmarkClient) DeleteBookmark(ctx context.Context, in *IDRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *bookmarkClient) DeleteBookmark(ctx context.Context, in *protobuf.IDRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Bookmark_DeleteBookmark_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -95,7 +96,7 @@ func (c *bookmarkClient) DeleteBookmark(ctx context.Context, in *IDRequest, opts return out, nil } -func (c *bookmarkClient) ListBookmarks(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListBookmarksResponse, error) { +func (c *bookmarkClient) ListBookmarks(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListBookmarksResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListBookmarksResponse) err := c.cc.Invoke(ctx, Bookmark_ListBookmarks_FullMethodName, in, out, cOpts...) @@ -105,9 +106,9 @@ func (c *bookmarkClient) ListBookmarks(ctx context.Context, in *FetchRequest, op return out, nil } -func (c *bookmarkClient) ImportBookmarks(ctx context.Context, in *ImportBookmarksRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *bookmarkClient) ImportBookmarks(ctx context.Context, in *ImportBookmarksRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Bookmark_ImportBookmarks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -116,53 +117,51 @@ func (c *bookmarkClient) ImportBookmarks(ctx context.Context, in *ImportBookmark } // BookmarkServer is the server API for Bookmark service. -// All implementations must embed UnimplementedBookmarkServer +// All implementations should embed UnimplementedBookmarkServer // for forward compatibility. // // 书签服务 type BookmarkServer interface { // 创建书签 - CreateBookmark(context.Context, *CreateBookmarkRequest) (*StatusReply, error) + CreateBookmark(context.Context, *CreateBookmarkRequest) (*protobuf.StatusReply, error) // 获取书签详情 - GetBookmark(context.Context, *IDRequest) (*CloudBookmarkItem, error) + GetBookmark(context.Context, *protobuf.IDRequest) (*CloudBookmarkItem, error) // 更新书签 - UpdateBookmark(context.Context, *CloudBookmarkItem) (*StatusReply, error) + UpdateBookmark(context.Context, *CloudBookmarkItem) (*protobuf.StatusReply, error) // 删除书签 - DeleteBookmark(context.Context, *IDRequest) (*StatusReply, error) + DeleteBookmark(context.Context, *protobuf.IDRequest) (*protobuf.StatusReply, error) // 获取书签列表 - ListBookmarks(context.Context, *FetchRequest) (*ListBookmarksResponse, error) + ListBookmarks(context.Context, *protobuf.FetchRequest) (*ListBookmarksResponse, error) // 导入书签 - ImportBookmarks(context.Context, *ImportBookmarksRequest) (*StatusReply, error) - mustEmbedUnimplementedBookmarkServer() + ImportBookmarks(context.Context, *ImportBookmarksRequest) (*protobuf.StatusReply, error) } -// UnimplementedBookmarkServer must be embedded to have +// UnimplementedBookmarkServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedBookmarkServer struct{} -func (UnimplementedBookmarkServer) CreateBookmark(context.Context, *CreateBookmarkRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateBookmark not implemented") +func (UnimplementedBookmarkServer) CreateBookmark(context.Context, *CreateBookmarkRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CreateBookmark not implemented") } -func (UnimplementedBookmarkServer) GetBookmark(context.Context, *IDRequest) (*CloudBookmarkItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBookmark not implemented") +func (UnimplementedBookmarkServer) GetBookmark(context.Context, *protobuf.IDRequest) (*CloudBookmarkItem, error) { + return nil, status.Error(codes.Unimplemented, "method GetBookmark not implemented") } -func (UnimplementedBookmarkServer) UpdateBookmark(context.Context, *CloudBookmarkItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateBookmark not implemented") +func (UnimplementedBookmarkServer) UpdateBookmark(context.Context, *CloudBookmarkItem) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateBookmark not implemented") } -func (UnimplementedBookmarkServer) DeleteBookmark(context.Context, *IDRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteBookmark not implemented") +func (UnimplementedBookmarkServer) DeleteBookmark(context.Context, *protobuf.IDRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteBookmark not implemented") } -func (UnimplementedBookmarkServer) ListBookmarks(context.Context, *FetchRequest) (*ListBookmarksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListBookmarks not implemented") +func (UnimplementedBookmarkServer) ListBookmarks(context.Context, *protobuf.FetchRequest) (*ListBookmarksResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListBookmarks not implemented") } -func (UnimplementedBookmarkServer) ImportBookmarks(context.Context, *ImportBookmarksRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImportBookmarks not implemented") +func (UnimplementedBookmarkServer) ImportBookmarks(context.Context, *ImportBookmarksRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method ImportBookmarks not implemented") } -func (UnimplementedBookmarkServer) mustEmbedUnimplementedBookmarkServer() {} -func (UnimplementedBookmarkServer) testEmbeddedByValue() {} +func (UnimplementedBookmarkServer) testEmbeddedByValue() {} // UnsafeBookmarkServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BookmarkServer will @@ -172,7 +171,7 @@ type UnsafeBookmarkServer interface { } func RegisterBookmarkServer(s grpc.ServiceRegistrar, srv BookmarkServer) { - // If the following call pancis, it indicates UnimplementedBookmarkServer was + // If the following call panics, it indicates UnimplementedBookmarkServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -201,7 +200,7 @@ func _Bookmark_CreateBookmark_Handler(srv interface{}, ctx context.Context, dec } func _Bookmark_GetBookmark_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IDRequest) + in := new(protobuf.IDRequest) if err := dec(in); err != nil { return nil, err } @@ -213,7 +212,7 @@ func _Bookmark_GetBookmark_Handler(srv interface{}, ctx context.Context, dec fun FullMethod: Bookmark_GetBookmark_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookmarkServer).GetBookmark(ctx, req.(*IDRequest)) + return srv.(BookmarkServer).GetBookmark(ctx, req.(*protobuf.IDRequest)) } return interceptor(ctx, in, info, handler) } @@ -237,7 +236,7 @@ func _Bookmark_UpdateBookmark_Handler(srv interface{}, ctx context.Context, dec } func _Bookmark_DeleteBookmark_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IDRequest) + in := new(protobuf.IDRequest) if err := dec(in); err != nil { return nil, err } @@ -249,13 +248,13 @@ func _Bookmark_DeleteBookmark_Handler(srv interface{}, ctx context.Context, dec FullMethod: Bookmark_DeleteBookmark_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookmarkServer).DeleteBookmark(ctx, req.(*IDRequest)) + return srv.(BookmarkServer).DeleteBookmark(ctx, req.(*protobuf.IDRequest)) } return interceptor(ctx, in, info, handler) } func _Bookmark_ListBookmarks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -267,7 +266,7 @@ func _Bookmark_ListBookmarks_Handler(srv interface{}, ctx context.Context, dec f FullMethod: Bookmark_ListBookmarks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BookmarkServer).ListBookmarks(ctx, req.(*FetchRequest)) + return srv.(BookmarkServer).ListBookmarks(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -323,5 +322,5 @@ var Bookmark_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "bookmark.proto", + Metadata: "module/base/cloud/proto/bookmark.proto", } diff --git a/module/base/cloud/pb/disk.pb.go b/module/base/cloud/pb/disk.pb.go index c0ec480..6bed547 100644 --- a/module/base/cloud/pb/disk.pb.go +++ b/module/base/cloud/pb/disk.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: disk.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/base/cloud/proto/disk.proto package cloud import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -34,7 +35,7 @@ type CreateDirRequest struct { func (x *CreateDirRequest) Reset() { *x = CreateDirRequest{} - mi := &file_disk_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +47,7 @@ func (x *CreateDirRequest) String() string { func (*CreateDirRequest) ProtoMessage() {} func (x *CreateDirRequest) ProtoReflect() protoreflect.Message { - mi := &file_disk_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +60,7 @@ func (x *CreateDirRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateDirRequest.ProtoReflect.Descriptor instead. func (*CreateDirRequest) Descriptor() ([]byte, []int) { - return file_disk_proto_rawDescGZIP(), []int{0} + return file_module_base_cloud_proto_disk_proto_rawDescGZIP(), []int{0} } func (x *CreateDirRequest) GetCloudId() uint64 { @@ -108,7 +109,7 @@ type ListDirsResponse struct { func (x *ListDirsResponse) Reset() { *x = ListDirsResponse{} - mi := &file_disk_proto_msgTypes[1] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -120,7 +121,7 @@ func (x *ListDirsResponse) String() string { func (*ListDirsResponse) ProtoMessage() {} func (x *ListDirsResponse) ProtoReflect() protoreflect.Message { - mi := &file_disk_proto_msgTypes[1] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -133,7 +134,7 @@ func (x *ListDirsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListDirsResponse.ProtoReflect.Descriptor instead. func (*ListDirsResponse) Descriptor() ([]byte, []int) { - return file_disk_proto_rawDescGZIP(), []int{1} + return file_module_base_cloud_proto_disk_proto_rawDescGZIP(), []int{1} } func (x *ListDirsResponse) GetDirs() []*CloudDiskDirItem { @@ -170,7 +171,7 @@ type CloudDiskDirItem struct { func (x *CloudDiskDirItem) Reset() { *x = CloudDiskDirItem{} - mi := &file_disk_proto_msgTypes[2] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -182,7 +183,7 @@ func (x *CloudDiskDirItem) String() string { func (*CloudDiskDirItem) ProtoMessage() {} func (x *CloudDiskDirItem) ProtoReflect() protoreflect.Message { - mi := &file_disk_proto_msgTypes[2] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -195,7 +196,7 @@ func (x *CloudDiskDirItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CloudDiskDirItem.ProtoReflect.Descriptor instead. func (*CloudDiskDirItem) Descriptor() ([]byte, []int) { - return file_disk_proto_rawDescGZIP(), []int{2} + return file_module_base_cloud_proto_disk_proto_rawDescGZIP(), []int{2} } func (x *CloudDiskDirItem) GetId() uint64 { @@ -278,7 +279,7 @@ type MoveDirRequest struct { func (x *MoveDirRequest) Reset() { *x = MoveDirRequest{} - mi := &file_disk_proto_msgTypes[3] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -290,7 +291,7 @@ func (x *MoveDirRequest) String() string { func (*MoveDirRequest) ProtoMessage() {} func (x *MoveDirRequest) ProtoReflect() protoreflect.Message { - mi := &file_disk_proto_msgTypes[3] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -303,7 +304,7 @@ func (x *MoveDirRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MoveDirRequest.ProtoReflect.Descriptor instead. func (*MoveDirRequest) Descriptor() ([]byte, []int) { - return file_disk_proto_rawDescGZIP(), []int{3} + return file_module_base_cloud_proto_disk_proto_rawDescGZIP(), []int{3} } func (x *MoveDirRequest) GetId() uint64 { @@ -330,7 +331,7 @@ type ListFilesResponse struct { func (x *ListFilesResponse) Reset() { *x = ListFilesResponse{} - mi := &file_disk_proto_msgTypes[4] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -342,7 +343,7 @@ func (x *ListFilesResponse) String() string { func (*ListFilesResponse) ProtoMessage() {} func (x *ListFilesResponse) ProtoReflect() protoreflect.Message { - mi := &file_disk_proto_msgTypes[4] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -355,7 +356,7 @@ func (x *ListFilesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListFilesResponse.ProtoReflect.Descriptor instead. func (*ListFilesResponse) Descriptor() ([]byte, []int) { - return file_disk_proto_rawDescGZIP(), []int{4} + return file_module_base_cloud_proto_disk_proto_rawDescGZIP(), []int{4} } func (x *ListFilesResponse) GetFiles() []*CloudDiskFileItem { @@ -382,7 +383,7 @@ type MoveFileRequest struct { func (x *MoveFileRequest) Reset() { *x = MoveFileRequest{} - mi := &file_disk_proto_msgTypes[5] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -394,7 +395,7 @@ func (x *MoveFileRequest) String() string { func (*MoveFileRequest) ProtoMessage() {} func (x *MoveFileRequest) ProtoReflect() protoreflect.Message { - mi := &file_disk_proto_msgTypes[5] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -407,7 +408,7 @@ func (x *MoveFileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MoveFileRequest.ProtoReflect.Descriptor instead. func (*MoveFileRequest) Descriptor() ([]byte, []int) { - return file_disk_proto_rawDescGZIP(), []int{5} + return file_module_base_cloud_proto_disk_proto_rawDescGZIP(), []int{5} } func (x *MoveFileRequest) GetId() uint64 { @@ -435,7 +436,7 @@ type CopyFileRequest struct { func (x *CopyFileRequest) Reset() { *x = CopyFileRequest{} - mi := &file_disk_proto_msgTypes[6] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -447,7 +448,7 @@ func (x *CopyFileRequest) String() string { func (*CopyFileRequest) ProtoMessage() {} func (x *CopyFileRequest) ProtoReflect() protoreflect.Message { - mi := &file_disk_proto_msgTypes[6] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -460,7 +461,7 @@ func (x *CopyFileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CopyFileRequest.ProtoReflect.Descriptor instead. func (*CopyFileRequest) Descriptor() ([]byte, []int) { - return file_disk_proto_rawDescGZIP(), []int{6} + return file_module_base_cloud_proto_disk_proto_rawDescGZIP(), []int{6} } func (x *CopyFileRequest) GetId() uint64 { @@ -501,7 +502,7 @@ type CloudDiskFileRequest struct { func (x *CloudDiskFileRequest) Reset() { *x = CloudDiskFileRequest{} - mi := &file_disk_proto_msgTypes[7] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -513,7 +514,7 @@ func (x *CloudDiskFileRequest) String() string { func (*CloudDiskFileRequest) ProtoMessage() {} func (x *CloudDiskFileRequest) ProtoReflect() protoreflect.Message { - mi := &file_disk_proto_msgTypes[7] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -526,7 +527,7 @@ func (x *CloudDiskFileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CloudDiskFileRequest.ProtoReflect.Descriptor instead. func (*CloudDiskFileRequest) Descriptor() ([]byte, []int) { - return file_disk_proto_rawDescGZIP(), []int{7} + return file_module_base_cloud_proto_disk_proto_rawDescGZIP(), []int{7} } func (x *CloudDiskFileRequest) GetCloudId() uint64 { @@ -614,7 +615,7 @@ type CloudDiskFileItem struct { func (x *CloudDiskFileItem) Reset() { *x = CloudDiskFileItem{} - mi := &file_disk_proto_msgTypes[8] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -626,7 +627,7 @@ func (x *CloudDiskFileItem) String() string { func (*CloudDiskFileItem) ProtoMessage() {} func (x *CloudDiskFileItem) ProtoReflect() protoreflect.Message { - mi := &file_disk_proto_msgTypes[8] + mi := &file_module_base_cloud_proto_disk_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -639,7 +640,7 @@ func (x *CloudDiskFileItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CloudDiskFileItem.ProtoReflect.Descriptor instead. func (*CloudDiskFileItem) Descriptor() ([]byte, []int) { - return file_disk_proto_rawDescGZIP(), []int{8} + return file_module_base_cloud_proto_disk_proto_rawDescGZIP(), []int{8} } func (x *CloudDiskFileItem) GetId() uint64 { @@ -726,12 +727,11 @@ func (x *CloudDiskFileItem) GetDirectory() *CloudDiskDirItem { return nil } -var File_disk_proto protoreflect.FileDescriptor +var File_module_base_cloud_proto_disk_proto protoreflect.FileDescriptor -const file_disk_proto_rawDesc = "" + +const file_module_base_cloud_proto_disk_proto_rawDesc = "" + "\n" + - "\x15" + - "base/cloud/disk.proto\x12\x05cloud\x1a\x12cloud/blocks.proto\"\x99\x01\n" + + "\"module/base/cloud/proto/disk.proto\x12\x05cloud\x1a\x15protobuf/blocks.proto\"\x99\x01\n" + "\x10CreateDirRequest\x12\x19\n" + "\bcloud_id\x18\x01 \x01(\x04R\acloudId\x12%\n" + "\x0ecloud_identity\x18\x02 \x01(\tR\rcloudIdentity\x12\x1b\n" + @@ -793,56 +793,56 @@ const file_disk_proto_rawDesc = "" + " \x01(\tR\tcreatedAt\x12\x1d\n" + "\n" + "updated_at\x18\v \x01(\tR\tupdatedAt\x125\n" + - "\tdirectory\x18\f \x01(\v2\x17.cloud.CloudDiskDirItemR\tdirectory2\xea\x06\n" + - "\x04Disk\x128\n" + - "\tCreateDir\x12\x17.cloud.CreateDirRequest\x1a\x12.cloud.StatusReply\x126\n" + - "\x06GetDir\x12\x13.cloud.IdentRequest\x1a\x17.cloud.CloudDiskDirItem\x128\n" + - "\tUpdateDir\x12\x17.cloud.CloudDiskDirItem\x1a\x12.cloud.StatusReply\x124\n" + - "\tDeleteDir\x12\x13.cloud.IdentRequest\x1a\x12.cloud.StatusReply\x128\n" + - "\bListDirs\x12\x13.cloud.FetchRequest\x1a\x17.cloud.ListDirsResponse\x12:\n" + + "\tdirectory\x18\f \x01(\v2\x17.cloud.CloudDiskDirItemR\tdirectory2\xfb\x06\n" + + "\x04Disk\x129\n" + + "\tCreateDir\x12\x17.cloud.CreateDirRequest\x1a\x13.blocks.StatusReply\x127\n" + + "\x06GetDir\x12\x14.blocks.IdentRequest\x1a\x17.cloud.CloudDiskDirItem\x129\n" + + "\tUpdateDir\x12\x17.cloud.CloudDiskDirItem\x1a\x13.blocks.StatusReply\x126\n" + + "\tDeleteDir\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\x129\n" + + "\bListDirs\x12\x14.blocks.FetchRequest\x1a\x17.cloud.ListDirsResponse\x12;\n" + "\n" + - "GetDirTree\x12\x13.cloud.IdentRequest\x1a\x17.cloud.CloudDiskDirItem\x124\n" + - "\aMoveDir\x12\x15.cloud.MoveDirRequest\x1a\x12.cloud.StatusReply\x12=\n" + + "GetDirTree\x12\x14.blocks.IdentRequest\x1a\x17.cloud.CloudDiskDirItem\x125\n" + + "\aMoveDir\x12\x15.cloud.MoveDirRequest\x1a\x13.blocks.StatusReply\x12>\n" + "\n" + - "UploadFile\x12\x1b.cloud.CloudDiskFileRequest\x1a\x12.cloud.StatusReply\x128\n" + - "\aGetFile\x12\x13.cloud.IdentRequest\x1a\x18.cloud.CloudDiskFileItem\x12:\n" + + "UploadFile\x12\x1b.cloud.CloudDiskFileRequest\x1a\x13.blocks.StatusReply\x129\n" + + "\aGetFile\x12\x14.blocks.IdentRequest\x1a\x18.cloud.CloudDiskFileItem\x12;\n" + "\n" + - "UpdateFile\x12\x18.cloud.CloudDiskFileItem\x1a\x12.cloud.StatusReply\x125\n" + + "UpdateFile\x12\x18.cloud.CloudDiskFileItem\x1a\x13.blocks.StatusReply\x127\n" + "\n" + - "DeleteFile\x12\x13.cloud.IdentRequest\x1a\x12.cloud.StatusReply\x12:\n" + - "\tListFiles\x12\x13.cloud.FetchRequest\x1a\x18.cloud.ListFilesResponse\x126\n" + - "\bMoveFile\x12\x16.cloud.MoveFileRequest\x1a\x12.cloud.StatusReply\x126\n" + - "\bCopyFile\x12\x16.cloud.CopyFileRequest\x1a\x12.cloud.StatusReply\x12<\n" + - "\vSearchFiles\x12\x13.cloud.FetchRequest\x1a\x18.cloud.ListFilesResponseB\tZ\a.;cloudb\x06proto3" + "DeleteFile\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\x12;\n" + + "\tListFiles\x12\x14.blocks.FetchRequest\x1a\x18.cloud.ListFilesResponse\x127\n" + + "\bMoveFile\x12\x16.cloud.MoveFileRequest\x1a\x13.blocks.StatusReply\x127\n" + + "\bCopyFile\x12\x16.cloud.CopyFileRequest\x1a\x13.blocks.StatusReply\x12=\n" + + "\vSearchFiles\x12\x14.blocks.FetchRequest\x1a\x18.cloud.ListFilesResponseB%Z#bsm/full/module/base/cloud/pb;cloudb\x06proto3" var ( - file_disk_proto_rawDescOnce sync.Once - file_disk_proto_rawDescData []byte + file_module_base_cloud_proto_disk_proto_rawDescOnce sync.Once + file_module_base_cloud_proto_disk_proto_rawDescData []byte ) -func file_disk_proto_rawDescGZIP() []byte { - file_disk_proto_rawDescOnce.Do(func() { - file_disk_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_disk_proto_rawDesc), len(file_disk_proto_rawDesc))) +func file_module_base_cloud_proto_disk_proto_rawDescGZIP() []byte { + file_module_base_cloud_proto_disk_proto_rawDescOnce.Do(func() { + file_module_base_cloud_proto_disk_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_disk_proto_rawDesc), len(file_module_base_cloud_proto_disk_proto_rawDesc))) }) - return file_disk_proto_rawDescData + return file_module_base_cloud_proto_disk_proto_rawDescData } -var file_disk_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_disk_proto_goTypes = []any{ - (*CreateDirRequest)(nil), // 0: cloud.CreateDirRequest - (*ListDirsResponse)(nil), // 1: cloud.ListDirsResponse - (*CloudDiskDirItem)(nil), // 2: cloud.CloudDiskDirItem - (*MoveDirRequest)(nil), // 3: cloud.MoveDirRequest - (*ListFilesResponse)(nil), // 4: cloud.ListFilesResponse - (*MoveFileRequest)(nil), // 5: cloud.MoveFileRequest - (*CopyFileRequest)(nil), // 6: cloud.CopyFileRequest - (*CloudDiskFileRequest)(nil), // 7: cloud.CloudDiskFileRequest - (*CloudDiskFileItem)(nil), // 8: cloud.CloudDiskFileItem - (*IdentRequest)(nil), // 9: cloud.IdentRequest - (*FetchRequest)(nil), // 10: cloud.FetchRequest - (*StatusReply)(nil), // 11: cloud.StatusReply +var file_module_base_cloud_proto_disk_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_module_base_cloud_proto_disk_proto_goTypes = []any{ + (*CreateDirRequest)(nil), // 0: cloud.CreateDirRequest + (*ListDirsResponse)(nil), // 1: cloud.ListDirsResponse + (*CloudDiskDirItem)(nil), // 2: cloud.CloudDiskDirItem + (*MoveDirRequest)(nil), // 3: cloud.MoveDirRequest + (*ListFilesResponse)(nil), // 4: cloud.ListFilesResponse + (*MoveFileRequest)(nil), // 5: cloud.MoveFileRequest + (*CopyFileRequest)(nil), // 6: cloud.CopyFileRequest + (*CloudDiskFileRequest)(nil), // 7: cloud.CloudDiskFileRequest + (*CloudDiskFileItem)(nil), // 8: cloud.CloudDiskFileItem + (*protobuf.IdentRequest)(nil), // 9: blocks.IdentRequest + (*protobuf.FetchRequest)(nil), // 10: blocks.FetchRequest + (*protobuf.StatusReply)(nil), // 11: blocks.StatusReply } -var file_disk_proto_depIdxs = []int32{ +var file_module_base_cloud_proto_disk_proto_depIdxs = []int32{ 2, // 0: cloud.ListDirsResponse.dirs:type_name -> cloud.CloudDiskDirItem 2, // 1: cloud.CloudDiskDirItem.parent:type_name -> cloud.CloudDiskDirItem 2, // 2: cloud.CloudDiskDirItem.subdirectories:type_name -> cloud.CloudDiskDirItem @@ -850,34 +850,34 @@ var file_disk_proto_depIdxs = []int32{ 8, // 4: cloud.ListFilesResponse.files:type_name -> cloud.CloudDiskFileItem 2, // 5: cloud.CloudDiskFileItem.directory:type_name -> cloud.CloudDiskDirItem 0, // 6: cloud.Disk.CreateDir:input_type -> cloud.CreateDirRequest - 9, // 7: cloud.Disk.GetDir:input_type -> cloud.IdentRequest + 9, // 7: cloud.Disk.GetDir:input_type -> blocks.IdentRequest 2, // 8: cloud.Disk.UpdateDir:input_type -> cloud.CloudDiskDirItem - 9, // 9: cloud.Disk.DeleteDir:input_type -> cloud.IdentRequest - 10, // 10: cloud.Disk.ListDirs:input_type -> cloud.FetchRequest - 9, // 11: cloud.Disk.GetDirTree:input_type -> cloud.IdentRequest + 9, // 9: cloud.Disk.DeleteDir:input_type -> blocks.IdentRequest + 10, // 10: cloud.Disk.ListDirs:input_type -> blocks.FetchRequest + 9, // 11: cloud.Disk.GetDirTree:input_type -> blocks.IdentRequest 3, // 12: cloud.Disk.MoveDir:input_type -> cloud.MoveDirRequest 7, // 13: cloud.Disk.UploadFile:input_type -> cloud.CloudDiskFileRequest - 9, // 14: cloud.Disk.GetFile:input_type -> cloud.IdentRequest + 9, // 14: cloud.Disk.GetFile:input_type -> blocks.IdentRequest 8, // 15: cloud.Disk.UpdateFile:input_type -> cloud.CloudDiskFileItem - 9, // 16: cloud.Disk.DeleteFile:input_type -> cloud.IdentRequest - 10, // 17: cloud.Disk.ListFiles:input_type -> cloud.FetchRequest + 9, // 16: cloud.Disk.DeleteFile:input_type -> blocks.IdentRequest + 10, // 17: cloud.Disk.ListFiles:input_type -> blocks.FetchRequest 5, // 18: cloud.Disk.MoveFile:input_type -> cloud.MoveFileRequest 6, // 19: cloud.Disk.CopyFile:input_type -> cloud.CopyFileRequest - 10, // 20: cloud.Disk.SearchFiles:input_type -> cloud.FetchRequest - 11, // 21: cloud.Disk.CreateDir:output_type -> cloud.StatusReply + 10, // 20: cloud.Disk.SearchFiles:input_type -> blocks.FetchRequest + 11, // 21: cloud.Disk.CreateDir:output_type -> blocks.StatusReply 2, // 22: cloud.Disk.GetDir:output_type -> cloud.CloudDiskDirItem - 11, // 23: cloud.Disk.UpdateDir:output_type -> cloud.StatusReply - 11, // 24: cloud.Disk.DeleteDir:output_type -> cloud.StatusReply + 11, // 23: cloud.Disk.UpdateDir:output_type -> blocks.StatusReply + 11, // 24: cloud.Disk.DeleteDir:output_type -> blocks.StatusReply 1, // 25: cloud.Disk.ListDirs:output_type -> cloud.ListDirsResponse 2, // 26: cloud.Disk.GetDirTree:output_type -> cloud.CloudDiskDirItem - 11, // 27: cloud.Disk.MoveDir:output_type -> cloud.StatusReply - 11, // 28: cloud.Disk.UploadFile:output_type -> cloud.StatusReply + 11, // 27: cloud.Disk.MoveDir:output_type -> blocks.StatusReply + 11, // 28: cloud.Disk.UploadFile:output_type -> blocks.StatusReply 8, // 29: cloud.Disk.GetFile:output_type -> cloud.CloudDiskFileItem - 11, // 30: cloud.Disk.UpdateFile:output_type -> cloud.StatusReply - 11, // 31: cloud.Disk.DeleteFile:output_type -> cloud.StatusReply + 11, // 30: cloud.Disk.UpdateFile:output_type -> blocks.StatusReply + 11, // 31: cloud.Disk.DeleteFile:output_type -> blocks.StatusReply 4, // 32: cloud.Disk.ListFiles:output_type -> cloud.ListFilesResponse - 11, // 33: cloud.Disk.MoveFile:output_type -> cloud.StatusReply - 11, // 34: cloud.Disk.CopyFile:output_type -> cloud.StatusReply + 11, // 33: cloud.Disk.MoveFile:output_type -> blocks.StatusReply + 11, // 34: cloud.Disk.CopyFile:output_type -> blocks.StatusReply 4, // 35: cloud.Disk.SearchFiles:output_type -> cloud.ListFilesResponse 21, // [21:36] is the sub-list for method output_type 6, // [6:21] is the sub-list for method input_type @@ -886,27 +886,26 @@ var file_disk_proto_depIdxs = []int32{ 0, // [0:6] is the sub-list for field type_name } -func init() { file_disk_proto_init() } -func file_disk_proto_init() { - if File_disk_proto != nil { +func init() { file_module_base_cloud_proto_disk_proto_init() } +func file_module_base_cloud_proto_disk_proto_init() { + if File_module_base_cloud_proto_disk_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_disk_proto_rawDesc), len(file_disk_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_disk_proto_rawDesc), len(file_module_base_cloud_proto_disk_proto_rawDesc)), NumEnums: 0, NumMessages: 9, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_disk_proto_goTypes, - DependencyIndexes: file_disk_proto_depIdxs, - MessageInfos: file_disk_proto_msgTypes, + GoTypes: file_module_base_cloud_proto_disk_proto_goTypes, + DependencyIndexes: file_module_base_cloud_proto_disk_proto_depIdxs, + MessageInfos: file_module_base_cloud_proto_disk_proto_msgTypes, }.Build() - File_disk_proto = out.File - file_disk_proto_goTypes = nil - file_disk_proto_depIdxs = nil + File_module_base_cloud_proto_disk_proto = out.File + file_module_base_cloud_proto_disk_proto_goTypes = nil + file_module_base_cloud_proto_disk_proto_depIdxs = nil } diff --git a/module/base/cloud/pb/disk.pb.gw.go b/module/base/cloud/pb/disk.pb.gw.go index a2939eb..6170124 100644 --- a/module/base/cloud/pb/disk.pb.gw.go +++ b/module/base/cloud/pb/disk.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: disk.proto +// source: module/base/cloud/proto/disk.proto /* Package cloud is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package cloud import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -64,7 +65,7 @@ func local_request_Disk_CreateDir_0(ctx context.Context, marshaler runtime.Marsh func request_Disk_GetDir_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Disk_GetDir_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Disk_GetDir_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -118,7 +119,7 @@ func local_request_Disk_UpdateDir_0(ctx context.Context, marshaler runtime.Marsh func request_Disk_DeleteDir_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Disk_DeleteDir_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Disk_DeleteDir_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -145,7 +146,7 @@ func local_request_Disk_DeleteDir_0(ctx context.Context, marshaler runtime.Marsh func request_Disk_ListDirs_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -160,7 +161,7 @@ func request_Disk_ListDirs_0(ctx context.Context, marshaler runtime.Marshaler, c func local_request_Disk_ListDirs_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -172,7 +173,7 @@ func local_request_Disk_ListDirs_0(ctx context.Context, marshaler runtime.Marsha func request_Disk_GetDirTree_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -187,7 +188,7 @@ func request_Disk_GetDirTree_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Disk_GetDirTree_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -253,7 +254,7 @@ func local_request_Disk_UploadFile_0(ctx context.Context, marshaler runtime.Mars func request_Disk_GetFile_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -268,7 +269,7 @@ func request_Disk_GetFile_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Disk_GetFile_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -307,7 +308,7 @@ func local_request_Disk_UpdateFile_0(ctx context.Context, marshaler runtime.Mars func request_Disk_DeleteFile_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -322,7 +323,7 @@ func request_Disk_DeleteFile_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Disk_DeleteFile_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -334,7 +335,7 @@ func local_request_Disk_DeleteFile_0(ctx context.Context, marshaler runtime.Mars func request_Disk_ListFiles_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -349,7 +350,7 @@ func request_Disk_ListFiles_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Disk_ListFiles_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -415,7 +416,7 @@ func local_request_Disk_CopyFile_0(ctx context.Context, marshaler runtime.Marsha func request_Disk_SearchFiles_0(ctx context.Context, marshaler runtime.Marshaler, client DiskClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -430,7 +431,7 @@ func request_Disk_SearchFiles_0(ctx context.Context, marshaler runtime.Marshaler func local_request_Disk_SearchFiles_0(ctx context.Context, marshaler runtime.Marshaler, server DiskServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/base/cloud/pb/disk_grpc.pb.go b/module/base/cloud/pb/disk_grpc.pb.go index d7ac695..5a412bc 100644 --- a/module/base/cloud/pb/disk_grpc.pb.go +++ b/module/base/cloud/pb/disk_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: disk.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/cloud/proto/disk.proto package cloud import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -43,35 +44,35 @@ const ( // 云盘目录服务 type DiskClient interface { // 创建目录 - CreateDir(ctx context.Context, in *CreateDirRequest, opts ...grpc.CallOption) (*StatusReply, error) + CreateDir(ctx context.Context, in *CreateDirRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取目录详情 - GetDir(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudDiskDirItem, error) + GetDir(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudDiskDirItem, error) // 更新目录 - UpdateDir(ctx context.Context, in *CloudDiskDirItem, opts ...grpc.CallOption) (*StatusReply, error) + UpdateDir(ctx context.Context, in *CloudDiskDirItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除目录 - DeleteDir(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + DeleteDir(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取目录列表 - ListDirs(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListDirsResponse, error) + ListDirs(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListDirsResponse, error) // 获取目录树 - GetDirTree(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudDiskDirItem, error) + GetDirTree(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudDiskDirItem, error) // 移动目录 - MoveDir(ctx context.Context, in *MoveDirRequest, opts ...grpc.CallOption) (*StatusReply, error) + MoveDir(ctx context.Context, in *MoveDirRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 上传文件 - UploadFile(ctx context.Context, in *CloudDiskFileRequest, opts ...grpc.CallOption) (*StatusReply, error) + UploadFile(ctx context.Context, in *CloudDiskFileRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取文件详情 - GetFile(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudDiskFileItem, error) + GetFile(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudDiskFileItem, error) // 更新文件 - UpdateFile(ctx context.Context, in *CloudDiskFileItem, opts ...grpc.CallOption) (*StatusReply, error) + UpdateFile(ctx context.Context, in *CloudDiskFileItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除文件 - DeleteFile(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + DeleteFile(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取文件列表 - ListFiles(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) + ListFiles(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) // 移动文件 - MoveFile(ctx context.Context, in *MoveFileRequest, opts ...grpc.CallOption) (*StatusReply, error) + MoveFile(ctx context.Context, in *MoveFileRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 复制文件 - CopyFile(ctx context.Context, in *CopyFileRequest, opts ...grpc.CallOption) (*StatusReply, error) + CopyFile(ctx context.Context, in *CopyFileRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 搜索文件 - SearchFiles(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) + SearchFiles(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) } type diskClient struct { @@ -82,9 +83,9 @@ func NewDiskClient(cc grpc.ClientConnInterface) DiskClient { return &diskClient{cc} } -func (c *diskClient) CreateDir(ctx context.Context, in *CreateDirRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *diskClient) CreateDir(ctx context.Context, in *CreateDirRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Disk_CreateDir_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -92,7 +93,7 @@ func (c *diskClient) CreateDir(ctx context.Context, in *CreateDirRequest, opts . return out, nil } -func (c *diskClient) GetDir(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudDiskDirItem, error) { +func (c *diskClient) GetDir(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudDiskDirItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CloudDiskDirItem) err := c.cc.Invoke(ctx, Disk_GetDir_FullMethodName, in, out, cOpts...) @@ -102,9 +103,9 @@ func (c *diskClient) GetDir(ctx context.Context, in *IdentRequest, opts ...grpc. return out, nil } -func (c *diskClient) UpdateDir(ctx context.Context, in *CloudDiskDirItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *diskClient) UpdateDir(ctx context.Context, in *CloudDiskDirItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Disk_UpdateDir_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -112,9 +113,9 @@ func (c *diskClient) UpdateDir(ctx context.Context, in *CloudDiskDirItem, opts . return out, nil } -func (c *diskClient) DeleteDir(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *diskClient) DeleteDir(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Disk_DeleteDir_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -122,7 +123,7 @@ func (c *diskClient) DeleteDir(ctx context.Context, in *IdentRequest, opts ...gr return out, nil } -func (c *diskClient) ListDirs(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListDirsResponse, error) { +func (c *diskClient) ListDirs(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListDirsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListDirsResponse) err := c.cc.Invoke(ctx, Disk_ListDirs_FullMethodName, in, out, cOpts...) @@ -132,7 +133,7 @@ func (c *diskClient) ListDirs(ctx context.Context, in *FetchRequest, opts ...grp return out, nil } -func (c *diskClient) GetDirTree(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudDiskDirItem, error) { +func (c *diskClient) GetDirTree(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudDiskDirItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CloudDiskDirItem) err := c.cc.Invoke(ctx, Disk_GetDirTree_FullMethodName, in, out, cOpts...) @@ -142,9 +143,9 @@ func (c *diskClient) GetDirTree(ctx context.Context, in *IdentRequest, opts ...g return out, nil } -func (c *diskClient) MoveDir(ctx context.Context, in *MoveDirRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *diskClient) MoveDir(ctx context.Context, in *MoveDirRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Disk_MoveDir_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -152,9 +153,9 @@ func (c *diskClient) MoveDir(ctx context.Context, in *MoveDirRequest, opts ...gr return out, nil } -func (c *diskClient) UploadFile(ctx context.Context, in *CloudDiskFileRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *diskClient) UploadFile(ctx context.Context, in *CloudDiskFileRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Disk_UploadFile_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -162,7 +163,7 @@ func (c *diskClient) UploadFile(ctx context.Context, in *CloudDiskFileRequest, o return out, nil } -func (c *diskClient) GetFile(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudDiskFileItem, error) { +func (c *diskClient) GetFile(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudDiskFileItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CloudDiskFileItem) err := c.cc.Invoke(ctx, Disk_GetFile_FullMethodName, in, out, cOpts...) @@ -172,9 +173,9 @@ func (c *diskClient) GetFile(ctx context.Context, in *IdentRequest, opts ...grpc return out, nil } -func (c *diskClient) UpdateFile(ctx context.Context, in *CloudDiskFileItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *diskClient) UpdateFile(ctx context.Context, in *CloudDiskFileItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Disk_UpdateFile_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -182,9 +183,9 @@ func (c *diskClient) UpdateFile(ctx context.Context, in *CloudDiskFileItem, opts return out, nil } -func (c *diskClient) DeleteFile(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *diskClient) DeleteFile(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Disk_DeleteFile_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -192,7 +193,7 @@ func (c *diskClient) DeleteFile(ctx context.Context, in *IdentRequest, opts ...g return out, nil } -func (c *diskClient) ListFiles(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) { +func (c *diskClient) ListFiles(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListFilesResponse) err := c.cc.Invoke(ctx, Disk_ListFiles_FullMethodName, in, out, cOpts...) @@ -202,9 +203,9 @@ func (c *diskClient) ListFiles(ctx context.Context, in *FetchRequest, opts ...gr return out, nil } -func (c *diskClient) MoveFile(ctx context.Context, in *MoveFileRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *diskClient) MoveFile(ctx context.Context, in *MoveFileRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Disk_MoveFile_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -212,9 +213,9 @@ func (c *diskClient) MoveFile(ctx context.Context, in *MoveFileRequest, opts ... return out, nil } -func (c *diskClient) CopyFile(ctx context.Context, in *CopyFileRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *diskClient) CopyFile(ctx context.Context, in *CopyFileRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Disk_CopyFile_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -222,7 +223,7 @@ func (c *diskClient) CopyFile(ctx context.Context, in *CopyFileRequest, opts ... return out, nil } -func (c *diskClient) SearchFiles(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) { +func (c *diskClient) SearchFiles(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListFilesResponse) err := c.cc.Invoke(ctx, Disk_SearchFiles_FullMethodName, in, out, cOpts...) @@ -233,98 +234,96 @@ func (c *diskClient) SearchFiles(ctx context.Context, in *FetchRequest, opts ... } // DiskServer is the server API for Disk service. -// All implementations must embed UnimplementedDiskServer +// All implementations should embed UnimplementedDiskServer // for forward compatibility. // // 云盘目录服务 type DiskServer interface { // 创建目录 - CreateDir(context.Context, *CreateDirRequest) (*StatusReply, error) + CreateDir(context.Context, *CreateDirRequest) (*protobuf.StatusReply, error) // 获取目录详情 - GetDir(context.Context, *IdentRequest) (*CloudDiskDirItem, error) + GetDir(context.Context, *protobuf.IdentRequest) (*CloudDiskDirItem, error) // 更新目录 - UpdateDir(context.Context, *CloudDiskDirItem) (*StatusReply, error) + UpdateDir(context.Context, *CloudDiskDirItem) (*protobuf.StatusReply, error) // 删除目录 - DeleteDir(context.Context, *IdentRequest) (*StatusReply, error) + DeleteDir(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) // 获取目录列表 - ListDirs(context.Context, *FetchRequest) (*ListDirsResponse, error) + ListDirs(context.Context, *protobuf.FetchRequest) (*ListDirsResponse, error) // 获取目录树 - GetDirTree(context.Context, *IdentRequest) (*CloudDiskDirItem, error) + GetDirTree(context.Context, *protobuf.IdentRequest) (*CloudDiskDirItem, error) // 移动目录 - MoveDir(context.Context, *MoveDirRequest) (*StatusReply, error) + MoveDir(context.Context, *MoveDirRequest) (*protobuf.StatusReply, error) // 上传文件 - UploadFile(context.Context, *CloudDiskFileRequest) (*StatusReply, error) + UploadFile(context.Context, *CloudDiskFileRequest) (*protobuf.StatusReply, error) // 获取文件详情 - GetFile(context.Context, *IdentRequest) (*CloudDiskFileItem, error) + GetFile(context.Context, *protobuf.IdentRequest) (*CloudDiskFileItem, error) // 更新文件 - UpdateFile(context.Context, *CloudDiskFileItem) (*StatusReply, error) + UpdateFile(context.Context, *CloudDiskFileItem) (*protobuf.StatusReply, error) // 删除文件 - DeleteFile(context.Context, *IdentRequest) (*StatusReply, error) + DeleteFile(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) // 获取文件列表 - ListFiles(context.Context, *FetchRequest) (*ListFilesResponse, error) + ListFiles(context.Context, *protobuf.FetchRequest) (*ListFilesResponse, error) // 移动文件 - MoveFile(context.Context, *MoveFileRequest) (*StatusReply, error) + MoveFile(context.Context, *MoveFileRequest) (*protobuf.StatusReply, error) // 复制文件 - CopyFile(context.Context, *CopyFileRequest) (*StatusReply, error) + CopyFile(context.Context, *CopyFileRequest) (*protobuf.StatusReply, error) // 搜索文件 - SearchFiles(context.Context, *FetchRequest) (*ListFilesResponse, error) - mustEmbedUnimplementedDiskServer() + SearchFiles(context.Context, *protobuf.FetchRequest) (*ListFilesResponse, error) } -// UnimplementedDiskServer must be embedded to have +// UnimplementedDiskServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedDiskServer struct{} -func (UnimplementedDiskServer) CreateDir(context.Context, *CreateDirRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateDir not implemented") +func (UnimplementedDiskServer) CreateDir(context.Context, *CreateDirRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CreateDir not implemented") } -func (UnimplementedDiskServer) GetDir(context.Context, *IdentRequest) (*CloudDiskDirItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDir not implemented") +func (UnimplementedDiskServer) GetDir(context.Context, *protobuf.IdentRequest) (*CloudDiskDirItem, error) { + return nil, status.Error(codes.Unimplemented, "method GetDir not implemented") } -func (UnimplementedDiskServer) UpdateDir(context.Context, *CloudDiskDirItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateDir not implemented") +func (UnimplementedDiskServer) UpdateDir(context.Context, *CloudDiskDirItem) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateDir not implemented") } -func (UnimplementedDiskServer) DeleteDir(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteDir not implemented") +func (UnimplementedDiskServer) DeleteDir(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteDir not implemented") } -func (UnimplementedDiskServer) ListDirs(context.Context, *FetchRequest) (*ListDirsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListDirs not implemented") +func (UnimplementedDiskServer) ListDirs(context.Context, *protobuf.FetchRequest) (*ListDirsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListDirs not implemented") } -func (UnimplementedDiskServer) GetDirTree(context.Context, *IdentRequest) (*CloudDiskDirItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDirTree not implemented") +func (UnimplementedDiskServer) GetDirTree(context.Context, *protobuf.IdentRequest) (*CloudDiskDirItem, error) { + return nil, status.Error(codes.Unimplemented, "method GetDirTree not implemented") } -func (UnimplementedDiskServer) MoveDir(context.Context, *MoveDirRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MoveDir not implemented") +func (UnimplementedDiskServer) MoveDir(context.Context, *MoveDirRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method MoveDir not implemented") } -func (UnimplementedDiskServer) UploadFile(context.Context, *CloudDiskFileRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UploadFile not implemented") +func (UnimplementedDiskServer) UploadFile(context.Context, *CloudDiskFileRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method UploadFile not implemented") } -func (UnimplementedDiskServer) GetFile(context.Context, *IdentRequest) (*CloudDiskFileItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFile not implemented") +func (UnimplementedDiskServer) GetFile(context.Context, *protobuf.IdentRequest) (*CloudDiskFileItem, error) { + return nil, status.Error(codes.Unimplemented, "method GetFile not implemented") } -func (UnimplementedDiskServer) UpdateFile(context.Context, *CloudDiskFileItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateFile not implemented") +func (UnimplementedDiskServer) UpdateFile(context.Context, *CloudDiskFileItem) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateFile not implemented") } -func (UnimplementedDiskServer) DeleteFile(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteFile not implemented") +func (UnimplementedDiskServer) DeleteFile(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteFile not implemented") } -func (UnimplementedDiskServer) ListFiles(context.Context, *FetchRequest) (*ListFilesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListFiles not implemented") +func (UnimplementedDiskServer) ListFiles(context.Context, *protobuf.FetchRequest) (*ListFilesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListFiles not implemented") } -func (UnimplementedDiskServer) MoveFile(context.Context, *MoveFileRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MoveFile not implemented") +func (UnimplementedDiskServer) MoveFile(context.Context, *MoveFileRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method MoveFile not implemented") } -func (UnimplementedDiskServer) CopyFile(context.Context, *CopyFileRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CopyFile not implemented") +func (UnimplementedDiskServer) CopyFile(context.Context, *CopyFileRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CopyFile not implemented") } -func (UnimplementedDiskServer) SearchFiles(context.Context, *FetchRequest) (*ListFilesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchFiles not implemented") +func (UnimplementedDiskServer) SearchFiles(context.Context, *protobuf.FetchRequest) (*ListFilesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SearchFiles not implemented") } -func (UnimplementedDiskServer) mustEmbedUnimplementedDiskServer() {} -func (UnimplementedDiskServer) testEmbeddedByValue() {} +func (UnimplementedDiskServer) testEmbeddedByValue() {} // UnsafeDiskServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DiskServer will @@ -334,7 +333,7 @@ type UnsafeDiskServer interface { } func RegisterDiskServer(s grpc.ServiceRegistrar, srv DiskServer) { - // If the following call pancis, it indicates UnimplementedDiskServer was + // If the following call panics, it indicates UnimplementedDiskServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -363,7 +362,7 @@ func _Disk_CreateDir_Handler(srv interface{}, ctx context.Context, dec func(inte } func _Disk_GetDir_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -375,7 +374,7 @@ func _Disk_GetDir_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Disk_GetDir_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).GetDir(ctx, req.(*IdentRequest)) + return srv.(DiskServer).GetDir(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -399,7 +398,7 @@ func _Disk_UpdateDir_Handler(srv interface{}, ctx context.Context, dec func(inte } func _Disk_DeleteDir_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -411,13 +410,13 @@ func _Disk_DeleteDir_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Disk_DeleteDir_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).DeleteDir(ctx, req.(*IdentRequest)) + return srv.(DiskServer).DeleteDir(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Disk_ListDirs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -429,13 +428,13 @@ func _Disk_ListDirs_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Disk_ListDirs_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).ListDirs(ctx, req.(*FetchRequest)) + return srv.(DiskServer).ListDirs(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } func _Disk_GetDirTree_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -447,7 +446,7 @@ func _Disk_GetDirTree_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: Disk_GetDirTree_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).GetDirTree(ctx, req.(*IdentRequest)) + return srv.(DiskServer).GetDirTree(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -489,7 +488,7 @@ func _Disk_UploadFile_Handler(srv interface{}, ctx context.Context, dec func(int } func _Disk_GetFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -501,7 +500,7 @@ func _Disk_GetFile_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Disk_GetFile_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).GetFile(ctx, req.(*IdentRequest)) + return srv.(DiskServer).GetFile(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -525,7 +524,7 @@ func _Disk_UpdateFile_Handler(srv interface{}, ctx context.Context, dec func(int } func _Disk_DeleteFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -537,13 +536,13 @@ func _Disk_DeleteFile_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: Disk_DeleteFile_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).DeleteFile(ctx, req.(*IdentRequest)) + return srv.(DiskServer).DeleteFile(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Disk_ListFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -555,7 +554,7 @@ func _Disk_ListFiles_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Disk_ListFiles_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).ListFiles(ctx, req.(*FetchRequest)) + return srv.(DiskServer).ListFiles(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -597,7 +596,7 @@ func _Disk_CopyFile_Handler(srv interface{}, ctx context.Context, dec func(inter } func _Disk_SearchFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -609,7 +608,7 @@ func _Disk_SearchFiles_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: Disk_SearchFiles_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).SearchFiles(ctx, req.(*FetchRequest)) + return srv.(DiskServer).SearchFiles(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -683,5 +682,5 @@ var Disk_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "disk.proto", + Metadata: "module/base/cloud/proto/disk.proto", } diff --git a/module/base/cloud/pb/note.pb.go b/module/base/cloud/pb/note.pb.go index 8d67503..2201a88 100644 --- a/module/base/cloud/pb/note.pb.go +++ b/module/base/cloud/pb/note.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: note.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/base/cloud/proto/note.proto package cloud import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -39,7 +40,7 @@ type CreateNoteRequest struct { func (x *CreateNoteRequest) Reset() { *x = CreateNoteRequest{} - mi := &file_note_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_note_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -51,7 +52,7 @@ func (x *CreateNoteRequest) String() string { func (*CreateNoteRequest) ProtoMessage() {} func (x *CreateNoteRequest) ProtoReflect() protoreflect.Message { - mi := &file_note_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_note_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64,7 +65,7 @@ func (x *CreateNoteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateNoteRequest.ProtoReflect.Descriptor instead. func (*CreateNoteRequest) Descriptor() ([]byte, []int) { - return file_note_proto_rawDescGZIP(), []int{0} + return file_module_base_cloud_proto_note_proto_rawDescGZIP(), []int{0} } func (x *CreateNoteRequest) GetCloudId() uint64 { @@ -140,7 +141,7 @@ type ListNotesResponse struct { func (x *ListNotesResponse) Reset() { *x = ListNotesResponse{} - mi := &file_note_proto_msgTypes[1] + mi := &file_module_base_cloud_proto_note_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -152,7 +153,7 @@ func (x *ListNotesResponse) String() string { func (*ListNotesResponse) ProtoMessage() {} func (x *ListNotesResponse) ProtoReflect() protoreflect.Message { - mi := &file_note_proto_msgTypes[1] + mi := &file_module_base_cloud_proto_note_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -165,7 +166,7 @@ func (x *ListNotesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListNotesResponse.ProtoReflect.Descriptor instead. func (*ListNotesResponse) Descriptor() ([]byte, []int) { - return file_note_proto_rawDescGZIP(), []int{1} + return file_module_base_cloud_proto_note_proto_rawDescGZIP(), []int{1} } func (x *ListNotesResponse) GetNotes() []*CloudNoteItem { @@ -192,7 +193,7 @@ type TogglePinRequest struct { func (x *TogglePinRequest) Reset() { *x = TogglePinRequest{} - mi := &file_note_proto_msgTypes[2] + mi := &file_module_base_cloud_proto_note_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -204,7 +205,7 @@ func (x *TogglePinRequest) String() string { func (*TogglePinRequest) ProtoMessage() {} func (x *TogglePinRequest) ProtoReflect() protoreflect.Message { - mi := &file_note_proto_msgTypes[2] + mi := &file_module_base_cloud_proto_note_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -217,7 +218,7 @@ func (x *TogglePinRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TogglePinRequest.ProtoReflect.Descriptor instead. func (*TogglePinRequest) Descriptor() ([]byte, []int) { - return file_note_proto_rawDescGZIP(), []int{2} + return file_module_base_cloud_proto_note_proto_rawDescGZIP(), []int{2} } func (x *TogglePinRequest) GetId() uint64 { @@ -257,7 +258,7 @@ type CloudNoteItem struct { func (x *CloudNoteItem) Reset() { *x = CloudNoteItem{} - mi := &file_note_proto_msgTypes[3] + mi := &file_module_base_cloud_proto_note_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -269,7 +270,7 @@ func (x *CloudNoteItem) String() string { func (*CloudNoteItem) ProtoMessage() {} func (x *CloudNoteItem) ProtoReflect() protoreflect.Message { - mi := &file_note_proto_msgTypes[3] + mi := &file_module_base_cloud_proto_note_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -282,7 +283,7 @@ func (x *CloudNoteItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CloudNoteItem.ProtoReflect.Descriptor instead. func (*CloudNoteItem) Descriptor() ([]byte, []int) { - return file_note_proto_rawDescGZIP(), []int{3} + return file_module_base_cloud_proto_note_proto_rawDescGZIP(), []int{3} } func (x *CloudNoteItem) GetId() uint64 { @@ -392,7 +393,7 @@ type NoteAttachmentItem struct { func (x *NoteAttachmentItem) Reset() { *x = NoteAttachmentItem{} - mi := &file_note_proto_msgTypes[4] + mi := &file_module_base_cloud_proto_note_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -404,7 +405,7 @@ func (x *NoteAttachmentItem) String() string { func (*NoteAttachmentItem) ProtoMessage() {} func (x *NoteAttachmentItem) ProtoReflect() protoreflect.Message { - mi := &file_note_proto_msgTypes[4] + mi := &file_module_base_cloud_proto_note_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -417,7 +418,7 @@ func (x *NoteAttachmentItem) ProtoReflect() protoreflect.Message { // Deprecated: Use NoteAttachmentItem.ProtoReflect.Descriptor instead. func (*NoteAttachmentItem) Descriptor() ([]byte, []int) { - return file_note_proto_rawDescGZIP(), []int{4} + return file_module_base_cloud_proto_note_proto_rawDescGZIP(), []int{4} } func (x *NoteAttachmentItem) GetId() uint64 { @@ -469,12 +470,11 @@ func (x *NoteAttachmentItem) GetCreatedAt() string { return "" } -var File_note_proto protoreflect.FileDescriptor +var File_module_base_cloud_proto_note_proto protoreflect.FileDescriptor -const file_note_proto_rawDesc = "" + +const file_module_base_cloud_proto_note_proto_rawDesc = "" + "\n" + - "\x15" + - "base/cloud/note.proto\x12\x05cloud\x1a\x12cloud/blocks.proto\"\x92\x02\n" + + "\"module/base/cloud/proto/note.proto\x12\x05cloud\x1a\x15protobuf/blocks.proto\"\x92\x02\n" + "\x11CreateNoteRequest\x12\x19\n" + "\bcloud_id\x18\x01 \x01(\x04R\acloudId\x12%\n" + "\x0ecloud_identity\x18\x02 \x01(\tR\rcloudIdentity\x12\x14\n" + @@ -520,68 +520,68 @@ const file_note_proto_rawDesc = "" + "\tfile_size\x18\x05 \x01(\x03R\bfileSize\x12\x1b\n" + "\tmime_type\x18\x06 \x01(\tR\bmimeType\x12\x1d\n" + "\n" + - "created_at\x18\a \x01(\tR\tcreatedAt2\xd6\x04\n" + - "\x04Note\x12:\n" + + "created_at\x18\a \x01(\tR\tcreatedAt2\xe3\x04\n" + + "\x04Note\x12;\n" + "\n" + - "CreateNote\x12\x18.cloud.CreateNoteRequest\x1a\x12.cloud.StatusReply\x124\n" + - "\aGetNote\x12\x13.cloud.IdentRequest\x1a\x14.cloud.CloudNoteItem\x126\n" + + "CreateNote\x12\x18.cloud.CreateNoteRequest\x1a\x13.blocks.StatusReply\x125\n" + + "\aGetNote\x12\x14.blocks.IdentRequest\x1a\x14.cloud.CloudNoteItem\x127\n" + "\n" + - "UpdateNote\x12\x14.cloud.CloudNoteItem\x1a\x12.cloud.StatusReply\x125\n" + + "UpdateNote\x12\x14.cloud.CloudNoteItem\x1a\x13.blocks.StatusReply\x127\n" + "\n" + - "DeleteNote\x12\x13.cloud.IdentRequest\x1a\x12.cloud.StatusReply\x12:\n" + - "\tListNotes\x12\x13.cloud.FetchRequest\x1a\x18.cloud.ListNotesResponse\x128\n" + - "\tTogglePin\x12\x17.cloud.TogglePinRequest\x1a\x12.cloud.StatusReply\x129\n" + - "\x0eIncrementViews\x12\x13.cloud.IdentRequest\x1a\x12.cloud.StatusReply\x12<\n" + - "\vSearchNotes\x12\x13.cloud.FetchRequest\x1a\x18.cloud.ListNotesResponse\x12A\n" + - "\x10InsertAttachment\x12\x19.cloud.NoteAttachmentItem\x1a\x12.cloud.StatusReply\x12;\n" + - "\x10DeleteAttachment\x12\x13.cloud.IdentRequest\x1a\x12.cloud.StatusReplyB\tZ\a.;cloudb\x06proto3" + "DeleteNote\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\x12;\n" + + "\tListNotes\x12\x14.blocks.FetchRequest\x1a\x18.cloud.ListNotesResponse\x129\n" + + "\tTogglePin\x12\x17.cloud.TogglePinRequest\x1a\x13.blocks.StatusReply\x12;\n" + + "\x0eIncrementViews\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\x12=\n" + + "\vSearchNotes\x12\x14.blocks.FetchRequest\x1a\x18.cloud.ListNotesResponse\x12B\n" + + "\x10InsertAttachment\x12\x19.cloud.NoteAttachmentItem\x1a\x13.blocks.StatusReply\x12=\n" + + "\x10DeleteAttachment\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReplyB%Z#bsm/full/module/base/cloud/pb;cloudb\x06proto3" var ( - file_note_proto_rawDescOnce sync.Once - file_note_proto_rawDescData []byte + file_module_base_cloud_proto_note_proto_rawDescOnce sync.Once + file_module_base_cloud_proto_note_proto_rawDescData []byte ) -func file_note_proto_rawDescGZIP() []byte { - file_note_proto_rawDescOnce.Do(func() { - file_note_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_note_proto_rawDesc), len(file_note_proto_rawDesc))) +func file_module_base_cloud_proto_note_proto_rawDescGZIP() []byte { + file_module_base_cloud_proto_note_proto_rawDescOnce.Do(func() { + file_module_base_cloud_proto_note_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_note_proto_rawDesc), len(file_module_base_cloud_proto_note_proto_rawDesc))) }) - return file_note_proto_rawDescData + return file_module_base_cloud_proto_note_proto_rawDescData } -var file_note_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_note_proto_goTypes = []any{ - (*CreateNoteRequest)(nil), // 0: cloud.CreateNoteRequest - (*ListNotesResponse)(nil), // 1: cloud.ListNotesResponse - (*TogglePinRequest)(nil), // 2: cloud.TogglePinRequest - (*CloudNoteItem)(nil), // 3: cloud.CloudNoteItem - (*NoteAttachmentItem)(nil), // 4: cloud.NoteAttachmentItem - (*IdentRequest)(nil), // 5: cloud.IdentRequest - (*FetchRequest)(nil), // 6: cloud.FetchRequest - (*StatusReply)(nil), // 7: cloud.StatusReply +var file_module_base_cloud_proto_note_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_module_base_cloud_proto_note_proto_goTypes = []any{ + (*CreateNoteRequest)(nil), // 0: cloud.CreateNoteRequest + (*ListNotesResponse)(nil), // 1: cloud.ListNotesResponse + (*TogglePinRequest)(nil), // 2: cloud.TogglePinRequest + (*CloudNoteItem)(nil), // 3: cloud.CloudNoteItem + (*NoteAttachmentItem)(nil), // 4: cloud.NoteAttachmentItem + (*protobuf.IdentRequest)(nil), // 5: blocks.IdentRequest + (*protobuf.FetchRequest)(nil), // 6: blocks.FetchRequest + (*protobuf.StatusReply)(nil), // 7: blocks.StatusReply } -var file_note_proto_depIdxs = []int32{ +var file_module_base_cloud_proto_note_proto_depIdxs = []int32{ 3, // 0: cloud.ListNotesResponse.notes:type_name -> cloud.CloudNoteItem 4, // 1: cloud.CloudNoteItem.attachments:type_name -> cloud.NoteAttachmentItem 0, // 2: cloud.Note.CreateNote:input_type -> cloud.CreateNoteRequest - 5, // 3: cloud.Note.GetNote:input_type -> cloud.IdentRequest + 5, // 3: cloud.Note.GetNote:input_type -> blocks.IdentRequest 3, // 4: cloud.Note.UpdateNote:input_type -> cloud.CloudNoteItem - 5, // 5: cloud.Note.DeleteNote:input_type -> cloud.IdentRequest - 6, // 6: cloud.Note.ListNotes:input_type -> cloud.FetchRequest + 5, // 5: cloud.Note.DeleteNote:input_type -> blocks.IdentRequest + 6, // 6: cloud.Note.ListNotes:input_type -> blocks.FetchRequest 2, // 7: cloud.Note.TogglePin:input_type -> cloud.TogglePinRequest - 5, // 8: cloud.Note.IncrementViews:input_type -> cloud.IdentRequest - 6, // 9: cloud.Note.SearchNotes:input_type -> cloud.FetchRequest + 5, // 8: cloud.Note.IncrementViews:input_type -> blocks.IdentRequest + 6, // 9: cloud.Note.SearchNotes:input_type -> blocks.FetchRequest 4, // 10: cloud.Note.InsertAttachment:input_type -> cloud.NoteAttachmentItem - 5, // 11: cloud.Note.DeleteAttachment:input_type -> cloud.IdentRequest - 7, // 12: cloud.Note.CreateNote:output_type -> cloud.StatusReply + 5, // 11: cloud.Note.DeleteAttachment:input_type -> blocks.IdentRequest + 7, // 12: cloud.Note.CreateNote:output_type -> blocks.StatusReply 3, // 13: cloud.Note.GetNote:output_type -> cloud.CloudNoteItem - 7, // 14: cloud.Note.UpdateNote:output_type -> cloud.StatusReply - 7, // 15: cloud.Note.DeleteNote:output_type -> cloud.StatusReply + 7, // 14: cloud.Note.UpdateNote:output_type -> blocks.StatusReply + 7, // 15: cloud.Note.DeleteNote:output_type -> blocks.StatusReply 1, // 16: cloud.Note.ListNotes:output_type -> cloud.ListNotesResponse - 7, // 17: cloud.Note.TogglePin:output_type -> cloud.StatusReply - 7, // 18: cloud.Note.IncrementViews:output_type -> cloud.StatusReply + 7, // 17: cloud.Note.TogglePin:output_type -> blocks.StatusReply + 7, // 18: cloud.Note.IncrementViews:output_type -> blocks.StatusReply 1, // 19: cloud.Note.SearchNotes:output_type -> cloud.ListNotesResponse - 7, // 20: cloud.Note.InsertAttachment:output_type -> cloud.StatusReply - 7, // 21: cloud.Note.DeleteAttachment:output_type -> cloud.StatusReply + 7, // 20: cloud.Note.InsertAttachment:output_type -> blocks.StatusReply + 7, // 21: cloud.Note.DeleteAttachment:output_type -> blocks.StatusReply 12, // [12:22] is the sub-list for method output_type 2, // [2:12] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -589,27 +589,26 @@ var file_note_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_note_proto_init() } -func file_note_proto_init() { - if File_note_proto != nil { +func init() { file_module_base_cloud_proto_note_proto_init() } +func file_module_base_cloud_proto_note_proto_init() { + if File_module_base_cloud_proto_note_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_note_proto_rawDesc), len(file_note_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_note_proto_rawDesc), len(file_module_base_cloud_proto_note_proto_rawDesc)), NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_note_proto_goTypes, - DependencyIndexes: file_note_proto_depIdxs, - MessageInfos: file_note_proto_msgTypes, + GoTypes: file_module_base_cloud_proto_note_proto_goTypes, + DependencyIndexes: file_module_base_cloud_proto_note_proto_depIdxs, + MessageInfos: file_module_base_cloud_proto_note_proto_msgTypes, }.Build() - File_note_proto = out.File - file_note_proto_goTypes = nil - file_note_proto_depIdxs = nil + File_module_base_cloud_proto_note_proto = out.File + file_module_base_cloud_proto_note_proto_goTypes = nil + file_module_base_cloud_proto_note_proto_depIdxs = nil } diff --git a/module/base/cloud/pb/note.pb.gw.go b/module/base/cloud/pb/note.pb.gw.go index 3cf21f6..3b600c0 100644 --- a/module/base/cloud/pb/note.pb.gw.go +++ b/module/base/cloud/pb/note.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: note.proto +// source: module/base/cloud/proto/note.proto /* Package cloud is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package cloud import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -64,7 +65,7 @@ func local_request_Note_CreateNote_0(ctx context.Context, marshaler runtime.Mars func request_Note_GetNote_0(ctx context.Context, marshaler runtime.Marshaler, client NoteClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Note_GetNote_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Note_GetNote_0(ctx context.Context, marshaler runtime.Marshaler, server NoteServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -118,7 +119,7 @@ func local_request_Note_UpdateNote_0(ctx context.Context, marshaler runtime.Mars func request_Note_DeleteNote_0(ctx context.Context, marshaler runtime.Marshaler, client NoteClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Note_DeleteNote_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Note_DeleteNote_0(ctx context.Context, marshaler runtime.Marshaler, server NoteServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -145,7 +146,7 @@ func local_request_Note_DeleteNote_0(ctx context.Context, marshaler runtime.Mars func request_Note_ListNotes_0(ctx context.Context, marshaler runtime.Marshaler, client NoteClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -160,7 +161,7 @@ func request_Note_ListNotes_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Note_ListNotes_0(ctx context.Context, marshaler runtime.Marshaler, server NoteServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -199,7 +200,7 @@ func local_request_Note_TogglePin_0(ctx context.Context, marshaler runtime.Marsh func request_Note_IncrementViews_0(ctx context.Context, marshaler runtime.Marshaler, client NoteClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -214,7 +215,7 @@ func request_Note_IncrementViews_0(ctx context.Context, marshaler runtime.Marsha func local_request_Note_IncrementViews_0(ctx context.Context, marshaler runtime.Marshaler, server NoteServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -226,7 +227,7 @@ func local_request_Note_IncrementViews_0(ctx context.Context, marshaler runtime. func request_Note_SearchNotes_0(ctx context.Context, marshaler runtime.Marshaler, client NoteClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -241,7 +242,7 @@ func request_Note_SearchNotes_0(ctx context.Context, marshaler runtime.Marshaler func local_request_Note_SearchNotes_0(ctx context.Context, marshaler runtime.Marshaler, server NoteServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -280,7 +281,7 @@ func local_request_Note_InsertAttachment_0(ctx context.Context, marshaler runtim func request_Note_DeleteAttachment_0(ctx context.Context, marshaler runtime.Marshaler, client NoteClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -295,7 +296,7 @@ func request_Note_DeleteAttachment_0(ctx context.Context, marshaler runtime.Mars func local_request_Note_DeleteAttachment_0(ctx context.Context, marshaler runtime.Marshaler, server NoteServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/base/cloud/pb/note_grpc.pb.go b/module/base/cloud/pb/note_grpc.pb.go index 2c68cf4..0caf4fd 100644 --- a/module/base/cloud/pb/note_grpc.pb.go +++ b/module/base/cloud/pb/note_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: note.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/cloud/proto/note.proto package cloud import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -38,25 +39,25 @@ const ( // 笔记服务 type NoteClient interface { // 创建笔记 - CreateNote(ctx context.Context, in *CreateNoteRequest, opts ...grpc.CallOption) (*StatusReply, error) + CreateNote(ctx context.Context, in *CreateNoteRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取笔记详情 - GetNote(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudNoteItem, error) + GetNote(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudNoteItem, error) // 更新笔记 - UpdateNote(ctx context.Context, in *CloudNoteItem, opts ...grpc.CallOption) (*StatusReply, error) + UpdateNote(ctx context.Context, in *CloudNoteItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除笔记 - DeleteNote(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + DeleteNote(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取笔记列表 - ListNotes(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error) + ListNotes(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error) // 置顶/取消置顶笔记 - TogglePin(ctx context.Context, in *TogglePinRequest, opts ...grpc.CallOption) (*StatusReply, error) + TogglePin(ctx context.Context, in *TogglePinRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 增加浏览次数 - IncrementViews(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + IncrementViews(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 搜索笔记 - SearchNotes(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error) + SearchNotes(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error) // 上传附件 - InsertAttachment(ctx context.Context, in *NoteAttachmentItem, opts ...grpc.CallOption) (*StatusReply, error) + InsertAttachment(ctx context.Context, in *NoteAttachmentItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除附件 - DeleteAttachment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + DeleteAttachment(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type noteClient struct { @@ -67,9 +68,9 @@ func NewNoteClient(cc grpc.ClientConnInterface) NoteClient { return ¬eClient{cc} } -func (c *noteClient) CreateNote(ctx context.Context, in *CreateNoteRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *noteClient) CreateNote(ctx context.Context, in *CreateNoteRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Note_CreateNote_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -77,7 +78,7 @@ func (c *noteClient) CreateNote(ctx context.Context, in *CreateNoteRequest, opts return out, nil } -func (c *noteClient) GetNote(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudNoteItem, error) { +func (c *noteClient) GetNote(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudNoteItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CloudNoteItem) err := c.cc.Invoke(ctx, Note_GetNote_FullMethodName, in, out, cOpts...) @@ -87,9 +88,9 @@ func (c *noteClient) GetNote(ctx context.Context, in *IdentRequest, opts ...grpc return out, nil } -func (c *noteClient) UpdateNote(ctx context.Context, in *CloudNoteItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *noteClient) UpdateNote(ctx context.Context, in *CloudNoteItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Note_UpdateNote_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -97,9 +98,9 @@ func (c *noteClient) UpdateNote(ctx context.Context, in *CloudNoteItem, opts ... return out, nil } -func (c *noteClient) DeleteNote(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *noteClient) DeleteNote(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Note_DeleteNote_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -107,7 +108,7 @@ func (c *noteClient) DeleteNote(ctx context.Context, in *IdentRequest, opts ...g return out, nil } -func (c *noteClient) ListNotes(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error) { +func (c *noteClient) ListNotes(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListNotesResponse) err := c.cc.Invoke(ctx, Note_ListNotes_FullMethodName, in, out, cOpts...) @@ -117,9 +118,9 @@ func (c *noteClient) ListNotes(ctx context.Context, in *FetchRequest, opts ...gr return out, nil } -func (c *noteClient) TogglePin(ctx context.Context, in *TogglePinRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *noteClient) TogglePin(ctx context.Context, in *TogglePinRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Note_TogglePin_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -127,9 +128,9 @@ func (c *noteClient) TogglePin(ctx context.Context, in *TogglePinRequest, opts . return out, nil } -func (c *noteClient) IncrementViews(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *noteClient) IncrementViews(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Note_IncrementViews_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -137,7 +138,7 @@ func (c *noteClient) IncrementViews(ctx context.Context, in *IdentRequest, opts return out, nil } -func (c *noteClient) SearchNotes(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error) { +func (c *noteClient) SearchNotes(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListNotesResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListNotesResponse) err := c.cc.Invoke(ctx, Note_SearchNotes_FullMethodName, in, out, cOpts...) @@ -147,9 +148,9 @@ func (c *noteClient) SearchNotes(ctx context.Context, in *FetchRequest, opts ... return out, nil } -func (c *noteClient) InsertAttachment(ctx context.Context, in *NoteAttachmentItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *noteClient) InsertAttachment(ctx context.Context, in *NoteAttachmentItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Note_InsertAttachment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -157,9 +158,9 @@ func (c *noteClient) InsertAttachment(ctx context.Context, in *NoteAttachmentIte return out, nil } -func (c *noteClient) DeleteAttachment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *noteClient) DeleteAttachment(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Note_DeleteAttachment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -168,73 +169,71 @@ func (c *noteClient) DeleteAttachment(ctx context.Context, in *IdentRequest, opt } // NoteServer is the server API for Note service. -// All implementations must embed UnimplementedNoteServer +// All implementations should embed UnimplementedNoteServer // for forward compatibility. // // 笔记服务 type NoteServer interface { // 创建笔记 - CreateNote(context.Context, *CreateNoteRequest) (*StatusReply, error) + CreateNote(context.Context, *CreateNoteRequest) (*protobuf.StatusReply, error) // 获取笔记详情 - GetNote(context.Context, *IdentRequest) (*CloudNoteItem, error) + GetNote(context.Context, *protobuf.IdentRequest) (*CloudNoteItem, error) // 更新笔记 - UpdateNote(context.Context, *CloudNoteItem) (*StatusReply, error) + UpdateNote(context.Context, *CloudNoteItem) (*protobuf.StatusReply, error) // 删除笔记 - DeleteNote(context.Context, *IdentRequest) (*StatusReply, error) + DeleteNote(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) // 获取笔记列表 - ListNotes(context.Context, *FetchRequest) (*ListNotesResponse, error) + ListNotes(context.Context, *protobuf.FetchRequest) (*ListNotesResponse, error) // 置顶/取消置顶笔记 - TogglePin(context.Context, *TogglePinRequest) (*StatusReply, error) + TogglePin(context.Context, *TogglePinRequest) (*protobuf.StatusReply, error) // 增加浏览次数 - IncrementViews(context.Context, *IdentRequest) (*StatusReply, error) + IncrementViews(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) // 搜索笔记 - SearchNotes(context.Context, *FetchRequest) (*ListNotesResponse, error) + SearchNotes(context.Context, *protobuf.FetchRequest) (*ListNotesResponse, error) // 上传附件 - InsertAttachment(context.Context, *NoteAttachmentItem) (*StatusReply, error) + InsertAttachment(context.Context, *NoteAttachmentItem) (*protobuf.StatusReply, error) // 删除附件 - DeleteAttachment(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedNoteServer() + DeleteAttachment(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) } -// UnimplementedNoteServer must be embedded to have +// UnimplementedNoteServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedNoteServer struct{} -func (UnimplementedNoteServer) CreateNote(context.Context, *CreateNoteRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateNote not implemented") +func (UnimplementedNoteServer) CreateNote(context.Context, *CreateNoteRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CreateNote not implemented") } -func (UnimplementedNoteServer) GetNote(context.Context, *IdentRequest) (*CloudNoteItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNote not implemented") +func (UnimplementedNoteServer) GetNote(context.Context, *protobuf.IdentRequest) (*CloudNoteItem, error) { + return nil, status.Error(codes.Unimplemented, "method GetNote not implemented") } -func (UnimplementedNoteServer) UpdateNote(context.Context, *CloudNoteItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateNote not implemented") +func (UnimplementedNoteServer) UpdateNote(context.Context, *CloudNoteItem) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateNote not implemented") } -func (UnimplementedNoteServer) DeleteNote(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteNote not implemented") +func (UnimplementedNoteServer) DeleteNote(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteNote not implemented") } -func (UnimplementedNoteServer) ListNotes(context.Context, *FetchRequest) (*ListNotesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNotes not implemented") +func (UnimplementedNoteServer) ListNotes(context.Context, *protobuf.FetchRequest) (*ListNotesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListNotes not implemented") } -func (UnimplementedNoteServer) TogglePin(context.Context, *TogglePinRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method TogglePin not implemented") +func (UnimplementedNoteServer) TogglePin(context.Context, *TogglePinRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method TogglePin not implemented") } -func (UnimplementedNoteServer) IncrementViews(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method IncrementViews not implemented") +func (UnimplementedNoteServer) IncrementViews(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method IncrementViews not implemented") } -func (UnimplementedNoteServer) SearchNotes(context.Context, *FetchRequest) (*ListNotesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchNotes not implemented") +func (UnimplementedNoteServer) SearchNotes(context.Context, *protobuf.FetchRequest) (*ListNotesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SearchNotes not implemented") } -func (UnimplementedNoteServer) InsertAttachment(context.Context, *NoteAttachmentItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method InsertAttachment not implemented") +func (UnimplementedNoteServer) InsertAttachment(context.Context, *NoteAttachmentItem) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method InsertAttachment not implemented") } -func (UnimplementedNoteServer) DeleteAttachment(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteAttachment not implemented") +func (UnimplementedNoteServer) DeleteAttachment(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteAttachment not implemented") } -func (UnimplementedNoteServer) mustEmbedUnimplementedNoteServer() {} -func (UnimplementedNoteServer) testEmbeddedByValue() {} +func (UnimplementedNoteServer) testEmbeddedByValue() {} // UnsafeNoteServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to NoteServer will @@ -244,7 +243,7 @@ type UnsafeNoteServer interface { } func RegisterNoteServer(s grpc.ServiceRegistrar, srv NoteServer) { - // If the following call pancis, it indicates UnimplementedNoteServer was + // If the following call panics, it indicates UnimplementedNoteServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -273,7 +272,7 @@ func _Note_CreateNote_Handler(srv interface{}, ctx context.Context, dec func(int } func _Note_GetNote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -285,7 +284,7 @@ func _Note_GetNote_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Note_GetNote_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NoteServer).GetNote(ctx, req.(*IdentRequest)) + return srv.(NoteServer).GetNote(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -309,7 +308,7 @@ func _Note_UpdateNote_Handler(srv interface{}, ctx context.Context, dec func(int } func _Note_DeleteNote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -321,13 +320,13 @@ func _Note_DeleteNote_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: Note_DeleteNote_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NoteServer).DeleteNote(ctx, req.(*IdentRequest)) + return srv.(NoteServer).DeleteNote(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Note_ListNotes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -339,7 +338,7 @@ func _Note_ListNotes_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Note_ListNotes_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NoteServer).ListNotes(ctx, req.(*FetchRequest)) + return srv.(NoteServer).ListNotes(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -363,7 +362,7 @@ func _Note_TogglePin_Handler(srv interface{}, ctx context.Context, dec func(inte } func _Note_IncrementViews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -375,13 +374,13 @@ func _Note_IncrementViews_Handler(srv interface{}, ctx context.Context, dec func FullMethod: Note_IncrementViews_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NoteServer).IncrementViews(ctx, req.(*IdentRequest)) + return srv.(NoteServer).IncrementViews(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Note_SearchNotes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -393,7 +392,7 @@ func _Note_SearchNotes_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: Note_SearchNotes_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NoteServer).SearchNotes(ctx, req.(*FetchRequest)) + return srv.(NoteServer).SearchNotes(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -417,7 +416,7 @@ func _Note_InsertAttachment_Handler(srv interface{}, ctx context.Context, dec fu } func _Note_DeleteAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -429,7 +428,7 @@ func _Note_DeleteAttachment_Handler(srv interface{}, ctx context.Context, dec fu FullMethod: Note_DeleteAttachment_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NoteServer).DeleteAttachment(ctx, req.(*IdentRequest)) + return srv.(NoteServer).DeleteAttachment(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -483,5 +482,5 @@ var Note_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "note.proto", + Metadata: "module/base/cloud/proto/note.proto", } diff --git a/module/base/cloud/pb/private.pb.go b/module/base/cloud/pb/private.pb.go index 2436551..184eabb 100644 --- a/module/base/cloud/pb/private.pb.go +++ b/module/base/cloud/pb/private.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: private.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/base/cloud/proto/private.proto package cloud import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -38,7 +39,7 @@ type CreatePrivateDataRequest struct { func (x *CreatePrivateDataRequest) Reset() { *x = CreatePrivateDataRequest{} - mi := &file_private_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_private_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -50,7 +51,7 @@ func (x *CreatePrivateDataRequest) String() string { func (*CreatePrivateDataRequest) ProtoMessage() {} func (x *CreatePrivateDataRequest) ProtoReflect() protoreflect.Message { - mi := &file_private_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_private_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63,7 +64,7 @@ func (x *CreatePrivateDataRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreatePrivateDataRequest.ProtoReflect.Descriptor instead. func (*CreatePrivateDataRequest) Descriptor() ([]byte, []int) { - return file_private_proto_rawDescGZIP(), []int{0} + return file_module_base_cloud_proto_private_proto_rawDescGZIP(), []int{0} } func (x *CreatePrivateDataRequest) GetCloudId() uint64 { @@ -132,7 +133,7 @@ type ListPrivateDataResponse struct { func (x *ListPrivateDataResponse) Reset() { *x = ListPrivateDataResponse{} - mi := &file_private_proto_msgTypes[1] + mi := &file_module_base_cloud_proto_private_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -144,7 +145,7 @@ func (x *ListPrivateDataResponse) String() string { func (*ListPrivateDataResponse) ProtoMessage() {} func (x *ListPrivateDataResponse) ProtoReflect() protoreflect.Message { - mi := &file_private_proto_msgTypes[1] + mi := &file_module_base_cloud_proto_private_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -157,7 +158,7 @@ func (x *ListPrivateDataResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPrivateDataResponse.ProtoReflect.Descriptor instead. func (*ListPrivateDataResponse) Descriptor() ([]byte, []int) { - return file_private_proto_rawDescGZIP(), []int{1} + return file_module_base_cloud_proto_private_proto_rawDescGZIP(), []int{1} } func (x *ListPrivateDataResponse) GetData() []*CloudPrivateItem { @@ -184,7 +185,7 @@ type DataRequest struct { func (x *DataRequest) Reset() { *x = DataRequest{} - mi := &file_private_proto_msgTypes[2] + mi := &file_module_base_cloud_proto_private_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -196,7 +197,7 @@ func (x *DataRequest) String() string { func (*DataRequest) ProtoMessage() {} func (x *DataRequest) ProtoReflect() protoreflect.Message { - mi := &file_private_proto_msgTypes[2] + mi := &file_module_base_cloud_proto_private_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -209,7 +210,7 @@ func (x *DataRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DataRequest.ProtoReflect.Descriptor instead. func (*DataRequest) Descriptor() ([]byte, []int) { - return file_private_proto_rawDescGZIP(), []int{2} + return file_module_base_cloud_proto_private_proto_rawDescGZIP(), []int{2} } func (x *DataRequest) GetData() string { @@ -245,7 +246,7 @@ type CloudPrivateItem struct { func (x *CloudPrivateItem) Reset() { *x = CloudPrivateItem{} - mi := &file_private_proto_msgTypes[3] + mi := &file_module_base_cloud_proto_private_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -257,7 +258,7 @@ func (x *CloudPrivateItem) String() string { func (*CloudPrivateItem) ProtoMessage() {} func (x *CloudPrivateItem) ProtoReflect() protoreflect.Message { - mi := &file_private_proto_msgTypes[3] + mi := &file_module_base_cloud_proto_private_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -270,7 +271,7 @@ func (x *CloudPrivateItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CloudPrivateItem.ProtoReflect.Descriptor instead. func (*CloudPrivateItem) Descriptor() ([]byte, []int) { - return file_private_proto_rawDescGZIP(), []int{3} + return file_module_base_cloud_proto_private_proto_rawDescGZIP(), []int{3} } func (x *CloudPrivateItem) GetId() uint64 { @@ -343,11 +344,11 @@ func (x *CloudPrivateItem) GetUpdatedAt() string { return "" } -var File_private_proto protoreflect.FileDescriptor +var File_module_base_cloud_proto_private_proto protoreflect.FileDescriptor -const file_private_proto_rawDesc = "" + +const file_module_base_cloud_proto_private_proto_rawDesc = "" + "\n" + - "\x18base/cloud/private.proto\x12\x05cloud\x1a\x12cloud/blocks.proto\"\xfc\x01\n" + + "%module/base/cloud/proto/private.proto\x12\x05cloud\x1a\x15protobuf/blocks.proto\"\xfc\x01\n" + "\x18CreatePrivateDataRequest\x12\x19\n" + "\bcloud_id\x18\x01 \x01(\x04R\acloudId\x12%\n" + "\x0ecloud_identity\x18\x02 \x01(\tR\rcloudIdentity\x12\x1b\n" + @@ -376,60 +377,60 @@ const file_private_proto_rawDesc = "" + "created_at\x18\t \x01(\tR\tcreatedAt\x12\x1d\n" + "\n" + "updated_at\x18\n" + - " \x01(\tR\tupdatedAt2\xe0\x04\n" + - "\aPrivate\x12H\n" + - "\x11CreatePrivateData\x12\x1f.cloud.CreatePrivateDataRequest\x1a\x12.cloud.StatusReply\x12>\n" + - "\x0eGetPrivateData\x12\x13.cloud.IdentRequest\x1a\x17.cloud.CloudPrivateItem\x12@\n" + - "\x11UpdatePrivateData\x12\x17.cloud.CloudPrivateItem\x1a\x12.cloud.StatusReply\x12<\n" + - "\x11DeletePrivateData\x12\x13.cloud.IdentRequest\x1a\x12.cloud.StatusReply\x12F\n" + - "\x0fListPrivateData\x12\x13.cloud.FetchRequest\x1a\x1e.cloud.ListPrivateDataResponse\x12K\n" + - "\x14GetPrivateDataByType\x12\x13.cloud.FetchRequest\x1a\x1e.cloud.ListPrivateDataResponse\x12H\n" + - "\x11SearchPrivateData\x12\x13.cloud.FetchRequest\x1a\x1e.cloud.ListPrivateDataResponse\x125\n" + - "\vEncryptData\x12\x12.cloud.DataRequest\x1a\x12.cloud.StatusReply\x125\n" + - "\vDecryptData\x12\x12.cloud.DataRequest\x1a\x12.cloud.StatusReplyB\tZ\a.;cloudb\x06proto3" + " \x01(\tR\tupdatedAt2\xea\x04\n" + + "\aPrivate\x12I\n" + + "\x11CreatePrivateData\x12\x1f.cloud.CreatePrivateDataRequest\x1a\x13.blocks.StatusReply\x12?\n" + + "\x0eGetPrivateData\x12\x14.blocks.IdentRequest\x1a\x17.cloud.CloudPrivateItem\x12A\n" + + "\x11UpdatePrivateData\x12\x17.cloud.CloudPrivateItem\x1a\x13.blocks.StatusReply\x12>\n" + + "\x11DeletePrivateData\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\x12G\n" + + "\x0fListPrivateData\x12\x14.blocks.FetchRequest\x1a\x1e.cloud.ListPrivateDataResponse\x12L\n" + + "\x14GetPrivateDataByType\x12\x14.blocks.FetchRequest\x1a\x1e.cloud.ListPrivateDataResponse\x12I\n" + + "\x11SearchPrivateData\x12\x14.blocks.FetchRequest\x1a\x1e.cloud.ListPrivateDataResponse\x126\n" + + "\vEncryptData\x12\x12.cloud.DataRequest\x1a\x13.blocks.StatusReply\x126\n" + + "\vDecryptData\x12\x12.cloud.DataRequest\x1a\x13.blocks.StatusReplyB%Z#bsm/full/module/base/cloud/pb;cloudb\x06proto3" var ( - file_private_proto_rawDescOnce sync.Once - file_private_proto_rawDescData []byte + file_module_base_cloud_proto_private_proto_rawDescOnce sync.Once + file_module_base_cloud_proto_private_proto_rawDescData []byte ) -func file_private_proto_rawDescGZIP() []byte { - file_private_proto_rawDescOnce.Do(func() { - file_private_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_private_proto_rawDesc), len(file_private_proto_rawDesc))) +func file_module_base_cloud_proto_private_proto_rawDescGZIP() []byte { + file_module_base_cloud_proto_private_proto_rawDescOnce.Do(func() { + file_module_base_cloud_proto_private_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_private_proto_rawDesc), len(file_module_base_cloud_proto_private_proto_rawDesc))) }) - return file_private_proto_rawDescData + return file_module_base_cloud_proto_private_proto_rawDescData } -var file_private_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_private_proto_goTypes = []any{ +var file_module_base_cloud_proto_private_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_module_base_cloud_proto_private_proto_goTypes = []any{ (*CreatePrivateDataRequest)(nil), // 0: cloud.CreatePrivateDataRequest (*ListPrivateDataResponse)(nil), // 1: cloud.ListPrivateDataResponse (*DataRequest)(nil), // 2: cloud.DataRequest (*CloudPrivateItem)(nil), // 3: cloud.CloudPrivateItem - (*IdentRequest)(nil), // 4: cloud.IdentRequest - (*FetchRequest)(nil), // 5: cloud.FetchRequest - (*StatusReply)(nil), // 6: cloud.StatusReply + (*protobuf.IdentRequest)(nil), // 4: blocks.IdentRequest + (*protobuf.FetchRequest)(nil), // 5: blocks.FetchRequest + (*protobuf.StatusReply)(nil), // 6: blocks.StatusReply } -var file_private_proto_depIdxs = []int32{ +var file_module_base_cloud_proto_private_proto_depIdxs = []int32{ 3, // 0: cloud.ListPrivateDataResponse.data:type_name -> cloud.CloudPrivateItem 0, // 1: cloud.Private.CreatePrivateData:input_type -> cloud.CreatePrivateDataRequest - 4, // 2: cloud.Private.GetPrivateData:input_type -> cloud.IdentRequest + 4, // 2: cloud.Private.GetPrivateData:input_type -> blocks.IdentRequest 3, // 3: cloud.Private.UpdatePrivateData:input_type -> cloud.CloudPrivateItem - 4, // 4: cloud.Private.DeletePrivateData:input_type -> cloud.IdentRequest - 5, // 5: cloud.Private.ListPrivateData:input_type -> cloud.FetchRequest - 5, // 6: cloud.Private.GetPrivateDataByType:input_type -> cloud.FetchRequest - 5, // 7: cloud.Private.SearchPrivateData:input_type -> cloud.FetchRequest + 4, // 4: cloud.Private.DeletePrivateData:input_type -> blocks.IdentRequest + 5, // 5: cloud.Private.ListPrivateData:input_type -> blocks.FetchRequest + 5, // 6: cloud.Private.GetPrivateDataByType:input_type -> blocks.FetchRequest + 5, // 7: cloud.Private.SearchPrivateData:input_type -> blocks.FetchRequest 2, // 8: cloud.Private.EncryptData:input_type -> cloud.DataRequest 2, // 9: cloud.Private.DecryptData:input_type -> cloud.DataRequest - 6, // 10: cloud.Private.CreatePrivateData:output_type -> cloud.StatusReply + 6, // 10: cloud.Private.CreatePrivateData:output_type -> blocks.StatusReply 3, // 11: cloud.Private.GetPrivateData:output_type -> cloud.CloudPrivateItem - 6, // 12: cloud.Private.UpdatePrivateData:output_type -> cloud.StatusReply - 6, // 13: cloud.Private.DeletePrivateData:output_type -> cloud.StatusReply + 6, // 12: cloud.Private.UpdatePrivateData:output_type -> blocks.StatusReply + 6, // 13: cloud.Private.DeletePrivateData:output_type -> blocks.StatusReply 1, // 14: cloud.Private.ListPrivateData:output_type -> cloud.ListPrivateDataResponse 1, // 15: cloud.Private.GetPrivateDataByType:output_type -> cloud.ListPrivateDataResponse 1, // 16: cloud.Private.SearchPrivateData:output_type -> cloud.ListPrivateDataResponse - 6, // 17: cloud.Private.EncryptData:output_type -> cloud.StatusReply - 6, // 18: cloud.Private.DecryptData:output_type -> cloud.StatusReply + 6, // 17: cloud.Private.EncryptData:output_type -> blocks.StatusReply + 6, // 18: cloud.Private.DecryptData:output_type -> blocks.StatusReply 10, // [10:19] is the sub-list for method output_type 1, // [1:10] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -437,27 +438,26 @@ var file_private_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_private_proto_init() } -func file_private_proto_init() { - if File_private_proto != nil { +func init() { file_module_base_cloud_proto_private_proto_init() } +func file_module_base_cloud_proto_private_proto_init() { + if File_module_base_cloud_proto_private_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_private_proto_rawDesc), len(file_private_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_private_proto_rawDesc), len(file_module_base_cloud_proto_private_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_private_proto_goTypes, - DependencyIndexes: file_private_proto_depIdxs, - MessageInfos: file_private_proto_msgTypes, + GoTypes: file_module_base_cloud_proto_private_proto_goTypes, + DependencyIndexes: file_module_base_cloud_proto_private_proto_depIdxs, + MessageInfos: file_module_base_cloud_proto_private_proto_msgTypes, }.Build() - File_private_proto = out.File - file_private_proto_goTypes = nil - file_private_proto_depIdxs = nil + File_module_base_cloud_proto_private_proto = out.File + file_module_base_cloud_proto_private_proto_goTypes = nil + file_module_base_cloud_proto_private_proto_depIdxs = nil } diff --git a/module/base/cloud/pb/private.pb.gw.go b/module/base/cloud/pb/private.pb.gw.go index 569726a..52af514 100644 --- a/module/base/cloud/pb/private.pb.gw.go +++ b/module/base/cloud/pb/private.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: private.proto +// source: module/base/cloud/proto/private.proto /* Package cloud is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package cloud import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -64,7 +65,7 @@ func local_request_Private_CreatePrivateData_0(ctx context.Context, marshaler ru func request_Private_GetPrivateData_0(ctx context.Context, marshaler runtime.Marshaler, client PrivateClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Private_GetPrivateData_0(ctx context.Context, marshaler runtime.Mar func local_request_Private_GetPrivateData_0(ctx context.Context, marshaler runtime.Marshaler, server PrivateServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -118,7 +119,7 @@ func local_request_Private_UpdatePrivateData_0(ctx context.Context, marshaler ru func request_Private_DeletePrivateData_0(ctx context.Context, marshaler runtime.Marshaler, client PrivateClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Private_DeletePrivateData_0(ctx context.Context, marshaler runtime. func local_request_Private_DeletePrivateData_0(ctx context.Context, marshaler runtime.Marshaler, server PrivateServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -145,7 +146,7 @@ func local_request_Private_DeletePrivateData_0(ctx context.Context, marshaler ru func request_Private_ListPrivateData_0(ctx context.Context, marshaler runtime.Marshaler, client PrivateClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -160,7 +161,7 @@ func request_Private_ListPrivateData_0(ctx context.Context, marshaler runtime.Ma func local_request_Private_ListPrivateData_0(ctx context.Context, marshaler runtime.Marshaler, server PrivateServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -172,7 +173,7 @@ func local_request_Private_ListPrivateData_0(ctx context.Context, marshaler runt func request_Private_GetPrivateDataByType_0(ctx context.Context, marshaler runtime.Marshaler, client PrivateClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -187,7 +188,7 @@ func request_Private_GetPrivateDataByType_0(ctx context.Context, marshaler runti func local_request_Private_GetPrivateDataByType_0(ctx context.Context, marshaler runtime.Marshaler, server PrivateServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -199,7 +200,7 @@ func local_request_Private_GetPrivateDataByType_0(ctx context.Context, marshaler func request_Private_SearchPrivateData_0(ctx context.Context, marshaler runtime.Marshaler, client PrivateClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -214,7 +215,7 @@ func request_Private_SearchPrivateData_0(ctx context.Context, marshaler runtime. func local_request_Private_SearchPrivateData_0(ctx context.Context, marshaler runtime.Marshaler, server PrivateServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/base/cloud/pb/private_grpc.pb.go b/module/base/cloud/pb/private_grpc.pb.go index 1345e07..99175be 100644 --- a/module/base/cloud/pb/private_grpc.pb.go +++ b/module/base/cloud/pb/private_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: private.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/cloud/proto/private.proto package cloud import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -37,23 +38,23 @@ const ( // 隐私数据服务 type PrivateClient interface { // 创建隐私数据 - CreatePrivateData(ctx context.Context, in *CreatePrivateDataRequest, opts ...grpc.CallOption) (*StatusReply, error) + CreatePrivateData(ctx context.Context, in *CreatePrivateDataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取隐私数据详情 - GetPrivateData(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudPrivateItem, error) + GetPrivateData(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudPrivateItem, error) // 更新隐私数据 - UpdatePrivateData(ctx context.Context, in *CloudPrivateItem, opts ...grpc.CallOption) (*StatusReply, error) + UpdatePrivateData(ctx context.Context, in *CloudPrivateItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除隐私数据 - DeletePrivateData(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + DeletePrivateData(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取隐私数据列表 - ListPrivateData(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) + ListPrivateData(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) // 按类型获取隐私数据 - GetPrivateDataByType(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) + GetPrivateDataByType(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) // 搜索隐私数据 - SearchPrivateData(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) + SearchPrivateData(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) // 加密数据 - EncryptData(ctx context.Context, in *DataRequest, opts ...grpc.CallOption) (*StatusReply, error) + EncryptData(ctx context.Context, in *DataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 解密数据 - DecryptData(ctx context.Context, in *DataRequest, opts ...grpc.CallOption) (*StatusReply, error) + DecryptData(ctx context.Context, in *DataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type privateClient struct { @@ -64,9 +65,9 @@ func NewPrivateClient(cc grpc.ClientConnInterface) PrivateClient { return &privateClient{cc} } -func (c *privateClient) CreatePrivateData(ctx context.Context, in *CreatePrivateDataRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *privateClient) CreatePrivateData(ctx context.Context, in *CreatePrivateDataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Private_CreatePrivateData_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -74,7 +75,7 @@ func (c *privateClient) CreatePrivateData(ctx context.Context, in *CreatePrivate return out, nil } -func (c *privateClient) GetPrivateData(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudPrivateItem, error) { +func (c *privateClient) GetPrivateData(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudPrivateItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CloudPrivateItem) err := c.cc.Invoke(ctx, Private_GetPrivateData_FullMethodName, in, out, cOpts...) @@ -84,9 +85,9 @@ func (c *privateClient) GetPrivateData(ctx context.Context, in *IdentRequest, op return out, nil } -func (c *privateClient) UpdatePrivateData(ctx context.Context, in *CloudPrivateItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *privateClient) UpdatePrivateData(ctx context.Context, in *CloudPrivateItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Private_UpdatePrivateData_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -94,9 +95,9 @@ func (c *privateClient) UpdatePrivateData(ctx context.Context, in *CloudPrivateI return out, nil } -func (c *privateClient) DeletePrivateData(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *privateClient) DeletePrivateData(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Private_DeletePrivateData_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -104,7 +105,7 @@ func (c *privateClient) DeletePrivateData(ctx context.Context, in *IdentRequest, return out, nil } -func (c *privateClient) ListPrivateData(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) { +func (c *privateClient) ListPrivateData(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPrivateDataResponse) err := c.cc.Invoke(ctx, Private_ListPrivateData_FullMethodName, in, out, cOpts...) @@ -114,7 +115,7 @@ func (c *privateClient) ListPrivateData(ctx context.Context, in *FetchRequest, o return out, nil } -func (c *privateClient) GetPrivateDataByType(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) { +func (c *privateClient) GetPrivateDataByType(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPrivateDataResponse) err := c.cc.Invoke(ctx, Private_GetPrivateDataByType_FullMethodName, in, out, cOpts...) @@ -124,7 +125,7 @@ func (c *privateClient) GetPrivateDataByType(ctx context.Context, in *FetchReque return out, nil } -func (c *privateClient) SearchPrivateData(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) { +func (c *privateClient) SearchPrivateData(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPrivateDataResponse) err := c.cc.Invoke(ctx, Private_SearchPrivateData_FullMethodName, in, out, cOpts...) @@ -134,9 +135,9 @@ func (c *privateClient) SearchPrivateData(ctx context.Context, in *FetchRequest, return out, nil } -func (c *privateClient) EncryptData(ctx context.Context, in *DataRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *privateClient) EncryptData(ctx context.Context, in *DataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Private_EncryptData_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -144,9 +145,9 @@ func (c *privateClient) EncryptData(ctx context.Context, in *DataRequest, opts . return out, nil } -func (c *privateClient) DecryptData(ctx context.Context, in *DataRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *privateClient) DecryptData(ctx context.Context, in *DataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Private_DecryptData_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -155,68 +156,66 @@ func (c *privateClient) DecryptData(ctx context.Context, in *DataRequest, opts . } // PrivateServer is the server API for Private service. -// All implementations must embed UnimplementedPrivateServer +// All implementations should embed UnimplementedPrivateServer // for forward compatibility. // // 隐私数据服务 type PrivateServer interface { // 创建隐私数据 - CreatePrivateData(context.Context, *CreatePrivateDataRequest) (*StatusReply, error) + CreatePrivateData(context.Context, *CreatePrivateDataRequest) (*protobuf.StatusReply, error) // 获取隐私数据详情 - GetPrivateData(context.Context, *IdentRequest) (*CloudPrivateItem, error) + GetPrivateData(context.Context, *protobuf.IdentRequest) (*CloudPrivateItem, error) // 更新隐私数据 - UpdatePrivateData(context.Context, *CloudPrivateItem) (*StatusReply, error) + UpdatePrivateData(context.Context, *CloudPrivateItem) (*protobuf.StatusReply, error) // 删除隐私数据 - DeletePrivateData(context.Context, *IdentRequest) (*StatusReply, error) + DeletePrivateData(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) // 获取隐私数据列表 - ListPrivateData(context.Context, *FetchRequest) (*ListPrivateDataResponse, error) + ListPrivateData(context.Context, *protobuf.FetchRequest) (*ListPrivateDataResponse, error) // 按类型获取隐私数据 - GetPrivateDataByType(context.Context, *FetchRequest) (*ListPrivateDataResponse, error) + GetPrivateDataByType(context.Context, *protobuf.FetchRequest) (*ListPrivateDataResponse, error) // 搜索隐私数据 - SearchPrivateData(context.Context, *FetchRequest) (*ListPrivateDataResponse, error) + SearchPrivateData(context.Context, *protobuf.FetchRequest) (*ListPrivateDataResponse, error) // 加密数据 - EncryptData(context.Context, *DataRequest) (*StatusReply, error) + EncryptData(context.Context, *DataRequest) (*protobuf.StatusReply, error) // 解密数据 - DecryptData(context.Context, *DataRequest) (*StatusReply, error) - mustEmbedUnimplementedPrivateServer() + DecryptData(context.Context, *DataRequest) (*protobuf.StatusReply, error) } -// UnimplementedPrivateServer must be embedded to have +// UnimplementedPrivateServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedPrivateServer struct{} -func (UnimplementedPrivateServer) CreatePrivateData(context.Context, *CreatePrivateDataRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePrivateData not implemented") +func (UnimplementedPrivateServer) CreatePrivateData(context.Context, *CreatePrivateDataRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CreatePrivateData not implemented") } -func (UnimplementedPrivateServer) GetPrivateData(context.Context, *IdentRequest) (*CloudPrivateItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPrivateData not implemented") +func (UnimplementedPrivateServer) GetPrivateData(context.Context, *protobuf.IdentRequest) (*CloudPrivateItem, error) { + return nil, status.Error(codes.Unimplemented, "method GetPrivateData not implemented") } -func (UnimplementedPrivateServer) UpdatePrivateData(context.Context, *CloudPrivateItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdatePrivateData not implemented") +func (UnimplementedPrivateServer) UpdatePrivateData(context.Context, *CloudPrivateItem) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method UpdatePrivateData not implemented") } -func (UnimplementedPrivateServer) DeletePrivateData(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeletePrivateData not implemented") +func (UnimplementedPrivateServer) DeletePrivateData(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DeletePrivateData not implemented") } -func (UnimplementedPrivateServer) ListPrivateData(context.Context, *FetchRequest) (*ListPrivateDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListPrivateData not implemented") +func (UnimplementedPrivateServer) ListPrivateData(context.Context, *protobuf.FetchRequest) (*ListPrivateDataResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListPrivateData not implemented") } -func (UnimplementedPrivateServer) GetPrivateDataByType(context.Context, *FetchRequest) (*ListPrivateDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPrivateDataByType not implemented") +func (UnimplementedPrivateServer) GetPrivateDataByType(context.Context, *protobuf.FetchRequest) (*ListPrivateDataResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetPrivateDataByType not implemented") } -func (UnimplementedPrivateServer) SearchPrivateData(context.Context, *FetchRequest) (*ListPrivateDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchPrivateData not implemented") +func (UnimplementedPrivateServer) SearchPrivateData(context.Context, *protobuf.FetchRequest) (*ListPrivateDataResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SearchPrivateData not implemented") } -func (UnimplementedPrivateServer) EncryptData(context.Context, *DataRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method EncryptData not implemented") +func (UnimplementedPrivateServer) EncryptData(context.Context, *DataRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method EncryptData not implemented") } -func (UnimplementedPrivateServer) DecryptData(context.Context, *DataRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DecryptData not implemented") +func (UnimplementedPrivateServer) DecryptData(context.Context, *DataRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DecryptData not implemented") } -func (UnimplementedPrivateServer) mustEmbedUnimplementedPrivateServer() {} -func (UnimplementedPrivateServer) testEmbeddedByValue() {} +func (UnimplementedPrivateServer) testEmbeddedByValue() {} // UnsafePrivateServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PrivateServer will @@ -226,7 +225,7 @@ type UnsafePrivateServer interface { } func RegisterPrivateServer(s grpc.ServiceRegistrar, srv PrivateServer) { - // If the following call pancis, it indicates UnimplementedPrivateServer was + // If the following call panics, it indicates UnimplementedPrivateServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -255,7 +254,7 @@ func _Private_CreatePrivateData_Handler(srv interface{}, ctx context.Context, de } func _Private_GetPrivateData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -267,7 +266,7 @@ func _Private_GetPrivateData_Handler(srv interface{}, ctx context.Context, dec f FullMethod: Private_GetPrivateData_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PrivateServer).GetPrivateData(ctx, req.(*IdentRequest)) + return srv.(PrivateServer).GetPrivateData(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -291,7 +290,7 @@ func _Private_UpdatePrivateData_Handler(srv interface{}, ctx context.Context, de } func _Private_DeletePrivateData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -303,13 +302,13 @@ func _Private_DeletePrivateData_Handler(srv interface{}, ctx context.Context, de FullMethod: Private_DeletePrivateData_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PrivateServer).DeletePrivateData(ctx, req.(*IdentRequest)) + return srv.(PrivateServer).DeletePrivateData(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Private_ListPrivateData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -321,13 +320,13 @@ func _Private_ListPrivateData_Handler(srv interface{}, ctx context.Context, dec FullMethod: Private_ListPrivateData_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PrivateServer).ListPrivateData(ctx, req.(*FetchRequest)) + return srv.(PrivateServer).ListPrivateData(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } func _Private_GetPrivateDataByType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -339,13 +338,13 @@ func _Private_GetPrivateDataByType_Handler(srv interface{}, ctx context.Context, FullMethod: Private_GetPrivateDataByType_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PrivateServer).GetPrivateDataByType(ctx, req.(*FetchRequest)) + return srv.(PrivateServer).GetPrivateDataByType(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } func _Private_SearchPrivateData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -357,7 +356,7 @@ func _Private_SearchPrivateData_Handler(srv interface{}, ctx context.Context, de FullMethod: Private_SearchPrivateData_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PrivateServer).SearchPrivateData(ctx, req.(*FetchRequest)) + return srv.(PrivateServer).SearchPrivateData(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -443,5 +442,5 @@ var Private_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "private.proto", + Metadata: "module/base/cloud/proto/private.proto", } diff --git a/module/base/cloud/pb/share.pb.go b/module/base/cloud/pb/share.pb.go index ee20708..a1eb85e 100644 --- a/module/base/cloud/pb/share.pb.go +++ b/module/base/cloud/pb/share.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: share.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/base/cloud/proto/share.proto package cloud import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -38,7 +39,7 @@ type CreateShareRequest struct { func (x *CreateShareRequest) Reset() { *x = CreateShareRequest{} - mi := &file_share_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_share_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -50,7 +51,7 @@ func (x *CreateShareRequest) String() string { func (*CreateShareRequest) ProtoMessage() {} func (x *CreateShareRequest) ProtoReflect() protoreflect.Message { - mi := &file_share_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_share_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63,7 +64,7 @@ func (x *CreateShareRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateShareRequest.ProtoReflect.Descriptor instead. func (*CreateShareRequest) Descriptor() ([]byte, []int) { - return file_share_proto_rawDescGZIP(), []int{0} + return file_module_base_cloud_proto_share_proto_rawDescGZIP(), []int{0} } func (x *CreateShareRequest) GetCloudId() uint64 { @@ -132,7 +133,7 @@ type ListSharesResponse struct { func (x *ListSharesResponse) Reset() { *x = ListSharesResponse{} - mi := &file_share_proto_msgTypes[1] + mi := &file_module_base_cloud_proto_share_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -144,7 +145,7 @@ func (x *ListSharesResponse) String() string { func (*ListSharesResponse) ProtoMessage() {} func (x *ListSharesResponse) ProtoReflect() protoreflect.Message { - mi := &file_share_proto_msgTypes[1] + mi := &file_module_base_cloud_proto_share_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -157,7 +158,7 @@ func (x *ListSharesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListSharesResponse.ProtoReflect.Descriptor instead. func (*ListSharesResponse) Descriptor() ([]byte, []int) { - return file_share_proto_rawDescGZIP(), []int{1} + return file_module_base_cloud_proto_share_proto_rawDescGZIP(), []int{1} } func (x *ListSharesResponse) GetShares() []*CloudShareItem { @@ -184,7 +185,7 @@ type ValidateSharePasswordRequest struct { func (x *ValidateSharePasswordRequest) Reset() { *x = ValidateSharePasswordRequest{} - mi := &file_share_proto_msgTypes[2] + mi := &file_module_base_cloud_proto_share_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -196,7 +197,7 @@ func (x *ValidateSharePasswordRequest) String() string { func (*ValidateSharePasswordRequest) ProtoMessage() {} func (x *ValidateSharePasswordRequest) ProtoReflect() protoreflect.Message { - mi := &file_share_proto_msgTypes[2] + mi := &file_module_base_cloud_proto_share_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -209,7 +210,7 @@ func (x *ValidateSharePasswordRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidateSharePasswordRequest.ProtoReflect.Descriptor instead. func (*ValidateSharePasswordRequest) Descriptor() ([]byte, []int) { - return file_share_proto_rawDescGZIP(), []int{2} + return file_module_base_cloud_proto_share_proto_rawDescGZIP(), []int{2} } func (x *ValidateSharePasswordRequest) GetIdentity() string { @@ -247,7 +248,7 @@ type CloudShareItem struct { func (x *CloudShareItem) Reset() { *x = CloudShareItem{} - mi := &file_share_proto_msgTypes[3] + mi := &file_module_base_cloud_proto_share_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -259,7 +260,7 @@ func (x *CloudShareItem) String() string { func (*CloudShareItem) ProtoMessage() {} func (x *CloudShareItem) ProtoReflect() protoreflect.Message { - mi := &file_share_proto_msgTypes[3] + mi := &file_module_base_cloud_proto_share_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -272,7 +273,7 @@ func (x *CloudShareItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CloudShareItem.ProtoReflect.Descriptor instead. func (*CloudShareItem) Descriptor() ([]byte, []int) { - return file_share_proto_rawDescGZIP(), []int{3} + return file_module_base_cloud_proto_share_proto_rawDescGZIP(), []int{3} } func (x *CloudShareItem) GetId() uint64 { @@ -359,11 +360,11 @@ func (x *CloudShareItem) GetUpdatedAt() string { return "" } -var File_share_proto protoreflect.FileDescriptor +var File_module_base_cloud_proto_share_proto protoreflect.FileDescriptor -const file_share_proto_rawDesc = "" + +const file_module_base_cloud_proto_share_proto_rawDesc = "" + "\n" + - "\x16base/cloud/share.proto\x12\x05cloud\x1a\x12cloud/blocks.proto\"\x8f\x02\n" + + "#module/base/cloud/proto/share.proto\x12\x05cloud\x1a\x15protobuf/blocks.proto\"\x8f\x02\n" + "\x12CreateShareRequest\x12\x19\n" + "\bcloud_id\x18\x01 \x01(\x04R\acloudId\x12%\n" + "\x0ecloud_identity\x18\x02 \x01(\tR\rcloudIdentity\x12\x1d\n" + @@ -403,49 +404,49 @@ const file_share_proto_rawDesc = "" + "\n" + "created_at\x18\v \x01(\tR\tcreatedAt\x12\x1d\n" + "\n" + - "updated_at\x18\f \x01(\tR\tupdatedAt2\xc5\x02\n" + - "\x05Share\x12<\n" + - "\vCreateShare\x12\x19.cloud.CreateShareRequest\x1a\x12.cloud.StatusReply\x126\n" + - "\bGetShare\x12\x13.cloud.IdentRequest\x1a\x15.cloud.CloudShareItem\x126\n" + - "\vDeleteShare\x12\x13.cloud.IdentRequest\x1a\x12.cloud.StatusReply\x12<\n" + + "updated_at\x18\f \x01(\tR\tupdatedAt2\xcb\x02\n" + + "\x05Share\x12=\n" + + "\vCreateShare\x12\x19.cloud.CreateShareRequest\x1a\x13.blocks.StatusReply\x127\n" + + "\bGetShare\x12\x14.blocks.IdentRequest\x1a\x15.cloud.CloudShareItem\x128\n" + + "\vDeleteShare\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\x12=\n" + "\n" + - "ListShares\x12\x13.cloud.FetchRequest\x1a\x19.cloud.ListSharesResponse\x12P\n" + - "\x15ValidateSharePassword\x12#.cloud.ValidateSharePasswordRequest\x1a\x12.cloud.StatusReplyB\tZ\a.;cloudb\x06proto3" + "ListShares\x12\x14.blocks.FetchRequest\x1a\x19.cloud.ListSharesResponse\x12Q\n" + + "\x15ValidateSharePassword\x12#.cloud.ValidateSharePasswordRequest\x1a\x13.blocks.StatusReplyB%Z#bsm/full/module/base/cloud/pb;cloudb\x06proto3" var ( - file_share_proto_rawDescOnce sync.Once - file_share_proto_rawDescData []byte + file_module_base_cloud_proto_share_proto_rawDescOnce sync.Once + file_module_base_cloud_proto_share_proto_rawDescData []byte ) -func file_share_proto_rawDescGZIP() []byte { - file_share_proto_rawDescOnce.Do(func() { - file_share_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_share_proto_rawDesc), len(file_share_proto_rawDesc))) +func file_module_base_cloud_proto_share_proto_rawDescGZIP() []byte { + file_module_base_cloud_proto_share_proto_rawDescOnce.Do(func() { + file_module_base_cloud_proto_share_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_share_proto_rawDesc), len(file_module_base_cloud_proto_share_proto_rawDesc))) }) - return file_share_proto_rawDescData + return file_module_base_cloud_proto_share_proto_rawDescData } -var file_share_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_share_proto_goTypes = []any{ +var file_module_base_cloud_proto_share_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_module_base_cloud_proto_share_proto_goTypes = []any{ (*CreateShareRequest)(nil), // 0: cloud.CreateShareRequest (*ListSharesResponse)(nil), // 1: cloud.ListSharesResponse (*ValidateSharePasswordRequest)(nil), // 2: cloud.ValidateSharePasswordRequest (*CloudShareItem)(nil), // 3: cloud.CloudShareItem - (*IdentRequest)(nil), // 4: cloud.IdentRequest - (*FetchRequest)(nil), // 5: cloud.FetchRequest - (*StatusReply)(nil), // 6: cloud.StatusReply + (*protobuf.IdentRequest)(nil), // 4: blocks.IdentRequest + (*protobuf.FetchRequest)(nil), // 5: blocks.FetchRequest + (*protobuf.StatusReply)(nil), // 6: blocks.StatusReply } -var file_share_proto_depIdxs = []int32{ +var file_module_base_cloud_proto_share_proto_depIdxs = []int32{ 3, // 0: cloud.ListSharesResponse.shares:type_name -> cloud.CloudShareItem 0, // 1: cloud.Share.CreateShare:input_type -> cloud.CreateShareRequest - 4, // 2: cloud.Share.GetShare:input_type -> cloud.IdentRequest - 4, // 3: cloud.Share.DeleteShare:input_type -> cloud.IdentRequest - 5, // 4: cloud.Share.ListShares:input_type -> cloud.FetchRequest + 4, // 2: cloud.Share.GetShare:input_type -> blocks.IdentRequest + 4, // 3: cloud.Share.DeleteShare:input_type -> blocks.IdentRequest + 5, // 4: cloud.Share.ListShares:input_type -> blocks.FetchRequest 2, // 5: cloud.Share.ValidateSharePassword:input_type -> cloud.ValidateSharePasswordRequest - 6, // 6: cloud.Share.CreateShare:output_type -> cloud.StatusReply + 6, // 6: cloud.Share.CreateShare:output_type -> blocks.StatusReply 3, // 7: cloud.Share.GetShare:output_type -> cloud.CloudShareItem - 6, // 8: cloud.Share.DeleteShare:output_type -> cloud.StatusReply + 6, // 8: cloud.Share.DeleteShare:output_type -> blocks.StatusReply 1, // 9: cloud.Share.ListShares:output_type -> cloud.ListSharesResponse - 6, // 10: cloud.Share.ValidateSharePassword:output_type -> cloud.StatusReply + 6, // 10: cloud.Share.ValidateSharePassword:output_type -> blocks.StatusReply 6, // [6:11] is the sub-list for method output_type 1, // [1:6] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -453,27 +454,26 @@ var file_share_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_share_proto_init() } -func file_share_proto_init() { - if File_share_proto != nil { +func init() { file_module_base_cloud_proto_share_proto_init() } +func file_module_base_cloud_proto_share_proto_init() { + if File_module_base_cloud_proto_share_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_share_proto_rawDesc), len(file_share_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_share_proto_rawDesc), len(file_module_base_cloud_proto_share_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_share_proto_goTypes, - DependencyIndexes: file_share_proto_depIdxs, - MessageInfos: file_share_proto_msgTypes, + GoTypes: file_module_base_cloud_proto_share_proto_goTypes, + DependencyIndexes: file_module_base_cloud_proto_share_proto_depIdxs, + MessageInfos: file_module_base_cloud_proto_share_proto_msgTypes, }.Build() - File_share_proto = out.File - file_share_proto_goTypes = nil - file_share_proto_depIdxs = nil + File_module_base_cloud_proto_share_proto = out.File + file_module_base_cloud_proto_share_proto_goTypes = nil + file_module_base_cloud_proto_share_proto_depIdxs = nil } diff --git a/module/base/cloud/pb/share.pb.gw.go b/module/base/cloud/pb/share.pb.gw.go index dea62fd..f8c0636 100644 --- a/module/base/cloud/pb/share.pb.gw.go +++ b/module/base/cloud/pb/share.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: share.proto +// source: module/base/cloud/proto/share.proto /* Package cloud is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package cloud import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -64,7 +65,7 @@ func local_request_Share_CreateShare_0(ctx context.Context, marshaler runtime.Ma func request_Share_GetShare_0(ctx context.Context, marshaler runtime.Marshaler, client ShareClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Share_GetShare_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Share_GetShare_0(ctx context.Context, marshaler runtime.Marshaler, server ShareServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -91,7 +92,7 @@ func local_request_Share_GetShare_0(ctx context.Context, marshaler runtime.Marsh func request_Share_DeleteShare_0(ctx context.Context, marshaler runtime.Marshaler, client ShareClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Share_DeleteShare_0(ctx context.Context, marshaler runtime.Marshale func local_request_Share_DeleteShare_0(ctx context.Context, marshaler runtime.Marshaler, server ShareServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -118,7 +119,7 @@ func local_request_Share_DeleteShare_0(ctx context.Context, marshaler runtime.Ma func request_Share_ListShares_0(ctx context.Context, marshaler runtime.Marshaler, client ShareClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Share_ListShares_0(ctx context.Context, marshaler runtime.Marshaler func local_request_Share_ListShares_0(ctx context.Context, marshaler runtime.Marshaler, server ShareServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/base/cloud/pb/share_grpc.pb.go b/module/base/cloud/pb/share_grpc.pb.go index 0635bf8..839b0aa 100644 --- a/module/base/cloud/pb/share_grpc.pb.go +++ b/module/base/cloud/pb/share_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: share.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/cloud/proto/share.proto package cloud import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -33,15 +34,15 @@ const ( // 分享服务 type ShareClient interface { // 创建分享 - CreateShare(ctx context.Context, in *CreateShareRequest, opts ...grpc.CallOption) (*StatusReply, error) + CreateShare(ctx context.Context, in *CreateShareRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取分享详情 - GetShare(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudShareItem, error) + GetShare(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudShareItem, error) // 删除分享 - DeleteShare(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + DeleteShare(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取分享列表 - ListShares(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListSharesResponse, error) + ListShares(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListSharesResponse, error) // 验证分享密码 - ValidateSharePassword(ctx context.Context, in *ValidateSharePasswordRequest, opts ...grpc.CallOption) (*StatusReply, error) + ValidateSharePassword(ctx context.Context, in *ValidateSharePasswordRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type shareClient struct { @@ -52,9 +53,9 @@ func NewShareClient(cc grpc.ClientConnInterface) ShareClient { return &shareClient{cc} } -func (c *shareClient) CreateShare(ctx context.Context, in *CreateShareRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *shareClient) CreateShare(ctx context.Context, in *CreateShareRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Share_CreateShare_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -62,7 +63,7 @@ func (c *shareClient) CreateShare(ctx context.Context, in *CreateShareRequest, o return out, nil } -func (c *shareClient) GetShare(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudShareItem, error) { +func (c *shareClient) GetShare(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudShareItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CloudShareItem) err := c.cc.Invoke(ctx, Share_GetShare_FullMethodName, in, out, cOpts...) @@ -72,9 +73,9 @@ func (c *shareClient) GetShare(ctx context.Context, in *IdentRequest, opts ...gr return out, nil } -func (c *shareClient) DeleteShare(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *shareClient) DeleteShare(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Share_DeleteShare_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -82,7 +83,7 @@ func (c *shareClient) DeleteShare(ctx context.Context, in *IdentRequest, opts .. return out, nil } -func (c *shareClient) ListShares(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListSharesResponse, error) { +func (c *shareClient) ListShares(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListSharesResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListSharesResponse) err := c.cc.Invoke(ctx, Share_ListShares_FullMethodName, in, out, cOpts...) @@ -92,9 +93,9 @@ func (c *shareClient) ListShares(ctx context.Context, in *FetchRequest, opts ... return out, nil } -func (c *shareClient) ValidateSharePassword(ctx context.Context, in *ValidateSharePasswordRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *shareClient) ValidateSharePassword(ctx context.Context, in *ValidateSharePasswordRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Share_ValidateSharePassword_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -103,48 +104,46 @@ func (c *shareClient) ValidateSharePassword(ctx context.Context, in *ValidateSha } // ShareServer is the server API for Share service. -// All implementations must embed UnimplementedShareServer +// All implementations should embed UnimplementedShareServer // for forward compatibility. // // 分享服务 type ShareServer interface { // 创建分享 - CreateShare(context.Context, *CreateShareRequest) (*StatusReply, error) + CreateShare(context.Context, *CreateShareRequest) (*protobuf.StatusReply, error) // 获取分享详情 - GetShare(context.Context, *IdentRequest) (*CloudShareItem, error) + GetShare(context.Context, *protobuf.IdentRequest) (*CloudShareItem, error) // 删除分享 - DeleteShare(context.Context, *IdentRequest) (*StatusReply, error) + DeleteShare(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) // 获取分享列表 - ListShares(context.Context, *FetchRequest) (*ListSharesResponse, error) + ListShares(context.Context, *protobuf.FetchRequest) (*ListSharesResponse, error) // 验证分享密码 - ValidateSharePassword(context.Context, *ValidateSharePasswordRequest) (*StatusReply, error) - mustEmbedUnimplementedShareServer() + ValidateSharePassword(context.Context, *ValidateSharePasswordRequest) (*protobuf.StatusReply, error) } -// UnimplementedShareServer must be embedded to have +// UnimplementedShareServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedShareServer struct{} -func (UnimplementedShareServer) CreateShare(context.Context, *CreateShareRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateShare not implemented") +func (UnimplementedShareServer) CreateShare(context.Context, *CreateShareRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CreateShare not implemented") } -func (UnimplementedShareServer) GetShare(context.Context, *IdentRequest) (*CloudShareItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetShare not implemented") +func (UnimplementedShareServer) GetShare(context.Context, *protobuf.IdentRequest) (*CloudShareItem, error) { + return nil, status.Error(codes.Unimplemented, "method GetShare not implemented") } -func (UnimplementedShareServer) DeleteShare(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteShare not implemented") +func (UnimplementedShareServer) DeleteShare(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteShare not implemented") } -func (UnimplementedShareServer) ListShares(context.Context, *FetchRequest) (*ListSharesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListShares not implemented") +func (UnimplementedShareServer) ListShares(context.Context, *protobuf.FetchRequest) (*ListSharesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListShares not implemented") } -func (UnimplementedShareServer) ValidateSharePassword(context.Context, *ValidateSharePasswordRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidateSharePassword not implemented") +func (UnimplementedShareServer) ValidateSharePassword(context.Context, *ValidateSharePasswordRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method ValidateSharePassword not implemented") } -func (UnimplementedShareServer) mustEmbedUnimplementedShareServer() {} -func (UnimplementedShareServer) testEmbeddedByValue() {} +func (UnimplementedShareServer) testEmbeddedByValue() {} // UnsafeShareServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ShareServer will @@ -154,7 +153,7 @@ type UnsafeShareServer interface { } func RegisterShareServer(s grpc.ServiceRegistrar, srv ShareServer) { - // If the following call pancis, it indicates UnimplementedShareServer was + // If the following call panics, it indicates UnimplementedShareServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -183,7 +182,7 @@ func _Share_CreateShare_Handler(srv interface{}, ctx context.Context, dec func(i } func _Share_GetShare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -195,13 +194,13 @@ func _Share_GetShare_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Share_GetShare_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ShareServer).GetShare(ctx, req.(*IdentRequest)) + return srv.(ShareServer).GetShare(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Share_DeleteShare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -213,13 +212,13 @@ func _Share_DeleteShare_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: Share_DeleteShare_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ShareServer).DeleteShare(ctx, req.(*IdentRequest)) + return srv.(ShareServer).DeleteShare(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Share_ListShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -231,7 +230,7 @@ func _Share_ListShares_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: Share_ListShares_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ShareServer).ListShares(ctx, req.(*FetchRequest)) + return srv.(ShareServer).ListShares(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -283,5 +282,5 @@ var Share_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "share.proto", + Metadata: "module/base/cloud/proto/share.proto", } diff --git a/module/base/cloud/pb/space.pb.go b/module/base/cloud/pb/space.pb.go index 912b662..9413359 100644 --- a/module/base/cloud/pb/space.pb.go +++ b/module/base/cloud/pb/space.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: space.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/base/cloud/proto/space.proto package cloud import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -50,7 +51,7 @@ type CloudSpace struct { func (x *CloudSpace) Reset() { *x = CloudSpace{} - mi := &file_space_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_space_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -62,7 +63,7 @@ func (x *CloudSpace) String() string { func (*CloudSpace) ProtoMessage() {} func (x *CloudSpace) ProtoReflect() protoreflect.Message { - mi := &file_space_proto_msgTypes[0] + mi := &file_module_base_cloud_proto_space_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75,7 +76,7 @@ func (x *CloudSpace) ProtoReflect() protoreflect.Message { // Deprecated: Use CloudSpace.ProtoReflect.Descriptor instead. func (*CloudSpace) Descriptor() ([]byte, []int) { - return file_space_proto_rawDescGZIP(), []int{0} + return file_module_base_cloud_proto_space_proto_rawDescGZIP(), []int{0} } func (x *CloudSpace) GetId() uint64 { @@ -211,13 +212,11 @@ func (x *CloudSpace) GetCloudShares() []*CloudShareItem { return nil } -var File_space_proto protoreflect.FileDescriptor +var File_module_base_cloud_proto_space_proto protoreflect.FileDescriptor -const file_space_proto_rawDesc = "" + +const file_module_base_cloud_proto_space_proto_rawDesc = "" + "\n" + - "\x16base/cloud/space.proto\x12\x05cloud\x1a\x12cloud/blocks.proto\x1a\n" + - "disk.proto\x1a\x16base/cloud/album.proto\x1a\n" + - "note.proto\x1a\x19base/cloud/bookmark.proto\x1a\x18base/cloud/private.proto\x1a\x16base/cloud/share.proto\"\x98\x06\n" + + "#module/base/cloud/proto/space.proto\x12\x05cloud\x1a\x15protobuf/blocks.proto\x1a\"module/base/cloud/proto/disk.proto\x1a#module/base/cloud/proto/album.proto\x1a\"module/base/cloud/proto/note.proto\x1a&module/base/cloud/proto/bookmark.proto\x1a%module/base/cloud/proto/private.proto\x1a#module/base/cloud/proto/share.proto\"\x98\x06\n" + "\n" + "CloudSpace\x12\x0e\n" + "\x02id\x18\x01 \x01(\x04R\x02id\x12\x1a\n" + @@ -247,44 +246,44 @@ const file_space_proto_rawDesc = "" + "cloudNotes\x12A\n" + "\x0fcloud_bookmarks\x18\x11 \x03(\v2\x18.cloud.CloudBookmarkItemR\x0ecloudBookmarks\x12<\n" + "\rcloud_private\x18\x12 \x03(\v2\x17.cloud.CloudPrivateItemR\fcloudPrivate\x128\n" + - "\fcloud_shares\x18\x13 \x03(\v2\x15.cloud.CloudShareItemR\vcloudShares2m\n" + - "\x05Space\x12&\n" + - "\x03Get\x12\f.cloud.Empty\x1a\x11.cloud.CloudSpace\x12<\n" + - "\x12GetByKeyIdentifier\x12\x13.cloud.IdentRequest\x1a\x11.cloud.CloudSpaceB\tZ\a.;cloudb\x06proto3" + "\fcloud_shares\x18\x13 \x03(\v2\x15.cloud.CloudShareItemR\vcloudShares2o\n" + + "\x05Space\x12'\n" + + "\x03Get\x12\r.blocks.Empty\x1a\x11.cloud.CloudSpace\x12=\n" + + "\x12GetByKeyIdentifier\x12\x14.blocks.IdentRequest\x1a\x11.cloud.CloudSpaceB%Z#bsm/full/module/base/cloud/pb;cloudb\x06proto3" var ( - file_space_proto_rawDescOnce sync.Once - file_space_proto_rawDescData []byte + file_module_base_cloud_proto_space_proto_rawDescOnce sync.Once + file_module_base_cloud_proto_space_proto_rawDescData []byte ) -func file_space_proto_rawDescGZIP() []byte { - file_space_proto_rawDescOnce.Do(func() { - file_space_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_space_proto_rawDesc), len(file_space_proto_rawDesc))) +func file_module_base_cloud_proto_space_proto_rawDescGZIP() []byte { + file_module_base_cloud_proto_space_proto_rawDescOnce.Do(func() { + file_module_base_cloud_proto_space_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_space_proto_rawDesc), len(file_module_base_cloud_proto_space_proto_rawDesc))) }) - return file_space_proto_rawDescData + return file_module_base_cloud_proto_space_proto_rawDescData } -var file_space_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_space_proto_goTypes = []any{ - (*CloudSpace)(nil), // 0: cloud.CloudSpace - (*CloudDiskDirItem)(nil), // 1: cloud.CloudDiskDirItem - (*CloudAlbumItem)(nil), // 2: cloud.CloudAlbumItem - (*CloudNoteItem)(nil), // 3: cloud.CloudNoteItem - (*CloudBookmarkItem)(nil), // 4: cloud.CloudBookmarkItem - (*CloudPrivateItem)(nil), // 5: cloud.CloudPrivateItem - (*CloudShareItem)(nil), // 6: cloud.CloudShareItem - (*Empty)(nil), // 7: cloud.Empty - (*IdentRequest)(nil), // 8: cloud.IdentRequest +var file_module_base_cloud_proto_space_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_module_base_cloud_proto_space_proto_goTypes = []any{ + (*CloudSpace)(nil), // 0: cloud.CloudSpace + (*CloudDiskDirItem)(nil), // 1: cloud.CloudDiskDirItem + (*CloudAlbumItem)(nil), // 2: cloud.CloudAlbumItem + (*CloudNoteItem)(nil), // 3: cloud.CloudNoteItem + (*CloudBookmarkItem)(nil), // 4: cloud.CloudBookmarkItem + (*CloudPrivateItem)(nil), // 5: cloud.CloudPrivateItem + (*CloudShareItem)(nil), // 6: cloud.CloudShareItem + (*protobuf.Empty)(nil), // 7: blocks.Empty + (*protobuf.IdentRequest)(nil), // 8: blocks.IdentRequest } -var file_space_proto_depIdxs = []int32{ +var file_module_base_cloud_proto_space_proto_depIdxs = []int32{ 1, // 0: cloud.CloudSpace.cloud_disk_dirs:type_name -> cloud.CloudDiskDirItem 2, // 1: cloud.CloudSpace.cloud_albums:type_name -> cloud.CloudAlbumItem 3, // 2: cloud.CloudSpace.cloud_notes:type_name -> cloud.CloudNoteItem 4, // 3: cloud.CloudSpace.cloud_bookmarks:type_name -> cloud.CloudBookmarkItem 5, // 4: cloud.CloudSpace.cloud_private:type_name -> cloud.CloudPrivateItem 6, // 5: cloud.CloudSpace.cloud_shares:type_name -> cloud.CloudShareItem - 7, // 6: cloud.Space.Get:input_type -> cloud.Empty - 8, // 7: cloud.Space.GetByKeyIdentifier:input_type -> cloud.IdentRequest + 7, // 6: cloud.Space.Get:input_type -> blocks.Empty + 8, // 7: cloud.Space.GetByKeyIdentifier:input_type -> blocks.IdentRequest 0, // 8: cloud.Space.Get:output_type -> cloud.CloudSpace 0, // 9: cloud.Space.GetByKeyIdentifier:output_type -> cloud.CloudSpace 8, // [8:10] is the sub-list for method output_type @@ -294,33 +293,32 @@ var file_space_proto_depIdxs = []int32{ 0, // [0:6] is the sub-list for field type_name } -func init() { file_space_proto_init() } -func file_space_proto_init() { - if File_space_proto != nil { +func init() { file_module_base_cloud_proto_space_proto_init() } +func file_module_base_cloud_proto_space_proto_init() { + if File_module_base_cloud_proto_space_proto != nil { return } - file_blocks_proto_init() - file_disk_proto_init() - file_album_proto_init() - file_note_proto_init() - file_bookmark_proto_init() - file_private_proto_init() - file_share_proto_init() + file_module_base_cloud_proto_disk_proto_init() + file_module_base_cloud_proto_album_proto_init() + file_module_base_cloud_proto_note_proto_init() + file_module_base_cloud_proto_bookmark_proto_init() + file_module_base_cloud_proto_private_proto_init() + file_module_base_cloud_proto_share_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_space_proto_rawDesc), len(file_space_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cloud_proto_space_proto_rawDesc), len(file_module_base_cloud_proto_space_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_space_proto_goTypes, - DependencyIndexes: file_space_proto_depIdxs, - MessageInfos: file_space_proto_msgTypes, + GoTypes: file_module_base_cloud_proto_space_proto_goTypes, + DependencyIndexes: file_module_base_cloud_proto_space_proto_depIdxs, + MessageInfos: file_module_base_cloud_proto_space_proto_msgTypes, }.Build() - File_space_proto = out.File - file_space_proto_goTypes = nil - file_space_proto_depIdxs = nil + File_module_base_cloud_proto_space_proto = out.File + file_module_base_cloud_proto_space_proto_goTypes = nil + file_module_base_cloud_proto_space_proto_depIdxs = nil } diff --git a/module/base/cloud/pb/space.pb.gw.go b/module/base/cloud/pb/space.pb.gw.go index 423c3b3..0c39593 100644 --- a/module/base/cloud/pb/space.pb.gw.go +++ b/module/base/cloud/pb/space.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: space.proto +// source: module/base/cloud/proto/space.proto /* Package cloud is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package cloud import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Space_Get_0(ctx context.Context, marshaler runtime.Marshaler, client SpaceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Space_Get_0(ctx context.Context, marshaler runtime.Marshaler, clien func local_request_Space_Get_0(ctx context.Context, marshaler runtime.Marshaler, server SpaceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -64,7 +65,7 @@ func local_request_Space_Get_0(ctx context.Context, marshaler runtime.Marshaler, func request_Space_GetByKeyIdentifier_0(ctx context.Context, marshaler runtime.Marshaler, client SpaceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Space_GetByKeyIdentifier_0(ctx context.Context, marshaler runtime.M func local_request_Space_GetByKeyIdentifier_0(ctx context.Context, marshaler runtime.Marshaler, server SpaceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/base/cloud/pb/space_grpc.pb.go b/module/base/cloud/pb/space_grpc.pb.go index bed5cd1..2e66633 100644 --- a/module/base/cloud/pb/space_grpc.pb.go +++ b/module/base/cloud/pb/space_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: space.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/cloud/proto/space.proto package cloud import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -28,9 +29,9 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type SpaceClient interface { // 获取空间数据 - Get(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CloudSpace, error) + Get(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*CloudSpace, error) // 获取空间数据 - GetByKeyIdentifier(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudSpace, error) + GetByKeyIdentifier(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudSpace, error) } type spaceClient struct { @@ -41,7 +42,7 @@ func NewSpaceClient(cc grpc.ClientConnInterface) SpaceClient { return &spaceClient{cc} } -func (c *spaceClient) Get(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CloudSpace, error) { +func (c *spaceClient) Get(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*CloudSpace, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CloudSpace) err := c.cc.Invoke(ctx, Space_Get_FullMethodName, in, out, cOpts...) @@ -51,7 +52,7 @@ func (c *spaceClient) Get(ctx context.Context, in *Empty, opts ...grpc.CallOptio return out, nil } -func (c *spaceClient) GetByKeyIdentifier(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CloudSpace, error) { +func (c *spaceClient) GetByKeyIdentifier(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudSpace, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CloudSpace) err := c.cc.Invoke(ctx, Space_GetByKeyIdentifier_FullMethodName, in, out, cOpts...) @@ -62,31 +63,29 @@ func (c *spaceClient) GetByKeyIdentifier(ctx context.Context, in *IdentRequest, } // SpaceServer is the server API for Space service. -// All implementations must embed UnimplementedSpaceServer +// All implementations should embed UnimplementedSpaceServer // for forward compatibility. type SpaceServer interface { // 获取空间数据 - Get(context.Context, *Empty) (*CloudSpace, error) + Get(context.Context, *protobuf.Empty) (*CloudSpace, error) // 获取空间数据 - GetByKeyIdentifier(context.Context, *IdentRequest) (*CloudSpace, error) - mustEmbedUnimplementedSpaceServer() + GetByKeyIdentifier(context.Context, *protobuf.IdentRequest) (*CloudSpace, error) } -// UnimplementedSpaceServer must be embedded to have +// UnimplementedSpaceServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedSpaceServer struct{} -func (UnimplementedSpaceServer) Get(context.Context, *Empty) (*CloudSpace, error) { - return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +func (UnimplementedSpaceServer) Get(context.Context, *protobuf.Empty) (*CloudSpace, error) { + return nil, status.Error(codes.Unimplemented, "method Get not implemented") } -func (UnimplementedSpaceServer) GetByKeyIdentifier(context.Context, *IdentRequest) (*CloudSpace, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetByKeyIdentifier not implemented") +func (UnimplementedSpaceServer) GetByKeyIdentifier(context.Context, *protobuf.IdentRequest) (*CloudSpace, error) { + return nil, status.Error(codes.Unimplemented, "method GetByKeyIdentifier not implemented") } -func (UnimplementedSpaceServer) mustEmbedUnimplementedSpaceServer() {} -func (UnimplementedSpaceServer) testEmbeddedByValue() {} +func (UnimplementedSpaceServer) testEmbeddedByValue() {} // UnsafeSpaceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SpaceServer will @@ -96,7 +95,7 @@ type UnsafeSpaceServer interface { } func RegisterSpaceServer(s grpc.ServiceRegistrar, srv SpaceServer) { - // If the following call pancis, it indicates UnimplementedSpaceServer was + // If the following call panics, it indicates UnimplementedSpaceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -107,7 +106,7 @@ func RegisterSpaceServer(s grpc.ServiceRegistrar, srv SpaceServer) { } func _Space_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -119,13 +118,13 @@ func _Space_Get_Handler(srv interface{}, ctx context.Context, dec func(interface FullMethod: Space_Get_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SpaceServer).Get(ctx, req.(*Empty)) + return srv.(SpaceServer).Get(ctx, req.(*protobuf.Empty)) } return interceptor(ctx, in, info, handler) } func _Space_GetByKeyIdentifier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -137,7 +136,7 @@ func _Space_GetByKeyIdentifier_Handler(srv interface{}, ctx context.Context, dec FullMethod: Space_GetByKeyIdentifier_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SpaceServer).GetByKeyIdentifier(ctx, req.(*IdentRequest)) + return srv.(SpaceServer).GetByKeyIdentifier(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -159,5 +158,5 @@ var Space_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "space.proto", + Metadata: "module/base/cloud/proto/space.proto", } diff --git a/module/base/cloud/proto/album.proto b/module/base/cloud/proto/album.proto index e254a6d..e45b0fe 100644 --- a/module/base/cloud/proto/album.proto +++ b/module/base/cloud/proto/album.proto @@ -1,35 +1,35 @@ syntax = "proto3"; package cloud; -option go_package = ".;cloud"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/cloud/pb;cloud"; +import "protobuf/blocks.proto"; // 相册服务 service Album { // 创建相册 - rpc CreateAlbum(CreateAlbumRequest) returns (StatusReply); + rpc CreateAlbum(CreateAlbumRequest) returns (blocks.StatusReply); // 获取相册详情 - rpc GetAlbum(IdentRequest) returns (CloudAlbumItem); + rpc GetAlbum(blocks.IdentRequest) returns (CloudAlbumItem); // 更新相册 - rpc UpdateAlbum(CloudAlbumItem) returns (StatusReply); + rpc UpdateAlbum(CloudAlbumItem) returns (blocks.StatusReply); // 删除相册 - rpc DeleteAlbum(IdentRequest) returns (StatusReply); + rpc DeleteAlbum(blocks.IdentRequest) returns (blocks.StatusReply); // 获取相册列表 - rpc ListAlbums(FetchRequest) returns (ListAlbumsResponse); + rpc ListAlbums(blocks.FetchRequest) returns (ListAlbumsResponse); // 设置封面照片 - rpc SetCoverPhoto(SetCoverPhotoRequest) returns (StatusReply); + rpc SetCoverPhoto(SetCoverPhotoRequest) returns (blocks.StatusReply); // 上传照片 - rpc UploadPhoto(CloudPhotoItem) returns (StatusReply); + rpc UploadPhoto(CloudPhotoItem) returns (blocks.StatusReply); // 获取照片详情 - rpc GetPhoto(IdentRequest) returns (CloudPhotoItem); + rpc GetPhoto(blocks.IdentRequest) returns (CloudPhotoItem); // 更新照片 - rpc UpdatePhoto(CloudPhotoItem) returns (StatusReply); + rpc UpdatePhoto(CloudPhotoItem) returns (blocks.StatusReply); // 删除照片 - rpc DeletePhoto(IdentRequest) returns (StatusReply); + rpc DeletePhoto(blocks.IdentRequest) returns (blocks.StatusReply); // 获取照片列表 - rpc ListPhotos(FetchRequest) returns (ListPhotosResponse); + rpc ListPhotos(blocks.FetchRequest) returns (ListPhotosResponse); // 移动照片到其他相册 - rpc MovePhoto(MovePhotoRequest) returns (StatusReply); + rpc MovePhoto(MovePhotoRequest) returns (blocks.StatusReply); } // 请求消息定义 @@ -62,7 +62,7 @@ message CloudAlbumItem { bool is_private = 6; // 是否私有 string created_at = 7; string updated_at = 8; - + // 关联关系 repeated CloudPhotoItem photos = 9; // 相册下的照片 } @@ -96,7 +96,7 @@ message CloudPhotoItem { string tags = 13; // 标签,逗号分隔 string created_at = 14; string updated_at = 15; - + // 关联关系 CloudAlbumItem album = 16; } \ No newline at end of file diff --git a/module/base/cloud/proto/blocks.proto b/module/base/cloud/proto/blocks.proto deleted file mode 100644 index c637682..0000000 --- a/module/base/cloud/proto/blocks.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; -package cloud; -option go_package = ".;cloud"; - - -// 通用响应消息 -message Empty {} - -// 通用ID请求 -message IDRequest { - uint64 id = 1; -} - -message IdentRequest{ - int64 id = 1; // 唯一ID - string identity = 2; // 唯一码 -} - -// 通用ID列表请求 -message IDListRequest { - repeated uint64 ids = 1; -} - -// 列表请求参数 -message FetchRequest { - int64 page_no=1 [json_name = "page_no"]; // 页数 - int64 page_size=2 [json_name = "page_size"]; // 每页记录数 - map params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11 -} - - -// 基础时间戳和ID结构 -message StdIicuds { - uint64 id = 1; - string created_at = 2; - string updated_at = 3; - string deleted_at = 4; -} - -// 用户身份信息 -message StdPassport { - uint64 passport_id = 1; - string passport_identity = 2; -} - -// 云盘基础信息 -message CloudBase { - uint64 cloud_id = 1; - string cloud_identity = 2; -} - -// 状态回复 -message StatusReply{ - int32 code=1; // 状态码 - string message=2; // 状态说明 - string details=3; // 数据 - int64 timeseq=4; // 响应时间序列 -} \ No newline at end of file diff --git a/module/base/cloud/proto/bookmark.proto b/module/base/cloud/proto/bookmark.proto index 888df63..c2a6f6b 100644 --- a/module/base/cloud/proto/bookmark.proto +++ b/module/base/cloud/proto/bookmark.proto @@ -1,22 +1,22 @@ syntax = "proto3"; package cloud; -option go_package = ".;cloud"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/cloud/pb;cloud"; +import "protobuf/blocks.proto"; // 书签服务 service Bookmark { // 创建书签 - rpc CreateBookmark(CreateBookmarkRequest) returns (StatusReply); + rpc CreateBookmark(CreateBookmarkRequest) returns (blocks.StatusReply); // 获取书签详情 - rpc GetBookmark(IDRequest) returns (CloudBookmarkItem); + rpc GetBookmark(blocks.IDRequest) returns (CloudBookmarkItem); // 更新书签 - rpc UpdateBookmark(CloudBookmarkItem) returns (StatusReply); + rpc UpdateBookmark(CloudBookmarkItem) returns (blocks.StatusReply); // 删除书签 - rpc DeleteBookmark(IDRequest) returns (StatusReply); + rpc DeleteBookmark(blocks.IDRequest) returns (blocks.StatusReply); // 获取书签列表 - rpc ListBookmarks(FetchRequest) returns (ListBookmarksResponse); + rpc ListBookmarks(blocks.FetchRequest) returns (ListBookmarksResponse); // 导入书签 - rpc ImportBookmarks(ImportBookmarksRequest) returns (StatusReply); + rpc ImportBookmarks(ImportBookmarksRequest) returns (blocks.StatusReply); } message CreateBookmarkRequest { diff --git a/module/base/cloud/proto/disk.proto b/module/base/cloud/proto/disk.proto index 0f316f0..2535ddb 100644 --- a/module/base/cloud/proto/disk.proto +++ b/module/base/cloud/proto/disk.proto @@ -1,41 +1,41 @@ syntax = "proto3"; package cloud; -option go_package = ".;cloud"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/cloud/pb;cloud"; +import "protobuf/blocks.proto"; // 云盘目录服务 service Disk { // 创建目录 - rpc CreateDir(CreateDirRequest) returns (StatusReply); + rpc CreateDir(CreateDirRequest) returns (blocks.StatusReply); // 获取目录详情 - rpc GetDir(IdentRequest) returns (CloudDiskDirItem); + rpc GetDir(blocks.IdentRequest) returns (CloudDiskDirItem); // 更新目录 - rpc UpdateDir(CloudDiskDirItem) returns (StatusReply); + rpc UpdateDir(CloudDiskDirItem) returns (blocks.StatusReply); // 删除目录 - rpc DeleteDir(IdentRequest) returns (StatusReply); + rpc DeleteDir(blocks.IdentRequest) returns (blocks.StatusReply); // 获取目录列表 - rpc ListDirs(FetchRequest) returns (ListDirsResponse); + rpc ListDirs(blocks.FetchRequest) returns (ListDirsResponse); // 获取目录树 - rpc GetDirTree(IdentRequest) returns (CloudDiskDirItem); + rpc GetDirTree(blocks.IdentRequest) returns (CloudDiskDirItem); // 移动目录 - rpc MoveDir(MoveDirRequest) returns (StatusReply); + rpc MoveDir(MoveDirRequest) returns (blocks.StatusReply); // 上传文件 - rpc UploadFile(CloudDiskFileRequest) returns (StatusReply); + rpc UploadFile(CloudDiskFileRequest) returns (blocks.StatusReply); // 获取文件详情 - rpc GetFile(IdentRequest) returns (CloudDiskFileItem); + rpc GetFile(blocks.IdentRequest) returns (CloudDiskFileItem); // 更新文件 - rpc UpdateFile(CloudDiskFileItem) returns (StatusReply); + rpc UpdateFile(CloudDiskFileItem) returns (blocks.StatusReply); // 删除文件 - rpc DeleteFile(IdentRequest) returns (StatusReply); + rpc DeleteFile(blocks.IdentRequest) returns (blocks.StatusReply); // 获取文件列表 - rpc ListFiles(FetchRequest) returns (ListFilesResponse); + rpc ListFiles(blocks.FetchRequest) returns (ListFilesResponse); // 移动文件 - rpc MoveFile(MoveFileRequest) returns (StatusReply); + rpc MoveFile(MoveFileRequest) returns (blocks.StatusReply); // 复制文件 - rpc CopyFile(CopyFileRequest) returns (StatusReply); + rpc CopyFile(CopyFileRequest) returns (blocks.StatusReply); // 搜索文件 - rpc SearchFiles(FetchRequest) returns (ListFilesResponse); + rpc SearchFiles(blocks.FetchRequest) returns (ListFilesResponse); } message CreateDirRequest { @@ -61,7 +61,7 @@ message CloudDiskDirItem { string path = 5; // 完整路径 string created_at = 6; string updated_at = 7; - + // 自关联 CloudDiskDirItem parent = 8; // 父级目录 repeated CloudDiskDirItem subdirectories = 9; // 子级目录 @@ -116,7 +116,7 @@ message CloudDiskFileItem { string hash = 9; // 文件哈希,用于去重 string created_at = 10; string updated_at = 11; - + // 关联关系 CloudDiskDirItem directory = 12; // 文件所属目录 } diff --git a/module/base/cloud/proto/note.proto b/module/base/cloud/proto/note.proto index 1dac06d..c457587 100644 --- a/module/base/cloud/proto/note.proto +++ b/module/base/cloud/proto/note.proto @@ -1,31 +1,31 @@ syntax = "proto3"; package cloud; -option go_package = ".;cloud"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/cloud/pb;cloud"; +import "protobuf/blocks.proto"; // 笔记服务 service Note { // 创建笔记 - rpc CreateNote(CreateNoteRequest) returns (StatusReply); + rpc CreateNote(CreateNoteRequest) returns (blocks.StatusReply); // 获取笔记详情 - rpc GetNote(IdentRequest) returns (CloudNoteItem); + rpc GetNote(blocks.IdentRequest) returns (CloudNoteItem); // 更新笔记 - rpc UpdateNote(CloudNoteItem) returns (StatusReply); + rpc UpdateNote(CloudNoteItem) returns (blocks.StatusReply); // 删除笔记 - rpc DeleteNote(IdentRequest) returns (StatusReply); + rpc DeleteNote(blocks.IdentRequest) returns (blocks.StatusReply); // 获取笔记列表 - rpc ListNotes(FetchRequest) returns (ListNotesResponse); + rpc ListNotes(blocks.FetchRequest) returns (ListNotesResponse); // 置顶/取消置顶笔记 - rpc TogglePin(TogglePinRequest) returns (StatusReply); + rpc TogglePin(TogglePinRequest) returns (blocks.StatusReply); // 增加浏览次数 - rpc IncrementViews(IdentRequest) returns (StatusReply); + rpc IncrementViews(blocks.IdentRequest) returns (blocks.StatusReply); // 搜索笔记 - rpc SearchNotes(FetchRequest) returns (ListNotesResponse); + rpc SearchNotes(blocks.FetchRequest) returns (ListNotesResponse); // 上传附件 - rpc InsertAttachment(NoteAttachmentItem) returns (StatusReply); + rpc InsertAttachment(NoteAttachmentItem) returns (blocks.StatusReply); // 删除附件 - rpc DeleteAttachment(IdentRequest) returns (StatusReply); + rpc DeleteAttachment(blocks.IdentRequest) returns (blocks.StatusReply); } // 请求消息定义 @@ -66,7 +66,7 @@ message CloudNoteItem { int32 views = 10; // 浏览次数 string created_at = 11; string updated_at = 12; - + // 关联关系 repeated NoteAttachmentItem attachments = 13; } diff --git a/module/base/cloud/proto/private.proto b/module/base/cloud/proto/private.proto index 79fb230..c5bef32 100644 --- a/module/base/cloud/proto/private.proto +++ b/module/base/cloud/proto/private.proto @@ -1,28 +1,28 @@ syntax = "proto3"; package cloud; -option go_package = ".;cloud"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/cloud/pb;cloud"; +import "protobuf/blocks.proto"; // 隐私数据服务 service Private { // 创建隐私数据 - rpc CreatePrivateData(CreatePrivateDataRequest) returns (StatusReply); + rpc CreatePrivateData(CreatePrivateDataRequest) returns (blocks.StatusReply); // 获取隐私数据详情 - rpc GetPrivateData(IdentRequest) returns (CloudPrivateItem); + rpc GetPrivateData(blocks.IdentRequest) returns (CloudPrivateItem); // 更新隐私数据 - rpc UpdatePrivateData(CloudPrivateItem) returns (StatusReply); + rpc UpdatePrivateData(CloudPrivateItem) returns (blocks.StatusReply); // 删除隐私数据 - rpc DeletePrivateData(IdentRequest) returns (StatusReply); + rpc DeletePrivateData(blocks.IdentRequest) returns (blocks.StatusReply); // 获取隐私数据列表 - rpc ListPrivateData(FetchRequest) returns (ListPrivateDataResponse); + rpc ListPrivateData(blocks.FetchRequest) returns (ListPrivateDataResponse); // 按类型获取隐私数据 - rpc GetPrivateDataByType(FetchRequest) returns (ListPrivateDataResponse); + rpc GetPrivateDataByType(blocks.FetchRequest) returns (ListPrivateDataResponse); // 搜索隐私数据 - rpc SearchPrivateData(FetchRequest) returns (ListPrivateDataResponse); + rpc SearchPrivateData(blocks.FetchRequest) returns (ListPrivateDataResponse); // 加密数据 - rpc EncryptData(DataRequest) returns (StatusReply); + rpc EncryptData(DataRequest) returns (blocks.StatusReply); // 解密数据 - rpc DecryptData(DataRequest) returns (StatusReply); + rpc DecryptData(DataRequest) returns (blocks.StatusReply); } // 请求消息定义 message CreatePrivateDataRequest { diff --git a/module/base/cloud/proto/share.proto b/module/base/cloud/proto/share.proto index e652868..2c30816 100644 --- a/module/base/cloud/proto/share.proto +++ b/module/base/cloud/proto/share.proto @@ -1,20 +1,20 @@ syntax = "proto3"; package cloud; -option go_package = ".;cloud"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/cloud/pb;cloud"; +import "protobuf/blocks.proto"; // 分享服务 service Share { // 创建分享 - rpc CreateShare(CreateShareRequest) returns (StatusReply); + rpc CreateShare(CreateShareRequest) returns (blocks.StatusReply); // 获取分享详情 - rpc GetShare(IdentRequest) returns (CloudShareItem); + rpc GetShare(blocks.IdentRequest) returns (CloudShareItem); // 删除分享 - rpc DeleteShare(IdentRequest) returns (StatusReply); + rpc DeleteShare(blocks.IdentRequest) returns (blocks.StatusReply); // 获取分享列表 - rpc ListShares(FetchRequest) returns (ListSharesResponse); + rpc ListShares(blocks.FetchRequest) returns (ListSharesResponse); // 验证分享密码 - rpc ValidateSharePassword(ValidateSharePasswordRequest) returns (StatusReply); + rpc ValidateSharePassword(ValidateSharePasswordRequest) returns (blocks.StatusReply); } // 请求消息定义 diff --git a/module/base/cloud/proto/space.proto b/module/base/cloud/proto/space.proto index 9e8b127..4b82f1f 100644 --- a/module/base/cloud/proto/space.proto +++ b/module/base/cloud/proto/space.proto @@ -1,21 +1,21 @@ syntax = "proto3"; package cloud; -option go_package = ".;cloud"; +option go_package = "bsm/full/module/base/cloud/pb;cloud"; -import "blocks.proto"; -import "disk.proto"; -import "album.proto"; -import "note.proto"; -import "bookmark.proto"; -import "private.proto"; -import "share.proto"; +import "protobuf/blocks.proto"; +import "module/base/cloud/proto/disk.proto"; +import "module/base/cloud/proto/album.proto"; +import "module/base/cloud/proto/note.proto"; +import "module/base/cloud/proto/bookmark.proto"; +import "module/base/cloud/proto/private.proto"; +import "module/base/cloud/proto/share.proto"; -service Space { +service Space { // 获取空间数据 - rpc Get(Empty) returns (CloudSpace); + rpc Get(blocks.Empty) returns (CloudSpace); // 获取空间数据 - rpc GetByKeyIdentifier(IdentRequest) returns (CloudSpace); + rpc GetByKeyIdentifier(blocks.IdentRequest) returns (CloudSpace); } // 系统统计和配置模型 @@ -33,7 +33,7 @@ message CloudSpace { int32 private_count = 11; // 私有数量 string created_at = 12; string updated_at = 13; - + // 关联关系 repeated CloudDiskDirItem cloud_disk_dirs = 14; // 关联云盘目录 repeated CloudAlbumItem cloud_albums = 15; // 关联相册 diff --git a/module/base/cms/Makefile b/module/base/cms/Makefile deleted file mode 100644 index 191b622..0000000 --- a/module/base/cms/Makefile +++ /dev/null @@ -1,251 +0,0 @@ -# CMS Service Makefile - -# 变量定义 -APP_NAME := cms -VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "v1.0.0") -BUILD_TIME := $(shell date +%Y-%m-%d\ %H:%M:%S) -GIT_COMMIT := $(shell git rev-parse HEAD 2>/dev/null || echo "unknown") -GO_VERSION := $(shell go version | awk '{print $$3}') - -# 构建标志 -LDFLAGS := -ldflags "-X main.Version=$(VERSION) -X main.BuildTime=$(BUILD_TIME) -X main.GitCommit=$(GIT_COMMIT) -w -s" -BUILD_FLAGS := -trimpath $(LDFLAGS) - -# 目录 -BUILD_DIR := build -PROTO_DIR := proto -PB_DIR := pb - -# Go环境变量 -export GO111MODULE=on -export GOPROXY=https://goproxy.cn,direct -export GOPRIVATE=git.apinb.com/* -export GONOPROXY=git.apinb.com/* -export GOINSECURE=git.apinb.com/* -export GONOSUMDB=git.apinb.com/* -export GOEXPERIMENT=jsonv2 - -.PHONY: help -help: ## 显示帮助信息 - @echo "CMS Service - 可用的命令:" - @echo "" - @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) - -.PHONY: tidy -tidy: ## 下载依赖 - @echo "下载Go依赖..." - go mod download - go mod tidy - -.PHONY: buf -buf: ## buf生成相关代码 - @echo "buf生成相关代码..." - buf generate - @echo "buf生成完成" - cd ../../bsm-sdk/client && \ - git add . && \ - git commit -m "Auto Update Commit." && \ - git push - -.PHONY: build -build: deps ## 构建应用 - @echo "构建应用..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME) ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)" - -.PHONY: build-linux -build-linux: deps ## 构建Linux版本 - @echo "构建Linux版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-linux-amd64 ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-linux-amd64" - -.PHONY: build-windows -build-windows: deps ## 构建Windows版本 - @echo "构建Windows版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-windows-amd64.exe ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-windows-amd64.exe" - -.PHONY: build-darwin -build-darwin: deps ## 构建macOS版本 - @echo "构建macOS版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-darwin-amd64 ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-darwin-amd64" - -.PHONY: build-all -build-all: build-linux build-windows build-darwin ## 构建所有平台版本 - -.PHONY: run -run: build ## 运行应用 - @echo "启动应用..." - ./$(BUILD_DIR)/$(APP_NAME) - -.PHONY: dev -dev: ## 开发模式运行 - @echo "开发模式启动..." - go run ./cmd/main/main.go - -.PHONY: test -test: ## 运行测试 - @echo "运行测试..." - go test -v ./... - -.PHONY: test-coverage -test-coverage: ## 运行测试并生成覆盖率报告 - @echo "运行测试覆盖率..." - go test -v -coverprofile=coverage.out ./... - go tool cover -html=coverage.out -o coverage.html - @echo "覆盖率报告生成: coverage.html" - -.PHONY: test-grpc -test-grpc: ## 运行gRPC测试 - @echo "运行gRPC测试..." - @if [ -f ./test/grpc/main.go ]; then \ - go run ./test/grpc/main.go; \ - else \ - echo "gRPC测试文件不存在"; \ - fi - -.PHONY: lint -lint: ## 运行代码检查 - @echo "运行代码检查..." - @if command -v golangci-lint >/dev/null 2>&1; then \ - golangci-lint run; \ - else \ - echo "golangci-lint 未安装,使用go vet..."; \ - go vet ./...; \ - fi - -.PHONY: fmt -fmt: ## 格式化代码 - @echo "格式化代码..." - go fmt ./... - @if command -v goimports >/dev/null 2>&1; then \ - goimports -w .; \ - fi - -.PHONY: security -security: ## 安全检查 - @echo "运行安全检查..." - @if command -v gosec >/dev/null 2>&1; then \ - gosec ./...; \ - else \ - echo "gosec 未安装,请运行: go install github.com/securego/gosec/v2/cmd/gosec@latest"; \ - fi - -.PHONY: docker-build -docker-build: ## 构建Docker镜像 - @echo "构建Docker镜像..." - docker build -t $(APP_NAME):$(VERSION) . - docker tag $(APP_NAME):$(VERSION) $(APP_NAME):latest - -.PHONY: docker-run -docker-run: ## 运行Docker容器 - @echo "运行Docker容器..." - docker run -d --name $(APP_NAME) -p 12426:12426 -p 12425:12425 $(APP_NAME):latest - -.PHONY: docker-stop -docker-stop: ## 停止Docker容器 - @echo "停止Docker容器..." - docker stop $(APP_NAME) || true - docker rm $(APP_NAME) || true - -.PHONY: docker-compose-up -docker-compose-up: ## 启动docker-compose服务 - @echo "启动docker-compose服务..." - docker-compose up -d - -.PHONY: docker-compose-down -docker-compose-down: ## 停止docker-compose服务 - @echo "停止docker-compose服务..." - docker-compose down - -.PHONY: docker-compose-logs -docker-compose-logs: ## 查看docker-compose日志 - docker-compose logs -f - -.PHONY: clean -clean: ## 清理构建文件 - @echo "清理构建文件..." - rm -rf $(BUILD_DIR) - rm -f coverage.out coverage.html - docker system prune -f - -.PHONY: install-tools -install-tools: ## 安装开发工具 - @echo "安装开发工具..." - go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - go install golang.org/x/tools/cmd/goimports@latest - go install github.com/securego/gosec/v2/cmd/gosec@latest - go install github.com/bufbuild/buf/cmd/buf@latest - go install git.apinb.com/bsm-tools/protoc-gen-markdown@latest - go install git.apinb.com/bsm-tools/protoc-gen-slc@latest - go install git.apinb.com/bsm-tools/protoc-gen-ts@latest - go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest - go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest - go install github.com/pepabo/protoc-gen-go-client@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - -.PHONY: update -update: ## 更新依赖 - @echo "更新依赖..." - go get -u ./... - go mod tidy - -.PHONY: version -version: ## 显示版本信息 - @echo "应用名称: $(APP_NAME)" - @echo "版本: $(VERSION)" - @echo "构建时间: $(BUILD_TIME)" - @echo "Git提交: $(GIT_COMMIT)" - @echo "Go版本: $(GO_VERSION)" - -.PHONY: swagger -swagger: ## 生成Swagger文档 - @echo "Swagger文档已通过protobuf生成在swagger目录" - -.PHONY: init-db -init-db: ## 初始化数据库 - @echo "初始化数据库..." - @echo "数据库表将在服务启动时自动创建" - @echo "请确保数据库连接配置正确" - -.PHONY: backup-db -backup-db: ## 备份数据库 - @echo "备份数据库..." - @read -p "请输入数据库连接字符串: " DB_URL; \ - pg_dump $$DB_URL > backup_$(shell date +%Y%m%d_%H%M%S).sql - -.PHONY: migrate -migrate: ## 运行数据库迁移 - @echo "运行数据库迁移..." - go run ./cmd/cli/main.go - -.PHONY: seed -seed: ## 填充测试数据 - @echo "填充测试数据..." - @echo "测试数据将在服务启动时自动创建" - -.PHONY: health -health: ## 检查服务健康状态 - @echo "检查服务健康状态..." - @curl -f http://localhost:12425/health || echo "服务未运行或健康检查失败" - -.PHONY: logs -logs: ## 查看服务日志 - @echo "查看服务日志..." - @if [ -f ./logs/cms.log ]; then \ - tail -f ./logs/cms.log; \ - else \ - echo "日志文件不存在"; \ - fi - -.PHONY: all -all: clean deps proto build test lint ## 执行完整的构建流程 - -# 默认目标 -.DEFAULT_GOAL := help diff --git a/module/base/cms/pb/blocks.pb.go b/module/base/cms/pb/blocks.pb.go deleted file mode 100644 index 0bfb1cf..0000000 --- a/module/base/cms/pb/blocks.pb.go +++ /dev/null @@ -1,750 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc (unknown) -// source: blocks.proto - -package cms - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// 列表请求参数 -type FetchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PageNo int64 `protobuf:"varint,1,opt,name=page_no,proto3" json:"page_no,omitempty"` // 页数 - PageSize int64 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // 每页记录数 - Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:category_id=?,vlaue=11 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchRequest) Reset() { - *x = FetchRequest{} - mi := &file_blocks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRequest) ProtoMessage() {} - -func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. -func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{0} -} - -func (x *FetchRequest) GetPageNo() int64 { - if x != nil { - return x.PageNo - } - return 0 -} - -func (x *FetchRequest) GetPageSize() int64 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *FetchRequest) GetParams() map[string]string { - if x != nil { - return x.Params - } - return nil -} - -// 唯一标识请求参数 -type IdentRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IdentRequest) Reset() { - *x = IdentRequest{} - mi := &file_blocks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IdentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IdentRequest) ProtoMessage() {} - -func (x *IdentRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. -func (*IdentRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{1} -} - -func (x *IdentRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *IdentRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -// 时序版本号请求参数 -type VersionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 时序版本号 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *VersionRequest) Reset() { - *x = VersionRequest{} - mi := &file_blocks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *VersionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersionRequest) ProtoMessage() {} - -func (x *VersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. -func (*VersionRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{2} -} - -func (x *VersionRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -// 搜索请求参数 -type SearchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` //<必传>, 关键词 - PageNo int64 `protobuf:"varint,2,opt,name=page_no,proto3" json:"page_no,omitempty"` // 页数 - PageSize int64 `protobuf:"varint,3,opt,name=page_size,proto3" json:"page_size,omitempty"` // 每页记录数 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchRequest) Reset() { - *x = SearchRequest{} - mi := &file_blocks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchRequest) ProtoMessage() {} - -func (x *SearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. -func (*SearchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{3} -} - -func (x *SearchRequest) GetKeyword() string { - if x != nil { - return x.Keyword - } - return "" -} - -func (x *SearchRequest) GetPageNo() int64 { - if x != nil { - return x.PageNo - } - return 0 -} - -func (x *SearchRequest) GetPageSize() int64 { - if x != nil { - return x.PageSize - } - return 0 -} - -type StatusReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // 状态码 - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 状态说明 - Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` // 数据 - Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusReply) Reset() { - *x = StatusReply{} - mi := &file_blocks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusReply) ProtoMessage() {} - -func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. -func (*StatusReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{4} -} - -func (x *StatusReply) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *StatusReply) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *StatusReply) GetDetails() string { - if x != nil { - return x.Details - } - return "" -} - -func (x *StatusReply) GetTimeseq() int64 { - if x != nil { - return x.Timeseq - } - return 0 -} - -// 空结构请求 -type Empty struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Empty) Reset() { - *x = Empty{} - mi := &file_blocks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Empty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Empty) ProtoMessage() {} - -func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{5} -} - -// 分类 -type CategoryItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"` - Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - ParentId int64 `protobuf:"varint,4,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类 - Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` // 标题 - CoverPath string `protobuf:"bytes,6,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片 - Intro string `protobuf:"bytes,7,opt,name=intro,proto3" json:"intro,omitempty"` // 简介 - CreatedAt string `protobuf:"bytes,8,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间 - UpdatedAt string `protobuf:"bytes,9,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间 - Child []*CategoryItem `protobuf:"bytes,10,rep,name=child,proto3" json:"child,omitempty"` // 子集 - CategoryKey string `protobuf:"bytes,11,opt,name=category_key,proto3" json:"category_key,omitempty"` // 分类标识 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CategoryItem) Reset() { - *x = CategoryItem{} - mi := &file_blocks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CategoryItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CategoryItem) ProtoMessage() {} - -func (x *CategoryItem) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CategoryItem.ProtoReflect.Descriptor instead. -func (*CategoryItem) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{6} -} - -func (x *CategoryItem) GetSiteIdentity() string { - if x != nil { - return x.SiteIdentity - } - return "" -} - -func (x *CategoryItem) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *CategoryItem) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *CategoryItem) GetParentId() int64 { - if x != nil { - return x.ParentId - } - return 0 -} - -func (x *CategoryItem) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *CategoryItem) GetCoverPath() string { - if x != nil { - return x.CoverPath - } - return "" -} - -func (x *CategoryItem) GetIntro() string { - if x != nil { - return x.Intro - } - return "" -} - -func (x *CategoryItem) GetCreatedAt() string { - if x != nil { - return x.CreatedAt - } - return "" -} - -func (x *CategoryItem) GetUpdatedAt() string { - if x != nil { - return x.UpdatedAt - } - return "" -} - -func (x *CategoryItem) GetChild() []*CategoryItem { - if x != nil { - return x.Child - } - return nil -} - -func (x *CategoryItem) GetCategoryKey() string { - if x != nil { - return x.CategoryKey - } - return "" -} - -// 标签 -type TagsItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` // 标题 - CoverPath string `protobuf:"bytes,4,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片 - Intro string `protobuf:"bytes,5,opt,name=intro,proto3" json:"intro,omitempty"` // 简介 - CreatedAt string `protobuf:"bytes,6,opt,name=created_at,proto3" json:"created_at,omitempty"` //创建时间 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TagsItem) Reset() { - *x = TagsItem{} - mi := &file_blocks_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TagsItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TagsItem) ProtoMessage() {} - -func (x *TagsItem) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TagsItem.ProtoReflect.Descriptor instead. -func (*TagsItem) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{7} -} - -func (x *TagsItem) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *TagsItem) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *TagsItem) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *TagsItem) GetCoverPath() string { - if x != nil { - return x.CoverPath - } - return "" -} - -func (x *TagsItem) GetIntro() string { - if x != nil { - return x.Intro - } - return "" -} - -func (x *TagsItem) GetCreatedAt() string { - if x != nil { - return x.CreatedAt - } - return "" -} - -// 附件 -type AccessoryItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` // 附件标题 - FilePath string `protobuf:"bytes,3,opt,name=file_path,proto3" json:"file_path,omitempty"` // 附件文件路径 - CreatedAt string `protobuf:"bytes,4,opt,name=created_at,proto3" json:"created_at,omitempty"` //创建时间 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AccessoryItem) Reset() { - *x = AccessoryItem{} - mi := &file_blocks_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AccessoryItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccessoryItem) ProtoMessage() {} - -func (x *AccessoryItem) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccessoryItem.ProtoReflect.Descriptor instead. -func (*AccessoryItem) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{8} -} - -func (x *AccessoryItem) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *AccessoryItem) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *AccessoryItem) GetFilePath() string { - if x != nil { - return x.FilePath - } - return "" -} - -func (x *AccessoryItem) GetCreatedAt() string { - if x != nil { - return x.CreatedAt - } - return "" -} - -var File_blocks_proto protoreflect.FileDescriptor - -const file_blocks_proto_rawDesc = "" + - "\n" + - "\x10cms/blocks.proto\x12\x03cms\"\xb8\x01\n" + - "\fFetchRequest\x12\x18\n" + - "\apage_no\x18\x01 \x01(\x03R\apage_no\x12\x1c\n" + - "\tpage_size\x18\x02 \x01(\x03R\tpage_size\x125\n" + - "\x06params\x18\x03 \x03(\v2\x1d.cms.FetchRequest.ParamsEntryR\x06params\x1a9\n" + - "\vParamsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" + - "\fIdentRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\"*\n" + - "\x0eVersionRequest\x12\x18\n" + - "\aversion\x18\x01 \x01(\x03R\aversion\"a\n" + - "\rSearchRequest\x12\x18\n" + - "\akeyword\x18\x01 \x01(\tR\akeyword\x12\x18\n" + - "\apage_no\x18\x02 \x01(\x03R\apage_no\x12\x1c\n" + - "\tpage_size\x18\x03 \x01(\x03R\tpage_size\"o\n" + - "\vStatusReply\x12\x12\n" + - "\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessage\x12\x18\n" + - "\adetails\x18\x03 \x01(\tR\adetails\x12\x18\n" + - "\atimeseq\x18\x04 \x01(\x03R\atimeseq\"\a\n" + - "\x05Empty\"\xd7\x02\n" + - "\fCategoryItem\x12$\n" + - "\rsite_identity\x18\x01 \x01(\tR\rsite_identity\x12\x0e\n" + - "\x02id\x18\x02 \x01(\x03R\x02id\x12\x1a\n" + - "\bidentity\x18\x03 \x01(\tR\bidentity\x12\x1c\n" + - "\tparent_id\x18\x04 \x01(\x03R\tparent_id\x12\x14\n" + - "\x05title\x18\x05 \x01(\tR\x05title\x12\x1e\n" + - "\n" + - "cover_path\x18\x06 \x01(\tR\n" + - "cover_path\x12\x14\n" + - "\x05intro\x18\a \x01(\tR\x05intro\x12\x1e\n" + - "\n" + - "created_at\x18\b \x01(\tR\n" + - "created_at\x12\x1e\n" + - "\n" + - "updated_at\x18\t \x01(\tR\n" + - "updated_at\x12'\n" + - "\x05child\x18\n" + - " \x03(\v2\x11.cms.CategoryItemR\x05child\x12\"\n" + - "\fcategory_key\x18\v \x01(\tR\fcategory_key\"\xa2\x01\n" + - "\bTagsItem\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x14\n" + - "\x05title\x18\x03 \x01(\tR\x05title\x12\x1e\n" + - "\n" + - "cover_path\x18\x04 \x01(\tR\n" + - "cover_path\x12\x14\n" + - "\x05intro\x18\x05 \x01(\tR\x05intro\x12\x1e\n" + - "\n" + - "created_at\x18\x06 \x01(\tR\n" + - "created_at\"\x7f\n" + - "\rAccessoryItem\x12\x1a\n" + - "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x14\n" + - "\x05title\x18\x02 \x01(\tR\x05title\x12\x1c\n" + - "\tfile_path\x18\x03 \x01(\tR\tfile_path\x12\x1e\n" + - "\n" + - "created_at\x18\x04 \x01(\tR\n" + - "created_atB\aZ\x05.;cmsb\x06proto3" - -var ( - file_blocks_proto_rawDescOnce sync.Once - file_blocks_proto_rawDescData []byte -) - -func file_blocks_proto_rawDescGZIP() []byte { - file_blocks_proto_rawDescOnce.Do(func() { - file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc))) - }) - return file_blocks_proto_rawDescData -} - -var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_blocks_proto_goTypes = []any{ - (*FetchRequest)(nil), // 0: cms.FetchRequest - (*IdentRequest)(nil), // 1: cms.IdentRequest - (*VersionRequest)(nil), // 2: cms.VersionRequest - (*SearchRequest)(nil), // 3: cms.SearchRequest - (*StatusReply)(nil), // 4: cms.StatusReply - (*Empty)(nil), // 5: cms.Empty - (*CategoryItem)(nil), // 6: cms.CategoryItem - (*TagsItem)(nil), // 7: cms.TagsItem - (*AccessoryItem)(nil), // 8: cms.AccessoryItem - nil, // 9: cms.FetchRequest.ParamsEntry -} -var file_blocks_proto_depIdxs = []int32{ - 9, // 0: cms.FetchRequest.params:type_name -> cms.FetchRequest.ParamsEntry - 6, // 1: cms.CategoryItem.child:type_name -> cms.CategoryItem - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_blocks_proto_init() } -func file_blocks_proto_init() { - if File_blocks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_blocks_proto_goTypes, - DependencyIndexes: file_blocks_proto_depIdxs, - MessageInfos: file_blocks_proto_msgTypes, - }.Build() - File_blocks_proto = out.File - file_blocks_proto_goTypes = nil - file_blocks_proto_depIdxs = nil -} diff --git a/module/base/cms/pb/blocks_compat.go b/module/base/cms/pb/blocks_compat.go new file mode 100644 index 0000000..84e559d --- /dev/null +++ b/module/base/cms/pb/blocks_compat.go @@ -0,0 +1,13 @@ +package cms + +import blocks "bsm/full/protobuf" + +type Empty = blocks.Empty +type FetchRequest = blocks.FetchRequest +type IdentRequest = blocks.IdentRequest +type VersionRequest = blocks.VersionRequest +type SearchRequest = blocks.CmsSearchRequest +type StatusReply = blocks.StatusReply +type CategoryItem = blocks.CmsCategoryItem +type TagsItem = blocks.CmsTagsItem +type AccessoryItem = blocks.CmsAccessoryItem diff --git a/module/base/cms/pb/category.pb.go b/module/base/cms/pb/category.pb.go index 768193b..8e2cf02 100644 --- a/module/base/cms/pb/category.pb.go +++ b/module/base/cms/pb/category.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc (unknown) -// source: category.proto +// protoc v7.35.0 +// source: module/base/cms/proto/category.proto package cms import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,7 +26,7 @@ const ( type CategoryListReply struct { state protoimpl.MessageState `protogen:"open.v1"` // 数据 - Data []*CategoryItem `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + Data []*protobuf.CmsCategoryItem `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` // 总数 Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` unknownFields protoimpl.UnknownFields @@ -34,7 +35,7 @@ type CategoryListReply struct { func (x *CategoryListReply) Reset() { *x = CategoryListReply{} - mi := &file_category_proto_msgTypes[0] + mi := &file_module_base_cms_proto_category_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +47,7 @@ func (x *CategoryListReply) String() string { func (*CategoryListReply) ProtoMessage() {} func (x *CategoryListReply) ProtoReflect() protoreflect.Message { - mi := &file_category_proto_msgTypes[0] + mi := &file_module_base_cms_proto_category_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,10 +60,10 @@ func (x *CategoryListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use CategoryListReply.ProtoReflect.Descriptor instead. func (*CategoryListReply) Descriptor() ([]byte, []int) { - return file_category_proto_rawDescGZIP(), []int{0} + return file_module_base_cms_proto_category_proto_rawDescGZIP(), []int{0} } -func (x *CategoryListReply) GetData() []*CategoryItem { +func (x *CategoryListReply) GetData() []*protobuf.CmsCategoryItem { if x != nil { return x.Data } @@ -86,7 +87,7 @@ type AddCategoryResponse struct { func (x *AddCategoryResponse) Reset() { *x = AddCategoryResponse{} - mi := &file_category_proto_msgTypes[1] + mi := &file_module_base_cms_proto_category_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -98,7 +99,7 @@ func (x *AddCategoryResponse) String() string { func (*AddCategoryResponse) ProtoMessage() {} func (x *AddCategoryResponse) ProtoReflect() protoreflect.Message { - mi := &file_category_proto_msgTypes[1] + mi := &file_module_base_cms_proto_category_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111,7 +112,7 @@ func (x *AddCategoryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AddCategoryResponse.ProtoReflect.Descriptor instead. func (*AddCategoryResponse) Descriptor() ([]byte, []int) { - return file_category_proto_rawDescGZIP(), []int{1} + return file_module_base_cms_proto_category_proto_rawDescGZIP(), []int{1} } func (x *AddCategoryResponse) GetIdentity() string { @@ -123,23 +124,23 @@ func (x *AddCategoryResponse) GetIdentity() string { // 添加分类请求 type AddCategoryRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"` - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 添加分类请求唯一码 - ParentId int64 `protobuf:"varint,3,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类 - Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` // 标题 - CoverPath string `protobuf:"bytes,5,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片 - Intro string `protobuf:"bytes,6,opt,name=intro,proto3" json:"intro,omitempty"` // 简介 - CreatedAt string `protobuf:"bytes,7,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间 - UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间 - Data []*CategoryItem `protobuf:"bytes,9,rep,name=data,proto3" json:"data,omitempty"` // 子集 + state protoimpl.MessageState `protogen:"open.v1"` + SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 添加分类请求唯一码 + ParentId int64 `protobuf:"varint,3,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类 + Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` // 标题 + CoverPath string `protobuf:"bytes,5,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片 + Intro string `protobuf:"bytes,6,opt,name=intro,proto3" json:"intro,omitempty"` // 简介 + CreatedAt string `protobuf:"bytes,7,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间 + UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间 + Data []*protobuf.CmsCategoryItem `protobuf:"bytes,9,rep,name=data,proto3" json:"data,omitempty"` // 子集 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *AddCategoryRequest) Reset() { *x = AddCategoryRequest{} - mi := &file_category_proto_msgTypes[2] + mi := &file_module_base_cms_proto_category_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -151,7 +152,7 @@ func (x *AddCategoryRequest) String() string { func (*AddCategoryRequest) ProtoMessage() {} func (x *AddCategoryRequest) ProtoReflect() protoreflect.Message { - mi := &file_category_proto_msgTypes[2] + mi := &file_module_base_cms_proto_category_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -164,7 +165,7 @@ func (x *AddCategoryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddCategoryRequest.ProtoReflect.Descriptor instead. func (*AddCategoryRequest) Descriptor() ([]byte, []int) { - return file_category_proto_rawDescGZIP(), []int{2} + return file_module_base_cms_proto_category_proto_rawDescGZIP(), []int{2} } func (x *AddCategoryRequest) GetSiteIdentity() string { @@ -223,7 +224,7 @@ func (x *AddCategoryRequest) GetUpdatedAt() string { return "" } -func (x *AddCategoryRequest) GetData() []*CategoryItem { +func (x *AddCategoryRequest) GetData() []*protobuf.CmsCategoryItem { if x != nil { return x.Data } @@ -232,24 +233,24 @@ func (x *AddCategoryRequest) GetData() []*CategoryItem { // 修改分类请求 type ModifyCategoryRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"` - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 修改分类请求唯一标识 - ParentId int64 `protobuf:"varint,3,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类 - Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` // 标题 - CoverPath string `protobuf:"bytes,5,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片 - Intro string `protobuf:"bytes,6,opt,name=intro,proto3" json:"intro,omitempty"` // 简介 - CreatedAt string `protobuf:"bytes,7,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间 - UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间 - Data []*CategoryItem `protobuf:"bytes,9,rep,name=data,proto3" json:"data,omitempty"` // 子集 - CategoryKey string `protobuf:"bytes,10,opt,name=category_key,proto3" json:"category_key,omitempty"` // 分类标识 + state protoimpl.MessageState `protogen:"open.v1"` + SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 修改分类请求唯一标识 + ParentId int64 `protobuf:"varint,3,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类 + Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` // 标题 + CoverPath string `protobuf:"bytes,5,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片 + Intro string `protobuf:"bytes,6,opt,name=intro,proto3" json:"intro,omitempty"` // 简介 + CreatedAt string `protobuf:"bytes,7,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间 + UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间 + Data []*protobuf.CmsCategoryItem `protobuf:"bytes,9,rep,name=data,proto3" json:"data,omitempty"` // 子集 + CategoryKey string `protobuf:"bytes,10,opt,name=category_key,proto3" json:"category_key,omitempty"` // 分类标识 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ModifyCategoryRequest) Reset() { *x = ModifyCategoryRequest{} - mi := &file_category_proto_msgTypes[3] + mi := &file_module_base_cms_proto_category_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -261,7 +262,7 @@ func (x *ModifyCategoryRequest) String() string { func (*ModifyCategoryRequest) ProtoMessage() {} func (x *ModifyCategoryRequest) ProtoReflect() protoreflect.Message { - mi := &file_category_proto_msgTypes[3] + mi := &file_module_base_cms_proto_category_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -274,7 +275,7 @@ func (x *ModifyCategoryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ModifyCategoryRequest.ProtoReflect.Descriptor instead. func (*ModifyCategoryRequest) Descriptor() ([]byte, []int) { - return file_category_proto_rawDescGZIP(), []int{3} + return file_module_base_cms_proto_category_proto_rawDescGZIP(), []int{3} } func (x *ModifyCategoryRequest) GetSiteIdentity() string { @@ -333,7 +334,7 @@ func (x *ModifyCategoryRequest) GetUpdatedAt() string { return "" } -func (x *ModifyCategoryRequest) GetData() []*CategoryItem { +func (x *ModifyCategoryRequest) GetData() []*protobuf.CmsCategoryItem { if x != nil { return x.Data } @@ -357,7 +358,7 @@ type DeleteCategoryRequest struct { func (x *DeleteCategoryRequest) Reset() { *x = DeleteCategoryRequest{} - mi := &file_category_proto_msgTypes[4] + mi := &file_module_base_cms_proto_category_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -369,7 +370,7 @@ func (x *DeleteCategoryRequest) String() string { func (*DeleteCategoryRequest) ProtoMessage() {} func (x *DeleteCategoryRequest) ProtoReflect() protoreflect.Message { - mi := &file_category_proto_msgTypes[4] + mi := &file_module_base_cms_proto_category_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -382,7 +383,7 @@ func (x *DeleteCategoryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteCategoryRequest.ProtoReflect.Descriptor instead. func (*DeleteCategoryRequest) Descriptor() ([]byte, []int) { - return file_category_proto_rawDescGZIP(), []int{4} + return file_module_base_cms_proto_category_proto_rawDescGZIP(), []int{4} } func (x *DeleteCategoryRequest) GetIdentity() string { @@ -402,7 +403,7 @@ type KeywordRequest struct { func (x *KeywordRequest) Reset() { *x = KeywordRequest{} - mi := &file_category_proto_msgTypes[5] + mi := &file_module_base_cms_proto_category_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -414,7 +415,7 @@ func (x *KeywordRequest) String() string { func (*KeywordRequest) ProtoMessage() {} func (x *KeywordRequest) ProtoReflect() protoreflect.Message { - mi := &file_category_proto_msgTypes[5] + mi := &file_module_base_cms_proto_category_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -427,7 +428,7 @@ func (x *KeywordRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use KeywordRequest.ProtoReflect.Descriptor instead. func (*KeywordRequest) Descriptor() ([]byte, []int) { - return file_category_proto_rawDescGZIP(), []int{5} + return file_module_base_cms_proto_category_proto_rawDescGZIP(), []int{5} } func (x *KeywordRequest) GetKeyword() string { @@ -437,16 +438,16 @@ func (x *KeywordRequest) GetKeyword() string { return "" } -var File_category_proto protoreflect.FileDescriptor +var File_module_base_cms_proto_category_proto protoreflect.FileDescriptor -const file_category_proto_rawDesc = "" + +const file_module_base_cms_proto_category_proto_rawDesc = "" + "\n" + - "\x17base/cms/category.proto\x12\x03cms\x1a\x10cms/blocks.proto\"P\n" + - "\x11CategoryListReply\x12%\n" + - "\x04data\x18\x01 \x03(\v2\x11.cms.CategoryItemR\x04data\x12\x14\n" + + "$module/base/cms/proto/category.proto\x12\x03cms\x1a\x15protobuf/blocks.proto\"V\n" + + "\x11CategoryListReply\x12+\n" + + "\x04data\x18\x01 \x03(\v2\x17.blocks.CmsCategoryItemR\x04data\x12\x14\n" + "\x05count\x18\x02 \x01(\x03R\x05count\"1\n" + "\x13AddCategoryResponse\x12\x1a\n" + - "\bidentity\x18\x01 \x01(\tR\bidentity\"\xa7\x02\n" + + "\bidentity\x18\x01 \x01(\tR\bidentity\"\xad\x02\n" + "\x12AddCategoryRequest\x12$\n" + "\rsite_identity\x18\x01 \x01(\tR\rsite_identity\x12\x1a\n" + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x1c\n" + @@ -461,8 +462,8 @@ const file_category_proto_rawDesc = "" + "created_at\x12\x1e\n" + "\n" + "updated_at\x18\b \x01(\tR\n" + - "updated_at\x12%\n" + - "\x04data\x18\t \x03(\v2\x11.cms.CategoryItemR\x04data\"\xce\x02\n" + + "updated_at\x12+\n" + + "\x04data\x18\t \x03(\v2\x17.blocks.CmsCategoryItemR\x04data\"\xd4\x02\n" + "\x15ModifyCategoryRequest\x12$\n" + "\rsite_identity\x18\x01 \x01(\tR\rsite_identity\x12\x1a\n" + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x1c\n" + @@ -477,56 +478,56 @@ const file_category_proto_rawDesc = "" + "created_at\x12\x1e\n" + "\n" + "updated_at\x18\b \x01(\tR\n" + - "updated_at\x12%\n" + - "\x04data\x18\t \x03(\v2\x11.cms.CategoryItemR\x04data\x12\"\n" + + "updated_at\x12+\n" + + "\x04data\x18\t \x03(\v2\x17.blocks.CmsCategoryItemR\x04data\x12\"\n" + "\fcategory_key\x18\n" + " \x01(\tR\fcategory_key\"3\n" + "\x15DeleteCategoryRequest\x12\x1a\n" + "\bidentity\x18\x01 \x01(\tR\bidentity\"*\n" + "\x0eKeywordRequest\x12\x18\n" + - "\akeyword\x18\x01 \x01(\tR\akeyword2\xe5\x01\n" + - "\bCategory\x124\n" + - "\x05Fetch\x12\x11.cms.IdentRequest\x1a\x16.cms.CategoryListReply\"\x00\x12/\n" + - "\x06Create\x12\x11.cms.CategoryItem\x1a\x10.cms.StatusReply\"\x00\x128\n" + - "\x06Modify\x12\x1a.cms.ModifyCategoryRequest\x1a\x10.cms.StatusReply\"\x00\x128\n" + - "\x06Delete\x12\x1a.cms.DeleteCategoryRequest\x1a\x10.cms.StatusReply\"\x00B\aZ\x05.;cmsb\x06proto3" + "\akeyword\x18\x01 \x01(\tR\akeyword2\xf7\x01\n" + + "\bCategory\x127\n" + + "\x05Fetch\x12\x14.blocks.IdentRequest\x1a\x16.cms.CategoryListReply\"\x00\x128\n" + + "\x06Create\x12\x17.blocks.CmsCategoryItem\x1a\x13.blocks.StatusReply\"\x00\x12;\n" + + "\x06Modify\x12\x1a.cms.ModifyCategoryRequest\x1a\x13.blocks.StatusReply\"\x00\x12;\n" + + "\x06Delete\x12\x1a.cms.DeleteCategoryRequest\x1a\x13.blocks.StatusReply\"\x00B!Z\x1fbsm/full/module/base/cms/pb;cmsb\x06proto3" var ( - file_category_proto_rawDescOnce sync.Once - file_category_proto_rawDescData []byte + file_module_base_cms_proto_category_proto_rawDescOnce sync.Once + file_module_base_cms_proto_category_proto_rawDescData []byte ) -func file_category_proto_rawDescGZIP() []byte { - file_category_proto_rawDescOnce.Do(func() { - file_category_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_category_proto_rawDesc), len(file_category_proto_rawDesc))) +func file_module_base_cms_proto_category_proto_rawDescGZIP() []byte { + file_module_base_cms_proto_category_proto_rawDescOnce.Do(func() { + file_module_base_cms_proto_category_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_category_proto_rawDesc), len(file_module_base_cms_proto_category_proto_rawDesc))) }) - return file_category_proto_rawDescData + return file_module_base_cms_proto_category_proto_rawDescData } -var file_category_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_category_proto_goTypes = []any{ - (*CategoryListReply)(nil), // 0: cms.CategoryListReply - (*AddCategoryResponse)(nil), // 1: cms.AddCategoryResponse - (*AddCategoryRequest)(nil), // 2: cms.AddCategoryRequest - (*ModifyCategoryRequest)(nil), // 3: cms.ModifyCategoryRequest - (*DeleteCategoryRequest)(nil), // 4: cms.DeleteCategoryRequest - (*KeywordRequest)(nil), // 5: cms.KeywordRequest - (*CategoryItem)(nil), // 6: cms.CategoryItem - (*IdentRequest)(nil), // 7: cms.IdentRequest - (*StatusReply)(nil), // 8: cms.StatusReply +var file_module_base_cms_proto_category_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_module_base_cms_proto_category_proto_goTypes = []any{ + (*CategoryListReply)(nil), // 0: cms.CategoryListReply + (*AddCategoryResponse)(nil), // 1: cms.AddCategoryResponse + (*AddCategoryRequest)(nil), // 2: cms.AddCategoryRequest + (*ModifyCategoryRequest)(nil), // 3: cms.ModifyCategoryRequest + (*DeleteCategoryRequest)(nil), // 4: cms.DeleteCategoryRequest + (*KeywordRequest)(nil), // 5: cms.KeywordRequest + (*protobuf.CmsCategoryItem)(nil), // 6: blocks.CmsCategoryItem + (*protobuf.IdentRequest)(nil), // 7: blocks.IdentRequest + (*protobuf.StatusReply)(nil), // 8: blocks.StatusReply } -var file_category_proto_depIdxs = []int32{ - 6, // 0: cms.CategoryListReply.data:type_name -> cms.CategoryItem - 6, // 1: cms.AddCategoryRequest.data:type_name -> cms.CategoryItem - 6, // 2: cms.ModifyCategoryRequest.data:type_name -> cms.CategoryItem - 7, // 3: cms.Category.Fetch:input_type -> cms.IdentRequest - 6, // 4: cms.Category.Create:input_type -> cms.CategoryItem +var file_module_base_cms_proto_category_proto_depIdxs = []int32{ + 6, // 0: cms.CategoryListReply.data:type_name -> blocks.CmsCategoryItem + 6, // 1: cms.AddCategoryRequest.data:type_name -> blocks.CmsCategoryItem + 6, // 2: cms.ModifyCategoryRequest.data:type_name -> blocks.CmsCategoryItem + 7, // 3: cms.Category.Fetch:input_type -> blocks.IdentRequest + 6, // 4: cms.Category.Create:input_type -> blocks.CmsCategoryItem 3, // 5: cms.Category.Modify:input_type -> cms.ModifyCategoryRequest 4, // 6: cms.Category.Delete:input_type -> cms.DeleteCategoryRequest 0, // 7: cms.Category.Fetch:output_type -> cms.CategoryListReply - 8, // 8: cms.Category.Create:output_type -> cms.StatusReply - 8, // 9: cms.Category.Modify:output_type -> cms.StatusReply - 8, // 10: cms.Category.Delete:output_type -> cms.StatusReply + 8, // 8: cms.Category.Create:output_type -> blocks.StatusReply + 8, // 9: cms.Category.Modify:output_type -> blocks.StatusReply + 8, // 10: cms.Category.Delete:output_type -> blocks.StatusReply 7, // [7:11] is the sub-list for method output_type 3, // [3:7] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name @@ -534,27 +535,26 @@ var file_category_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_category_proto_init() } -func file_category_proto_init() { - if File_category_proto != nil { +func init() { file_module_base_cms_proto_category_proto_init() } +func file_module_base_cms_proto_category_proto_init() { + if File_module_base_cms_proto_category_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_category_proto_rawDesc), len(file_category_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_category_proto_rawDesc), len(file_module_base_cms_proto_category_proto_rawDesc)), NumEnums: 0, NumMessages: 6, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_category_proto_goTypes, - DependencyIndexes: file_category_proto_depIdxs, - MessageInfos: file_category_proto_msgTypes, + GoTypes: file_module_base_cms_proto_category_proto_goTypes, + DependencyIndexes: file_module_base_cms_proto_category_proto_depIdxs, + MessageInfos: file_module_base_cms_proto_category_proto_msgTypes, }.Build() - File_category_proto = out.File - file_category_proto_goTypes = nil - file_category_proto_depIdxs = nil + File_module_base_cms_proto_category_proto = out.File + file_module_base_cms_proto_category_proto_goTypes = nil + file_module_base_cms_proto_category_proto_depIdxs = nil } diff --git a/module/base/cms/pb/category.pb.gw.go b/module/base/cms/pb/category.pb.gw.go index f821ef9..28ce038 100644 --- a/module/base/cms/pb/category.pb.gw.go +++ b/module/base/cms/pb/category.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: category.proto +// source: module/base/cms/proto/category.proto /* Package cms is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package cms import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Category_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client CategoryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Category_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Category_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server CategoryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -64,7 +65,7 @@ func local_request_Category_Fetch_0(ctx context.Context, marshaler runtime.Marsh func request_Category_Create_0(ctx context.Context, marshaler runtime.Marshaler, client CategoryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq CategoryItem + protoReq blocks.CmsCategoryItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Category_Create_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Category_Create_0(ctx context.Context, marshaler runtime.Marshaler, server CategoryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq CategoryItem + protoReq blocks.CmsCategoryItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/base/cms/pb/category_grpc.pb.go b/module/base/cms/pb/category_grpc.pb.go index 43ca11e..1b80601 100644 --- a/module/base/cms/pb/category_grpc.pb.go +++ b/module/base/cms/pb/category_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.6.1 -// - protoc (unknown) -// source: category.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/cms/proto/category.proto package cms import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -32,13 +33,13 @@ const ( // CMS - 分类 type CategoryClient interface { // 分类列表 - Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CategoryListReply, error) + Fetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CategoryListReply, error) // 添加分类 - Create(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *protobuf.CmsCategoryItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 修改分类 - Modify(ctx context.Context, in *ModifyCategoryRequest, opts ...grpc.CallOption) (*StatusReply, error) + Modify(ctx context.Context, in *ModifyCategoryRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除分类 - Delete(ctx context.Context, in *DeleteCategoryRequest, opts ...grpc.CallOption) (*StatusReply, error) + Delete(ctx context.Context, in *DeleteCategoryRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type categoryClient struct { @@ -49,7 +50,7 @@ func NewCategoryClient(cc grpc.ClientConnInterface) CategoryClient { return &categoryClient{cc} } -func (c *categoryClient) Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CategoryListReply, error) { +func (c *categoryClient) Fetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CategoryListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CategoryListReply) err := c.cc.Invoke(ctx, Category_Fetch_FullMethodName, in, out, cOpts...) @@ -59,9 +60,9 @@ func (c *categoryClient) Fetch(ctx context.Context, in *IdentRequest, opts ...gr return out, nil } -func (c *categoryClient) Create(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *categoryClient) Create(ctx context.Context, in *protobuf.CmsCategoryItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Category_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -69,9 +70,9 @@ func (c *categoryClient) Create(ctx context.Context, in *CategoryItem, opts ...g return out, nil } -func (c *categoryClient) Modify(ctx context.Context, in *ModifyCategoryRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *categoryClient) Modify(ctx context.Context, in *ModifyCategoryRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Category_Modify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -79,9 +80,9 @@ func (c *categoryClient) Modify(ctx context.Context, in *ModifyCategoryRequest, return out, nil } -func (c *categoryClient) Delete(ctx context.Context, in *DeleteCategoryRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *categoryClient) Delete(ctx context.Context, in *DeleteCategoryRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Category_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -90,43 +91,41 @@ func (c *categoryClient) Delete(ctx context.Context, in *DeleteCategoryRequest, } // CategoryServer is the server API for Category service. -// All implementations must embed UnimplementedCategoryServer +// All implementations should embed UnimplementedCategoryServer // for forward compatibility. // // CMS - 分类 type CategoryServer interface { // 分类列表 - Fetch(context.Context, *IdentRequest) (*CategoryListReply, error) + Fetch(context.Context, *protobuf.IdentRequest) (*CategoryListReply, error) // 添加分类 - Create(context.Context, *CategoryItem) (*StatusReply, error) + Create(context.Context, *protobuf.CmsCategoryItem) (*protobuf.StatusReply, error) // 修改分类 - Modify(context.Context, *ModifyCategoryRequest) (*StatusReply, error) + Modify(context.Context, *ModifyCategoryRequest) (*protobuf.StatusReply, error) // 删除分类 - Delete(context.Context, *DeleteCategoryRequest) (*StatusReply, error) - mustEmbedUnimplementedCategoryServer() + Delete(context.Context, *DeleteCategoryRequest) (*protobuf.StatusReply, error) } -// UnimplementedCategoryServer must be embedded to have +// UnimplementedCategoryServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedCategoryServer struct{} -func (UnimplementedCategoryServer) Fetch(context.Context, *IdentRequest) (*CategoryListReply, error) { +func (UnimplementedCategoryServer) Fetch(context.Context, *protobuf.IdentRequest) (*CategoryListReply, error) { return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedCategoryServer) Create(context.Context, *CategoryItem) (*StatusReply, error) { +func (UnimplementedCategoryServer) Create(context.Context, *protobuf.CmsCategoryItem) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedCategoryServer) Modify(context.Context, *ModifyCategoryRequest) (*StatusReply, error) { +func (UnimplementedCategoryServer) Modify(context.Context, *ModifyCategoryRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } -func (UnimplementedCategoryServer) Delete(context.Context, *DeleteCategoryRequest) (*StatusReply, error) { +func (UnimplementedCategoryServer) Delete(context.Context, *DeleteCategoryRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedCategoryServer) mustEmbedUnimplementedCategoryServer() {} -func (UnimplementedCategoryServer) testEmbeddedByValue() {} +func (UnimplementedCategoryServer) testEmbeddedByValue() {} // UnsafeCategoryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CategoryServer will @@ -147,7 +146,7 @@ func RegisterCategoryServer(s grpc.ServiceRegistrar, srv CategoryServer) { } func _Category_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -159,13 +158,13 @@ func _Category_Fetch_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Category_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CategoryServer).Fetch(ctx, req.(*IdentRequest)) + return srv.(CategoryServer).Fetch(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Category_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CategoryItem) + in := new(protobuf.CmsCategoryItem) if err := dec(in); err != nil { return nil, err } @@ -177,7 +176,7 @@ func _Category_Create_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: Category_Create_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CategoryServer).Create(ctx, req.(*CategoryItem)) + return srv.(CategoryServer).Create(ctx, req.(*protobuf.CmsCategoryItem)) } return interceptor(ctx, in, info, handler) } @@ -243,5 +242,5 @@ var Category_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "category.proto", + Metadata: "module/base/cms/proto/category.proto", } diff --git a/module/base/cms/pb/pages.pb.go b/module/base/cms/pb/pages.pb.go index f89d901..5abad74 100644 --- a/module/base/cms/pb/pages.pb.go +++ b/module/base/cms/pb/pages.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc (unknown) -// source: pages.proto +// protoc v7.35.0 +// source: module/base/cms/proto/pages.proto package cms import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -31,7 +32,7 @@ type GetPagesByKeyRequest struct { func (x *GetPagesByKeyRequest) Reset() { *x = GetPagesByKeyRequest{} - mi := &file_pages_proto_msgTypes[0] + mi := &file_module_base_cms_proto_pages_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -43,7 +44,7 @@ func (x *GetPagesByKeyRequest) String() string { func (*GetPagesByKeyRequest) ProtoMessage() {} func (x *GetPagesByKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_pages_proto_msgTypes[0] + mi := &file_module_base_cms_proto_pages_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -56,7 +57,7 @@ func (x *GetPagesByKeyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPagesByKeyRequest.ProtoReflect.Descriptor instead. func (*GetPagesByKeyRequest) Descriptor() ([]byte, []int) { - return file_pages_proto_rawDescGZIP(), []int{0} + return file_module_base_cms_proto_pages_proto_rawDescGZIP(), []int{0} } func (x *GetPagesByKeyRequest) GetKey() string { @@ -68,31 +69,31 @@ func (x *GetPagesByKeyRequest) GetKey() string { // 文章 type PagesItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"` - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 文章唯一标识 - CreatedAt string `protobuf:"bytes,3,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间 - UpdatedAt string `protobuf:"bytes,4,opt,name=updated_at,proto3" json:"updated_at,omitempty"` //更新时间 - PostType int32 `protobuf:"varint,5,opt,name=post_type,proto3" json:"post_type,omitempty"` // 用户自定义文章类型 - Rights string `protobuf:"bytes,6,opt,name=rights,proto3" json:"rights,omitempty"` //权限 - Title string `protobuf:"bytes,7,opt,name=title,proto3" json:"title,omitempty"` // <必传>,标题 - Key string `protobuf:"bytes,8,opt,name=key,proto3" json:"key,omitempty"` //<必传> 内容页的key - Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"` //简介 - CoverPath string `protobuf:"bytes,10,opt,name=cover_path,proto3" json:"cover_path,omitempty"` //封面 - Content string `protobuf:"bytes,11,opt,name=content,proto3" json:"content,omitempty"` // <必传>,内容 - HasAccessory bool `protobuf:"varint,12,opt,name=has_accessory,proto3" json:"has_accessory,omitempty"` //是否有附件,默认没有 - AccessoryIdentityArray []string `protobuf:"bytes,13,rep,name=accessory_identity_array,proto3" json:"accessory_identity_array,omitempty"` //附件Identity 列表 - AccessoryData []*AccessoryItem `protobuf:"bytes,14,rep,name=accessory_data,proto3" json:"accessory_data,omitempty"` //附件数据 - TagsData []*TagsItem `protobuf:"bytes,15,rep,name=tags_data,proto3" json:"tags_data,omitempty"` // 标签数据 - TagsIdentityArray []string `protobuf:"bytes,16,rep,name=tags_identity_array,proto3" json:"tags_identity_array,omitempty"` // 标签集Identity 列表 - Hits int64 `protobuf:"varint,17,opt,name=hits,proto3" json:"hits,omitempty"` //点击量 + state protoimpl.MessageState `protogen:"open.v1"` + SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 文章唯一标识 + CreatedAt string `protobuf:"bytes,3,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间 + UpdatedAt string `protobuf:"bytes,4,opt,name=updated_at,proto3" json:"updated_at,omitempty"` //更新时间 + PostType int32 `protobuf:"varint,5,opt,name=post_type,proto3" json:"post_type,omitempty"` // 用户自定义文章类型 + Rights string `protobuf:"bytes,6,opt,name=rights,proto3" json:"rights,omitempty"` //权限 + Title string `protobuf:"bytes,7,opt,name=title,proto3" json:"title,omitempty"` // <必传>,标题 + Key string `protobuf:"bytes,8,opt,name=key,proto3" json:"key,omitempty"` //<必传> 内容页的key + Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"` //简介 + CoverPath string `protobuf:"bytes,10,opt,name=cover_path,proto3" json:"cover_path,omitempty"` //封面 + Content string `protobuf:"bytes,11,opt,name=content,proto3" json:"content,omitempty"` // <必传>,内容 + HasAccessory bool `protobuf:"varint,12,opt,name=has_accessory,proto3" json:"has_accessory,omitempty"` //是否有附件,默认没有 + AccessoryIdentityArray []string `protobuf:"bytes,13,rep,name=accessory_identity_array,proto3" json:"accessory_identity_array,omitempty"` //附件Identity 列表 + AccessoryData []*protobuf.CmsAccessoryItem `protobuf:"bytes,14,rep,name=accessory_data,proto3" json:"accessory_data,omitempty"` //附件数据 + TagsData []*protobuf.CmsTagsItem `protobuf:"bytes,15,rep,name=tags_data,proto3" json:"tags_data,omitempty"` // 标签数据 + TagsIdentityArray []string `protobuf:"bytes,16,rep,name=tags_identity_array,proto3" json:"tags_identity_array,omitempty"` // 标签集Identity 列表 + Hits int64 `protobuf:"varint,17,opt,name=hits,proto3" json:"hits,omitempty"` //点击量 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *PagesItem) Reset() { *x = PagesItem{} - mi := &file_pages_proto_msgTypes[1] + mi := &file_module_base_cms_proto_pages_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -104,7 +105,7 @@ func (x *PagesItem) String() string { func (*PagesItem) ProtoMessage() {} func (x *PagesItem) ProtoReflect() protoreflect.Message { - mi := &file_pages_proto_msgTypes[1] + mi := &file_module_base_cms_proto_pages_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -117,7 +118,7 @@ func (x *PagesItem) ProtoReflect() protoreflect.Message { // Deprecated: Use PagesItem.ProtoReflect.Descriptor instead. func (*PagesItem) Descriptor() ([]byte, []int) { - return file_pages_proto_rawDescGZIP(), []int{1} + return file_module_base_cms_proto_pages_proto_rawDescGZIP(), []int{1} } func (x *PagesItem) GetSiteIdentity() string { @@ -211,14 +212,14 @@ func (x *PagesItem) GetAccessoryIdentityArray() []string { return nil } -func (x *PagesItem) GetAccessoryData() []*AccessoryItem { +func (x *PagesItem) GetAccessoryData() []*protobuf.CmsAccessoryItem { if x != nil { return x.AccessoryData } return nil } -func (x *PagesItem) GetTagsData() []*TagsItem { +func (x *PagesItem) GetTagsData() []*protobuf.CmsTagsItem { if x != nil { return x.TagsData } @@ -252,7 +253,7 @@ type PagesListRequest struct { func (x *PagesListRequest) Reset() { *x = PagesListRequest{} - mi := &file_pages_proto_msgTypes[2] + mi := &file_module_base_cms_proto_pages_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -264,7 +265,7 @@ func (x *PagesListRequest) String() string { func (*PagesListRequest) ProtoMessage() {} func (x *PagesListRequest) ProtoReflect() protoreflect.Message { - mi := &file_pages_proto_msgTypes[2] + mi := &file_module_base_cms_proto_pages_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -277,7 +278,7 @@ func (x *PagesListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PagesListRequest.ProtoReflect.Descriptor instead. func (*PagesListRequest) Descriptor() ([]byte, []int) { - return file_pages_proto_rawDescGZIP(), []int{2} + return file_module_base_cms_proto_pages_proto_rawDescGZIP(), []int{2} } func (x *PagesListRequest) GetPage() int64 { @@ -319,7 +320,7 @@ type PagesListReply struct { func (x *PagesListReply) Reset() { *x = PagesListReply{} - mi := &file_pages_proto_msgTypes[3] + mi := &file_module_base_cms_proto_pages_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -331,7 +332,7 @@ func (x *PagesListReply) String() string { func (*PagesListReply) ProtoMessage() {} func (x *PagesListReply) ProtoReflect() protoreflect.Message { - mi := &file_pages_proto_msgTypes[3] + mi := &file_module_base_cms_proto_pages_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -344,7 +345,7 @@ func (x *PagesListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use PagesListReply.ProtoReflect.Descriptor instead. func (*PagesListReply) Descriptor() ([]byte, []int) { - return file_pages_proto_rawDescGZIP(), []int{3} + return file_module_base_cms_proto_pages_proto_rawDescGZIP(), []int{3} } func (x *PagesListReply) GetData() []*PagesItem { @@ -371,7 +372,7 @@ type GetPagesRequest struct { func (x *GetPagesRequest) Reset() { *x = GetPagesRequest{} - mi := &file_pages_proto_msgTypes[4] + mi := &file_module_base_cms_proto_pages_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -383,7 +384,7 @@ func (x *GetPagesRequest) String() string { func (*GetPagesRequest) ProtoMessage() {} func (x *GetPagesRequest) ProtoReflect() protoreflect.Message { - mi := &file_pages_proto_msgTypes[4] + mi := &file_module_base_cms_proto_pages_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -396,7 +397,7 @@ func (x *GetPagesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPagesRequest.ProtoReflect.Descriptor instead. func (*GetPagesRequest) Descriptor() ([]byte, []int) { - return file_pages_proto_rawDescGZIP(), []int{4} + return file_module_base_cms_proto_pages_proto_rawDescGZIP(), []int{4} } func (x *GetPagesRequest) GetIdentity() string { @@ -406,13 +407,13 @@ func (x *GetPagesRequest) GetIdentity() string { return "" } -var File_pages_proto protoreflect.FileDescriptor +var File_module_base_cms_proto_pages_proto protoreflect.FileDescriptor -const file_pages_proto_rawDesc = "" + +const file_module_base_cms_proto_pages_proto_rawDesc = "" + "\n" + - "\x14base/cms/pages.proto\x12\x03cms\x1a\x10cms/blocks.proto\"(\n" + + "!module/base/cms/proto/pages.proto\x12\x03cms\x1a\x15protobuf/blocks.proto\"(\n" + "\x14GetPagesByKeyRequest\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\"\xd8\x04\n" + + "\x03key\x18\x01 \x01(\tR\x03key\"\xe4\x04\n" + "\tPagesItem\x12$\n" + "\rsite_identity\x18\x01 \x01(\tR\rsite_identity\x12\x1a\n" + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x1e\n" + @@ -433,9 +434,9 @@ const file_pages_proto_rawDesc = "" + "cover_path\x12\x18\n" + "\acontent\x18\v \x01(\tR\acontent\x12$\n" + "\rhas_accessory\x18\f \x01(\bR\rhas_accessory\x12:\n" + - "\x18accessory_identity_array\x18\r \x03(\tR\x18accessory_identity_array\x12:\n" + - "\x0eaccessory_data\x18\x0e \x03(\v2\x12.cms.AccessoryItemR\x0eaccessory_data\x12+\n" + - "\ttags_data\x18\x0f \x03(\v2\r.cms.TagsItemR\ttags_data\x120\n" + + "\x18accessory_identity_array\x18\r \x03(\tR\x18accessory_identity_array\x12@\n" + + "\x0eaccessory_data\x18\x0e \x03(\v2\x18.blocks.CmsAccessoryItemR\x0eaccessory_data\x121\n" + + "\ttags_data\x18\x0f \x03(\v2\x13.blocks.CmsTagsItemR\ttags_data\x120\n" + "\x13tags_identity_array\x18\x10 \x03(\tR\x13tags_identity_array\x12\x12\n" + "\x04hits\x18\x11 \x01(\x03R\x04hits\"h\n" + "\x10PagesListRequest\x12\x12\n" + @@ -447,55 +448,55 @@ const file_pages_proto_rawDesc = "" + "\x04data\x18\x01 \x03(\v2\x0e.cms.PagesItemR\x04data\x12\x14\n" + "\x05count\x18\x02 \x01(\x03R\x05count\"-\n" + "\x0fGetPagesRequest\x12\x1a\n" + - "\bidentity\x18\x01 \x01(\tR\bidentity2\xbd\x02\n" + + "\bidentity\x18\x01 \x01(\tR\bidentity2\xc9\x02\n" + "\x05Pages\x125\n" + "\x05Fetch\x12\x15.cms.PagesListRequest\x1a\x13.cms.PagesListReply\"\x00\x127\n" + "\rGetByIdentity\x12\x14.cms.GetPagesRequest\x1a\x0e.cms.PagesItem\"\x00\x127\n" + - "\bGetByKey\x12\x19.cms.GetPagesByKeyRequest\x1a\x0e.cms.PagesItem\"\x00\x12,\n" + - "\x06Create\x12\x0e.cms.PagesItem\x1a\x10.cms.StatusReply\"\x00\x12,\n" + - "\x06Modify\x12\x0e.cms.PagesItem\x1a\x10.cms.StatusReply\"\x00\x12/\n" + - "\x06Delete\x12\x11.cms.IdentRequest\x1a\x10.cms.StatusReply\"\x00B\aZ\x05.;cmsb\x06proto3" + "\bGetByKey\x12\x19.cms.GetPagesByKeyRequest\x1a\x0e.cms.PagesItem\"\x00\x12/\n" + + "\x06Create\x12\x0e.cms.PagesItem\x1a\x13.blocks.StatusReply\"\x00\x12/\n" + + "\x06Modify\x12\x0e.cms.PagesItem\x1a\x13.blocks.StatusReply\"\x00\x125\n" + + "\x06Delete\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\"\x00B!Z\x1fbsm/full/module/base/cms/pb;cmsb\x06proto3" var ( - file_pages_proto_rawDescOnce sync.Once - file_pages_proto_rawDescData []byte + file_module_base_cms_proto_pages_proto_rawDescOnce sync.Once + file_module_base_cms_proto_pages_proto_rawDescData []byte ) -func file_pages_proto_rawDescGZIP() []byte { - file_pages_proto_rawDescOnce.Do(func() { - file_pages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_pages_proto_rawDesc), len(file_pages_proto_rawDesc))) +func file_module_base_cms_proto_pages_proto_rawDescGZIP() []byte { + file_module_base_cms_proto_pages_proto_rawDescOnce.Do(func() { + file_module_base_cms_proto_pages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_pages_proto_rawDesc), len(file_module_base_cms_proto_pages_proto_rawDesc))) }) - return file_pages_proto_rawDescData + return file_module_base_cms_proto_pages_proto_rawDescData } -var file_pages_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_pages_proto_goTypes = []any{ - (*GetPagesByKeyRequest)(nil), // 0: cms.GetPagesByKeyRequest - (*PagesItem)(nil), // 1: cms.PagesItem - (*PagesListRequest)(nil), // 2: cms.PagesListRequest - (*PagesListReply)(nil), // 3: cms.PagesListReply - (*GetPagesRequest)(nil), // 4: cms.GetPagesRequest - (*AccessoryItem)(nil), // 5: cms.AccessoryItem - (*TagsItem)(nil), // 6: cms.TagsItem - (*IdentRequest)(nil), // 7: cms.IdentRequest - (*StatusReply)(nil), // 8: cms.StatusReply +var file_module_base_cms_proto_pages_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_module_base_cms_proto_pages_proto_goTypes = []any{ + (*GetPagesByKeyRequest)(nil), // 0: cms.GetPagesByKeyRequest + (*PagesItem)(nil), // 1: cms.PagesItem + (*PagesListRequest)(nil), // 2: cms.PagesListRequest + (*PagesListReply)(nil), // 3: cms.PagesListReply + (*GetPagesRequest)(nil), // 4: cms.GetPagesRequest + (*protobuf.CmsAccessoryItem)(nil), // 5: blocks.CmsAccessoryItem + (*protobuf.CmsTagsItem)(nil), // 6: blocks.CmsTagsItem + (*protobuf.IdentRequest)(nil), // 7: blocks.IdentRequest + (*protobuf.StatusReply)(nil), // 8: blocks.StatusReply } -var file_pages_proto_depIdxs = []int32{ - 5, // 0: cms.PagesItem.accessory_data:type_name -> cms.AccessoryItem - 6, // 1: cms.PagesItem.tags_data:type_name -> cms.TagsItem +var file_module_base_cms_proto_pages_proto_depIdxs = []int32{ + 5, // 0: cms.PagesItem.accessory_data:type_name -> blocks.CmsAccessoryItem + 6, // 1: cms.PagesItem.tags_data:type_name -> blocks.CmsTagsItem 1, // 2: cms.PagesListReply.data:type_name -> cms.PagesItem 2, // 3: cms.Pages.Fetch:input_type -> cms.PagesListRequest 4, // 4: cms.Pages.GetByIdentity:input_type -> cms.GetPagesRequest 0, // 5: cms.Pages.GetByKey:input_type -> cms.GetPagesByKeyRequest 1, // 6: cms.Pages.Create:input_type -> cms.PagesItem 1, // 7: cms.Pages.Modify:input_type -> cms.PagesItem - 7, // 8: cms.Pages.Delete:input_type -> cms.IdentRequest + 7, // 8: cms.Pages.Delete:input_type -> blocks.IdentRequest 3, // 9: cms.Pages.Fetch:output_type -> cms.PagesListReply 1, // 10: cms.Pages.GetByIdentity:output_type -> cms.PagesItem 1, // 11: cms.Pages.GetByKey:output_type -> cms.PagesItem - 8, // 12: cms.Pages.Create:output_type -> cms.StatusReply - 8, // 13: cms.Pages.Modify:output_type -> cms.StatusReply - 8, // 14: cms.Pages.Delete:output_type -> cms.StatusReply + 8, // 12: cms.Pages.Create:output_type -> blocks.StatusReply + 8, // 13: cms.Pages.Modify:output_type -> blocks.StatusReply + 8, // 14: cms.Pages.Delete:output_type -> blocks.StatusReply 9, // [9:15] is the sub-list for method output_type 3, // [3:9] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name @@ -503,27 +504,26 @@ var file_pages_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_pages_proto_init() } -func file_pages_proto_init() { - if File_pages_proto != nil { +func init() { file_module_base_cms_proto_pages_proto_init() } +func file_module_base_cms_proto_pages_proto_init() { + if File_module_base_cms_proto_pages_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_pages_proto_rawDesc), len(file_pages_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_pages_proto_rawDesc), len(file_module_base_cms_proto_pages_proto_rawDesc)), NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_pages_proto_goTypes, - DependencyIndexes: file_pages_proto_depIdxs, - MessageInfos: file_pages_proto_msgTypes, + GoTypes: file_module_base_cms_proto_pages_proto_goTypes, + DependencyIndexes: file_module_base_cms_proto_pages_proto_depIdxs, + MessageInfos: file_module_base_cms_proto_pages_proto_msgTypes, }.Build() - File_pages_proto = out.File - file_pages_proto_goTypes = nil - file_pages_proto_depIdxs = nil + File_module_base_cms_proto_pages_proto = out.File + file_module_base_cms_proto_pages_proto_goTypes = nil + file_module_base_cms_proto_pages_proto_depIdxs = nil } diff --git a/module/base/cms/pb/pages.pb.gw.go b/module/base/cms/pb/pages.pb.gw.go index ec3431a..bc96eb0 100644 --- a/module/base/cms/pb/pages.pb.gw.go +++ b/module/base/cms/pb/pages.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: pages.proto +// source: module/base/cms/proto/pages.proto /* Package cms is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package cms import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -172,7 +173,7 @@ func local_request_Pages_Modify_0(ctx context.Context, marshaler runtime.Marshal func request_Pages_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client PagesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -187,7 +188,7 @@ func request_Pages_Delete_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Pages_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server PagesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/base/cms/pb/pages_grpc.pb.go b/module/base/cms/pb/pages_grpc.pb.go index ffc44f7..9ea2404 100644 --- a/module/base/cms/pb/pages_grpc.pb.go +++ b/module/base/cms/pb/pages_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.6.1 -// - protoc (unknown) -// source: pages.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/cms/proto/pages.proto package cms import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -40,11 +41,11 @@ type PagesClient interface { // 获取单页详情 By Key GetByKey(ctx context.Context, in *GetPagesByKeyRequest, opts ...grpc.CallOption) (*PagesItem, error) // 发布单页 - Create(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 修改单页 - Modify(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*StatusReply, error) + Modify(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除单页 - Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type pagesClient struct { @@ -85,9 +86,9 @@ func (c *pagesClient) GetByKey(ctx context.Context, in *GetPagesByKeyRequest, op return out, nil } -func (c *pagesClient) Create(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *pagesClient) Create(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Pages_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -95,9 +96,9 @@ func (c *pagesClient) Create(ctx context.Context, in *PagesItem, opts ...grpc.Ca return out, nil } -func (c *pagesClient) Modify(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *pagesClient) Modify(ctx context.Context, in *PagesItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Pages_Modify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -105,9 +106,9 @@ func (c *pagesClient) Modify(ctx context.Context, in *PagesItem, opts ...grpc.Ca return out, nil } -func (c *pagesClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *pagesClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Pages_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -116,7 +117,7 @@ func (c *pagesClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc } // PagesServer is the server API for Pages service. -// All implementations must embed UnimplementedPagesServer +// All implementations should embed UnimplementedPagesServer // for forward compatibility. // // 单页管理 @@ -128,15 +129,14 @@ type PagesServer interface { // 获取单页详情 By Key GetByKey(context.Context, *GetPagesByKeyRequest) (*PagesItem, error) // 发布单页 - Create(context.Context, *PagesItem) (*StatusReply, error) + Create(context.Context, *PagesItem) (*protobuf.StatusReply, error) // 修改单页 - Modify(context.Context, *PagesItem) (*StatusReply, error) + Modify(context.Context, *PagesItem) (*protobuf.StatusReply, error) // 删除单页 - Delete(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedPagesServer() + Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) } -// UnimplementedPagesServer must be embedded to have +// UnimplementedPagesServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -152,17 +152,16 @@ func (UnimplementedPagesServer) GetByIdentity(context.Context, *GetPagesRequest) func (UnimplementedPagesServer) GetByKey(context.Context, *GetPagesByKeyRequest) (*PagesItem, error) { return nil, status.Error(codes.Unimplemented, "method GetByKey not implemented") } -func (UnimplementedPagesServer) Create(context.Context, *PagesItem) (*StatusReply, error) { +func (UnimplementedPagesServer) Create(context.Context, *PagesItem) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedPagesServer) Modify(context.Context, *PagesItem) (*StatusReply, error) { +func (UnimplementedPagesServer) Modify(context.Context, *PagesItem) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } -func (UnimplementedPagesServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) { +func (UnimplementedPagesServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedPagesServer) mustEmbedUnimplementedPagesServer() {} -func (UnimplementedPagesServer) testEmbeddedByValue() {} +func (UnimplementedPagesServer) testEmbeddedByValue() {} // UnsafePagesServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PagesServer will @@ -273,7 +272,7 @@ func _Pages_Modify_Handler(srv interface{}, ctx context.Context, dec func(interf } func _Pages_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -285,7 +284,7 @@ func _Pages_Delete_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Pages_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PagesServer).Delete(ctx, req.(*IdentRequest)) + return srv.(PagesServer).Delete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -323,5 +322,5 @@ var Pages_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "pages.proto", + Metadata: "module/base/cms/proto/pages.proto", } diff --git a/module/base/cms/pb/post.pb.go b/module/base/cms/pb/post.pb.go index 3c358cd..5c48a0a 100644 --- a/module/base/cms/pb/post.pb.go +++ b/module/base/cms/pb/post.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc (unknown) -// source: post.proto +// protoc v7.35.0 +// source: module/base/cms/proto/post.proto package cms import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -32,7 +33,7 @@ type DeleteCommentRequest struct { func (x *DeleteCommentRequest) Reset() { *x = DeleteCommentRequest{} - mi := &file_post_proto_msgTypes[0] + mi := &file_module_base_cms_proto_post_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +45,7 @@ func (x *DeleteCommentRequest) String() string { func (*DeleteCommentRequest) ProtoMessage() {} func (x *DeleteCommentRequest) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[0] + mi := &file_module_base_cms_proto_post_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +58,7 @@ func (x *DeleteCommentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteCommentRequest.ProtoReflect.Descriptor instead. func (*DeleteCommentRequest) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{0} + return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{0} } func (x *DeleteCommentRequest) GetIdentity() string { @@ -84,7 +85,7 @@ type GetPostByKeyRequest struct { func (x *GetPostByKeyRequest) Reset() { *x = GetPostByKeyRequest{} - mi := &file_post_proto_msgTypes[1] + mi := &file_module_base_cms_proto_post_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -96,7 +97,7 @@ func (x *GetPostByKeyRequest) String() string { func (*GetPostByKeyRequest) ProtoMessage() {} func (x *GetPostByKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[1] + mi := &file_module_base_cms_proto_post_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109,7 +110,7 @@ func (x *GetPostByKeyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPostByKeyRequest.ProtoReflect.Descriptor instead. func (*GetPostByKeyRequest) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{1} + return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{1} } func (x *GetPostByKeyRequest) GetKey() string { @@ -121,43 +122,41 @@ func (x *GetPostByKeyRequest) GetKey() string { // 文章 type PostItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"` - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 文章唯一标识 - OwnerId int64 `protobuf:"varint,3,opt,name=owner_id,proto3" json:"owner_id,omitempty"` // 作者ID - OwnerIdentity string `protobuf:"bytes,4,opt,name=owner_identity,proto3" json:"owner_identity,omitempty"` // 作者唯一标识 - CategoryIdentityArray []string `protobuf:"bytes,5,rep,name=category_identity_array,proto3" json:"category_identity_array,omitempty"` // <必传>,所属分类Identity 列表 - TagsIdentityArray []string `protobuf:"bytes,6,rep,name=tags_identity_array,proto3" json:"tags_identity_array,omitempty"` // 标签集Identity 列表 - Title string `protobuf:"bytes,7,opt,name=title,proto3" json:"title,omitempty"` // <必传>,标题 - CoverPath string `protobuf:"bytes,8,opt,name=cover_path,proto3" json:"cover_path,omitempty"` //封面 - Author string `protobuf:"bytes,9,opt,name=author,proto3" json:"author,omitempty"` // 作者 - AuthorIdentity string `protobuf:"bytes,10,opt,name=author_identity,proto3" json:"author_identity,omitempty"` - Content string `protobuf:"bytes,11,opt,name=content,proto3" json:"content,omitempty"` // <必传>,内容 - TargetUrl string `protobuf:"bytes,12,opt,name=target_url,proto3" json:"target_url,omitempty"` // 跳转目标地址 - SourceUrl string `protobuf:"bytes,13,opt,name=source_url,proto3" json:"source_url,omitempty"` // 文章来源地址 - Hits int64 `protobuf:"varint,14,opt,name=hits,proto3" json:"hits,omitempty"` //点击量 - AccessoryIdentityArray []string `protobuf:"bytes,15,rep,name=accessory_identity_array,proto3" json:"accessory_identity_array,omitempty"` //附件Identity 列表 - HasAccessory bool `protobuf:"varint,16,opt,name=has_accessory,proto3" json:"has_accessory,omitempty"` //是否有附件,默认没有 - CreatedAt string `protobuf:"bytes,17,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间 - UpdatedAt string `protobuf:"bytes,18,opt,name=updated_at,proto3" json:"updated_at,omitempty"` //更新时间 - Description string `protobuf:"bytes,19,opt,name=description,proto3" json:"description,omitempty"` //简介 - LikeHits int64 `protobuf:"varint,20,opt,name=like_hits,proto3" json:"like_hits,omitempty"` //点赞量 - UnlikeHits int64 `protobuf:"varint,21,opt,name=unlike_hits,proto3" json:"unlike_hits,omitempty"` //点踩量 - CommentHits int64 `protobuf:"varint,22,opt,name=comment_hits,proto3" json:"comment_hits,omitempty"` //评论量 - PostType int32 `protobuf:"varint,23,opt,name=post_type,proto3" json:"post_type,omitempty"` // 用户自定义文章类型 - Rights string `protobuf:"bytes,24,opt,name=rights,proto3" json:"rights,omitempty"` //权限 - Key string `protobuf:"bytes,25,opt,name=key,proto3" json:"key,omitempty"` // <必传>,文章key - CategoryData []*CategoryItem `protobuf:"bytes,26,rep,name=category_data,proto3" json:"category_data,omitempty"` // 分类数据 - TagsData []*TagsItem `protobuf:"bytes,27,rep,name=tags_data,proto3" json:"tags_data,omitempty"` // 标签数据 - AccessoryData []*AccessoryItem `protobuf:"bytes,28,rep,name=accessory_data,proto3" json:"accessory_data,omitempty"` //附件数据 - // ---- 以下字段来自 models.CmsPost(为兼容保留旧字段号,统一新增在末尾)---- - Lang string `protobuf:"bytes,29,opt,name=lang,proto3" json:"lang,omitempty"` // 语言 - SourceOrigin string `protobuf:"bytes,30,opt,name=source_origin,proto3" json:"source_origin,omitempty"` // 来源方简称 - ExtendUrl string `protobuf:"bytes,31,opt,name=extend_url,proto3" json:"extend_url,omitempty"` // 扩展:URL - ExtendData string `protobuf:"bytes,32,opt,name=extend_data,proto3" json:"extend_data,omitempty"` // 扩展:数据 - ExtendImg string `protobuf:"bytes,33,opt,name=extend_img,proto3" json:"extend_img,omitempty"` // 扩展:图片 - ExtendDesc string `protobuf:"bytes,34,opt,name=extend_desc,proto3" json:"extend_desc,omitempty"` // 扩展:描述 - Published string `protobuf:"bytes,35,opt,name=published,proto3" json:"published,omitempty"` // 事件发生时间 + state protoimpl.MessageState `protogen:"open.v1"` + SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 文章唯一标识 + OwnerId int64 `protobuf:"varint,3,opt,name=owner_id,proto3" json:"owner_id,omitempty"` // 作者ID + OwnerIdentity string `protobuf:"bytes,4,opt,name=owner_identity,proto3" json:"owner_identity,omitempty"` // 作者唯一标识 + CategoryIdentityArray []string `protobuf:"bytes,5,rep,name=category_identity_array,proto3" json:"category_identity_array,omitempty"` // <必传>,所属分类Identity 列表 + TagsIdentityArray []string `protobuf:"bytes,6,rep,name=tags_identity_array,proto3" json:"tags_identity_array,omitempty"` // 标签集Identity 列表 + Title string `protobuf:"bytes,7,opt,name=title,proto3" json:"title,omitempty"` // <必传>,标题 + CoverPath string `protobuf:"bytes,8,opt,name=cover_path,proto3" json:"cover_path,omitempty"` //封面 + Author string `protobuf:"bytes,9,opt,name=author,proto3" json:"author,omitempty"` // 作者 + AuthorIdentity string `protobuf:"bytes,10,opt,name=author_identity,proto3" json:"author_identity,omitempty"` + Content string `protobuf:"bytes,11,opt,name=content,proto3" json:"content,omitempty"` // <必传>,内容 + TargetUrl string `protobuf:"bytes,12,opt,name=target_url,proto3" json:"target_url,omitempty"` // 跳转目标地址 + SourceUrl string `protobuf:"bytes,13,opt,name=source_url,proto3" json:"source_url,omitempty"` // 文章来源地址 + Hits int64 `protobuf:"varint,14,opt,name=hits,proto3" json:"hits,omitempty"` //点击量 + AccessoryIdentityArray []string `protobuf:"bytes,15,rep,name=accessory_identity_array,proto3" json:"accessory_identity_array,omitempty"` //附件Identity 列表 + HasAccessory bool `protobuf:"varint,16,opt,name=has_accessory,proto3" json:"has_accessory,omitempty"` //是否有附件,默认没有 + CreatedAt string `protobuf:"bytes,17,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间 + UpdatedAt string `protobuf:"bytes,18,opt,name=updated_at,proto3" json:"updated_at,omitempty"` //更新时间 + Description string `protobuf:"bytes,19,opt,name=description,proto3" json:"description,omitempty"` //简介 + LikeHits int64 `protobuf:"varint,20,opt,name=like_hits,proto3" json:"like_hits,omitempty"` //点赞量 + UnlikeHits int64 `protobuf:"varint,21,opt,name=unlike_hits,proto3" json:"unlike_hits,omitempty"` //点踩量 + CommentHits int64 `protobuf:"varint,22,opt,name=comment_hits,proto3" json:"comment_hits,omitempty"` //评论量 + PostType int32 `protobuf:"varint,23,opt,name=post_type,proto3" json:"post_type,omitempty"` // 用户自定义文章类型 + Rights string `protobuf:"bytes,24,opt,name=rights,proto3" json:"rights,omitempty"` //权限 + CategoryData []*protobuf.CmsCategoryItem `protobuf:"bytes,26,rep,name=category_data,proto3" json:"category_data,omitempty"` // 分类数据 + TagsData []*protobuf.CmsTagsItem `protobuf:"bytes,27,rep,name=tags_data,proto3" json:"tags_data,omitempty"` // 标签数据 + AccessoryData []*protobuf.CmsAccessoryItem `protobuf:"bytes,28,rep,name=accessory_data,proto3" json:"accessory_data,omitempty"` //附件数据 + Lang string `protobuf:"bytes,29,opt,name=lang,proto3" json:"lang,omitempty"` // 语言 + SourceOrigin string `protobuf:"bytes,30,opt,name=source_origin,proto3" json:"source_origin,omitempty"` // 来源方简称 + ExtendUrl string `protobuf:"bytes,31,opt,name=extend_url,proto3" json:"extend_url,omitempty"` // 扩展:URL + ExtendData string `protobuf:"bytes,32,opt,name=extend_data,proto3" json:"extend_data,omitempty"` // 扩展:数据 + ExtendImg string `protobuf:"bytes,33,opt,name=extend_img,proto3" json:"extend_img,omitempty"` // 扩展:图片 + ExtendDesc string `protobuf:"bytes,34,opt,name=extend_desc,proto3" json:"extend_desc,omitempty"` // 扩展:描述 + Published string `protobuf:"bytes,35,opt,name=published,proto3" json:"published,omitempty"` // 事件发生时间 // 扩展:文章唯一键值(用于URL等) Hash string `protobuf:"bytes,36,opt,name=hash,proto3" json:"hash,omitempty"` unknownFields protoimpl.UnknownFields @@ -166,7 +165,7 @@ type PostItem struct { func (x *PostItem) Reset() { *x = PostItem{} - mi := &file_post_proto_msgTypes[2] + mi := &file_module_base_cms_proto_post_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -178,7 +177,7 @@ func (x *PostItem) String() string { func (*PostItem) ProtoMessage() {} func (x *PostItem) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[2] + mi := &file_module_base_cms_proto_post_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -191,7 +190,7 @@ func (x *PostItem) ProtoReflect() protoreflect.Message { // Deprecated: Use PostItem.ProtoReflect.Descriptor instead. func (*PostItem) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{2} + return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{2} } func (x *PostItem) GetSiteIdentity() string { @@ -362,28 +361,21 @@ func (x *PostItem) GetRights() string { return "" } -func (x *PostItem) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *PostItem) GetCategoryData() []*CategoryItem { +func (x *PostItem) GetCategoryData() []*protobuf.CmsCategoryItem { if x != nil { return x.CategoryData } return nil } -func (x *PostItem) GetTagsData() []*TagsItem { +func (x *PostItem) GetTagsData() []*protobuf.CmsTagsItem { if x != nil { return x.TagsData } return nil } -func (x *PostItem) GetAccessoryData() []*AccessoryItem { +func (x *PostItem) GetAccessoryData() []*protobuf.CmsAccessoryItem { if x != nil { return x.AccessoryData } @@ -461,7 +453,7 @@ type PostListRequest struct { func (x *PostListRequest) Reset() { *x = PostListRequest{} - mi := &file_post_proto_msgTypes[3] + mi := &file_module_base_cms_proto_post_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -473,7 +465,7 @@ func (x *PostListRequest) String() string { func (*PostListRequest) ProtoMessage() {} func (x *PostListRequest) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[3] + mi := &file_module_base_cms_proto_post_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -486,7 +478,7 @@ func (x *PostListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PostListRequest.ProtoReflect.Descriptor instead. func (*PostListRequest) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{3} + return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{3} } func (x *PostListRequest) GetPage() int64 { @@ -542,7 +534,7 @@ type PostListReply struct { func (x *PostListReply) Reset() { *x = PostListReply{} - mi := &file_post_proto_msgTypes[4] + mi := &file_module_base_cms_proto_post_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -554,7 +546,7 @@ func (x *PostListReply) String() string { func (*PostListReply) ProtoMessage() {} func (x *PostListReply) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[4] + mi := &file_module_base_cms_proto_post_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -567,7 +559,7 @@ func (x *PostListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use PostListReply.ProtoReflect.Descriptor instead. func (*PostListReply) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{4} + return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{4} } func (x *PostListReply) GetData() []*PostItem { @@ -595,7 +587,7 @@ type GetPostRequest struct { func (x *GetPostRequest) Reset() { *x = GetPostRequest{} - mi := &file_post_proto_msgTypes[5] + mi := &file_module_base_cms_proto_post_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -607,7 +599,7 @@ func (x *GetPostRequest) String() string { func (*GetPostRequest) ProtoMessage() {} func (x *GetPostRequest) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[5] + mi := &file_module_base_cms_proto_post_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -620,7 +612,7 @@ func (x *GetPostRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead. func (*GetPostRequest) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{5} + return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{5} } func (x *GetPostRequest) GetIdentity() string { @@ -660,7 +652,7 @@ type CommentItem struct { func (x *CommentItem) Reset() { *x = CommentItem{} - mi := &file_post_proto_msgTypes[6] + mi := &file_module_base_cms_proto_post_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -672,7 +664,7 @@ func (x *CommentItem) String() string { func (*CommentItem) ProtoMessage() {} func (x *CommentItem) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[6] + mi := &file_module_base_cms_proto_post_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -685,7 +677,7 @@ func (x *CommentItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CommentItem.ProtoReflect.Descriptor instead. func (*CommentItem) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{6} + return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{6} } func (x *CommentItem) GetIdentity() string { @@ -798,7 +790,7 @@ type CommentListRequest struct { func (x *CommentListRequest) Reset() { *x = CommentListRequest{} - mi := &file_post_proto_msgTypes[7] + mi := &file_module_base_cms_proto_post_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -810,7 +802,7 @@ func (x *CommentListRequest) String() string { func (*CommentListRequest) ProtoMessage() {} func (x *CommentListRequest) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[7] + mi := &file_module_base_cms_proto_post_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -823,7 +815,7 @@ func (x *CommentListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CommentListRequest.ProtoReflect.Descriptor instead. func (*CommentListRequest) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{7} + return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{7} } func (x *CommentListRequest) GetPostIdentity() string { @@ -858,7 +850,7 @@ type CommentListResponse struct { func (x *CommentListResponse) Reset() { *x = CommentListResponse{} - mi := &file_post_proto_msgTypes[8] + mi := &file_module_base_cms_proto_post_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -870,7 +862,7 @@ func (x *CommentListResponse) String() string { func (*CommentListResponse) ProtoMessage() {} func (x *CommentListResponse) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[8] + mi := &file_module_base_cms_proto_post_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -883,7 +875,7 @@ func (x *CommentListResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CommentListResponse.ProtoReflect.Descriptor instead. func (*CommentListResponse) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{8} + return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{8} } func (x *CommentListResponse) GetList() []*CommentItem { @@ -911,7 +903,7 @@ type PostOpIdentityRequest struct { func (x *PostOpIdentityRequest) Reset() { *x = PostOpIdentityRequest{} - mi := &file_post_proto_msgTypes[9] + mi := &file_module_base_cms_proto_post_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -923,7 +915,7 @@ func (x *PostOpIdentityRequest) String() string { func (*PostOpIdentityRequest) ProtoMessage() {} func (x *PostOpIdentityRequest) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[9] + mi := &file_module_base_cms_proto_post_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -936,7 +928,7 @@ func (x *PostOpIdentityRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PostOpIdentityRequest.ProtoReflect.Descriptor instead. func (*PostOpIdentityRequest) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{9} + return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{9} } func (x *PostOpIdentityRequest) GetPostIdentity() string { @@ -964,7 +956,7 @@ type CommentOpIdentityRequest struct { func (x *CommentOpIdentityRequest) Reset() { *x = CommentOpIdentityRequest{} - mi := &file_post_proto_msgTypes[10] + mi := &file_module_base_cms_proto_post_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -976,7 +968,7 @@ func (x *CommentOpIdentityRequest) String() string { func (*CommentOpIdentityRequest) ProtoMessage() {} func (x *CommentOpIdentityRequest) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[10] + mi := &file_module_base_cms_proto_post_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -989,7 +981,7 @@ func (x *CommentOpIdentityRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CommentOpIdentityRequest.ProtoReflect.Descriptor instead. func (*CommentOpIdentityRequest) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{10} + return file_module_base_cms_proto_post_proto_rawDescGZIP(), []int{10} } func (x *CommentOpIdentityRequest) GetCommentIdentity() string { @@ -1006,12 +998,11 @@ func (x *CommentOpIdentityRequest) GetOpIdentity() string { return "" } -var File_post_proto protoreflect.FileDescriptor +var File_module_base_cms_proto_post_proto protoreflect.FileDescriptor -const file_post_proto_rawDesc = "" + +const file_module_base_cms_proto_post_proto_rawDesc = "" + "\n" + - "\x13" + - "base/cms/post.proto\x12\x03cms\x1a\x10cms/blocks.proto\"X\n" + + " module/base/cms/proto/post.proto\x12\x03cms\x1a\x15protobuf/blocks.proto\"X\n" + "\x14DeleteCommentRequest\x12\x1a\n" + "\bidentity\x18\x01 \x01(\tR\bidentity\x12$\n" + "\rpost_identity\x18\x02 \x01(\tR\rpost_identity\"'\n" + @@ -1052,11 +1043,10 @@ const file_post_proto_rawDesc = "" + "\vunlike_hits\x18\x15 \x01(\x03R\vunlike_hits\x12\"\n" + "\fcomment_hits\x18\x16 \x01(\x03R\fcomment_hits\x12\x1c\n" + "\tpost_type\x18\x17 \x01(\x05R\tpost_type\x12\x16\n" + - "\x06rights\x18\x18 \x01(\tR\x06rights\x12\x10\n" + - "\x03key\x18\x19 \x01(\tR\x03key\x127\n" + - "\rcategory_data\x18\x1a \x03(\v2\x11.cms.CategoryItemR\rcategory_data\x12+\n" + - "\ttags_data\x18\x1b \x03(\v2\r.cms.TagsItemR\ttags_data\x12:\n" + - "\x0eaccessory_data\x18\x1c \x03(\v2\x12.cms.AccessoryItemR\x0eaccessory_data\x12\x12\n" + + "\x06rights\x18\x18 \x01(\tR\x06rights\x12=\n" + + "\rcategory_data\x18\x1a \x03(\v2\x17.blocks.CmsCategoryItemR\rcategory_data\x121\n" + + "\ttags_data\x18\x1b \x03(\v2\x13.blocks.CmsTagsItemR\ttags_data\x12@\n" + + "\x0eaccessory_data\x18\x1c \x03(\v2\x18.blocks.CmsAccessoryItemR\x0eaccessory_data\x12\x12\n" + "\x04lang\x18\x1d \x01(\tR\x04lang\x12$\n" + "\rsource_origin\x18\x1e \x01(\tR\rsource_origin\x12\x1e\n" + "\n" + @@ -1116,75 +1106,75 @@ const file_post_proto_rawDesc = "" + "\vop_identity\x18\x02 \x01(\tR\vop_identity\"h\n" + "\x18CommentOpIdentityRequest\x12*\n" + "\x10comment_identity\x18\x01 \x01(\tR\x10comment_identity\x12 \n" + - "\vop_identity\x18\x02 \x01(\tR\vop_identity2\xf7\b\n" + + "\vop_identity\x18\x02 \x01(\tR\vop_identity2\xaa\t\n" + "\x04Post\x123\n" + "\x05Fetch\x12\x14.cms.PostListRequest\x1a\x12.cms.PostListReply\"\x00\x125\n" + "\rGetByIdentity\x12\x13.cms.GetPostRequest\x1a\r.cms.PostItem\"\x00\x125\n" + - "\bGetByKey\x12\x18.cms.GetPostByKeyRequest\x1a\r.cms.PostItem\"\x00\x122\n" + - "\x06Search\x12\x12.cms.SearchRequest\x1a\x12.cms.PostListReply\"\x00\x12+\n" + - "\x06Create\x12\r.cms.PostItem\x1a\x10.cms.StatusReply\"\x00\x12+\n" + - "\x06Modify\x12\r.cms.PostItem\x1a\x10.cms.StatusReply\"\x00\x12/\n" + - "\x06Delete\x12\x11.cms.IdentRequest\x1a\x10.cms.StatusReply\"\x00\x12>\n" + - "\fIncrPostLike\x12\x1a.cms.PostOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12>\n" + - "\fDescPostLike\x12\x1a.cms.PostOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12@\n" + - "\x0eIncrPostUnlike\x12\x1a.cms.PostOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12@\n" + - "\x0eDescPostUnlike\x12\x1a.cms.PostOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12B\n" + - "\vCommentList\x12\x17.cms.CommentListRequest\x1a\x18.cms.CommentListResponse\"\x00\x122\n" + + "\bGetByKey\x12\x18.cms.GetPostByKeyRequest\x1a\r.cms.PostItem\"\x00\x128\n" + + "\x06Search\x12\x18.blocks.CmsSearchRequest\x1a\x12.cms.PostListReply\"\x00\x12.\n" + + "\x06Create\x12\r.cms.PostItem\x1a\x13.blocks.StatusReply\"\x00\x12.\n" + + "\x06Modify\x12\r.cms.PostItem\x1a\x13.blocks.StatusReply\"\x00\x125\n" + + "\x06Delete\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\"\x00\x12A\n" + + "\fIncrPostLike\x12\x1a.cms.PostOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12A\n" + + "\fDescPostLike\x12\x1a.cms.PostOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12C\n" + + "\x0eIncrPostUnlike\x12\x1a.cms.PostOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12C\n" + + "\x0eDescPostUnlike\x12\x1a.cms.PostOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12B\n" + + "\vCommentList\x12\x17.cms.CommentListRequest\x1a\x18.cms.CommentListResponse\"\x00\x125\n" + "\n" + - "AddComment\x12\x10.cms.CommentItem\x1a\x10.cms.StatusReply\"\x00\x125\n" + - "\rModifyComment\x12\x10.cms.CommentItem\x1a\x10.cms.StatusReply\"\x00\x12>\n" + - "\rDeleteComment\x12\x19.cms.DeleteCommentRequest\x1a\x10.cms.StatusReply\"\x00\x12D\n" + - "\x0fIncrCommentLike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12D\n" + - "\x0fDescCommentLike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12F\n" + - "\x11IncrCommentUnlike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00\x12F\n" + - "\x11DescCommentUnlike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x10.cms.StatusReply\"\x00B\aZ\x05.;cmsb\x06proto3" + "AddComment\x12\x10.cms.CommentItem\x1a\x13.blocks.StatusReply\"\x00\x128\n" + + "\rModifyComment\x12\x10.cms.CommentItem\x1a\x13.blocks.StatusReply\"\x00\x12A\n" + + "\rDeleteComment\x12\x19.cms.DeleteCommentRequest\x1a\x13.blocks.StatusReply\"\x00\x12G\n" + + "\x0fIncrCommentLike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12G\n" + + "\x0fDescCommentLike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12I\n" + + "\x11IncrCommentUnlike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00\x12I\n" + + "\x11DescCommentUnlike\x12\x1d.cms.CommentOpIdentityRequest\x1a\x13.blocks.StatusReply\"\x00B!Z\x1fbsm/full/module/base/cms/pb;cmsb\x06proto3" var ( - file_post_proto_rawDescOnce sync.Once - file_post_proto_rawDescData []byte + file_module_base_cms_proto_post_proto_rawDescOnce sync.Once + file_module_base_cms_proto_post_proto_rawDescData []byte ) -func file_post_proto_rawDescGZIP() []byte { - file_post_proto_rawDescOnce.Do(func() { - file_post_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_post_proto_rawDesc), len(file_post_proto_rawDesc))) +func file_module_base_cms_proto_post_proto_rawDescGZIP() []byte { + file_module_base_cms_proto_post_proto_rawDescOnce.Do(func() { + file_module_base_cms_proto_post_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_post_proto_rawDesc), len(file_module_base_cms_proto_post_proto_rawDesc))) }) - return file_post_proto_rawDescData + return file_module_base_cms_proto_post_proto_rawDescData } -var file_post_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_post_proto_goTypes = []any{ - (*DeleteCommentRequest)(nil), // 0: cms.DeleteCommentRequest - (*GetPostByKeyRequest)(nil), // 1: cms.GetPostByKeyRequest - (*PostItem)(nil), // 2: cms.PostItem - (*PostListRequest)(nil), // 3: cms.PostListRequest - (*PostListReply)(nil), // 4: cms.PostListReply - (*GetPostRequest)(nil), // 5: cms.GetPostRequest - (*CommentItem)(nil), // 6: cms.CommentItem - (*CommentListRequest)(nil), // 7: cms.CommentListRequest - (*CommentListResponse)(nil), // 8: cms.CommentListResponse - (*PostOpIdentityRequest)(nil), // 9: cms.PostOpIdentityRequest - (*CommentOpIdentityRequest)(nil), // 10: cms.CommentOpIdentityRequest - (*CategoryItem)(nil), // 11: cms.CategoryItem - (*TagsItem)(nil), // 12: cms.TagsItem - (*AccessoryItem)(nil), // 13: cms.AccessoryItem - (*SearchRequest)(nil), // 14: cms.SearchRequest - (*IdentRequest)(nil), // 15: cms.IdentRequest - (*StatusReply)(nil), // 16: cms.StatusReply +var file_module_base_cms_proto_post_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_module_base_cms_proto_post_proto_goTypes = []any{ + (*DeleteCommentRequest)(nil), // 0: cms.DeleteCommentRequest + (*GetPostByKeyRequest)(nil), // 1: cms.GetPostByKeyRequest + (*PostItem)(nil), // 2: cms.PostItem + (*PostListRequest)(nil), // 3: cms.PostListRequest + (*PostListReply)(nil), // 4: cms.PostListReply + (*GetPostRequest)(nil), // 5: cms.GetPostRequest + (*CommentItem)(nil), // 6: cms.CommentItem + (*CommentListRequest)(nil), // 7: cms.CommentListRequest + (*CommentListResponse)(nil), // 8: cms.CommentListResponse + (*PostOpIdentityRequest)(nil), // 9: cms.PostOpIdentityRequest + (*CommentOpIdentityRequest)(nil), // 10: cms.CommentOpIdentityRequest + (*protobuf.CmsCategoryItem)(nil), // 11: blocks.CmsCategoryItem + (*protobuf.CmsTagsItem)(nil), // 12: blocks.CmsTagsItem + (*protobuf.CmsAccessoryItem)(nil), // 13: blocks.CmsAccessoryItem + (*protobuf.CmsSearchRequest)(nil), // 14: blocks.CmsSearchRequest + (*protobuf.IdentRequest)(nil), // 15: blocks.IdentRequest + (*protobuf.StatusReply)(nil), // 16: blocks.StatusReply } -var file_post_proto_depIdxs = []int32{ - 11, // 0: cms.PostItem.category_data:type_name -> cms.CategoryItem - 12, // 1: cms.PostItem.tags_data:type_name -> cms.TagsItem - 13, // 2: cms.PostItem.accessory_data:type_name -> cms.AccessoryItem +var file_module_base_cms_proto_post_proto_depIdxs = []int32{ + 11, // 0: cms.PostItem.category_data:type_name -> blocks.CmsCategoryItem + 12, // 1: cms.PostItem.tags_data:type_name -> blocks.CmsTagsItem + 13, // 2: cms.PostItem.accessory_data:type_name -> blocks.CmsAccessoryItem 2, // 3: cms.PostListReply.data:type_name -> cms.PostItem 6, // 4: cms.CommentItem.list:type_name -> cms.CommentItem 6, // 5: cms.CommentListResponse.list:type_name -> cms.CommentItem 3, // 6: cms.Post.Fetch:input_type -> cms.PostListRequest 5, // 7: cms.Post.GetByIdentity:input_type -> cms.GetPostRequest 1, // 8: cms.Post.GetByKey:input_type -> cms.GetPostByKeyRequest - 14, // 9: cms.Post.Search:input_type -> cms.SearchRequest + 14, // 9: cms.Post.Search:input_type -> blocks.CmsSearchRequest 2, // 10: cms.Post.Create:input_type -> cms.PostItem 2, // 11: cms.Post.Modify:input_type -> cms.PostItem - 15, // 12: cms.Post.Delete:input_type -> cms.IdentRequest + 15, // 12: cms.Post.Delete:input_type -> blocks.IdentRequest 9, // 13: cms.Post.IncrPostLike:input_type -> cms.PostOpIdentityRequest 9, // 14: cms.Post.DescPostLike:input_type -> cms.PostOpIdentityRequest 9, // 15: cms.Post.IncrPostUnlike:input_type -> cms.PostOpIdentityRequest @@ -1201,21 +1191,21 @@ var file_post_proto_depIdxs = []int32{ 2, // 26: cms.Post.GetByIdentity:output_type -> cms.PostItem 2, // 27: cms.Post.GetByKey:output_type -> cms.PostItem 4, // 28: cms.Post.Search:output_type -> cms.PostListReply - 16, // 29: cms.Post.Create:output_type -> cms.StatusReply - 16, // 30: cms.Post.Modify:output_type -> cms.StatusReply - 16, // 31: cms.Post.Delete:output_type -> cms.StatusReply - 16, // 32: cms.Post.IncrPostLike:output_type -> cms.StatusReply - 16, // 33: cms.Post.DescPostLike:output_type -> cms.StatusReply - 16, // 34: cms.Post.IncrPostUnlike:output_type -> cms.StatusReply - 16, // 35: cms.Post.DescPostUnlike:output_type -> cms.StatusReply + 16, // 29: cms.Post.Create:output_type -> blocks.StatusReply + 16, // 30: cms.Post.Modify:output_type -> blocks.StatusReply + 16, // 31: cms.Post.Delete:output_type -> blocks.StatusReply + 16, // 32: cms.Post.IncrPostLike:output_type -> blocks.StatusReply + 16, // 33: cms.Post.DescPostLike:output_type -> blocks.StatusReply + 16, // 34: cms.Post.IncrPostUnlike:output_type -> blocks.StatusReply + 16, // 35: cms.Post.DescPostUnlike:output_type -> blocks.StatusReply 8, // 36: cms.Post.CommentList:output_type -> cms.CommentListResponse - 16, // 37: cms.Post.AddComment:output_type -> cms.StatusReply - 16, // 38: cms.Post.ModifyComment:output_type -> cms.StatusReply - 16, // 39: cms.Post.DeleteComment:output_type -> cms.StatusReply - 16, // 40: cms.Post.IncrCommentLike:output_type -> cms.StatusReply - 16, // 41: cms.Post.DescCommentLike:output_type -> cms.StatusReply - 16, // 42: cms.Post.IncrCommentUnlike:output_type -> cms.StatusReply - 16, // 43: cms.Post.DescCommentUnlike:output_type -> cms.StatusReply + 16, // 37: cms.Post.AddComment:output_type -> blocks.StatusReply + 16, // 38: cms.Post.ModifyComment:output_type -> blocks.StatusReply + 16, // 39: cms.Post.DeleteComment:output_type -> blocks.StatusReply + 16, // 40: cms.Post.IncrCommentLike:output_type -> blocks.StatusReply + 16, // 41: cms.Post.DescCommentLike:output_type -> blocks.StatusReply + 16, // 42: cms.Post.IncrCommentUnlike:output_type -> blocks.StatusReply + 16, // 43: cms.Post.DescCommentUnlike:output_type -> blocks.StatusReply 25, // [25:44] is the sub-list for method output_type 6, // [6:25] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name @@ -1223,27 +1213,26 @@ var file_post_proto_depIdxs = []int32{ 0, // [0:6] is the sub-list for field type_name } -func init() { file_post_proto_init() } -func file_post_proto_init() { - if File_post_proto != nil { +func init() { file_module_base_cms_proto_post_proto_init() } +func file_module_base_cms_proto_post_proto_init() { + if File_module_base_cms_proto_post_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_post_proto_rawDesc), len(file_post_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_post_proto_rawDesc), len(file_module_base_cms_proto_post_proto_rawDesc)), NumEnums: 0, NumMessages: 11, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_post_proto_goTypes, - DependencyIndexes: file_post_proto_depIdxs, - MessageInfos: file_post_proto_msgTypes, + GoTypes: file_module_base_cms_proto_post_proto_goTypes, + DependencyIndexes: file_module_base_cms_proto_post_proto_depIdxs, + MessageInfos: file_module_base_cms_proto_post_proto_msgTypes, }.Build() - File_post_proto = out.File - file_post_proto_goTypes = nil - file_post_proto_depIdxs = nil + File_module_base_cms_proto_post_proto = out.File + file_module_base_cms_proto_post_proto_goTypes = nil + file_module_base_cms_proto_post_proto_depIdxs = nil } diff --git a/module/base/cms/pb/post.pb.gw.go b/module/base/cms/pb/post.pb.gw.go index 2086acf..2dc1943 100644 --- a/module/base/cms/pb/post.pb.gw.go +++ b/module/base/cms/pb/post.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: post.proto +// source: module/base/cms/proto/post.proto /* Package cms is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package cms import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -118,7 +119,7 @@ func local_request_Post_GetByKey_0(ctx context.Context, marshaler runtime.Marsha func request_Post_Search_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq SearchRequest + protoReq blocks.CmsSearchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Post_Search_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Post_Search_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq SearchRequest + protoReq blocks.CmsSearchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -199,7 +200,7 @@ func local_request_Post_Modify_0(ctx context.Context, marshaler runtime.Marshale func request_Post_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -214,7 +215,7 @@ func request_Post_Delete_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Post_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/base/cms/pb/post_grpc.pb.go b/module/base/cms/pb/post_grpc.pb.go index 3e8bea6..e92820a 100644 --- a/module/base/cms/pb/post_grpc.pb.go +++ b/module/base/cms/pb/post_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.6.1 -// - protoc (unknown) -// source: post.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/cms/proto/post.proto package cms import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -53,37 +54,37 @@ type PostClient interface { // 获取文章详情 By Key GetByKey(ctx context.Context, in *GetPostByKeyRequest, opts ...grpc.CallOption) (*PostItem, error) // 搜索文章 - Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*PostListReply, error) + Search(ctx context.Context, in *protobuf.CmsSearchRequest, opts ...grpc.CallOption) (*PostListReply, error) // 发布文章 - Create(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 修改文章 - Modify(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) + Modify(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除文章 - Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 文章点赞处理 - IncrPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) + IncrPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 文章点赞取消处理 - DescPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) + DescPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 文章点踩处理 - IncrPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) + IncrPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 文章点踩取消处理 - DescPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) + DescPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 评论列表 CommentList(ctx context.Context, in *CommentListRequest, opts ...grpc.CallOption) (*CommentListResponse, error) // 发布评论 - AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) + AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 修改评论 - ModifyComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) + ModifyComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除评论 - DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*StatusReply, error) + DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 评论点赞处理 - IncrCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) + IncrCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 评论点赞取消处理 - DescCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) + DescCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 评论点踩处理 - IncrCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) + IncrCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 评论点踩取消处理 - DescCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) + DescCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type postClient struct { @@ -124,7 +125,7 @@ func (c *postClient) GetByKey(ctx context.Context, in *GetPostByKeyRequest, opts return out, nil } -func (c *postClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*PostListReply, error) { +func (c *postClient) Search(ctx context.Context, in *protobuf.CmsSearchRequest, opts ...grpc.CallOption) (*PostListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PostListReply) err := c.cc.Invoke(ctx, Post_Search_FullMethodName, in, out, cOpts...) @@ -134,9 +135,9 @@ func (c *postClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc return out, nil } -func (c *postClient) Create(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) Create(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -144,9 +145,9 @@ func (c *postClient) Create(ctx context.Context, in *PostItem, opts ...grpc.Call return out, nil } -func (c *postClient) Modify(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) Modify(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_Modify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -154,9 +155,9 @@ func (c *postClient) Modify(ctx context.Context, in *PostItem, opts ...grpc.Call return out, nil } -func (c *postClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -164,9 +165,9 @@ func (c *postClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc. return out, nil } -func (c *postClient) IncrPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) IncrPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_IncrPostLike_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -174,9 +175,9 @@ func (c *postClient) IncrPostLike(ctx context.Context, in *PostOpIdentityRequest return out, nil } -func (c *postClient) DescPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) DescPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_DescPostLike_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -184,9 +185,9 @@ func (c *postClient) DescPostLike(ctx context.Context, in *PostOpIdentityRequest return out, nil } -func (c *postClient) IncrPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) IncrPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_IncrPostUnlike_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -194,9 +195,9 @@ func (c *postClient) IncrPostUnlike(ctx context.Context, in *PostOpIdentityReque return out, nil } -func (c *postClient) DescPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) DescPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_DescPostUnlike_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -214,9 +215,9 @@ func (c *postClient) CommentList(ctx context.Context, in *CommentListRequest, op return out, nil } -func (c *postClient) AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_AddComment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -224,9 +225,9 @@ func (c *postClient) AddComment(ctx context.Context, in *CommentItem, opts ...gr return out, nil } -func (c *postClient) ModifyComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) ModifyComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_ModifyComment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -234,9 +235,9 @@ func (c *postClient) ModifyComment(ctx context.Context, in *CommentItem, opts .. return out, nil } -func (c *postClient) DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_DeleteComment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -244,9 +245,9 @@ func (c *postClient) DeleteComment(ctx context.Context, in *DeleteCommentRequest return out, nil } -func (c *postClient) IncrCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) IncrCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_IncrCommentLike_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -254,9 +255,9 @@ func (c *postClient) IncrCommentLike(ctx context.Context, in *CommentOpIdentityR return out, nil } -func (c *postClient) DescCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) DescCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_DescCommentLike_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -264,9 +265,9 @@ func (c *postClient) DescCommentLike(ctx context.Context, in *CommentOpIdentityR return out, nil } -func (c *postClient) IncrCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) IncrCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_IncrCommentUnlike_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -274,9 +275,9 @@ func (c *postClient) IncrCommentUnlike(ctx context.Context, in *CommentOpIdentit return out, nil } -func (c *postClient) DescCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) DescCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Post_DescCommentUnlike_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -285,7 +286,7 @@ func (c *postClient) DescCommentUnlike(ctx context.Context, in *CommentOpIdentit } // PostServer is the server API for Post service. -// All implementations must embed UnimplementedPostServer +// All implementations should embed UnimplementedPostServer // for forward compatibility. // // 正文 @@ -297,41 +298,40 @@ type PostServer interface { // 获取文章详情 By Key GetByKey(context.Context, *GetPostByKeyRequest) (*PostItem, error) // 搜索文章 - Search(context.Context, *SearchRequest) (*PostListReply, error) + Search(context.Context, *protobuf.CmsSearchRequest) (*PostListReply, error) // 发布文章 - Create(context.Context, *PostItem) (*StatusReply, error) + Create(context.Context, *PostItem) (*protobuf.StatusReply, error) // 修改文章 - Modify(context.Context, *PostItem) (*StatusReply, error) + Modify(context.Context, *PostItem) (*protobuf.StatusReply, error) // 删除文章 - Delete(context.Context, *IdentRequest) (*StatusReply, error) + Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) // 文章点赞处理 - IncrPostLike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) + IncrPostLike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error) // 文章点赞取消处理 - DescPostLike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) + DescPostLike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error) // 文章点踩处理 - IncrPostUnlike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) + IncrPostUnlike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error) // 文章点踩取消处理 - DescPostUnlike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) + DescPostUnlike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error) // 评论列表 CommentList(context.Context, *CommentListRequest) (*CommentListResponse, error) // 发布评论 - AddComment(context.Context, *CommentItem) (*StatusReply, error) + AddComment(context.Context, *CommentItem) (*protobuf.StatusReply, error) // 修改评论 - ModifyComment(context.Context, *CommentItem) (*StatusReply, error) + ModifyComment(context.Context, *CommentItem) (*protobuf.StatusReply, error) // 删除评论 - DeleteComment(context.Context, *DeleteCommentRequest) (*StatusReply, error) + DeleteComment(context.Context, *DeleteCommentRequest) (*protobuf.StatusReply, error) // 评论点赞处理 - IncrCommentLike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) + IncrCommentLike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error) // 评论点赞取消处理 - DescCommentLike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) + DescCommentLike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error) // 评论点踩处理 - IncrCommentUnlike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) + IncrCommentUnlike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error) // 评论点踩取消处理 - DescCommentUnlike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) - mustEmbedUnimplementedPostServer() + DescCommentUnlike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error) } -// UnimplementedPostServer must be embedded to have +// UnimplementedPostServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -347,56 +347,55 @@ func (UnimplementedPostServer) GetByIdentity(context.Context, *GetPostRequest) ( func (UnimplementedPostServer) GetByKey(context.Context, *GetPostByKeyRequest) (*PostItem, error) { return nil, status.Error(codes.Unimplemented, "method GetByKey not implemented") } -func (UnimplementedPostServer) Search(context.Context, *SearchRequest) (*PostListReply, error) { +func (UnimplementedPostServer) Search(context.Context, *protobuf.CmsSearchRequest) (*PostListReply, error) { return nil, status.Error(codes.Unimplemented, "method Search not implemented") } -func (UnimplementedPostServer) Create(context.Context, *PostItem) (*StatusReply, error) { +func (UnimplementedPostServer) Create(context.Context, *PostItem) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedPostServer) Modify(context.Context, *PostItem) (*StatusReply, error) { +func (UnimplementedPostServer) Modify(context.Context, *PostItem) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } -func (UnimplementedPostServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) { +func (UnimplementedPostServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedPostServer) IncrPostLike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) { +func (UnimplementedPostServer) IncrPostLike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method IncrPostLike not implemented") } -func (UnimplementedPostServer) DescPostLike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) { +func (UnimplementedPostServer) DescPostLike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method DescPostLike not implemented") } -func (UnimplementedPostServer) IncrPostUnlike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) { +func (UnimplementedPostServer) IncrPostUnlike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method IncrPostUnlike not implemented") } -func (UnimplementedPostServer) DescPostUnlike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) { +func (UnimplementedPostServer) DescPostUnlike(context.Context, *PostOpIdentityRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method DescPostUnlike not implemented") } func (UnimplementedPostServer) CommentList(context.Context, *CommentListRequest) (*CommentListResponse, error) { return nil, status.Error(codes.Unimplemented, "method CommentList not implemented") } -func (UnimplementedPostServer) AddComment(context.Context, *CommentItem) (*StatusReply, error) { +func (UnimplementedPostServer) AddComment(context.Context, *CommentItem) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method AddComment not implemented") } -func (UnimplementedPostServer) ModifyComment(context.Context, *CommentItem) (*StatusReply, error) { +func (UnimplementedPostServer) ModifyComment(context.Context, *CommentItem) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method ModifyComment not implemented") } -func (UnimplementedPostServer) DeleteComment(context.Context, *DeleteCommentRequest) (*StatusReply, error) { +func (UnimplementedPostServer) DeleteComment(context.Context, *DeleteCommentRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method DeleteComment not implemented") } -func (UnimplementedPostServer) IncrCommentLike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) { +func (UnimplementedPostServer) IncrCommentLike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method IncrCommentLike not implemented") } -func (UnimplementedPostServer) DescCommentLike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) { +func (UnimplementedPostServer) DescCommentLike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method DescCommentLike not implemented") } -func (UnimplementedPostServer) IncrCommentUnlike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) { +func (UnimplementedPostServer) IncrCommentUnlike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method IncrCommentUnlike not implemented") } -func (UnimplementedPostServer) DescCommentUnlike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) { +func (UnimplementedPostServer) DescCommentUnlike(context.Context, *CommentOpIdentityRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method DescCommentUnlike not implemented") } -func (UnimplementedPostServer) mustEmbedUnimplementedPostServer() {} -func (UnimplementedPostServer) testEmbeddedByValue() {} +func (UnimplementedPostServer) testEmbeddedByValue() {} // UnsafePostServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PostServer will @@ -471,7 +470,7 @@ func _Post_GetByKey_Handler(srv interface{}, ctx context.Context, dec func(inter } func _Post_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchRequest) + in := new(protobuf.CmsSearchRequest) if err := dec(in); err != nil { return nil, err } @@ -483,7 +482,7 @@ func _Post_Search_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Post_Search_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PostServer).Search(ctx, req.(*SearchRequest)) + return srv.(PostServer).Search(ctx, req.(*protobuf.CmsSearchRequest)) } return interceptor(ctx, in, info, handler) } @@ -525,7 +524,7 @@ func _Post_Modify_Handler(srv interface{}, ctx context.Context, dec func(interfa } func _Post_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -537,7 +536,7 @@ func _Post_Delete_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Post_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PostServer).Delete(ctx, req.(*IdentRequest)) + return srv.(PostServer).Delete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -843,5 +842,5 @@ var Post_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "post.proto", + Metadata: "module/base/cms/proto/post.proto", } diff --git a/module/base/cms/pb/site.pb.go b/module/base/cms/pb/site.pb.go index e27fa6a..b9816fb 100644 --- a/module/base/cms/pb/site.pb.go +++ b/module/base/cms/pb/site.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc (unknown) -// source: site.proto +// protoc v7.35.0 +// source: module/base/cms/proto/site.proto package cms import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -34,7 +35,7 @@ type SiteListReply struct { func (x *SiteListReply) Reset() { *x = SiteListReply{} - mi := &file_site_proto_msgTypes[0] + mi := &file_module_base_cms_proto_site_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +47,7 @@ func (x *SiteListReply) String() string { func (*SiteListReply) ProtoMessage() {} func (x *SiteListReply) ProtoReflect() protoreflect.Message { - mi := &file_site_proto_msgTypes[0] + mi := &file_module_base_cms_proto_site_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +60,7 @@ func (x *SiteListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SiteListReply.ProtoReflect.Descriptor instead. func (*SiteListReply) Descriptor() ([]byte, []int) { - return file_site_proto_rawDescGZIP(), []int{0} + return file_module_base_cms_proto_site_proto_rawDescGZIP(), []int{0} } func (x *SiteListReply) GetData() []*SiteItem { @@ -95,7 +96,7 @@ type SiteItem struct { func (x *SiteItem) Reset() { *x = SiteItem{} - mi := &file_site_proto_msgTypes[1] + mi := &file_module_base_cms_proto_site_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -107,7 +108,7 @@ func (x *SiteItem) String() string { func (*SiteItem) ProtoMessage() {} func (x *SiteItem) ProtoReflect() protoreflect.Message { - mi := &file_site_proto_msgTypes[1] + mi := &file_module_base_cms_proto_site_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -120,7 +121,7 @@ func (x *SiteItem) ProtoReflect() protoreflect.Message { // Deprecated: Use SiteItem.ProtoReflect.Descriptor instead. func (*SiteItem) Descriptor() ([]byte, []int) { - return file_site_proto_rawDescGZIP(), []int{1} + return file_module_base_cms_proto_site_proto_rawDescGZIP(), []int{1} } func (x *SiteItem) GetId() int64 { @@ -193,12 +194,11 @@ func (x *SiteItem) GetConfigs() string { return "" } -var File_site_proto protoreflect.FileDescriptor +var File_module_base_cms_proto_site_proto protoreflect.FileDescriptor -const file_site_proto_rawDesc = "" + +const file_module_base_cms_proto_site_proto_rawDesc = "" + "\n" + - "\x13" + - "base/cms/site.proto\x12\x03cms\x1a\x10cms/blocks.proto\"H\n" + + " module/base/cms/proto/site.proto\x12\x03cms\x1a\x15protobuf/blocks.proto\"H\n" + "\rSiteListReply\x12!\n" + "\x04data\x18\x01 \x03(\v2\r.cms.SiteItemR\x04data\x12\x14\n" + "\x05count\x18\x02 \x01(\x03R\x05count\"\x82\x02\n" + @@ -213,47 +213,46 @@ const file_site_proto_rawDesc = "" + "\x03seo\x18\b \x01(\tR\x03seo\x12\x14\n" + "\x05theme\x18\t \x01(\tR\x05theme\x12\x18\n" + "\aconfigs\x18\n" + - " \x01(\tR\aconfigs2\xe7\x01\n" + - "\x04Site\x12)\n" + - "\x05Fetch\x12\n" + - ".cms.Empty\x1a\x12.cms.SiteListReply\"\x00\x12)\n" + - "\x03Get\x12\x11.cms.IdentRequest\x1a\r.cms.SiteItem\"\x00\x12+\n" + - "\x06Create\x12\r.cms.SiteItem\x1a\x10.cms.StatusReply\"\x00\x12+\n" + - "\x06Modify\x12\r.cms.SiteItem\x1a\x10.cms.StatusReply\"\x00\x12/\n" + - "\x06Delete\x12\x11.cms.IdentRequest\x1a\x10.cms.StatusReply\"\x00B\aZ\x05.;cmsb\x06proto3" + " \x01(\tR\aconfigs2\xf9\x01\n" + + "\x04Site\x12,\n" + + "\x05Fetch\x12\r.blocks.Empty\x1a\x12.cms.SiteListReply\"\x00\x12,\n" + + "\x03Get\x12\x14.blocks.IdentRequest\x1a\r.cms.SiteItem\"\x00\x12.\n" + + "\x06Create\x12\r.cms.SiteItem\x1a\x13.blocks.StatusReply\"\x00\x12.\n" + + "\x06Modify\x12\r.cms.SiteItem\x1a\x13.blocks.StatusReply\"\x00\x125\n" + + "\x06Delete\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\"\x00B!Z\x1fbsm/full/module/base/cms/pb;cmsb\x06proto3" var ( - file_site_proto_rawDescOnce sync.Once - file_site_proto_rawDescData []byte + file_module_base_cms_proto_site_proto_rawDescOnce sync.Once + file_module_base_cms_proto_site_proto_rawDescData []byte ) -func file_site_proto_rawDescGZIP() []byte { - file_site_proto_rawDescOnce.Do(func() { - file_site_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_site_proto_rawDesc), len(file_site_proto_rawDesc))) +func file_module_base_cms_proto_site_proto_rawDescGZIP() []byte { + file_module_base_cms_proto_site_proto_rawDescOnce.Do(func() { + file_module_base_cms_proto_site_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_site_proto_rawDesc), len(file_module_base_cms_proto_site_proto_rawDesc))) }) - return file_site_proto_rawDescData + return file_module_base_cms_proto_site_proto_rawDescData } -var file_site_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_site_proto_goTypes = []any{ - (*SiteListReply)(nil), // 0: cms.SiteListReply - (*SiteItem)(nil), // 1: cms.SiteItem - (*Empty)(nil), // 2: cms.Empty - (*IdentRequest)(nil), // 3: cms.IdentRequest - (*StatusReply)(nil), // 4: cms.StatusReply +var file_module_base_cms_proto_site_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_module_base_cms_proto_site_proto_goTypes = []any{ + (*SiteListReply)(nil), // 0: cms.SiteListReply + (*SiteItem)(nil), // 1: cms.SiteItem + (*protobuf.Empty)(nil), // 2: blocks.Empty + (*protobuf.IdentRequest)(nil), // 3: blocks.IdentRequest + (*protobuf.StatusReply)(nil), // 4: blocks.StatusReply } -var file_site_proto_depIdxs = []int32{ +var file_module_base_cms_proto_site_proto_depIdxs = []int32{ 1, // 0: cms.SiteListReply.data:type_name -> cms.SiteItem - 2, // 1: cms.Site.Fetch:input_type -> cms.Empty - 3, // 2: cms.Site.Get:input_type -> cms.IdentRequest + 2, // 1: cms.Site.Fetch:input_type -> blocks.Empty + 3, // 2: cms.Site.Get:input_type -> blocks.IdentRequest 1, // 3: cms.Site.Create:input_type -> cms.SiteItem 1, // 4: cms.Site.Modify:input_type -> cms.SiteItem - 3, // 5: cms.Site.Delete:input_type -> cms.IdentRequest + 3, // 5: cms.Site.Delete:input_type -> blocks.IdentRequest 0, // 6: cms.Site.Fetch:output_type -> cms.SiteListReply 1, // 7: cms.Site.Get:output_type -> cms.SiteItem - 4, // 8: cms.Site.Create:output_type -> cms.StatusReply - 4, // 9: cms.Site.Modify:output_type -> cms.StatusReply - 4, // 10: cms.Site.Delete:output_type -> cms.StatusReply + 4, // 8: cms.Site.Create:output_type -> blocks.StatusReply + 4, // 9: cms.Site.Modify:output_type -> blocks.StatusReply + 4, // 10: cms.Site.Delete:output_type -> blocks.StatusReply 6, // [6:11] is the sub-list for method output_type 1, // [1:6] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -261,27 +260,26 @@ var file_site_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_site_proto_init() } -func file_site_proto_init() { - if File_site_proto != nil { +func init() { file_module_base_cms_proto_site_proto_init() } +func file_module_base_cms_proto_site_proto_init() { + if File_module_base_cms_proto_site_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_site_proto_rawDesc), len(file_site_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_site_proto_rawDesc), len(file_module_base_cms_proto_site_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_site_proto_goTypes, - DependencyIndexes: file_site_proto_depIdxs, - MessageInfos: file_site_proto_msgTypes, + GoTypes: file_module_base_cms_proto_site_proto_goTypes, + DependencyIndexes: file_module_base_cms_proto_site_proto_depIdxs, + MessageInfos: file_module_base_cms_proto_site_proto_msgTypes, }.Build() - File_site_proto = out.File - file_site_proto_goTypes = nil - file_site_proto_depIdxs = nil + File_module_base_cms_proto_site_proto = out.File + file_module_base_cms_proto_site_proto_goTypes = nil + file_module_base_cms_proto_site_proto_depIdxs = nil } diff --git a/module/base/cms/pb/site.pb.gw.go b/module/base/cms/pb/site.pb.gw.go index c915a8a..f7c0454 100644 --- a/module/base/cms/pb/site.pb.gw.go +++ b/module/base/cms/pb/site.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: site.proto +// source: module/base/cms/proto/site.proto /* Package cms is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package cms import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Site_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client SiteClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Site_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, clie func local_request_Site_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server SiteServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -64,7 +65,7 @@ func local_request_Site_Fetch_0(ctx context.Context, marshaler runtime.Marshaler func request_Site_Get_0(ctx context.Context, marshaler runtime.Marshaler, client SiteClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Site_Get_0(ctx context.Context, marshaler runtime.Marshaler, client func local_request_Site_Get_0(ctx context.Context, marshaler runtime.Marshaler, server SiteServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -145,7 +146,7 @@ func local_request_Site_Modify_0(ctx context.Context, marshaler runtime.Marshale func request_Site_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client SiteClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -160,7 +161,7 @@ func request_Site_Delete_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Site_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server SiteServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/base/cms/pb/site_grpc.pb.go b/module/base/cms/pb/site_grpc.pb.go index a9b990d..ec44410 100644 --- a/module/base/cms/pb/site_grpc.pb.go +++ b/module/base/cms/pb/site_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.6.1 -// - protoc (unknown) -// source: site.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/cms/proto/site.proto package cms import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -33,15 +34,15 @@ const ( // CMS - 站点 type SiteClient interface { // 站点列表 - Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SiteListReply, error) + Fetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*SiteListReply, error) // 站点详情 - Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*SiteItem, error) + Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*SiteItem, error) // 添加站点 - Create(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 修改站点 - Modify(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*StatusReply, error) + Modify(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除站点 - Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type siteClient struct { @@ -52,7 +53,7 @@ func NewSiteClient(cc grpc.ClientConnInterface) SiteClient { return &siteClient{cc} } -func (c *siteClient) Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SiteListReply, error) { +func (c *siteClient) Fetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*SiteListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SiteListReply) err := c.cc.Invoke(ctx, Site_Fetch_FullMethodName, in, out, cOpts...) @@ -62,7 +63,7 @@ func (c *siteClient) Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOpti return out, nil } -func (c *siteClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*SiteItem, error) { +func (c *siteClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*SiteItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SiteItem) err := c.cc.Invoke(ctx, Site_Get_FullMethodName, in, out, cOpts...) @@ -72,9 +73,9 @@ func (c *siteClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.Cal return out, nil } -func (c *siteClient) Create(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *siteClient) Create(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Site_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -82,9 +83,9 @@ func (c *siteClient) Create(ctx context.Context, in *SiteItem, opts ...grpc.Call return out, nil } -func (c *siteClient) Modify(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *siteClient) Modify(ctx context.Context, in *SiteItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Site_Modify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -92,9 +93,9 @@ func (c *siteClient) Modify(ctx context.Context, in *SiteItem, opts ...grpc.Call return out, nil } -func (c *siteClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *siteClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Site_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -103,48 +104,46 @@ func (c *siteClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc. } // SiteServer is the server API for Site service. -// All implementations must embed UnimplementedSiteServer +// All implementations should embed UnimplementedSiteServer // for forward compatibility. // // CMS - 站点 type SiteServer interface { // 站点列表 - Fetch(context.Context, *Empty) (*SiteListReply, error) + Fetch(context.Context, *protobuf.Empty) (*SiteListReply, error) // 站点详情 - Get(context.Context, *IdentRequest) (*SiteItem, error) + Get(context.Context, *protobuf.IdentRequest) (*SiteItem, error) // 添加站点 - Create(context.Context, *SiteItem) (*StatusReply, error) + Create(context.Context, *SiteItem) (*protobuf.StatusReply, error) // 修改站点 - Modify(context.Context, *SiteItem) (*StatusReply, error) + Modify(context.Context, *SiteItem) (*protobuf.StatusReply, error) // 删除站点 - Delete(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedSiteServer() + Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) } -// UnimplementedSiteServer must be embedded to have +// UnimplementedSiteServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedSiteServer struct{} -func (UnimplementedSiteServer) Fetch(context.Context, *Empty) (*SiteListReply, error) { +func (UnimplementedSiteServer) Fetch(context.Context, *protobuf.Empty) (*SiteListReply, error) { return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedSiteServer) Get(context.Context, *IdentRequest) (*SiteItem, error) { +func (UnimplementedSiteServer) Get(context.Context, *protobuf.IdentRequest) (*SiteItem, error) { return nil, status.Error(codes.Unimplemented, "method Get not implemented") } -func (UnimplementedSiteServer) Create(context.Context, *SiteItem) (*StatusReply, error) { +func (UnimplementedSiteServer) Create(context.Context, *SiteItem) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedSiteServer) Modify(context.Context, *SiteItem) (*StatusReply, error) { +func (UnimplementedSiteServer) Modify(context.Context, *SiteItem) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } -func (UnimplementedSiteServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) { +func (UnimplementedSiteServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedSiteServer) mustEmbedUnimplementedSiteServer() {} -func (UnimplementedSiteServer) testEmbeddedByValue() {} +func (UnimplementedSiteServer) testEmbeddedByValue() {} // UnsafeSiteServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SiteServer will @@ -165,7 +164,7 @@ func RegisterSiteServer(s grpc.ServiceRegistrar, srv SiteServer) { } func _Site_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -177,13 +176,13 @@ func _Site_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interfac FullMethod: Site_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SiteServer).Fetch(ctx, req.(*Empty)) + return srv.(SiteServer).Fetch(ctx, req.(*protobuf.Empty)) } return interceptor(ctx, in, info, handler) } func _Site_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -195,7 +194,7 @@ func _Site_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{ FullMethod: Site_Get_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SiteServer).Get(ctx, req.(*IdentRequest)) + return srv.(SiteServer).Get(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -237,7 +236,7 @@ func _Site_Modify_Handler(srv interface{}, ctx context.Context, dec func(interfa } func _Site_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -249,7 +248,7 @@ func _Site_Delete_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Site_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SiteServer).Delete(ctx, req.(*IdentRequest)) + return srv.(SiteServer).Delete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -283,5 +282,5 @@ var Site_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "site.proto", + Metadata: "module/base/cms/proto/site.proto", } diff --git a/module/base/cms/pb/tags.pb.go b/module/base/cms/pb/tags.pb.go index 5f0791c..358c1e1 100644 --- a/module/base/cms/pb/tags.pb.go +++ b/module/base/cms/pb/tags.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc (unknown) -// source: tags.proto +// protoc v7.35.0 +// source: module/base/cms/proto/tags.proto package cms import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,16 +24,16 @@ const ( // 标签列表 type TagsListReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Data []*TagsItem `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` // 数据 - Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // 总数 + state protoimpl.MessageState `protogen:"open.v1"` + Data []*protobuf.CmsTagsItem `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` // 数据 + Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // 总数 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *TagsListReply) Reset() { *x = TagsListReply{} - mi := &file_tags_proto_msgTypes[0] + mi := &file_module_base_cms_proto_tags_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +45,7 @@ func (x *TagsListReply) String() string { func (*TagsListReply) ProtoMessage() {} func (x *TagsListReply) ProtoReflect() protoreflect.Message { - mi := &file_tags_proto_msgTypes[0] + mi := &file_module_base_cms_proto_tags_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,10 +58,10 @@ func (x *TagsListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use TagsListReply.ProtoReflect.Descriptor instead. func (*TagsListReply) Descriptor() ([]byte, []int) { - return file_tags_proto_rawDescGZIP(), []int{0} + return file_module_base_cms_proto_tags_proto_rawDescGZIP(), []int{0} } -func (x *TagsListReply) GetData() []*TagsItem { +func (x *TagsListReply) GetData() []*protobuf.CmsTagsItem { if x != nil { return x.Data } @@ -74,50 +75,49 @@ func (x *TagsListReply) GetCount() int64 { return 0 } -var File_tags_proto protoreflect.FileDescriptor +var File_module_base_cms_proto_tags_proto protoreflect.FileDescriptor -const file_tags_proto_rawDesc = "" + +const file_module_base_cms_proto_tags_proto_rawDesc = "" + "\n" + - "\x13" + - "base/cms/tags.proto\x12\x03cms\x1a\x10cms/blocks.proto\"H\n" + - "\rTagsListReply\x12!\n" + - "\x04data\x18\x01 \x03(\v2\r.cms.TagsItemR\x04data\x12\x14\n" + - "\x05count\x18\x02 \x01(\x03R\x05count2\xc3\x01\n" + - "\x04Tags\x120\n" + - "\x05Fetch\x12\x11.cms.IdentRequest\x1a\x12.cms.TagsListReply\"\x00\x12+\n" + - "\x06Create\x12\r.cms.TagsItem\x1a\x10.cms.StatusReply\"\x00\x12+\n" + - "\x06Modify\x12\r.cms.TagsItem\x1a\x10.cms.StatusReply\"\x00\x12/\n" + - "\x06Delete\x12\x11.cms.IdentRequest\x1a\x10.cms.StatusReply\"\x00B\aZ\x05.;cmsb\x06proto3" + " module/base/cms/proto/tags.proto\x12\x03cms\x1a\x15protobuf/blocks.proto\"N\n" + + "\rTagsListReply\x12'\n" + + "\x04data\x18\x01 \x03(\v2\x13.blocks.CmsTagsItemR\x04data\x12\x14\n" + + "\x05count\x18\x02 \x01(\x03R\x05count2\xde\x01\n" + + "\x04Tags\x123\n" + + "\x05Fetch\x12\x14.blocks.IdentRequest\x1a\x12.cms.TagsListReply\"\x00\x124\n" + + "\x06Create\x12\x13.blocks.CmsTagsItem\x1a\x13.blocks.StatusReply\"\x00\x124\n" + + "\x06Modify\x12\x13.blocks.CmsTagsItem\x1a\x13.blocks.StatusReply\"\x00\x125\n" + + "\x06Delete\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\"\x00B!Z\x1fbsm/full/module/base/cms/pb;cmsb\x06proto3" var ( - file_tags_proto_rawDescOnce sync.Once - file_tags_proto_rawDescData []byte + file_module_base_cms_proto_tags_proto_rawDescOnce sync.Once + file_module_base_cms_proto_tags_proto_rawDescData []byte ) -func file_tags_proto_rawDescGZIP() []byte { - file_tags_proto_rawDescOnce.Do(func() { - file_tags_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_tags_proto_rawDesc), len(file_tags_proto_rawDesc))) +func file_module_base_cms_proto_tags_proto_rawDescGZIP() []byte { + file_module_base_cms_proto_tags_proto_rawDescOnce.Do(func() { + file_module_base_cms_proto_tags_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_tags_proto_rawDesc), len(file_module_base_cms_proto_tags_proto_rawDesc))) }) - return file_tags_proto_rawDescData + return file_module_base_cms_proto_tags_proto_rawDescData } -var file_tags_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_tags_proto_goTypes = []any{ - (*TagsListReply)(nil), // 0: cms.TagsListReply - (*TagsItem)(nil), // 1: cms.TagsItem - (*IdentRequest)(nil), // 2: cms.IdentRequest - (*StatusReply)(nil), // 3: cms.StatusReply +var file_module_base_cms_proto_tags_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_module_base_cms_proto_tags_proto_goTypes = []any{ + (*TagsListReply)(nil), // 0: cms.TagsListReply + (*protobuf.CmsTagsItem)(nil), // 1: blocks.CmsTagsItem + (*protobuf.IdentRequest)(nil), // 2: blocks.IdentRequest + (*protobuf.StatusReply)(nil), // 3: blocks.StatusReply } -var file_tags_proto_depIdxs = []int32{ - 1, // 0: cms.TagsListReply.data:type_name -> cms.TagsItem - 2, // 1: cms.Tags.Fetch:input_type -> cms.IdentRequest - 1, // 2: cms.Tags.Create:input_type -> cms.TagsItem - 1, // 3: cms.Tags.Modify:input_type -> cms.TagsItem - 2, // 4: cms.Tags.Delete:input_type -> cms.IdentRequest +var file_module_base_cms_proto_tags_proto_depIdxs = []int32{ + 1, // 0: cms.TagsListReply.data:type_name -> blocks.CmsTagsItem + 2, // 1: cms.Tags.Fetch:input_type -> blocks.IdentRequest + 1, // 2: cms.Tags.Create:input_type -> blocks.CmsTagsItem + 1, // 3: cms.Tags.Modify:input_type -> blocks.CmsTagsItem + 2, // 4: cms.Tags.Delete:input_type -> blocks.IdentRequest 0, // 5: cms.Tags.Fetch:output_type -> cms.TagsListReply - 3, // 6: cms.Tags.Create:output_type -> cms.StatusReply - 3, // 7: cms.Tags.Modify:output_type -> cms.StatusReply - 3, // 8: cms.Tags.Delete:output_type -> cms.StatusReply + 3, // 6: cms.Tags.Create:output_type -> blocks.StatusReply + 3, // 7: cms.Tags.Modify:output_type -> blocks.StatusReply + 3, // 8: cms.Tags.Delete:output_type -> blocks.StatusReply 5, // [5:9] is the sub-list for method output_type 1, // [1:5] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -125,27 +125,26 @@ var file_tags_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_tags_proto_init() } -func file_tags_proto_init() { - if File_tags_proto != nil { +func init() { file_module_base_cms_proto_tags_proto_init() } +func file_module_base_cms_proto_tags_proto_init() { + if File_module_base_cms_proto_tags_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_tags_proto_rawDesc), len(file_tags_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_cms_proto_tags_proto_rawDesc), len(file_module_base_cms_proto_tags_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_tags_proto_goTypes, - DependencyIndexes: file_tags_proto_depIdxs, - MessageInfos: file_tags_proto_msgTypes, + GoTypes: file_module_base_cms_proto_tags_proto_goTypes, + DependencyIndexes: file_module_base_cms_proto_tags_proto_depIdxs, + MessageInfos: file_module_base_cms_proto_tags_proto_msgTypes, }.Build() - File_tags_proto = out.File - file_tags_proto_goTypes = nil - file_tags_proto_depIdxs = nil + File_module_base_cms_proto_tags_proto = out.File + file_module_base_cms_proto_tags_proto_goTypes = nil + file_module_base_cms_proto_tags_proto_depIdxs = nil } diff --git a/module/base/cms/pb/tags.pb.gw.go b/module/base/cms/pb/tags.pb.gw.go index 92038ab..41717a3 100644 --- a/module/base/cms/pb/tags.pb.gw.go +++ b/module/base/cms/pb/tags.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: tags.proto +// source: module/base/cms/proto/tags.proto /* Package cms is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package cms import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Tags_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client TagsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Tags_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, clie func local_request_Tags_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server TagsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -64,7 +65,7 @@ func local_request_Tags_Fetch_0(ctx context.Context, marshaler runtime.Marshaler func request_Tags_Create_0(ctx context.Context, marshaler runtime.Marshaler, client TagsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq TagsItem + protoReq blocks.CmsTagsItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Tags_Create_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Tags_Create_0(ctx context.Context, marshaler runtime.Marshaler, server TagsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq TagsItem + protoReq blocks.CmsTagsItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -91,7 +92,7 @@ func local_request_Tags_Create_0(ctx context.Context, marshaler runtime.Marshale func request_Tags_Modify_0(ctx context.Context, marshaler runtime.Marshaler, client TagsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq TagsItem + protoReq blocks.CmsTagsItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Tags_Modify_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Tags_Modify_0(ctx context.Context, marshaler runtime.Marshaler, server TagsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq TagsItem + protoReq blocks.CmsTagsItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -118,7 +119,7 @@ func local_request_Tags_Modify_0(ctx context.Context, marshaler runtime.Marshale func request_Tags_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client TagsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Tags_Delete_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Tags_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server TagsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/base/cms/pb/tags_grpc.pb.go b/module/base/cms/pb/tags_grpc.pb.go index f9541bc..216796f 100644 --- a/module/base/cms/pb/tags_grpc.pb.go +++ b/module/base/cms/pb/tags_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.6.1 -// - protoc (unknown) -// source: tags.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/cms/proto/tags.proto package cms import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -32,13 +33,13 @@ const ( // 标签 type TagsClient interface { // 标签列表 - Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*TagsListReply, error) + Fetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*TagsListReply, error) // 创建标签 - Create(ctx context.Context, in *TagsItem, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *protobuf.CmsTagsItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 修改标签 - Modify(ctx context.Context, in *TagsItem, opts ...grpc.CallOption) (*StatusReply, error) + Modify(ctx context.Context, in *protobuf.CmsTagsItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除标签 - Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type tagsClient struct { @@ -49,7 +50,7 @@ func NewTagsClient(cc grpc.ClientConnInterface) TagsClient { return &tagsClient{cc} } -func (c *tagsClient) Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*TagsListReply, error) { +func (c *tagsClient) Fetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*TagsListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(TagsListReply) err := c.cc.Invoke(ctx, Tags_Fetch_FullMethodName, in, out, cOpts...) @@ -59,9 +60,9 @@ func (c *tagsClient) Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.C return out, nil } -func (c *tagsClient) Create(ctx context.Context, in *TagsItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *tagsClient) Create(ctx context.Context, in *protobuf.CmsTagsItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Tags_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -69,9 +70,9 @@ func (c *tagsClient) Create(ctx context.Context, in *TagsItem, opts ...grpc.Call return out, nil } -func (c *tagsClient) Modify(ctx context.Context, in *TagsItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *tagsClient) Modify(ctx context.Context, in *protobuf.CmsTagsItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Tags_Modify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -79,9 +80,9 @@ func (c *tagsClient) Modify(ctx context.Context, in *TagsItem, opts ...grpc.Call return out, nil } -func (c *tagsClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *tagsClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Tags_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -90,43 +91,41 @@ func (c *tagsClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc. } // TagsServer is the server API for Tags service. -// All implementations must embed UnimplementedTagsServer +// All implementations should embed UnimplementedTagsServer // for forward compatibility. // // 标签 type TagsServer interface { // 标签列表 - Fetch(context.Context, *IdentRequest) (*TagsListReply, error) + Fetch(context.Context, *protobuf.IdentRequest) (*TagsListReply, error) // 创建标签 - Create(context.Context, *TagsItem) (*StatusReply, error) + Create(context.Context, *protobuf.CmsTagsItem) (*protobuf.StatusReply, error) // 修改标签 - Modify(context.Context, *TagsItem) (*StatusReply, error) + Modify(context.Context, *protobuf.CmsTagsItem) (*protobuf.StatusReply, error) // 删除标签 - Delete(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedTagsServer() + Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) } -// UnimplementedTagsServer must be embedded to have +// UnimplementedTagsServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedTagsServer struct{} -func (UnimplementedTagsServer) Fetch(context.Context, *IdentRequest) (*TagsListReply, error) { +func (UnimplementedTagsServer) Fetch(context.Context, *protobuf.IdentRequest) (*TagsListReply, error) { return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedTagsServer) Create(context.Context, *TagsItem) (*StatusReply, error) { +func (UnimplementedTagsServer) Create(context.Context, *protobuf.CmsTagsItem) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedTagsServer) Modify(context.Context, *TagsItem) (*StatusReply, error) { +func (UnimplementedTagsServer) Modify(context.Context, *protobuf.CmsTagsItem) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } -func (UnimplementedTagsServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) { +func (UnimplementedTagsServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedTagsServer) mustEmbedUnimplementedTagsServer() {} -func (UnimplementedTagsServer) testEmbeddedByValue() {} +func (UnimplementedTagsServer) testEmbeddedByValue() {} // UnsafeTagsServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TagsServer will @@ -147,7 +146,7 @@ func RegisterTagsServer(s grpc.ServiceRegistrar, srv TagsServer) { } func _Tags_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -159,13 +158,13 @@ func _Tags_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interfac FullMethod: Tags_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagsServer).Fetch(ctx, req.(*IdentRequest)) + return srv.(TagsServer).Fetch(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Tags_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TagsItem) + in := new(protobuf.CmsTagsItem) if err := dec(in); err != nil { return nil, err } @@ -177,13 +176,13 @@ func _Tags_Create_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Tags_Create_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagsServer).Create(ctx, req.(*TagsItem)) + return srv.(TagsServer).Create(ctx, req.(*protobuf.CmsTagsItem)) } return interceptor(ctx, in, info, handler) } func _Tags_Modify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TagsItem) + in := new(protobuf.CmsTagsItem) if err := dec(in); err != nil { return nil, err } @@ -195,13 +194,13 @@ func _Tags_Modify_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Tags_Modify_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagsServer).Modify(ctx, req.(*TagsItem)) + return srv.(TagsServer).Modify(ctx, req.(*protobuf.CmsTagsItem)) } return interceptor(ctx, in, info, handler) } func _Tags_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -213,7 +212,7 @@ func _Tags_Delete_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Tags_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagsServer).Delete(ctx, req.(*IdentRequest)) + return srv.(TagsServer).Delete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -243,5 +242,5 @@ var Tags_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "tags.proto", + Metadata: "module/base/cms/proto/tags.proto", } diff --git a/module/base/cms/proto/blocks.proto b/module/base/cms/proto/blocks.proto deleted file mode 100644 index 322d1b9..0000000 --- a/module/base/cms/proto/blocks.proto +++ /dev/null @@ -1,73 +0,0 @@ -syntax = "proto3"; -package cms; -option go_package = ".;cms"; - -// 列表请求参数 -message FetchRequest { - int64 page_no = 1 [json_name = "page_no"]; // 页数 - int64 page_size = 2 [json_name = "page_size"]; // 每页记录数 - map params = 3; // 条件参数,key=val,eg key:category_id=?,vlaue=11 -} - -// 唯一标识请求参数 -message IdentRequest{ - int64 id = 1; // 唯一ID - string identity = 2; // 唯一标识 -} - -// 时序版本号请求参数 -message VersionRequest { - int64 version = 1; // 时序版本号 -} - -// 搜索请求参数 -message SearchRequest { - string keyword = 1; //<必传>, 关键词 - int64 page_no = 2 [json_name = "page_no"]; // 页数 - int64 page_size = 3 [json_name = "page_size"]; // 每页记录数 -} - -message StatusReply{ - int32 code = 1; // 状态码 - string message = 2; // 状态说明 - string details = 3; // 数据 - int64 timeseq = 4; // 响应时间序列 -} - -// 空结构请求 -message Empty{ -} - -// 分类 -message CategoryItem{ - string site_identity = 1 [json_name = "site_identity"]; - int64 id = 2; - string identity = 3; // 唯一标识 - int64 parent_id = 4 [json_name = "parent_id"]; // 为空表示顶级分类 - string title = 5; // 标题 - string cover_path = 6 [json_name = "cover_path"]; // 封面图片 - string intro = 7; // 简介 - string created_at = 8 [json_name = "created_at"]; // 创建时间 - string updated_at = 9 [json_name = "updated_at"]; // 更新时间 - repeated CategoryItem child = 10; // 子集 - string category_key = 11 [json_name = "category_key"];// 分类标识 - -} - -// 标签 -message TagsItem{ - int64 id = 1; - string identity = 2; // 唯一标识 - string title = 3; // 标题 - string cover_path = 4 [json_name = "cover_path"]; // 封面图片 - string intro = 5; // 简介 - string created_at = 6 [json_name = "created_at"]; //创建时间 -} - -// 附件 -message AccessoryItem{ - string identity = 1; // 唯一标识 - string title = 2; // 附件标题 - string file_path = 3 [json_name = "file_path"]; // 附件文件路径 - string created_at = 4 [json_name = "created_at"]; //创建时间 -} diff --git a/module/base/cms/proto/category.proto b/module/base/cms/proto/category.proto index b0cdcd9..fb55fbe 100644 --- a/module/base/cms/proto/category.proto +++ b/module/base/cms/proto/category.proto @@ -1,27 +1,27 @@ syntax = "proto3"; package cms; -option go_package = ".;cms"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/cms/pb;cms"; +import "protobuf/blocks.proto"; // CMS - 分类 service Category { // 分类列表 - rpc Fetch (IdentRequest) returns (CategoryListReply) {}; + rpc Fetch (blocks.IdentRequest) returns (CategoryListReply) {}; // 添加分类 - rpc Create (CategoryItem) returns (StatusReply) {}; + rpc Create (blocks.CmsCategoryItem) returns (blocks.StatusReply) {}; // 修改分类 - rpc Modify (ModifyCategoryRequest) returns (StatusReply) {}; + rpc Modify (ModifyCategoryRequest) returns (blocks.StatusReply) {}; // 删除分类 - rpc Delete (DeleteCategoryRequest) returns (StatusReply) {}; + rpc Delete (DeleteCategoryRequest) returns (blocks.StatusReply) {}; } // 分类列表 message CategoryListReply { // 数据 - repeated CategoryItem data = 1; + repeated blocks.CmsCategoryItem data = 1; // 总数 int64 count = 2; } @@ -41,7 +41,7 @@ message AddCategoryRequest{ string intro = 6; // 简介 string created_at = 7 [json_name = "created_at"]; // 创建时间 string updated_at = 8 [json_name = "updated_at"]; // 更新时间 - repeated CategoryItem data = 9; // 子集 + repeated blocks.CmsCategoryItem data = 9; // 子集 } // 修改分类请求 @@ -54,7 +54,7 @@ message ModifyCategoryRequest{ string intro = 6; // 简介 string created_at = 7 [json_name = "created_at"]; // 创建时间 string updated_at = 8 [json_name = "updated_at"]; // 更新时间 - repeated CategoryItem data = 9; // 子集 + repeated blocks.CmsCategoryItem data = 9; // 子集 string category_key = 10[json_name = "category_key"]; // 分类标识 } diff --git a/module/base/cms/proto/pages.proto b/module/base/cms/proto/pages.proto index c1247dc..2a04763 100644 --- a/module/base/cms/proto/pages.proto +++ b/module/base/cms/proto/pages.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package cms; -option go_package = ".;cms"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/cms/pb;cms"; +import "protobuf/blocks.proto"; // 单页管理 service Pages{ @@ -15,13 +15,13 @@ service Pages{ rpc GetByKey (GetPagesByKeyRequest) returns (PagesItem) {}; //发布单页 - rpc Create(PagesItem) returns (StatusReply) {}; + rpc Create(PagesItem) returns (blocks.StatusReply) {}; //修改单页 - rpc Modify(PagesItem) returns (StatusReply) {}; + rpc Modify(PagesItem) returns (blocks.StatusReply) {}; //删除单页 - rpc Delete(IdentRequest) returns (StatusReply) {}; + rpc Delete(blocks.IdentRequest) returns (blocks.StatusReply) {}; } // 根据KEY获取内容请求 @@ -45,8 +45,8 @@ message PagesItem{ bool has_accessory = 12 [json_name = "has_accessory"]; //是否有附件,默认没有 repeated string accessory_identity_array = 13 [json_name = "accessory_identity_array"]; //附件Identity 列表 - repeated AccessoryItem accessory_data = 14 [json_name = "accessory_data"]; //附件数据 - repeated TagsItem tags_data = 15 [json_name = "tags_data"]; // 标签数据 + repeated blocks.CmsAccessoryItem accessory_data = 14 [json_name = "accessory_data"]; //附件数据 + repeated blocks.CmsTagsItem tags_data = 15 [json_name = "tags_data"]; // 标签数据 repeated string tags_identity_array = 16 [json_name = "tags_identity_array"]; // 标签集Identity 列表 int64 hits = 17; //点击量 } diff --git a/module/base/cms/proto/post.proto b/module/base/cms/proto/post.proto index 2f492f4..430520f 100644 --- a/module/base/cms/proto/post.proto +++ b/module/base/cms/proto/post.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package cms; -option go_package = ".;cms"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/cms/pb;cms"; +import "protobuf/blocks.proto"; // 正文 service Post{ @@ -15,52 +15,52 @@ service Post{ rpc GetByKey (GetPostByKeyRequest) returns (PostItem) {}; //搜索文章 - rpc Search (SearchRequest) returns (PostListReply) {}; + rpc Search (blocks.CmsSearchRequest) returns (PostListReply) {}; //发布文章 - rpc Create(PostItem) returns (StatusReply) {}; + rpc Create(PostItem) returns (blocks.StatusReply) {}; //修改文章 - rpc Modify(PostItem) returns (StatusReply) {}; + rpc Modify(PostItem) returns (blocks.StatusReply) {}; //删除文章 - rpc Delete(IdentRequest) returns (StatusReply) {}; + rpc Delete(blocks.IdentRequest) returns (blocks.StatusReply) {}; // 文章点赞处理 - rpc IncrPostLike(PostOpIdentityRequest) returns (StatusReply) {}; + rpc IncrPostLike(PostOpIdentityRequest) returns (blocks.StatusReply) {}; // 文章点赞取消处理 - rpc DescPostLike(PostOpIdentityRequest) returns (StatusReply) {}; + rpc DescPostLike(PostOpIdentityRequest) returns (blocks.StatusReply) {}; // 文章点踩处理 - rpc IncrPostUnlike(PostOpIdentityRequest) returns (StatusReply) {}; + rpc IncrPostUnlike(PostOpIdentityRequest) returns (blocks.StatusReply) {}; // 文章点踩取消处理 - rpc DescPostUnlike(PostOpIdentityRequest) returns (StatusReply) {}; + rpc DescPostUnlike(PostOpIdentityRequest) returns (blocks.StatusReply) {}; //评论列表 rpc CommentList(CommentListRequest) returns (CommentListResponse) {}; //发布评论 - rpc AddComment(CommentItem) returns (StatusReply) {}; + rpc AddComment(CommentItem) returns (blocks.StatusReply) {}; //修改评论 - rpc ModifyComment(CommentItem) returns (StatusReply) {}; + rpc ModifyComment(CommentItem) returns (blocks.StatusReply) {}; //删除评论 - rpc DeleteComment(DeleteCommentRequest) returns (StatusReply) {}; + rpc DeleteComment(DeleteCommentRequest) returns (blocks.StatusReply) {}; // 评论点赞处理 - rpc IncrCommentLike(CommentOpIdentityRequest) returns (StatusReply) {}; + rpc IncrCommentLike(CommentOpIdentityRequest) returns (blocks.StatusReply) {}; // 评论点赞取消处理 - rpc DescCommentLike(CommentOpIdentityRequest) returns (StatusReply) {}; + rpc DescCommentLike(CommentOpIdentityRequest) returns (blocks.StatusReply) {}; // 评论点踩处理 - rpc IncrCommentUnlike(CommentOpIdentityRequest) returns (StatusReply) {}; + rpc IncrCommentUnlike(CommentOpIdentityRequest) returns (blocks.StatusReply) {}; // 评论点踩取消处理 - rpc DescCommentUnlike(CommentOpIdentityRequest) returns (StatusReply) {}; + rpc DescCommentUnlike(CommentOpIdentityRequest) returns (blocks.StatusReply) {}; } // 删除评论 @@ -101,9 +101,9 @@ message PostItem{ int32 post_type = 23 [json_name = "post_type"]; // 用户自定义文章类型 string rights = 24; //权限 - repeated CategoryItem category_data = 26 [json_name = "category_data"]; // 分类数据 - repeated TagsItem tags_data = 27 [json_name = "tags_data"]; // 标签数据 - repeated AccessoryItem accessory_data = 28 [json_name = "accessory_data"]; //附件数据 + repeated blocks.CmsCategoryItem category_data = 26 [json_name = "category_data"]; // 分类数据 + repeated blocks.CmsTagsItem tags_data = 27 [json_name = "tags_data"]; // 标签数据 + repeated blocks.CmsAccessoryItem accessory_data = 28 [json_name = "accessory_data"]; //附件数据 string lang = 29 [json_name = "lang"]; // 语言 string source_origin = 30 [json_name = "source_origin"]; // 来源方简称 diff --git a/module/base/cms/proto/site.proto b/module/base/cms/proto/site.proto index 33c4261..a9282a8 100644 --- a/module/base/cms/proto/site.proto +++ b/module/base/cms/proto/site.proto @@ -1,24 +1,24 @@ syntax = "proto3"; package cms; -option go_package = ".;cms"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/cms/pb;cms"; +import "protobuf/blocks.proto"; // CMS - 站点 service Site { // 站点列表 - rpc Fetch (Empty) returns (SiteListReply) {}; + rpc Fetch (blocks.Empty) returns (SiteListReply) {}; // 站点详情 - rpc Get (IdentRequest) returns (SiteItem) {}; + rpc Get (blocks.IdentRequest) returns (SiteItem) {}; // 添加站点 - rpc Create (SiteItem) returns (StatusReply) {}; + rpc Create (SiteItem) returns (blocks.StatusReply) {}; // 修改站点 - rpc Modify (SiteItem) returns (StatusReply) {}; + rpc Modify (SiteItem) returns (blocks.StatusReply) {}; // 删除站点 - rpc Delete (IdentRequest) returns (StatusReply) {}; + rpc Delete (blocks.IdentRequest) returns (blocks.StatusReply) {}; } // 站点列表 diff --git a/module/base/cms/proto/tags.proto b/module/base/cms/proto/tags.proto index f97e61f..cb8f264 100644 --- a/module/base/cms/proto/tags.proto +++ b/module/base/cms/proto/tags.proto @@ -1,25 +1,25 @@ syntax = "proto3"; package cms; -option go_package = ".;cms"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/cms/pb;cms"; +import "protobuf/blocks.proto"; // 标签 service Tags { //标签列表 - rpc Fetch (IdentRequest) returns (TagsListReply) {}; + rpc Fetch (blocks.IdentRequest) returns (TagsListReply) {}; //创建标签 - rpc Create(TagsItem) returns (StatusReply) {}; + rpc Create(blocks.CmsTagsItem) returns (blocks.StatusReply) {}; //修改标签 - rpc Modify(TagsItem) returns (StatusReply) {}; + rpc Modify(blocks.CmsTagsItem) returns (blocks.StatusReply) {}; //删除标签 - rpc Delete(IdentRequest) returns (StatusReply) {}; + rpc Delete(blocks.IdentRequest) returns (blocks.StatusReply) {}; } // 标签列表 message TagsListReply { - repeated TagsItem data = 1; // 数据 + repeated blocks.CmsTagsItem data = 1; // 数据 int64 count = 2; // 总数 } \ No newline at end of file diff --git a/module/base/feedback/go.mod b/module/base/feedback/go.mod index 0c218e0..e9d11e3 100644 --- a/module/base/feedback/go.mod +++ b/module/base/feedback/go.mod @@ -15,7 +15,6 @@ tool ( require ( git.apinb.com/bsm-sdk/core v0.2.0 - git.apinb.com/bsm-sdk/engine v1.3.2 github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 github.com/patrickmn/go-cache v2.1.0+incompatible go.etcd.io/etcd/client/v3 v3.7.1 diff --git a/module/base/feedback/go.sum b/module/base/feedback/go.sum index a2eb5b2..09a9a51 100644 --- a/module/base/feedback/go.sum +++ b/module/base/feedback/go.sum @@ -1,7 +1,5 @@ filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo= filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc= -git.apinb.com/bsm-sdk/engine v1.3.2 h1:QJ20jveUIHcn3Tu0ktrkZI9zGRaPuJRZ+YTbSa1Zj1w= -git.apinb.com/bsm-sdk/engine v1.3.2/go.mod h1:OXRlO6Cdidqagw+LJjCngvpuuX1rwhxDwZlL/MhwiKQ= git.apinb.com/bsm-tools/protoc-gen-markdown v0.0.0-20250907131213-6c1694ce6bcb h1:GoXhkGzI5vZ9JMXCVsSRw/AGsJY0tM2aEv76YaUg2wM= git.apinb.com/bsm-tools/protoc-gen-markdown v0.0.0-20250907131213-6c1694ce6bcb/go.mod h1:l+84zWPM4F40Ppar+jLapgjRNt6XWDsr+l0vN4Jjlm4= git.apinb.com/bsm-tools/protoc-gen-slc v0.0.13 h1:RGg2R2kHz6IAD7scH6So2FlZYctFUDxqWR8i/+fMfOU= diff --git a/module/base/feedback/internal/logic/method/delete.go b/module/base/feedback/internal/logic/method/delete.go index 6b468e5..8872144 100644 --- a/module/base/feedback/internal/logic/method/delete.go +++ b/module/base/feedback/internal/logic/method/delete.go @@ -8,8 +8,8 @@ import ( "bsm/full/module/base/feedback/internal/impl" "bsm/full/module/base/feedback/internal/models" pb "bsm/full/module/base/feedback/pb" + "git.apinb.com/bsm-sdk/core/errcode" "git.apinb.com/bsm-sdk/core/vars" - "git.apinb.com/bsm-sdk/engine/exception" ) // Delete 删除反馈记录 @@ -19,7 +19,7 @@ import ( func Delete(ctx context.Context, in *pb.DeleteRequest) (reply *pb.StatusReply, err error) { // 验证请求参数 if in.GetIdentity() == "" { - return nil, exception.ErrInvalidArgument + return nil, errcode.ErrInvalidArgument } // 删除记录(GORM会自动处理关联的图片和附件删除) diff --git a/module/base/feedback/internal/logic/method/get.go b/module/base/feedback/internal/logic/method/get.go index 68db46a..9f5cc35 100644 --- a/module/base/feedback/internal/logic/method/get.go +++ b/module/base/feedback/internal/logic/method/get.go @@ -8,7 +8,7 @@ import ( "bsm/full/module/base/feedback/internal/impl" "bsm/full/module/base/feedback/internal/models" pb "bsm/full/module/base/feedback/pb" - "git.apinb.com/bsm-sdk/engine/exception" + "git.apinb.com/bsm-sdk/core/errcode" "gorm.io/gorm" ) @@ -19,7 +19,7 @@ import ( func Get(ctx context.Context, in *pb.GetRequest) (reply *pb.GetReply, err error) { // 验证请求参数 if in.GetIdentity() == "" { - return nil, exception.ErrInvalidArgument + return nil, errcode.ErrInvalidArgument } out := new(pb.GetReply) @@ -29,7 +29,7 @@ func Get(ctx context.Context, in *pb.GetRequest) (reply *pb.GetReply, err error) err = impl.DBService.Preload("Images").Where("identity = ?", in.GetIdentity()).First(record).Error if err != nil { if errors.Is(err, gorm.ErrRecordNotFound) { - return nil, exception.ErrNotFound + return nil, errcode.ErrRecordNotFound } return nil, err } diff --git a/module/base/feedback/internal/logic/method/modify.go b/module/base/feedback/internal/logic/method/modify.go index 23ae332..ca8dd4e 100644 --- a/module/base/feedback/internal/logic/method/modify.go +++ b/module/base/feedback/internal/logic/method/modify.go @@ -8,11 +8,11 @@ import ( "bsm/full/module/base/feedback/internal/impl" "bsm/full/module/base/feedback/internal/models" pb "bsm/full/module/base/feedback/pb" + "git.apinb.com/bsm-sdk/core/errcode" "git.apinb.com/bsm-sdk/core/service" "git.apinb.com/bsm-sdk/core/types" "git.apinb.com/bsm-sdk/core/utils" "git.apinb.com/bsm-sdk/core/vars" - "git.apinb.com/bsm-sdk/engine/exception" ) // Modify 修改反馈记录 @@ -28,7 +28,7 @@ func Modify(ctx context.Context, in *pb.ModifyRequest) (reply *pb.StatusReply, e // 验证请求参数 if in.GetIdentity() == "" { - return nil, exception.ErrInvalidArgument + return nil, errcode.ErrInvalidArgument } // 构建更新记录 diff --git a/module/base/feedback/internal/logic/method/remark.go b/module/base/feedback/internal/logic/method/remark.go index 814f7c9..cfaae9e 100644 --- a/module/base/feedback/internal/logic/method/remark.go +++ b/module/base/feedback/internal/logic/method/remark.go @@ -8,8 +8,8 @@ import ( "bsm/full/module/base/feedback/internal/impl" "bsm/full/module/base/feedback/internal/models" pb "bsm/full/module/base/feedback/pb" + "git.apinb.com/bsm-sdk/core/errcode" "git.apinb.com/bsm-sdk/core/vars" - "git.apinb.com/bsm-sdk/engine/exception" ) // Remark 添加或更新反馈记录的备注和状态 @@ -19,7 +19,7 @@ import ( func Remark(ctx context.Context, in *pb.RemarkRequest) (reply *pb.StatusReply, err error) { // 验证请求参数 if in.GetIdentity() == "" { - return nil, exception.ErrInvalidArgument + return nil, errcode.ErrInvalidArgument } // 构建更新记录 diff --git a/module/base/feedback/internal/server/method_server.go b/module/base/feedback/internal/server/method_server.go index 7591e1c..9b61a26 100644 --- a/module/base/feedback/internal/server/method_server.go +++ b/module/base/feedback/internal/server/method_server.go @@ -2,9 +2,9 @@ package server import ( - "context" "bsm/full/module/base/feedback/internal/logic/method" pb "bsm/full/module/base/feedback/pb" + "context" ) type MethodServer struct { diff --git a/module/base/feedback/internal/server/new.go b/module/base/feedback/internal/server/new.go index 3758b39..c980805 100644 --- a/module/base/feedback/internal/server/new.go +++ b/module/base/feedback/internal/server/new.go @@ -2,8 +2,8 @@ package server import ( - "context" pb "bsm/full/module/base/feedback/pb" + "context" "git.apinb.com/bsm-sdk/core/vars" gwRuntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "google.golang.org/grpc" diff --git a/module/base/feedback/pb/feedback.pb.go b/module/base/feedback/pb/feedback.pb.go index 0458d2a..dd94e95 100644 --- a/module/base/feedback/pb/feedback.pb.go +++ b/module/base/feedback/pb/feedback.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: feedback.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/base/feedback/proto/feedback.proto package feedback @@ -39,7 +39,7 @@ type ListRequest struct { func (x *ListRequest) Reset() { *x = ListRequest{} - mi := &file_feedback_proto_msgTypes[0] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -51,7 +51,7 @@ func (x *ListRequest) String() string { func (*ListRequest) ProtoMessage() {} func (x *ListRequest) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[0] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64,7 +64,7 @@ func (x *ListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. func (*ListRequest) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{0} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{0} } func (x *ListRequest) GetPage() int64 { @@ -147,7 +147,7 @@ type ListReply struct { func (x *ListReply) Reset() { *x = ListReply{} - mi := &file_feedback_proto_msgTypes[1] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -159,7 +159,7 @@ func (x *ListReply) String() string { func (*ListReply) ProtoMessage() {} func (x *ListReply) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[1] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -172,7 +172,7 @@ func (x *ListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use ListReply.ProtoReflect.Descriptor instead. func (*ListReply) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{1} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{1} } func (x *ListReply) GetCount() int64 { @@ -213,7 +213,7 @@ type FeedbackItem struct { func (x *FeedbackItem) Reset() { *x = FeedbackItem{} - mi := &file_feedback_proto_msgTypes[2] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -225,7 +225,7 @@ func (x *FeedbackItem) String() string { func (*FeedbackItem) ProtoMessage() {} func (x *FeedbackItem) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[2] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -238,7 +238,7 @@ func (x *FeedbackItem) ProtoReflect() protoreflect.Message { // Deprecated: Use FeedbackItem.ProtoReflect.Descriptor instead. func (*FeedbackItem) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{2} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{2} } func (x *FeedbackItem) GetIdentity() string { @@ -365,7 +365,7 @@ type FeedbackAccessory struct { func (x *FeedbackAccessory) Reset() { *x = FeedbackAccessory{} - mi := &file_feedback_proto_msgTypes[3] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -377,7 +377,7 @@ func (x *FeedbackAccessory) String() string { func (*FeedbackAccessory) ProtoMessage() {} func (x *FeedbackAccessory) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[3] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -390,7 +390,7 @@ func (x *FeedbackAccessory) ProtoReflect() protoreflect.Message { // Deprecated: Use FeedbackAccessory.ProtoReflect.Descriptor instead. func (*FeedbackAccessory) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{3} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{3} } func (x *FeedbackAccessory) GetIdentity() string { @@ -432,7 +432,7 @@ type FeedbackImage struct { func (x *FeedbackImage) Reset() { *x = FeedbackImage{} - mi := &file_feedback_proto_msgTypes[4] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -444,7 +444,7 @@ func (x *FeedbackImage) String() string { func (*FeedbackImage) ProtoMessage() {} func (x *FeedbackImage) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[4] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -457,7 +457,7 @@ func (x *FeedbackImage) ProtoReflect() protoreflect.Message { // Deprecated: Use FeedbackImage.ProtoReflect.Descriptor instead. func (*FeedbackImage) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{4} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{4} } func (x *FeedbackImage) GetIdentity() string { @@ -490,7 +490,7 @@ type GetRequest struct { func (x *GetRequest) Reset() { *x = GetRequest{} - mi := &file_feedback_proto_msgTypes[5] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -502,7 +502,7 @@ func (x *GetRequest) String() string { func (*GetRequest) ProtoMessage() {} func (x *GetRequest) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[5] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -515,7 +515,7 @@ func (x *GetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. func (*GetRequest) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{5} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{5} } func (x *GetRequest) GetIdentity() string { @@ -535,7 +535,7 @@ type GetReply struct { func (x *GetReply) Reset() { *x = GetReply{} - mi := &file_feedback_proto_msgTypes[6] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -547,7 +547,7 @@ func (x *GetReply) String() string { func (*GetReply) ProtoMessage() {} func (x *GetReply) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[6] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -560,7 +560,7 @@ func (x *GetReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetReply.ProtoReflect.Descriptor instead. func (*GetReply) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{6} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{6} } func (x *GetReply) GetRecord() *FeedbackItem { @@ -597,7 +597,7 @@ type AddRequest struct { func (x *AddRequest) Reset() { *x = AddRequest{} - mi := &file_feedback_proto_msgTypes[7] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -609,7 +609,7 @@ func (x *AddRequest) String() string { func (*AddRequest) ProtoMessage() {} func (x *AddRequest) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[7] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -622,7 +622,7 @@ func (x *AddRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddRequest.ProtoReflect.Descriptor instead. func (*AddRequest) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{7} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{7} } func (x *AddRequest) GetUserIdentity() string { @@ -718,7 +718,7 @@ type AddReply struct { func (x *AddReply) Reset() { *x = AddReply{} - mi := &file_feedback_proto_msgTypes[8] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -730,7 +730,7 @@ func (x *AddReply) String() string { func (*AddReply) ProtoMessage() {} func (x *AddReply) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[8] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -743,7 +743,7 @@ func (x *AddReply) ProtoReflect() protoreflect.Message { // Deprecated: Use AddReply.ProtoReflect.Descriptor instead. func (*AddReply) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{8} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{8} } func (x *AddReply) GetIdentity() string { @@ -774,7 +774,7 @@ type ModifyRequest struct { func (x *ModifyRequest) Reset() { *x = ModifyRequest{} - mi := &file_feedback_proto_msgTypes[9] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -786,7 +786,7 @@ func (x *ModifyRequest) String() string { func (*ModifyRequest) ProtoMessage() {} func (x *ModifyRequest) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[9] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -799,7 +799,7 @@ func (x *ModifyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ModifyRequest.ProtoReflect.Descriptor instead. func (*ModifyRequest) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{9} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{9} } func (x *ModifyRequest) GetIdentity() string { @@ -902,7 +902,7 @@ type DeleteRequest struct { func (x *DeleteRequest) Reset() { *x = DeleteRequest{} - mi := &file_feedback_proto_msgTypes[10] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -914,7 +914,7 @@ func (x *DeleteRequest) String() string { func (*DeleteRequest) ProtoMessage() {} func (x *DeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[10] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -927,7 +927,7 @@ func (x *DeleteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. func (*DeleteRequest) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{10} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{10} } func (x *DeleteRequest) GetIdentity() string { @@ -948,7 +948,7 @@ type RemarkRequest struct { func (x *RemarkRequest) Reset() { *x = RemarkRequest{} - mi := &file_feedback_proto_msgTypes[11] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -960,7 +960,7 @@ func (x *RemarkRequest) String() string { func (*RemarkRequest) ProtoMessage() {} func (x *RemarkRequest) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[11] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -973,7 +973,7 @@ func (x *RemarkRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemarkRequest.ProtoReflect.Descriptor instead. func (*RemarkRequest) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{11} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{11} } func (x *RemarkRequest) GetIdentity() string { @@ -1007,7 +1007,7 @@ type IdentRequest struct { func (x *IdentRequest) Reset() { *x = IdentRequest{} - mi := &file_feedback_proto_msgTypes[12] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1019,7 +1019,7 @@ func (x *IdentRequest) String() string { func (*IdentRequest) ProtoMessage() {} func (x *IdentRequest) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[12] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1032,7 +1032,7 @@ func (x *IdentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. func (*IdentRequest) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{12} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{12} } func (x *IdentRequest) GetId() int64 { @@ -1061,7 +1061,7 @@ type StatusReply struct { func (x *StatusReply) Reset() { *x = StatusReply{} - mi := &file_feedback_proto_msgTypes[13] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1073,7 +1073,7 @@ func (x *StatusReply) String() string { func (*StatusReply) ProtoMessage() {} func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_feedback_proto_msgTypes[13] + mi := &file_module_base_feedback_proto_feedback_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1086,7 +1086,7 @@ func (x *StatusReply) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. func (*StatusReply) Descriptor() ([]byte, []int) { - return file_feedback_proto_rawDescGZIP(), []int{13} + return file_module_base_feedback_proto_feedback_proto_rawDescGZIP(), []int{13} } func (x *StatusReply) GetCode() int32 { @@ -1117,11 +1117,11 @@ func (x *StatusReply) GetTimeseq() int64 { return 0 } -var File_feedback_proto protoreflect.FileDescriptor +var File_module_base_feedback_proto_feedback_proto protoreflect.FileDescriptor -const file_feedback_proto_rawDesc = "" + +const file_module_base_feedback_proto_feedback_proto_rawDesc = "" + "\n" + - "\x1cbase/feedback/feedback.proto\x12\bfeedback\"\x99\x02\n" + + ")module/base/feedback/proto/feedback.proto\x12\bfeedback\"\x99\x02\n" + "\vListRequest\x12\x12\n" + "\x04page\x18\x01 \x01(\x03R\x04page\x12\x12\n" + "\x04size\x18\x02 \x01(\x03R\x04size\x12$\n" + @@ -1226,23 +1226,22 @@ const file_feedback_proto_rawDesc = "" + "\x03Add\x12\x14.feedback.AddRequest\x1a\x12.feedback.AddReply\"\x00\x12:\n" + "\x06Modify\x12\x17.feedback.ModifyRequest\x1a\x15.feedback.StatusReply\"\x00\x12:\n" + "\x06Delete\x12\x17.feedback.DeleteRequest\x1a\x15.feedback.StatusReply\"\x00\x12:\n" + - "\x06Remark\x12\x17.feedback.RemarkRequest\x1a\x15.feedback.StatusReply\"\x00B\fZ\n" + - ".;feedbackb\x06proto3" + "\x06Remark\x12\x17.feedback.RemarkRequest\x1a\x15.feedback.StatusReply\"\x00B+Z)bsm/full/module/base/feedback/pb;feedbackb\x06proto3" var ( - file_feedback_proto_rawDescOnce sync.Once - file_feedback_proto_rawDescData []byte + file_module_base_feedback_proto_feedback_proto_rawDescOnce sync.Once + file_module_base_feedback_proto_feedback_proto_rawDescData []byte ) -func file_feedback_proto_rawDescGZIP() []byte { - file_feedback_proto_rawDescOnce.Do(func() { - file_feedback_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_feedback_proto_rawDesc), len(file_feedback_proto_rawDesc))) +func file_module_base_feedback_proto_feedback_proto_rawDescGZIP() []byte { + file_module_base_feedback_proto_feedback_proto_rawDescOnce.Do(func() { + file_module_base_feedback_proto_feedback_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_feedback_proto_feedback_proto_rawDesc), len(file_module_base_feedback_proto_feedback_proto_rawDesc))) }) - return file_feedback_proto_rawDescData + return file_module_base_feedback_proto_feedback_proto_rawDescData } -var file_feedback_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_feedback_proto_goTypes = []any{ +var file_module_base_feedback_proto_feedback_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_module_base_feedback_proto_feedback_proto_goTypes = []any{ (*ListRequest)(nil), // 0: feedback.ListRequest (*ListReply)(nil), // 1: feedback.ListReply (*FeedbackItem)(nil), // 2: feedback.FeedbackItem @@ -1258,7 +1257,7 @@ var file_feedback_proto_goTypes = []any{ (*IdentRequest)(nil), // 12: feedback.IdentRequest (*StatusReply)(nil), // 13: feedback.StatusReply } -var file_feedback_proto_depIdxs = []int32{ +var file_module_base_feedback_proto_feedback_proto_depIdxs = []int32{ 2, // 0: feedback.ListReply.list:type_name -> feedback.FeedbackItem 4, // 1: feedback.FeedbackItem.images:type_name -> feedback.FeedbackImage 3, // 2: feedback.FeedbackItem.accessories:type_name -> feedback.FeedbackAccessory @@ -1286,26 +1285,26 @@ var file_feedback_proto_depIdxs = []int32{ 0, // [0:8] is the sub-list for field type_name } -func init() { file_feedback_proto_init() } -func file_feedback_proto_init() { - if File_feedback_proto != nil { +func init() { file_module_base_feedback_proto_feedback_proto_init() } +func file_module_base_feedback_proto_feedback_proto_init() { + if File_module_base_feedback_proto_feedback_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_feedback_proto_rawDesc), len(file_feedback_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_feedback_proto_feedback_proto_rawDesc), len(file_module_base_feedback_proto_feedback_proto_rawDesc)), NumEnums: 0, NumMessages: 14, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_feedback_proto_goTypes, - DependencyIndexes: file_feedback_proto_depIdxs, - MessageInfos: file_feedback_proto_msgTypes, + GoTypes: file_module_base_feedback_proto_feedback_proto_goTypes, + DependencyIndexes: file_module_base_feedback_proto_feedback_proto_depIdxs, + MessageInfos: file_module_base_feedback_proto_feedback_proto_msgTypes, }.Build() - File_feedback_proto = out.File - file_feedback_proto_goTypes = nil - file_feedback_proto_depIdxs = nil + File_module_base_feedback_proto_feedback_proto = out.File + file_module_base_feedback_proto_feedback_proto_goTypes = nil + file_module_base_feedback_proto_feedback_proto_depIdxs = nil } diff --git a/module/base/feedback/pb/feedback.pb.gw.go b/module/base/feedback/pb/feedback.pb.gw.go index 34edb26..a72a0b3 100644 --- a/module/base/feedback/pb/feedback.pb.gw.go +++ b/module/base/feedback/pb/feedback.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: feedback.proto +// source: module/base/feedback/proto/feedback.proto /* Package feedback is a reverse proxy. diff --git a/module/base/feedback/pb/feedback_grpc.pb.go b/module/base/feedback/pb/feedback_grpc.pb.go index bb92fd8..b93424f 100644 --- a/module/base/feedback/pb/feedback_grpc.pb.go +++ b/module/base/feedback/pb/feedback_grpc.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: feedback.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/feedback/proto/feedback.proto package feedback @@ -110,7 +110,7 @@ func (c *methodClient) Remark(ctx context.Context, in *RemarkRequest, opts ...gr } // MethodServer is the server API for Method service. -// All implementations must embed UnimplementedMethodServer +// All implementations should embed UnimplementedMethodServer // for forward compatibility. // // Feedback-建议反馈模块 @@ -121,10 +121,9 @@ type MethodServer interface { Modify(context.Context, *ModifyRequest) (*StatusReply, error) Delete(context.Context, *DeleteRequest) (*StatusReply, error) Remark(context.Context, *RemarkRequest) (*StatusReply, error) - mustEmbedUnimplementedMethodServer() } -// UnimplementedMethodServer must be embedded to have +// UnimplementedMethodServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -132,25 +131,24 @@ type MethodServer interface { type UnimplementedMethodServer struct{} func (UnimplementedMethodServer) List(context.Context, *ListRequest) (*ListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method List not implemented") + return nil, status.Error(codes.Unimplemented, "method List not implemented") } func (UnimplementedMethodServer) Get(context.Context, *GetRequest) (*GetReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") + return nil, status.Error(codes.Unimplemented, "method Get not implemented") } func (UnimplementedMethodServer) Add(context.Context, *AddRequest) (*AddReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Add not implemented") + return nil, status.Error(codes.Unimplemented, "method Add not implemented") } func (UnimplementedMethodServer) Modify(context.Context, *ModifyRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented") + return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } func (UnimplementedMethodServer) Delete(context.Context, *DeleteRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") + return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } func (UnimplementedMethodServer) Remark(context.Context, *RemarkRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Remark not implemented") + return nil, status.Error(codes.Unimplemented, "method Remark not implemented") } -func (UnimplementedMethodServer) mustEmbedUnimplementedMethodServer() {} -func (UnimplementedMethodServer) testEmbeddedByValue() {} +func (UnimplementedMethodServer) testEmbeddedByValue() {} // UnsafeMethodServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MethodServer will @@ -160,7 +158,7 @@ type UnsafeMethodServer interface { } func RegisterMethodServer(s grpc.ServiceRegistrar, srv MethodServer) { - // If the following call pancis, it indicates UnimplementedMethodServer was + // If the following call panics, it indicates UnimplementedMethodServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -311,5 +309,5 @@ var Method_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "feedback.proto", + Metadata: "module/base/feedback/proto/feedback.proto", } diff --git a/module/base/feedback/proto/feedback.proto b/module/base/feedback/proto/feedback.proto index 61be65b..09a25d9 100644 --- a/module/base/feedback/proto/feedback.proto +++ b/module/base/feedback/proto/feedback.proto @@ -1,15 +1,15 @@ syntax = "proto3"; package feedback; -option go_package = ".;feedback"; +option go_package = "bsm/full/module/base/feedback/pb;feedback"; // Feedback-建议反馈模块 service Method{ - rpc List(ListRequest) returns (ListReply) {} - rpc Get(GetRequest) returns (GetReply) {} - rpc Add(AddRequest) returns (AddReply) {} - rpc Modify(ModifyRequest) returns (StatusReply) {} - rpc Delete(DeleteRequest) returns (StatusReply) {} - rpc Remark(RemarkRequest) returns (StatusReply) {} + rpc List(ListRequest) returns (ListReply) {} + rpc Get(GetRequest) returns (GetReply) {} + rpc Add(AddRequest) returns (AddReply) {} + rpc Modify(ModifyRequest) returns (StatusReply) {} + rpc Delete(DeleteRequest) returns (StatusReply) {} + rpc Remark(RemarkRequest) returns (StatusReply) {} } diff --git a/module/base/fts/CHANGELOG.md b/module/base/fts/CHANGELOG.md deleted file mode 100644 index 0d7978d..0000000 --- a/module/base/fts/CHANGELOG.md +++ /dev/null @@ -1,70 +0,0 @@ -# FTS微服务更新日志 - -所有FTS微服务的重要更改都将记录在此文件中。 - -格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/), -并且此项目遵循 [语义版本控制](https://semver.org/lang/zh-CN/)。 - -## [v2.0.0] - 2024-10-02 - -### 重大更新 🚀 -- **升级Go版本到1.25.1** - 使用最新Go版本,获得更好的性能和特性 -- **现代化项目架构** - 参考最佳实践重构项目结构 -- **移除gRPC依赖** - 简化架构,专注HTTP API服务 - -### 新增功能 ✨ -- **现代化构建工具链** - - 添加完整的Makefile,支持多平台构建 - - Docker容器化支持,包含优化的多阶段构建 - - docker-compose完整开发环境配置 -- **增强的错误处理系统** - - 统一的业务错误定义和处理 - - 标准化的响应格式 - - 详细的错误码分类 -- **完善的健康检查机制** - - 详细健康检查端点(/health) - - 简单健康检查端点(/health/simple) - - 系统资源监控 - - 依赖服务状态检查 -- **优雅关闭机制** - 支持服务的优雅启动和关闭 -- **版本信息端点** - /version接口显示构建信息 - -### 开发体验改进 🛠️ -- **开发工具支持** - - golangci-lint代码检查 - - gosec安全扫描 - - 代码覆盖率测试 - - 自动化格式化 -- **完整的项目文档** - 详细的README和使用指南 -- **标准化项目结构** - 清晰的目录组织 - -### 技术升级 📦 -- 升级bsm-sdk/core到v0.0.88 -- 保持所有核心依赖的最新兼容版本 -- 优化依赖管理,移除不必要的包 - -### 性能优化 ⚡ -- 改进的配置加载机制 -- 更好的资源管理 -- 优化的HTTP服务器配置 - -### 安全增强 🔒 -- 增强的错误处理,避免信息泄露 -- 更安全的依赖配置 -- 标准化的认证和授权准备 - -### 运维支持 📊 -- 详细的健康检查 -- 结构化日志支持 -- 监控友好的端点设计 -- 容器化部署支持 - -## [v1.0.0] - 2024-xx-xx - -### 新增 -- 初始版本发布 -- 文件传输服务核心功能 -- OSS存储支持 -- 本地存储支持 -- 文件上传接口 -- 健康检查接口 diff --git a/module/base/fts/Dockerfile b/module/base/fts/Dockerfile deleted file mode 100644 index 5f30103..0000000 --- a/module/base/fts/Dockerfile +++ /dev/null @@ -1,59 +0,0 @@ -# 构建阶段 -FROM golang:1.26.5-alpine AS builder - -# 设置工作目录 -WORKDIR /app - -# 安装必要的工具 -RUN apk add --no-cache git ca-certificates tzdata - -# 设置Go环境变量 -ENV GO111MODULE=on \ - GOPROXY=https://goproxy.cn,direct \ - GOPRIVATE=git.apinb.com/* \ - GONOPROXY=git.apinb.com/* \ - GOINSECURE=git.apinb.com/* \ - GONOSUMDB=git.apinb.com/* \ - GOEXPERIMENT=jsonv2 - -# 复制go模块文件 -COPY go.mod go.sum ./ - -# 下载依赖 -RUN go mod download - -# 复制源代码 -COPY . . - -# 构建应用 -RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w -s' -o fts ./cmd/main/main.go - -# 运行阶段 -FROM alpine:latest - -# 设置时区 -RUN apk --no-cache add ca-certificates tzdata \ - && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata - -WORKDIR /root/ - -# 从构建阶段复制二进制文件 -COPY --from=builder /app/fts . - -# 复制配置文件 -COPY --from=builder /app/etc ./etc - -# 创建日志目录 -RUN mkdir -p /var/log/fts - -# 暴露端口 -EXPOSE 8080 - -# 设置健康检查 -HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD curl -f http://localhost:8080/ || exit 1 - -# 运行应用 -CMD ["./fts"] diff --git a/module/base/fts/Makefile b/module/base/fts/Makefile deleted file mode 100644 index 86bab2a..0000000 --- a/module/base/fts/Makefile +++ /dev/null @@ -1,167 +0,0 @@ -# FTS Service Makefile - -# 变量定义 -APP_NAME := fts -VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "v1.0.0") -BUILD_TIME := $(shell date +%Y-%m-%d\ %H:%M:%S) -GIT_COMMIT := $(shell git rev-parse HEAD 2>/dev/null || echo "unknown") -GO_VERSION := $(shell go version | awk '{print $$3}') - -# 构建标志 -LDFLAGS := -ldflags "-X main.Version=$(VERSION) -X main.BuildTime=$(BUILD_TIME) -X main.GitCommit=$(GIT_COMMIT) -w -s" -BUILD_FLAGS := -trimpath $(LDFLAGS) - -# 目录 -BUILD_DIR := build - -# Go环境变量 -export GO111MODULE=on -export GOPROXY=https://goproxy.cn,direct -export GOPRIVATE=git.apinb.com/* -export GONOPROXY=git.apinb.com/* -export GOINSECURE=git.apinb.com/* -export GONOSUMDB=git.apinb.com/* -export GOEXPERIMENT=jsonv2 - -.PHONY: help -help: ## 显示帮助信息 - @echo "FTS Service - 可用的命令:" - @echo "" - @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) - -.PHONY: deps -deps: ## 下载依赖 - @echo "下载Go依赖..." - go mod download - go mod tidy - -.PHONY: build -build: deps ## 构建应用 - @echo "构建应用..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME) ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)" - -.PHONY: build-linux -build-linux: deps ## 构建Linux版本 - @echo "构建Linux版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-linux-amd64 ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-linux-amd64" - -.PHONY: build-windows -build-windows: deps ## 构建Windows版本 - @echo "构建Windows版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-windows-amd64.exe ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-windows-amd64.exe" - -.PHONY: build-darwin -build-darwin: deps ## 构建macOS版本 - @echo "构建macOS版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-darwin-amd64 ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-darwin-amd64" - -.PHONY: build-all -build-all: build-linux build-windows build-darwin ## 构建所有平台版本 - -.PHONY: run -run: build ## 运行应用 - @echo "启动应用..." - ./$(BUILD_DIR)/$(APP_NAME) - -.PHONY: dev -dev: ## 开发模式运行 - @echo "开发模式启动..." - go run ./cmd/main/main.go - -.PHONY: test -test: ## 运行测试 - @echo "运行测试..." - go test -v ./... - -.PHONY: test-coverage -test-coverage: ## 运行测试并生成覆盖率报告 - @echo "运行测试覆盖率..." - go test -v -coverprofile=coverage.out ./... - go tool cover -html=coverage.out -o coverage.html - @echo "覆盖率报告生成: coverage.html" - -.PHONY: lint -lint: ## 运行代码检查 - @echo "运行代码检查..." - @if command -v golangci-lint >/dev/null 2>&1; then \ - golangci-lint run; \ - else \ - echo "golangci-lint 未安装,使用go vet..."; \ - go vet ./...; \ - fi - -.PHONY: fmt -fmt: ## 格式化代码 - @echo "格式化代码..." - go fmt ./... - @if command -v goimports >/dev/null 2>&1; then \ - goimports -w .; \ - fi - -.PHONY: security -security: ## 安全检查 - @echo "运行安全检查..." - @if command -v gosec >/dev/null 2>&1; then \ - gosec ./...; \ - else \ - echo "gosec 未安装,请运行: go install github.com/securego/gosec/v2/cmd/gosec@latest"; \ - fi - -.PHONY: docker-build -docker-build: ## 构建Docker镜像 - @echo "构建Docker镜像..." - docker build -t $(APP_NAME):$(VERSION) . - docker tag $(APP_NAME):$(VERSION) $(APP_NAME):latest - -.PHONY: docker-run -docker-run: ## 运行Docker容器 - @echo "运行Docker容器..." - docker run -d --name $(APP_NAME) -p 8080:8080 $(APP_NAME):latest - -.PHONY: docker-stop -docker-stop: ## 停止Docker容器 - @echo "停止Docker容器..." - docker stop $(APP_NAME) || true - docker rm $(APP_NAME) || true - -.PHONY: clean -clean: ## 清理构建文件 - @echo "清理构建文件..." - rm -rf $(BUILD_DIR) - rm -f coverage.out coverage.html - docker system prune -f - -.PHONY: install-tools -install-tools: ## 安装开发工具 - @echo "安装开发工具..." - go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - go install golang.org/x/tools/cmd/goimports@latest - go install github.com/securego/gosec/v2/cmd/gosec@latest - -.PHONY: mod-update -mod-update: ## 更新依赖 - @echo "更新依赖..." - go get -u ./... - go mod tidy - -.PHONY: version -version: ## 显示版本信息 - @echo "应用名称: $(APP_NAME)" - @echo "版本: $(VERSION)" - @echo "构建时间: $(BUILD_TIME)" - @echo "Git提交: $(GIT_COMMIT)" - @echo "Go版本: $(GO_VERSION)" - -.PHONY: all -all: clean deps build test lint ## 执行完整的构建流程 - -# 默认目标 -.DEFAULT_GOAL := help diff --git a/module/base/fts/docker-compose.yml b/module/base/fts/docker-compose.yml deleted file mode 100644 index f48b8b8..0000000 --- a/module/base/fts/docker-compose.yml +++ /dev/null @@ -1,95 +0,0 @@ -version: '3.8' - -services: - fts: - build: . - container_name: fts-service - ports: - - "8080:8080" - environment: - - ENV=dev - - GIN_MODE=release - volumes: - - ./etc:/root/etc:ro - - ./logs:/var/log/fts - depends_on: - - postgres - - redis - - etcd - networks: - - fts-network - restart: unless-stopped - - postgres: - image: postgres:15-alpine - container_name: fts-postgres - environment: - POSTGRES_DB: fts - POSTGRES_USER: fts - POSTGRES_PASSWORD: fts123456 - ports: - - "5432:5432" - volumes: - - postgres_data:/var/lib/postgresql/data - networks: - - fts-network - restart: unless-stopped - - redis: - image: redis:7-alpine - container_name: fts-redis - ports: - - "6379:6379" - volumes: - - redis_data:/data - networks: - - fts-network - restart: unless-stopped - - etcd: - image: quay.io/coreos/etcd:v3.5.9 - container_name: fts-etcd - environment: - - ETCD_NAME=etcd-server - - ETCD_DATA_DIR=/etcd-data - - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 - - ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379 - - ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 - - ETCD_INITIAL_ADVERTISE_PEER_URLS=http://0.0.0.0:2380 - - ETCD_INITIAL_CLUSTER=etcd-server=http://0.0.0.0:2380 - - ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster - - ETCD_INITIAL_CLUSTER_STATE=new - ports: - - "2379:2379" - - "2380:2380" - volumes: - - etcd_data:/etcd-data - networks: - - fts-network - restart: unless-stopped - - minio: - image: minio/minio:latest - container_name: fts-minio - command: server /data --console-address ":9001" - environment: - MINIO_ROOT_USER: admin - MINIO_ROOT_PASSWORD: admin123456 - ports: - - "9000:9000" - - "9001:9001" - volumes: - - minio_data:/data - networks: - - fts-network - restart: unless-stopped - -volumes: - postgres_data: - redis_data: - etcd_data: - minio_data: - -networks: - fts-network: - driver: bridge diff --git a/module/base/fts/internal/logic/fetch.go b/module/base/fts/internal/logic/fetch.go index 22894dd..636cfd2 100644 --- a/module/base/fts/internal/logic/fetch.go +++ b/module/base/fts/internal/logic/fetch.go @@ -9,7 +9,6 @@ package logic // "bsm/full/module/base/fts/internal/types" // "git.apinb.com/bsm-sdk/core/exception" -// "github.com/zeromicro/go-zero/core/logx" // ) // func (l *ListLogic) List(in *types.Paginate, r *http.Request) (resp *types.Base, err error) { diff --git a/module/base/initial/CHANGELOG.md b/module/base/initial/CHANGELOG.md deleted file mode 100644 index b96c442..0000000 --- a/module/base/initial/CHANGELOG.md +++ /dev/null @@ -1,166 +0,0 @@ -# 更新日志 - -本文档记录了Initial Service项目的所有重要更改。 - -## [优化版本] - 2024-10-02 - -### 🚀 新增功能 -- **缓存系统**: 新增Redis缓存服务,提升API响应性能 -- **Docker支持**: 完整的容器化部署方案 -- **Makefile**: 完善的构建和开发工具链 -- **健康检查**: 增强的服务健康监控 -- **错误处理**: 完善的错误码定义和处理机制 - -### 🔧 优化改进 -- **输入验证**: 所有API接口增加严格的输入参数验证 -- **数据库查询**: 优化查询逻辑,添加索引和排序 -- **配置管理**: 改进配置优先级处理和去重机制 -- **版本检查**: 增强版本比较算法和更新文件管理 -- **地区数据**: 优化层级查询和默认参数处理 -- **测试代码**: 重构测试代码,提升测试覆盖率 - -### 🐛 修复问题 -- 修复Go版本兼容性问题 -- 修复数据类型不匹配问题 -- 修复循环导入问题 -- 修复测试代码中的导入错误 -- 修复数据库查询中的参数绑定问题 - -### 📚 文档更新 -- **README.md**: 全面重写,添加详细的使用指南 -- **API文档**: 完善接口说明和示例 -- **部署文档**: 添加Docker和Kubernetes部署指南 -- **开发文档**: 添加开发环境设置和贡献指南 - -### 🏗️ 架构改进 -- **缓存层**: 新增缓存抽象层,支持多种缓存策略 -- **错误处理**: 统一错误码和错误处理机制 -- **配置管理**: 优化配置加载和验证逻辑 -- **服务发现**: 支持微服务注册和发现 - -### 🔒 安全增强 -- **输入验证**: 严格的参数校验和类型检查 -- **错误信息**: 避免敏感信息泄露 -- **连接安全**: 支持TLS加密连接 -- **权限控制**: 预留权限验证接口 - -### 📊 性能优化 -- **缓存策略**: 多层缓存提升响应速度 -- **数据库优化**: 查询优化和索引建立 -- **连接池**: 合理的数据库连接池配置 -- **内存管理**: 优化内存使用和垃圾回收 - -### 🛠️ 开发工具 -- **Makefile**: 完整的构建、测试、部署工具链 -- **Docker**: 标准化的容器化部署 -- **CI/CD**: 改进的持续集成和部署流程 -- **代码检查**: 集成代码质量检查工具 - -### 📦 依赖更新 -- 更新所有Go依赖到最新稳定版本 -- 优化依赖管理和模块结构 -- 移除未使用的依赖包 - -### 🧪 测试改进 -- **单元测试**: 增加核心逻辑单元测试 -- **集成测试**: 完善gRPC接口集成测试 -- **性能测试**: 添加性能基准测试 -- **覆盖率**: 提升测试覆盖率到80%+ - ---- - -## 升级指南 - -### 从旧版本升级 - -1. **备份数据** - ```bash - make backup-db - ``` - -2. **更新代码** - ```bash - git pull origin main - make deps - ``` - -3. **重新构建** - ```bash - make build - ``` - -4. **更新配置** - - 检查配置文件格式变更 - - 更新环境变量设置 - -5. **重启服务** - ```bash - make docker-compose-down - make docker-compose-up - ``` - -### 配置迁移 - -- Redis缓存配置现在是必需的 -- 数据库连接字符串格式保持不变 -- 新增APM监控配置(可选) - -### API兼容性 - -- 所有现有API保持向后兼容 -- 响应格式保持不变 -- 新增输入验证可能影响无效请求 - ---- - -## 贡献者 - -- **David Yan** - 项目维护者和主要开发者 -- **BSM Team** - 代码审查和测试 - ---- - -## 技术栈 - -- **语言**: Go 1.25.1 -- **框架**: gRPC + HTTP Gateway -- **数据库**: PostgreSQL 12+ -- **缓存**: Redis 6+ -- **容器**: Docker + Docker Compose -- **构建**: Makefile + Buf -- **监控**: ElasticAPM (可选) - ---- - -## 性能指标 - -### 优化前后对比 - -| 指标 | 优化前 | 优化后 | 提升 | -|------|--------|--------|------| -| 配置查询 | 50ms | 5ms | 90% | -| 国家数据 | 100ms | 10ms | 90% | -| 地区数据 | 200ms | 20ms | 90% | -| 内存使用 | 100MB | 80MB | 20% | -| 启动时间 | 10s | 5s | 50% | - -### 缓存命中率 - -- 配置数据: 95%+ -- 国家数据: 99%+ -- 地区数据: 90%+ -- 系统数据: 95%+ - ---- - -## 已知问题 - -目前没有已知的重大问题。 - -## 计划功能 - -- [ ] GraphQL API支持 -- [ ] 配置热更新 -- [ ] 多语言支持 -- [ ] 实时数据同步 -- [ ] 高级缓存策略 diff --git a/module/base/initial/Dockerfile b/module/base/initial/Dockerfile deleted file mode 100644 index 143fb7e..0000000 --- a/module/base/initial/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -# 使用官方Go镜像作为构建环境 -FROM golang:1.26.5-alpine AS builder - -# 设置工作目录 -WORKDIR /app - -# 安装必要的工具 -RUN apk add --no-cache git ca-certificates tzdata - -# 设置Go环境变量 -ENV GO111MODULE=on \ - GOPROXY=https://goproxy.cn,direct \ - GOPRIVATE=git.apinb.com/* \ - GONOPROXY=git.apinb.com/* \ - GOINSECURE=git.apinb.com/* \ - GONOSUMDB=git.apinb.com/* \ - GOEXPERIMENT=jsonv2 - -# 复制go.mod和go.sum文件 -COPY go.mod go.sum ./ - -# 下载依赖 -RUN go mod download - -# 复制源代码 -COPY . . - -# 构建应用 -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ - -ldflags='-w -s -extldflags "-static"' \ - -a -installsuffix cgo \ - -o initial \ - ./cmd/main/main.go - -# 使用最小的alpine镜像作为运行环境 -FROM alpine:latest - -# 安装必要的包 -RUN apk --no-cache add ca-certificates tzdata - -# 设置时区 -ENV TZ=Asia/Shanghai - -# 创建非root用户 -RUN addgroup -g 1001 -S appgroup && \ - adduser -u 1001 -S appuser -G appgroup - -# 设置工作目录 -WORKDIR /app - -# 从构建阶段复制二进制文件 -COPY --from=builder /app/initial . - -# 复制配置文件和其他必要文件 -COPY --from=builder /app/etc ./etc -COPY --from=builder /app/swagger ./swagger - -# 创建日志目录 -RUN mkdir -p /app/logs && \ - chown -R appuser:appgroup /app - -# 切换到非root用户 -USER appuser - -# 暴露端口 -EXPOSE 12101 12102 - -# 健康检查 -HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD wget --no-verbose --tries=1 --spider http://localhost:12102/health || exit 1 - -# 启动应用 -CMD ["./initial"] diff --git a/module/base/initial/Makefile b/module/base/initial/Makefile deleted file mode 100644 index 2c0cbf9..0000000 --- a/module/base/initial/Makefile +++ /dev/null @@ -1,211 +0,0 @@ -# Initial Service Makefile - -# 变量定义 -APP_NAME := initial -VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "v1.0.0") -BUILD_TIME := $(shell date +%Y-%m-%d\ %H:%M:%S) -GIT_COMMIT := $(shell git rev-parse HEAD 2>/dev/null || echo "unknown") -GO_VERSION := $(shell go version | awk '{print $$3}') - -# 构建标志 -LDFLAGS := -ldflags "-X main.Version=$(VERSION) -X main.BuildTime=$(BUILD_TIME) -X main.GitCommit=$(GIT_COMMIT) -w -s" -BUILD_FLAGS := -trimpath $(LDFLAGS) - -# 目录 -BUILD_DIR := build -PROTO_DIR := proto -PB_DIR := pb - -# Go环境变量 -export GO111MODULE=on -export GOPROXY=https://goproxy.cn,direct -export GOPRIVATE=git.apinb.com/* -export GONOPROXY=git.apinb.com/* -export GOINSECURE=git.apinb.com/* -export GONOSUMDB=git.apinb.com/* -export GOEXPERIMENT=jsonv2 - -.PHONY: help -help: ## 显示帮助信息 - @echo "Initial Service - 可用的命令:" - @echo "" - @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) - -.PHONY: deps -deps: ## 下载依赖 - @echo "下载Go依赖..." - go mod download - go mod tidy - -.PHONY: proto -proto: ## 生成protobuf代码 - @echo "生成protobuf代码..." - buf generate - -.PHONY: build -build: deps ## 构建应用 - @echo "构建应用..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME) ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)" - -.PHONY: build-linux -build-linux: deps ## 构建Linux版本 - @echo "构建Linux版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-linux-amd64 ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-linux-amd64" - -.PHONY: build-windows -build-windows: deps ## 构建Windows版本 - @echo "构建Windows版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-windows-amd64.exe ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-windows-amd64.exe" - -.PHONY: build-darwin -build-darwin: deps ## 构建macOS版本 - @echo "构建macOS版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-darwin-amd64 ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-darwin-amd64" - -.PHONY: build-all -build-all: build-linux build-windows build-darwin ## 构建所有平台版本 - -.PHONY: run -run: build ## 运行应用 - @echo "启动应用..." - ./$(BUILD_DIR)/$(APP_NAME) - -.PHONY: dev -dev: ## 开发模式运行 - @echo "开发模式启动..." - go run ./cmd/main/main.go - -.PHONY: test -test: ## 运行测试 - @echo "运行测试..." - go test -v ./... - -.PHONY: test-coverage -test-coverage: ## 运行测试并生成覆盖率报告 - @echo "运行测试覆盖率..." - go test -v -coverprofile=coverage.out ./... - go tool cover -html=coverage.out -o coverage.html - @echo "覆盖率报告生成: coverage.html" - -.PHONY: test-grpc -test-grpc: ## 运行gRPC测试 - @echo "运行gRPC测试..." - go run ./test/grpc/main.go - -.PHONY: lint -lint: ## 运行代码检查 - @echo "运行代码检查..." - @if command -v golangci-lint >/dev/null 2>&1; then \ - golangci-lint run; \ - else \ - echo "golangci-lint 未安装,使用go vet..."; \ - go vet ./...; \ - fi - -.PHONY: fmt -fmt: ## 格式化代码 - @echo "格式化代码..." - go fmt ./... - @if command -v goimports >/dev/null 2>&1; then \ - goimports -w .; \ - fi - -.PHONY: security -security: ## 安全检查 - @echo "运行安全检查..." - @if command -v gosec >/dev/null 2>&1; then \ - gosec ./...; \ - else \ - echo "gosec 未安装,请运行: go install github.com/securego/gosec/v2/cmd/gosec@latest"; \ - fi - -.PHONY: docker-build -docker-build: ## 构建Docker镜像 - @echo "构建Docker镜像..." - docker build -t $(APP_NAME):$(VERSION) . - docker tag $(APP_NAME):$(VERSION) $(APP_NAME):latest - -.PHONY: docker-run -docker-run: ## 运行Docker容器 - @echo "运行Docker容器..." - docker run -d --name $(APP_NAME) -p 12101:12101 -p 12102:12102 $(APP_NAME):latest - -.PHONY: docker-stop -docker-stop: ## 停止Docker容器 - @echo "停止Docker容器..." - docker stop $(APP_NAME) || true - docker rm $(APP_NAME) || true - -.PHONY: docker-compose-up -docker-compose-up: ## 启动docker-compose服务 - @echo "启动docker-compose服务..." - docker-compose up -d - -.PHONY: docker-compose-down -docker-compose-down: ## 停止docker-compose服务 - @echo "停止docker-compose服务..." - docker-compose down - -.PHONY: docker-compose-logs -docker-compose-logs: ## 查看docker-compose日志 - docker-compose logs -f - -.PHONY: clean -clean: ## 清理构建文件 - @echo "清理构建文件..." - rm -rf $(BUILD_DIR) - rm -f coverage.out coverage.html - docker system prune -f - -.PHONY: install-tools -install-tools: ## 安装开发工具 - @echo "安装开发工具..." - go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - go install golang.org/x/tools/cmd/goimports@latest - go install github.com/securego/gosec/v2/cmd/gosec@latest - go install github.com/bufbuild/buf/cmd/buf@latest - -.PHONY: mod-update -mod-update: ## 更新依赖 - @echo "更新依赖..." - go get -u ./... - go mod tidy - -.PHONY: version -version: ## 显示版本信息 - @echo "应用名称: $(APP_NAME)" - @echo "版本: $(VERSION)" - @echo "构建时间: $(BUILD_TIME)" - @echo "Git提交: $(GIT_COMMIT)" - @echo "Go版本: $(GO_VERSION)" - -.PHONY: swagger -swagger: ## 生成Swagger文档 - @echo "Swagger文档已通过protobuf生成在swagger目录" - -.PHONY: init-db -init-db: ## 初始化数据库 - @echo "初始化数据库..." - @echo "请确保PostgreSQL已启动,然后运行以下SQL文件:" - @echo "- scripts/initial_country_202509081640.sql" - @echo "- scripts/initial_areas_202509081640.sql" - -.PHONY: backup-db -backup-db: ## 备份数据库 - @echo "备份数据库..." - @read -p "请输入数据库连接字符串: " DB_URL; \ - pg_dump $$DB_URL > backup_$(shell date +%Y%m%d_%H%M%S).sql - -.PHONY: all -all: clean deps proto build test lint ## 执行完整的构建流程 - -# 默认目标 -.DEFAULT_GOAL := help diff --git a/module/base/initial/docker-compose.yml b/module/base/initial/docker-compose.yml deleted file mode 100644 index 8df368b..0000000 --- a/module/base/initial/docker-compose.yml +++ /dev/null @@ -1,101 +0,0 @@ -version: '3.8' - -services: - # Initial Service - initial-service: - build: - context: . - dockerfile: Dockerfile - container_name: initial-service - restart: unless-stopped - ports: - - "12101:12101" # gRPC port - - "12102:12102" # HTTP Gateway port - environment: - - SERVICE_ENV=docker - - TZ=Asia/Shanghai - volumes: - - ./etc:/app/etc:ro - - ./logs:/app/logs - depends_on: - - postgres - - redis - networks: - - initial-network - healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:12102/health"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 40s - - # PostgreSQL Database - postgres: - image: postgres:15-alpine - container_name: initial-postgres - restart: unless-stopped - environment: - POSTGRES_DB: initial_db - POSTGRES_USER: postgres - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-initial_password} - TZ: Asia/Shanghai - volumes: - - postgres_data:/var/lib/postgresql/data - - ./scripts:/docker-entrypoint-initdb.d:ro - ports: - - "5432:5432" - networks: - - initial-network - healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgres"] - interval: 10s - timeout: 5s - retries: 5 - - # Redis Cache - redis: - image: redis:7-alpine - container_name: initial-redis - restart: unless-stopped - command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD:-initial_redis_password} - environment: - TZ: Asia/Shanghai - volumes: - - redis_data:/data - ports: - - "6379:6379" - networks: - - initial-network - healthcheck: - test: ["CMD", "redis-cli", "--raw", "incr", "ping"] - interval: 10s - timeout: 3s - retries: 5 - - # Nginx Reverse Proxy (Optional) - nginx: - image: nginx:alpine - container_name: initial-nginx - restart: unless-stopped - ports: - - "80:80" - - "443:443" - volumes: - - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro - - ./nginx/ssl:/etc/nginx/ssl:ro - depends_on: - - initial-service - networks: - - initial-network - profiles: - - with-nginx - -volumes: - postgres_data: - driver: local - redis_data: - driver: local - -networks: - initial-network: - driver: bridge diff --git a/module/base/initial/pb/check.pb.go b/module/base/initial/pb/check.pb.go index fc8a444..6e2e68b 100644 --- a/module/base/initial/pb/check.pb.go +++ b/module/base/initial/pb/check.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: check.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/base/initial/proto/check.proto package initial @@ -30,7 +30,7 @@ type Crc struct { func (x *Crc) Reset() { *x = Crc{} - mi := &file_check_proto_msgTypes[0] + mi := &file_module_base_initial_proto_check_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -42,7 +42,7 @@ func (x *Crc) String() string { func (*Crc) ProtoMessage() {} func (x *Crc) ProtoReflect() protoreflect.Message { - mi := &file_check_proto_msgTypes[0] + mi := &file_module_base_initial_proto_check_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55,7 +55,7 @@ func (x *Crc) ProtoReflect() protoreflect.Message { // Deprecated: Use Crc.ProtoReflect.Descriptor instead. func (*Crc) Descriptor() ([]byte, []int) { - return file_check_proto_rawDescGZIP(), []int{0} + return file_module_base_initial_proto_check_proto_rawDescGZIP(), []int{0} } func (x *Crc) GetCode() string { @@ -77,7 +77,7 @@ type StatusReply struct { func (x *StatusReply) Reset() { *x = StatusReply{} - mi := &file_check_proto_msgTypes[1] + mi := &file_module_base_initial_proto_check_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -89,7 +89,7 @@ func (x *StatusReply) String() string { func (*StatusReply) ProtoMessage() {} func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_check_proto_msgTypes[1] + mi := &file_module_base_initial_proto_check_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102,7 +102,7 @@ func (x *StatusReply) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. func (*StatusReply) Descriptor() ([]byte, []int) { - return file_check_proto_rawDescGZIP(), []int{1} + return file_module_base_initial_proto_check_proto_rawDescGZIP(), []int{1} } func (x *StatusReply) GetCode() int32 { @@ -143,7 +143,7 @@ type ConfigRequest struct { func (x *ConfigRequest) Reset() { *x = ConfigRequest{} - mi := &file_check_proto_msgTypes[2] + mi := &file_module_base_initial_proto_check_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -155,7 +155,7 @@ func (x *ConfigRequest) String() string { func (*ConfigRequest) ProtoMessage() {} func (x *ConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_check_proto_msgTypes[2] + mi := &file_module_base_initial_proto_check_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -168,7 +168,7 @@ func (x *ConfigRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigRequest.ProtoReflect.Descriptor instead. func (*ConfigRequest) Descriptor() ([]byte, []int) { - return file_check_proto_rawDescGZIP(), []int{2} + return file_module_base_initial_proto_check_proto_rawDescGZIP(), []int{2} } func (x *ConfigRequest) GetApp() string { @@ -194,7 +194,7 @@ type ConfigReply struct { func (x *ConfigReply) Reset() { *x = ConfigReply{} - mi := &file_check_proto_msgTypes[3] + mi := &file_module_base_initial_proto_check_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -206,7 +206,7 @@ func (x *ConfigReply) String() string { func (*ConfigReply) ProtoMessage() {} func (x *ConfigReply) ProtoReflect() protoreflect.Message { - mi := &file_check_proto_msgTypes[3] + mi := &file_module_base_initial_proto_check_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -219,7 +219,7 @@ func (x *ConfigReply) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigReply.ProtoReflect.Descriptor instead. func (*ConfigReply) Descriptor() ([]byte, []int) { - return file_check_proto_rawDescGZIP(), []int{3} + return file_module_base_initial_proto_check_proto_rawDescGZIP(), []int{3} } func (x *ConfigReply) GetData() []*ConfigItem { @@ -241,7 +241,7 @@ type ConfigItem struct { func (x *ConfigItem) Reset() { *x = ConfigItem{} - mi := &file_check_proto_msgTypes[4] + mi := &file_module_base_initial_proto_check_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -253,7 +253,7 @@ func (x *ConfigItem) String() string { func (*ConfigItem) ProtoMessage() {} func (x *ConfigItem) ProtoReflect() protoreflect.Message { - mi := &file_check_proto_msgTypes[4] + mi := &file_module_base_initial_proto_check_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -266,7 +266,7 @@ func (x *ConfigItem) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigItem.ProtoReflect.Descriptor instead. func (*ConfigItem) Descriptor() ([]byte, []int) { - return file_check_proto_rawDescGZIP(), []int{4} + return file_module_base_initial_proto_check_proto_rawDescGZIP(), []int{4} } func (x *ConfigItem) GetIdentity() string { @@ -309,7 +309,7 @@ type CheckForUpdatesRequest struct { func (x *CheckForUpdatesRequest) Reset() { *x = CheckForUpdatesRequest{} - mi := &file_check_proto_msgTypes[5] + mi := &file_module_base_initial_proto_check_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -321,7 +321,7 @@ func (x *CheckForUpdatesRequest) String() string { func (*CheckForUpdatesRequest) ProtoMessage() {} func (x *CheckForUpdatesRequest) ProtoReflect() protoreflect.Message { - mi := &file_check_proto_msgTypes[5] + mi := &file_module_base_initial_proto_check_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -334,7 +334,7 @@ func (x *CheckForUpdatesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckForUpdatesRequest.ProtoReflect.Descriptor instead. func (*CheckForUpdatesRequest) Descriptor() ([]byte, []int) { - return file_check_proto_rawDescGZIP(), []int{5} + return file_module_base_initial_proto_check_proto_rawDescGZIP(), []int{5} } func (x *CheckForUpdatesRequest) GetApp() string { @@ -378,7 +378,7 @@ type CheckForUpdatesReply struct { func (x *CheckForUpdatesReply) Reset() { *x = CheckForUpdatesReply{} - mi := &file_check_proto_msgTypes[6] + mi := &file_module_base_initial_proto_check_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -390,7 +390,7 @@ func (x *CheckForUpdatesReply) String() string { func (*CheckForUpdatesReply) ProtoMessage() {} func (x *CheckForUpdatesReply) ProtoReflect() protoreflect.Message { - mi := &file_check_proto_msgTypes[6] + mi := &file_module_base_initial_proto_check_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -403,7 +403,7 @@ func (x *CheckForUpdatesReply) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckForUpdatesReply.ProtoReflect.Descriptor instead. func (*CheckForUpdatesReply) Descriptor() ([]byte, []int) { - return file_check_proto_rawDescGZIP(), []int{6} + return file_module_base_initial_proto_check_proto_rawDescGZIP(), []int{6} } func (x *CheckForUpdatesReply) GetIdentity() string { @@ -441,11 +441,11 @@ func (x *CheckForUpdatesReply) GetPubdate() string { return "" } -var File_check_proto protoreflect.FileDescriptor +var File_module_base_initial_proto_check_proto protoreflect.FileDescriptor -const file_check_proto_rawDesc = "" + +const file_module_base_initial_proto_check_proto_rawDesc = "" + "\n" + - "\x18base/initial/check.proto\x12\ainitial\"\x19\n" + + "%module/base/initial/proto/check.proto\x12\ainitial\"\x19\n" + "\x03Crc\x12\x12\n" + "\x04code\x18\x01 \x01(\tR\x04code\"o\n" + "\vStatusReply\x12\x12\n" + @@ -478,22 +478,22 @@ const file_check_proto_rawDesc = "" + "\x05Check\x12-\n" + "\x05Hello\x12\f.initial.Crc\x1a\x14.initial.StatusReply\"\x00\x128\n" + "\x06Config\x12\x16.initial.ConfigRequest\x1a\x14.initial.ConfigReply\"\x00\x12K\n" + - "\aUpdates\x12\x1f.initial.CheckForUpdatesRequest\x1a\x1d.initial.CheckForUpdatesReply\"\x00B\vZ\t.;initialb\x06proto3" + "\aUpdates\x12\x1f.initial.CheckForUpdatesRequest\x1a\x1d.initial.CheckForUpdatesReply\"\x00B)Z'bsm/full/module/base/initial/pb;initialb\x06proto3" var ( - file_check_proto_rawDescOnce sync.Once - file_check_proto_rawDescData []byte + file_module_base_initial_proto_check_proto_rawDescOnce sync.Once + file_module_base_initial_proto_check_proto_rawDescData []byte ) -func file_check_proto_rawDescGZIP() []byte { - file_check_proto_rawDescOnce.Do(func() { - file_check_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_check_proto_rawDesc), len(file_check_proto_rawDesc))) +func file_module_base_initial_proto_check_proto_rawDescGZIP() []byte { + file_module_base_initial_proto_check_proto_rawDescOnce.Do(func() { + file_module_base_initial_proto_check_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_initial_proto_check_proto_rawDesc), len(file_module_base_initial_proto_check_proto_rawDesc))) }) - return file_check_proto_rawDescData + return file_module_base_initial_proto_check_proto_rawDescData } -var file_check_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_check_proto_goTypes = []any{ +var file_module_base_initial_proto_check_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_module_base_initial_proto_check_proto_goTypes = []any{ (*Crc)(nil), // 0: initial.Crc (*StatusReply)(nil), // 1: initial.StatusReply (*ConfigRequest)(nil), // 2: initial.ConfigRequest @@ -502,7 +502,7 @@ var file_check_proto_goTypes = []any{ (*CheckForUpdatesRequest)(nil), // 5: initial.CheckForUpdatesRequest (*CheckForUpdatesReply)(nil), // 6: initial.CheckForUpdatesReply } -var file_check_proto_depIdxs = []int32{ +var file_module_base_initial_proto_check_proto_depIdxs = []int32{ 4, // 0: initial.ConfigReply.data:type_name -> initial.ConfigItem 0, // 1: initial.Check.Hello:input_type -> initial.Crc 2, // 2: initial.Check.Config:input_type -> initial.ConfigRequest @@ -517,26 +517,26 @@ var file_check_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_check_proto_init() } -func file_check_proto_init() { - if File_check_proto != nil { +func init() { file_module_base_initial_proto_check_proto_init() } +func file_module_base_initial_proto_check_proto_init() { + if File_module_base_initial_proto_check_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_check_proto_rawDesc), len(file_check_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_initial_proto_check_proto_rawDesc), len(file_module_base_initial_proto_check_proto_rawDesc)), NumEnums: 0, NumMessages: 7, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_check_proto_goTypes, - DependencyIndexes: file_check_proto_depIdxs, - MessageInfos: file_check_proto_msgTypes, + GoTypes: file_module_base_initial_proto_check_proto_goTypes, + DependencyIndexes: file_module_base_initial_proto_check_proto_depIdxs, + MessageInfos: file_module_base_initial_proto_check_proto_msgTypes, }.Build() - File_check_proto = out.File - file_check_proto_goTypes = nil - file_check_proto_depIdxs = nil + File_module_base_initial_proto_check_proto = out.File + file_module_base_initial_proto_check_proto_goTypes = nil + file_module_base_initial_proto_check_proto_depIdxs = nil } diff --git a/module/base/initial/pb/check.pb.gw.go b/module/base/initial/pb/check.pb.gw.go index 4cc9c35..3829436 100644 --- a/module/base/initial/pb/check.pb.gw.go +++ b/module/base/initial/pb/check.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: check.proto +// source: module/base/initial/proto/check.proto /* Package initial is a reverse proxy. diff --git a/module/base/initial/pb/check_grpc.pb.go b/module/base/initial/pb/check_grpc.pb.go index 6177fee..b3c19f8 100644 --- a/module/base/initial/pb/check_grpc.pb.go +++ b/module/base/initial/pb/check_grpc.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: check.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/initial/proto/check.proto package initial @@ -77,7 +77,7 @@ func (c *checkClient) Updates(ctx context.Context, in *CheckForUpdatesRequest, o } // CheckServer is the server API for Check service. -// All implementations must embed UnimplementedCheckServer +// All implementations should embed UnimplementedCheckServer // for forward compatibility. // // initial-检测是否有新版或新的配置 @@ -88,10 +88,9 @@ type CheckServer interface { Config(context.Context, *ConfigRequest) (*ConfigReply, error) // 检查更新 Updates(context.Context, *CheckForUpdatesRequest) (*CheckForUpdatesReply, error) - mustEmbedUnimplementedCheckServer() } -// UnimplementedCheckServer must be embedded to have +// UnimplementedCheckServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -99,16 +98,15 @@ type CheckServer interface { type UnimplementedCheckServer struct{} func (UnimplementedCheckServer) Hello(context.Context, *Crc) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Hello not implemented") + return nil, status.Error(codes.Unimplemented, "method Hello not implemented") } func (UnimplementedCheckServer) Config(context.Context, *ConfigRequest) (*ConfigReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Config not implemented") + return nil, status.Error(codes.Unimplemented, "method Config not implemented") } func (UnimplementedCheckServer) Updates(context.Context, *CheckForUpdatesRequest) (*CheckForUpdatesReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Updates not implemented") + return nil, status.Error(codes.Unimplemented, "method Updates not implemented") } -func (UnimplementedCheckServer) mustEmbedUnimplementedCheckServer() {} -func (UnimplementedCheckServer) testEmbeddedByValue() {} +func (UnimplementedCheckServer) testEmbeddedByValue() {} // UnsafeCheckServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CheckServer will @@ -118,7 +116,7 @@ type UnsafeCheckServer interface { } func RegisterCheckServer(s grpc.ServiceRegistrar, srv CheckServer) { - // If the following call pancis, it indicates UnimplementedCheckServer was + // If the following call panics, it indicates UnimplementedCheckServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -203,5 +201,5 @@ var Check_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "check.proto", + Metadata: "module/base/initial/proto/check.proto", } diff --git a/module/base/initial/pb/data.pb.go b/module/base/initial/pb/data.pb.go index 9bb603c..5928da2 100644 --- a/module/base/initial/pb/data.pb.go +++ b/module/base/initial/pb/data.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: data.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/base/initial/proto/data.proto package initial @@ -29,7 +29,7 @@ type Empty struct { func (x *Empty) Reset() { *x = Empty{} - mi := &file_data_proto_msgTypes[0] + mi := &file_module_base_initial_proto_data_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -41,7 +41,7 @@ func (x *Empty) String() string { func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_data_proto_msgTypes[0] + mi := &file_module_base_initial_proto_data_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -54,7 +54,7 @@ func (x *Empty) ProtoReflect() protoreflect.Message { // Deprecated: Use Empty.ProtoReflect.Descriptor instead. func (*Empty) Descriptor() ([]byte, []int) { - return file_data_proto_rawDescGZIP(), []int{0} + return file_module_base_initial_proto_data_proto_rawDescGZIP(), []int{0} } type CountryReply struct { @@ -66,7 +66,7 @@ type CountryReply struct { func (x *CountryReply) Reset() { *x = CountryReply{} - mi := &file_data_proto_msgTypes[1] + mi := &file_module_base_initial_proto_data_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -78,7 +78,7 @@ func (x *CountryReply) String() string { func (*CountryReply) ProtoMessage() {} func (x *CountryReply) ProtoReflect() protoreflect.Message { - mi := &file_data_proto_msgTypes[1] + mi := &file_module_base_initial_proto_data_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -91,7 +91,7 @@ func (x *CountryReply) ProtoReflect() protoreflect.Message { // Deprecated: Use CountryReply.ProtoReflect.Descriptor instead. func (*CountryReply) Descriptor() ([]byte, []int) { - return file_data_proto_rawDescGZIP(), []int{1} + return file_module_base_initial_proto_data_proto_rawDescGZIP(), []int{1} } func (x *CountryReply) GetCountries() []*CountryItem { @@ -123,7 +123,7 @@ type CountryItem struct { func (x *CountryItem) Reset() { *x = CountryItem{} - mi := &file_data_proto_msgTypes[2] + mi := &file_module_base_initial_proto_data_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -135,7 +135,7 @@ func (x *CountryItem) String() string { func (*CountryItem) ProtoMessage() {} func (x *CountryItem) ProtoReflect() protoreflect.Message { - mi := &file_data_proto_msgTypes[2] + mi := &file_module_base_initial_proto_data_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -148,7 +148,7 @@ func (x *CountryItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CountryItem.ProtoReflect.Descriptor instead. func (*CountryItem) Descriptor() ([]byte, []int) { - return file_data_proto_rawDescGZIP(), []int{2} + return file_module_base_initial_proto_data_proto_rawDescGZIP(), []int{2} } func (x *CountryItem) GetId() uint32 { @@ -263,7 +263,7 @@ type AreasRequest struct { func (x *AreasRequest) Reset() { *x = AreasRequest{} - mi := &file_data_proto_msgTypes[3] + mi := &file_module_base_initial_proto_data_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -275,7 +275,7 @@ func (x *AreasRequest) String() string { func (*AreasRequest) ProtoMessage() {} func (x *AreasRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_proto_msgTypes[3] + mi := &file_module_base_initial_proto_data_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -288,7 +288,7 @@ func (x *AreasRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AreasRequest.ProtoReflect.Descriptor instead. func (*AreasRequest) Descriptor() ([]byte, []int) { - return file_data_proto_rawDescGZIP(), []int{3} + return file_module_base_initial_proto_data_proto_rawDescGZIP(), []int{3} } func (x *AreasRequest) GetCountryId() int32 { @@ -321,7 +321,7 @@ type AreasReply struct { func (x *AreasReply) Reset() { *x = AreasReply{} - mi := &file_data_proto_msgTypes[4] + mi := &file_module_base_initial_proto_data_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -333,7 +333,7 @@ func (x *AreasReply) String() string { func (*AreasReply) ProtoMessage() {} func (x *AreasReply) ProtoReflect() protoreflect.Message { - mi := &file_data_proto_msgTypes[4] + mi := &file_module_base_initial_proto_data_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -346,7 +346,7 @@ func (x *AreasReply) ProtoReflect() protoreflect.Message { // Deprecated: Use AreasReply.ProtoReflect.Descriptor instead. func (*AreasReply) Descriptor() ([]byte, []int) { - return file_data_proto_rawDescGZIP(), []int{4} + return file_module_base_initial_proto_data_proto_rawDescGZIP(), []int{4} } func (x *AreasReply) GetAreas() []*AreasItem { @@ -372,7 +372,7 @@ type AreasItem struct { func (x *AreasItem) Reset() { *x = AreasItem{} - mi := &file_data_proto_msgTypes[5] + mi := &file_module_base_initial_proto_data_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -384,7 +384,7 @@ func (x *AreasItem) String() string { func (*AreasItem) ProtoMessage() {} func (x *AreasItem) ProtoReflect() protoreflect.Message { - mi := &file_data_proto_msgTypes[5] + mi := &file_module_base_initial_proto_data_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -397,7 +397,7 @@ func (x *AreasItem) ProtoReflect() protoreflect.Message { // Deprecated: Use AreasItem.ProtoReflect.Descriptor instead. func (*AreasItem) Descriptor() ([]byte, []int) { - return file_data_proto_rawDescGZIP(), []int{5} + return file_module_base_initial_proto_data_proto_rawDescGZIP(), []int{5} } func (x *AreasItem) GetId() string { @@ -465,7 +465,7 @@ type DatasReply struct { func (x *DatasReply) Reset() { *x = DatasReply{} - mi := &file_data_proto_msgTypes[6] + mi := &file_module_base_initial_proto_data_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -477,7 +477,7 @@ func (x *DatasReply) String() string { func (*DatasReply) ProtoMessage() {} func (x *DatasReply) ProtoReflect() protoreflect.Message { - mi := &file_data_proto_msgTypes[6] + mi := &file_module_base_initial_proto_data_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -490,7 +490,7 @@ func (x *DatasReply) ProtoReflect() protoreflect.Message { // Deprecated: Use DatasReply.ProtoReflect.Descriptor instead. func (*DatasReply) Descriptor() ([]byte, []int) { - return file_data_proto_rawDescGZIP(), []int{6} + return file_module_base_initial_proto_data_proto_rawDescGZIP(), []int{6} } func (x *DatasReply) GetDatas() []*DatasItem { @@ -514,7 +514,7 @@ type DatasItem struct { func (x *DatasItem) Reset() { *x = DatasItem{} - mi := &file_data_proto_msgTypes[7] + mi := &file_module_base_initial_proto_data_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -526,7 +526,7 @@ func (x *DatasItem) String() string { func (*DatasItem) ProtoMessage() {} func (x *DatasItem) ProtoReflect() protoreflect.Message { - mi := &file_data_proto_msgTypes[7] + mi := &file_module_base_initial_proto_data_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -539,7 +539,7 @@ func (x *DatasItem) ProtoReflect() protoreflect.Message { // Deprecated: Use DatasItem.ProtoReflect.Descriptor instead. func (*DatasItem) Descriptor() ([]byte, []int) { - return file_data_proto_rawDescGZIP(), []int{7} + return file_module_base_initial_proto_data_proto_rawDescGZIP(), []int{7} } func (x *DatasItem) GetId() int64 { @@ -584,12 +584,11 @@ func (x *DatasItem) GetIcon() string { return "" } -var File_data_proto protoreflect.FileDescriptor +var File_module_base_initial_proto_data_proto protoreflect.FileDescriptor -const file_data_proto_rawDesc = "" + +const file_module_base_initial_proto_data_proto_rawDesc = "" + "\n" + - "\x17" + - "base/initial/data.proto\x12\ainitial\"\a\n" + + "$module/base/initial/proto/data.proto\x12\ainitial\"\a\n" + "\x05Empty\"B\n" + "\fCountryReply\x122\n" + "\tcountries\x18\x01 \x03(\v2\x14.initial.CountryItemR\tcountries\"\x8a\x03\n" + @@ -642,22 +641,22 @@ const file_data_proto_rawDesc = "" + "\x04Data\x122\n" + "\aCountry\x12\x0e.initial.Empty\x1a\x15.initial.CountryReply\"\x00\x125\n" + "\x05Areas\x12\x15.initial.AreasRequest\x1a\x13.initial.AreasReply\"\x00\x12.\n" + - "\x05Datas\x12\x0e.initial.Empty\x1a\x13.initial.DatasReply\"\x00B\vZ\t.;initialb\x06proto3" + "\x05Datas\x12\x0e.initial.Empty\x1a\x13.initial.DatasReply\"\x00B)Z'bsm/full/module/base/initial/pb;initialb\x06proto3" var ( - file_data_proto_rawDescOnce sync.Once - file_data_proto_rawDescData []byte + file_module_base_initial_proto_data_proto_rawDescOnce sync.Once + file_module_base_initial_proto_data_proto_rawDescData []byte ) -func file_data_proto_rawDescGZIP() []byte { - file_data_proto_rawDescOnce.Do(func() { - file_data_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_data_proto_rawDesc), len(file_data_proto_rawDesc))) +func file_module_base_initial_proto_data_proto_rawDescGZIP() []byte { + file_module_base_initial_proto_data_proto_rawDescOnce.Do(func() { + file_module_base_initial_proto_data_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_initial_proto_data_proto_rawDesc), len(file_module_base_initial_proto_data_proto_rawDesc))) }) - return file_data_proto_rawDescData + return file_module_base_initial_proto_data_proto_rawDescData } -var file_data_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_data_proto_goTypes = []any{ +var file_module_base_initial_proto_data_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_module_base_initial_proto_data_proto_goTypes = []any{ (*Empty)(nil), // 0: initial.Empty (*CountryReply)(nil), // 1: initial.CountryReply (*CountryItem)(nil), // 2: initial.CountryItem @@ -667,7 +666,7 @@ var file_data_proto_goTypes = []any{ (*DatasReply)(nil), // 6: initial.DatasReply (*DatasItem)(nil), // 7: initial.DatasItem } -var file_data_proto_depIdxs = []int32{ +var file_module_base_initial_proto_data_proto_depIdxs = []int32{ 2, // 0: initial.CountryReply.countries:type_name -> initial.CountryItem 5, // 1: initial.AreasReply.areas:type_name -> initial.AreasItem 7, // 2: initial.DatasReply.datas:type_name -> initial.DatasItem @@ -684,26 +683,26 @@ var file_data_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_data_proto_init() } -func file_data_proto_init() { - if File_data_proto != nil { +func init() { file_module_base_initial_proto_data_proto_init() } +func file_module_base_initial_proto_data_proto_init() { + if File_module_base_initial_proto_data_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_data_proto_rawDesc), len(file_data_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_initial_proto_data_proto_rawDesc), len(file_module_base_initial_proto_data_proto_rawDesc)), NumEnums: 0, NumMessages: 8, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_data_proto_goTypes, - DependencyIndexes: file_data_proto_depIdxs, - MessageInfos: file_data_proto_msgTypes, + GoTypes: file_module_base_initial_proto_data_proto_goTypes, + DependencyIndexes: file_module_base_initial_proto_data_proto_depIdxs, + MessageInfos: file_module_base_initial_proto_data_proto_msgTypes, }.Build() - File_data_proto = out.File - file_data_proto_goTypes = nil - file_data_proto_depIdxs = nil + File_module_base_initial_proto_data_proto = out.File + file_module_base_initial_proto_data_proto_goTypes = nil + file_module_base_initial_proto_data_proto_depIdxs = nil } diff --git a/module/base/initial/pb/data.pb.gw.go b/module/base/initial/pb/data.pb.gw.go index 84f30e3..af29d1a 100644 --- a/module/base/initial/pb/data.pb.gw.go +++ b/module/base/initial/pb/data.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: data.proto +// source: module/base/initial/proto/data.proto /* Package initial is a reverse proxy. diff --git a/module/base/initial/pb/data_grpc.pb.go b/module/base/initial/pb/data_grpc.pb.go index 252191d..eed82b2 100644 --- a/module/base/initial/pb/data_grpc.pb.go +++ b/module/base/initial/pb/data_grpc.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: data.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/initial/proto/data.proto package initial @@ -76,7 +76,7 @@ func (c *dataClient) Datas(ctx context.Context, in *Empty, opts ...grpc.CallOpti } // DataServer is the server API for Data service. -// All implementations must embed UnimplementedDataServer +// All implementations should embed UnimplementedDataServer // for forward compatibility. // // initial-数据 @@ -86,10 +86,9 @@ type DataServer interface { Areas(context.Context, *AreasRequest) (*AreasReply, error) // 系统数据 Datas(context.Context, *Empty) (*DatasReply, error) - mustEmbedUnimplementedDataServer() } -// UnimplementedDataServer must be embedded to have +// UnimplementedDataServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -97,16 +96,15 @@ type DataServer interface { type UnimplementedDataServer struct{} func (UnimplementedDataServer) Country(context.Context, *Empty) (*CountryReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Country not implemented") + return nil, status.Error(codes.Unimplemented, "method Country not implemented") } func (UnimplementedDataServer) Areas(context.Context, *AreasRequest) (*AreasReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Areas not implemented") + return nil, status.Error(codes.Unimplemented, "method Areas not implemented") } func (UnimplementedDataServer) Datas(context.Context, *Empty) (*DatasReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Datas not implemented") + return nil, status.Error(codes.Unimplemented, "method Datas not implemented") } -func (UnimplementedDataServer) mustEmbedUnimplementedDataServer() {} -func (UnimplementedDataServer) testEmbeddedByValue() {} +func (UnimplementedDataServer) testEmbeddedByValue() {} // UnsafeDataServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DataServer will @@ -116,7 +114,7 @@ type UnsafeDataServer interface { } func RegisterDataServer(s grpc.ServiceRegistrar, srv DataServer) { - // If the following call pancis, it indicates UnimplementedDataServer was + // If the following call panics, it indicates UnimplementedDataServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -201,5 +199,5 @@ var Data_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "data.proto", + Metadata: "module/base/initial/proto/data.proto", } diff --git a/module/base/initial/proto/check.proto b/module/base/initial/proto/check.proto index 5da7cee..ffeba0c 100644 --- a/module/base/initial/proto/check.proto +++ b/module/base/initial/proto/check.proto @@ -1,20 +1,20 @@ syntax = "proto3"; package initial; -option go_package = ".;initial"; +option go_package = "bsm/full/module/base/initial/pb;initial"; // initial-检测是否有新版或新的配置 service Check{ - + // HELLO rpc Hello(Crc) returns (StatusReply){} // 获取应用的相关配置信息 - rpc Config(ConfigRequest) returns (ConfigReply) {} + rpc Config(ConfigRequest) returns (ConfigReply) {} // 检查更新 - rpc Updates(CheckForUpdatesRequest) returns (CheckForUpdatesReply) {} + rpc Updates(CheckForUpdatesRequest) returns (CheckForUpdatesReply) {} } @@ -49,7 +49,7 @@ message ConfigItem { int64 version=4; //版本号 } - + message CheckForUpdatesRequest { string app = 1; // 应用程序名称 <必填> string os = 2; // 操作系统 <必填> diff --git a/module/base/initial/proto/data.proto b/module/base/initial/proto/data.proto index 2845d25..7661245 100644 --- a/module/base/initial/proto/data.proto +++ b/module/base/initial/proto/data.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package initial; -option go_package = ".;initial"; +option go_package = "bsm/full/module/base/initial/pb;initial"; // initial-数据 @@ -8,10 +8,10 @@ service Data{ rpc Country(Empty) returns (CountryReply) {} // 系统区域数据,默认级别:市 - rpc Areas(AreasRequest) returns (AreasReply) {} + rpc Areas(AreasRequest) returns (AreasReply) {} // 系统数据 - rpc Datas(Empty) returns (DatasReply) {} + rpc Datas(Empty) returns (DatasReply) {} } @@ -42,11 +42,11 @@ message CountryItem { message AreasRequest { // 国家ID,默认:中国 1 - int32 country_id = 1; + int32 country_id = 1; // 国家代码,默认:中国 CN - string country_code = 2; + string country_code = 2; // 是否输出乡镇,默认:市级 - bool show_town = 3; + bool show_town = 3; } diff --git a/module/base/passport/CHANGELOG.md b/module/base/passport/CHANGELOG.md deleted file mode 100644 index b6bdcf3..0000000 --- a/module/base/passport/CHANGELOG.md +++ /dev/null @@ -1,237 +0,0 @@ -# 更新日志 - -本文档记录了 Passport Service 项目的所有重要更改。 - -## [优化版本] - 2024-10-02 - -### 🚀 新增功能 -- **完整的构建工具链**: 新增 Makefile,支持多平台构建、测试、部署 -- **容器化支持**: 完整的 Docker 和 Docker Compose 部署方案 -- **健康检查系统**: 新增 `/health` 和 `/ping` 端点,支持组件级健康监控 -- **缓存抽象层**: 新增 Redis 缓存服务,提升 API 响应性能 -- **错误处理机制**: 完善的错误码定义和统一错误处理 -- **多环境配置**: 支持开发、测试、生产环境配置 - -### 🔧 优化改进 -- **Go 版本升级**: 升级到 Go 1.25.1,享受最新性能优化 -- **依赖管理**: 重新整理 go.mod 结构,更新所有依赖到最新稳定版本 -- **输入验证**: 所有 API 接口增加严格的输入参数验证 -- **数据库查询**: 优化查询逻辑,添加错误处理和事务管理 -- **配置管理**: 改进配置加载和验证逻辑,增加默认值处理 -- **Token 管理**: 优化 JWT Token 生成和验证机制 -- **登录安全**: 增加登录尝试次数限制,防止暴力破解 - -### 🐛 修复问题 -- 修复 TODO 函数实现,完善业务逻辑 -- 修复数据库操作中的错误处理缺失问题 -- 修复 gRPC 服务注册中的安全警告 -- 修复配置文件中的类型不匹配问题 -- 修复缓存操作中的并发安全问题 - -### 📚 文档更新 -- **README.md**: 全面重写为中文版本,添加详细的使用指南 -- **API 文档**: 完善接口说明和示例 -- **部署文档**: 添加 Docker 和 Kubernetes 部署指南 -- **开发文档**: 添加开发环境设置和贡献指南 - -### 🏗️ 架构改进 -- **缓存层**: 新增多层缓存策略,支持用户数据、Token、验证码缓存 -- **错误处理**: 统一错误码和错误处理机制,提供友好的错误信息 -- **配置管理**: 优化配置加载和验证逻辑 -- **服务发现**: 完善微服务注册和发现机制 -- **健康监控**: 新增组件级健康检查,支持数据库、Redis、Etcd 监控 - -### 🔒 安全增强 -- **输入验证**: 严格的参数校验和类型检查 -- **登录保护**: 登录尝试次数限制和账户锁定机制 -- **Token 安全**: 改进 JWT Token 生成和验证 -- **错误信息**: 避免敏感信息泄露 -- **连接安全**: 支持 TLS 加密连接(生产环境推荐) - -### 📊 性能优化 -- **缓存策略**: 多层缓存提升响应速度 - - 用户信息缓存: 1小时 TTL - - Token 缓存: 24小时 TTL - - 验证码缓存: 自定义 TTL -- **数据库优化**: 查询优化和连接池配置 -- **内存管理**: 优化内存使用和垃圾回收 -- **并发处理**: 改进并发安全和性能 - -### 🛠️ 开发工具 -- **Makefile**: 完整的构建、测试、部署工具链 - - 支持多平台构建 (Linux, Windows, macOS) - - 集成代码检查和格式化 - - 支持 Docker 构建和部署 - - 数据库备份和恢复工具 -- **Docker**: 标准化的容器化部署 - - 多阶段构建优化镜像大小 - - 非 root 用户运行提升安全性 - - 健康检查和自动重启 -- **监控工具**: 可选的 Prometheus 和 Grafana 集成 - -### 📦 依赖更新 -- 更新所有 Go 依赖到最新稳定版本 -- 优化依赖管理和模块结构 -- 移除未使用的依赖包 -- 统一依赖版本管理 - -### 🧪 测试改进 -- **单元测试**: 为核心业务逻辑添加单元测试 -- **集成测试**: 完善 gRPC 接口集成测试 -- **健康检查**: 添加组件健康检查测试 -- **缓存测试**: 添加缓存功能测试 - ---- - -## 升级指南 - -### 从旧版本升级 - -1. **备份数据** - ```bash - make backup-db - ``` - -2. **更新代码** - ```bash - git pull origin main - make deps - ``` - -3. **重新构建** - ```bash - make build - ``` - -4. **更新配置** - - 检查配置文件格式变更 - - 更新环境变量设置 - - 确保 Redis 配置正确 - -5. **重启服务** - ```bash - make docker-compose-down - make docker-compose-up - ``` - -### 配置迁移 - -- Redis 缓存配置现在是必需的 -- 数据库连接字符串格式保持不变 -- 新增健康检查端点配置 -- JWT Token 配置增加默认值处理 - -### API 兼容性 - -- 所有现有 API 保持向后兼容 -- 响应格式保持不变 -- 新增输入验证可能影响无效请求 -- 错误码统一,错误信息更加友好 - ---- - -## 新增功能详解 - -### 缓存系统 -```go -// 用户信息缓存 -account, err := models.GetAccountByCache(ctx, "identity", userIdentity) - -// Token 缓存 -err := models.SetTokenCache(ctx, identity, token) - -// 验证码缓存 -err := models.SetVerificationCodeCache(ctx, phone, code, 5*time.Minute) -``` - -### 健康检查 -```bash -# 详细健康检查 -curl http://localhost:12425/health - -# 简单存活检查 -curl http://localhost:12425/ping -``` - -### 错误处理 -```go -// 使用统一错误码 -return excode.ErrInvalidCredentialsError() - -// 自定义错误信息 -return excode.NewError(excode.ErrUserNotFound, "指定用户不存在") -``` - ---- - -## 贡献者 - -- **David Yan** - 项目维护者和主要开发者 -- **BSM Team** - 代码审查和测试支持 - ---- - -## 技术栈 - -- **语言**: Go 1.25.1 -- **框架**: gRPC + HTTP Gateway -- **数据库**: PostgreSQL 15+ / MySQL 8+ -- **缓存**: Redis 7+ -- **服务发现**: Etcd 3.5+ -- **容器**: Docker + Docker Compose -- **构建**: Makefile + Buf -- **监控**: Prometheus + Grafana (可选) - ---- - -## 性能指标 - -### 优化前后对比 - -| 指标 | 优化前 | 优化后 | 提升 | -|------|--------|--------|------| -| 用户登录 | 100ms | 20ms | 80% | -| 用户信息查询 | 80ms | 10ms | 87.5% | -| Token 验证 | 50ms | 5ms | 90% | -| 内存使用 | 120MB | 90MB | 25% | -| 启动时间 | 15s | 8s | 47% | - -### 缓存命中率 - -- 用户信息: 95%+ -- Token 验证: 98%+ -- 验证码: 90%+ -- 配置数据: 99%+ - ---- - -## 已知问题 - -目前没有已知的重大问题。 - -如发现问题,请在 GitHub Issues 中报告。 - -## 计划功能 - -- [ ] OAuth2 集成支持 -- [ ] 多因子认证 (MFA) -- [ ] 用户行为分析 -- [ ] GraphQL API 支持 -- [ ] 实时通知系统 -- [ ] 高级权限管理 -- [ ] 国际化支持 -- [ ] 移动端 SDK - ---- - -## 支持 - -如需帮助或有疑问: - -1. 查看文档: `README.md` -2. 提交 Issue: GitHub Issues -3. 联系团队: 内部沟通渠道 - ---- - -**构建于 ❤️ BSM 开发团队** diff --git a/module/base/passport/Dockerfile b/module/base/passport/Dockerfile deleted file mode 100644 index 733c144..0000000 --- a/module/base/passport/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -# 使用官方Go镜像作为构建环境 -FROM golang:1.26.5-alpine AS builder - -# 设置工作目录 -WORKDIR /app - -# 安装必要的工具 -RUN apk add --no-cache git ca-certificates tzdata - -# 设置Go环境变量 -ENV GO111MODULE=on \ - GOPROXY=https://goproxy.cn,direct \ - GOPRIVATE=git.apinb.com/* \ - GONOPROXY=git.apinb.com/* \ - GOINSECURE=git.apinb.com/* \ - GONOSUMDB=git.apinb.com/* \ - GOEXPERIMENT=jsonv2 - -# 复制go.mod和go.sum文件 -COPY go.mod go.sum ./ - -# 下载依赖 -RUN go mod download - -# 复制源代码 -COPY . . - -# 构建应用 -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ - -ldflags='-w -s -extldflags "-static"' \ - -a -installsuffix cgo \ - -o passport \ - ./cmd/main/main.go - -# 使用最小的alpine镜像作为运行环境 -FROM alpine:latest - -# 安装必要的包 -RUN apk --no-cache add ca-certificates tzdata curl - -# 设置时区 -ENV TZ=Asia/Shanghai - -# 创建非root用户 -RUN addgroup -g 1001 -S appgroup && \ - adduser -u 1001 -S appuser -G appgroup - -# 设置工作目录 -WORKDIR /app - -# 从构建阶段复制二进制文件 -COPY --from=builder /app/passport . - -# 复制配置文件和其他必要文件 -COPY --from=builder /app/etc ./etc -COPY --from=builder /app/swagger ./swagger - -# 创建日志目录 -RUN mkdir -p /app/logs && \ - chown -R appuser:appgroup /app - -# 切换到非root用户 -USER appuser - -# 暴露端口 -EXPOSE 12426 12425 - -# 健康检查 -HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD curl -f http://localhost:12425/health || exit 1 - -# 启动应用 -CMD ["./passport"] diff --git a/module/base/passport/Makefile b/module/base/passport/Makefile deleted file mode 100644 index e6e9746..0000000 --- a/module/base/passport/Makefile +++ /dev/null @@ -1,261 +0,0 @@ -# Passport Service Makefile - -# 变量定义 -APP_NAME := passport -VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "v1.0.0") -BUILD_TIME := $(shell date +%Y-%m-%d\ %H:%M:%S) -GIT_COMMIT := $(shell git rev-parse HEAD 2>/dev/null || echo "unknown") -GO_VERSION := $(shell go version | awk '{print $$3}') - -# 构建标志 -LDFLAGS := -ldflags "-X main.Version=$(VERSION) -X main.BuildTime=$(BUILD_TIME) -X main.GitCommit=$(GIT_COMMIT) -w -s" -BUILD_FLAGS := -trimpath $(LDFLAGS) - -# 目录 -BUILD_DIR := build -PROTO_DIR := proto -PB_DIR := pb - -# Go环境变量 -export GO111MODULE=on -export GOPROXY=https://goproxy.cn,direct -export GOPRIVATE=git.apinb.com/* -export GONOPROXY=git.apinb.com/* -export GOINSECURE=git.apinb.com/* -export GONOSUMDB=git.apinb.com/* -export GOEXPERIMENT=jsonv2 - -.PHONY: help -help: ## 显示帮助信息 - @echo "Passport Service - 可用的命令:" - @echo "" - @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) - -.PHONY: tidy -tidy: ## 下载依赖 - @echo "下载Go依赖..." - go mod download - go mod tidy - -.PHONY: deps -deps: ## 下载构建依赖 - @echo "下载Go依赖..." - go mod download - -.PHONY: proto -proto: ## 生成当前项目Protocol Buffer代码 - @echo "生成Protocol Buffer代码..." - buf generate - -.PHONY: buf -buf: ## buf生成相关代码 - @echo "buf生成相关代码..." - buf generate - @echo "buf生成完成" - cd ../../bsm-sdk/client && \ - git add . && \ - git commit -m "Auto Update Commit." && \ - git push - -.PHONY: build -build: deps ## 构建应用 - @echo "构建应用..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME) ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)" - -.PHONY: build-linux -build-linux: deps ## 构建Linux版本 - @echo "构建Linux版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-linux-amd64 ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-linux-amd64" - -.PHONY: build-windows -build-windows: deps ## 构建Windows版本 - @echo "构建Windows版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-windows-amd64.exe ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-windows-amd64.exe" - -.PHONY: build-darwin -build-darwin: deps ## 构建macOS版本 - @echo "构建macOS版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-darwin-amd64 ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-darwin-amd64" - -.PHONY: build-all -build-all: build-linux build-windows build-darwin ## 构建所有平台版本 - -.PHONY: run -run: build ## 运行应用 - @echo "启动应用..." - ./$(BUILD_DIR)/$(APP_NAME) - -.PHONY: dev -dev: ## 开发模式运行 - @echo "开发模式启动..." - go run ./cmd/main/main.go - -.PHONY: test -test: ## 运行测试 - @echo "运行测试..." - go test -v ./... - -.PHONY: test-coverage -test-coverage: ## 运行测试并生成覆盖率报告 - @echo "运行测试覆盖率..." - go test -v -coverprofile=coverage.out ./... - go tool cover -html=coverage.out -o coverage.html - @echo "覆盖率报告生成: coverage.html" - -.PHONY: test-grpc -test-grpc: ## 运行gRPC测试 - @echo "运行gRPC测试..." - @if [ -f ./test/grpc/main.go ]; then \ - go run ./test/grpc/main.go; \ - else \ - echo "gRPC测试文件不存在"; \ - fi - -.PHONY: lint -lint: ## 运行代码检查 - @echo "运行代码检查..." - @if command -v golangci-lint >/dev/null 2>&1; then \ - golangci-lint run; \ - else \ - echo "golangci-lint 未安装,使用go vet..."; \ - go vet ./...; \ - fi - -.PHONY: fmt -fmt: ## 格式化代码 - @echo "格式化代码..." - go fmt ./... - @if command -v goimports >/dev/null 2>&1; then \ - goimports -w .; \ - fi - -.PHONY: security -security: ## 安全检查 - @echo "运行安全检查..." - @if command -v gosec >/dev/null 2>&1; then \ - gosec ./...; \ - else \ - echo "gosec 未安装,请运行: go install github.com/securego/gosec/v2/cmd/gosec@latest"; \ - fi - -.PHONY: docker-build -docker-build: ## 构建Docker镜像 - @echo "构建Docker镜像..." - docker build -t $(APP_NAME):$(VERSION) . - docker tag $(APP_NAME):$(VERSION) $(APP_NAME):latest - -.PHONY: docker-run -docker-run: ## 运行Docker容器 - @echo "运行Docker容器..." - docker run -d --name $(APP_NAME) -p 12426:12426 -p 12425:12425 $(APP_NAME):latest - -.PHONY: docker-stop -docker-stop: ## 停止Docker容器 - @echo "停止Docker容器..." - docker stop $(APP_NAME) || true - docker rm $(APP_NAME) || true - -.PHONY: docker-compose-up -docker-compose-up: ## 启动docker-compose服务 - @echo "启动docker-compose服务..." - docker-compose up -d - -.PHONY: docker-compose-down -docker-compose-down: ## 停止docker-compose服务 - @echo "停止docker-compose服务..." - docker-compose down - -.PHONY: docker-compose-logs -docker-compose-logs: ## 查看docker-compose日志 - docker-compose logs -f - -.PHONY: clean -clean: ## 清理构建文件 - @echo "清理构建文件..." - rm -rf $(BUILD_DIR) - rm -f coverage.out coverage.html - docker system prune -f - -.PHONY: install-tools -install-tools: ## 安装开发工具 - @echo "安装开发工具..." - go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - go install golang.org/x/tools/cmd/goimports@latest - go install github.com/securego/gosec/v2/cmd/gosec@latest - go install github.com/bufbuild/buf/cmd/buf@latest - go install git.apinb.com/bsm-tools/protoc-gen-markdown@latest - go install git.apinb.com/bsm-tools/protoc-gen-slc@latest - go install git.apinb.com/bsm-tools/protoc-gen-ts@latest - go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest - go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest - go install github.com/pepabo/protoc-gen-go-client@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - -.PHONY: update -update: ## 更新依赖 - @echo "更新依赖..." - go get -u ./... - go mod tidy - -.PHONY: version -version: ## 显示版本信息 - @echo "应用名称: $(APP_NAME)" - @echo "版本: $(VERSION)" - @echo "构建时间: $(BUILD_TIME)" - @echo "Git提交: $(GIT_COMMIT)" - @echo "Go版本: $(GO_VERSION)" - -.PHONY: swagger -swagger: ## 生成Swagger文档 - @echo "Swagger文档已通过protobuf生成在swagger目录" - -.PHONY: init-db -init-db: ## 初始化数据库 - @echo "初始化数据库..." - @echo "数据库表将在服务启动时自动创建" - @echo "请确保数据库连接配置正确" - -.PHONY: backup-db -backup-db: ## 备份数据库 - @echo "备份数据库..." - @read -p "请输入数据库连接字符串: " DB_URL; \ - pg_dump $$DB_URL > backup_$(shell date +%Y%m%d_%H%M%S).sql - -.PHONY: migrate -migrate: ## 运行数据库迁移 - @echo "运行数据库迁移..." - go run ./cmd/cli/main.go - -.PHONY: seed -seed: ## 填充测试数据 - @echo "填充测试数据..." - @echo "测试数据将在服务启动时自动创建" - -.PHONY: health -health: ## 检查服务健康状态 - @echo "检查服务健康状态..." - @curl -f http://localhost:12425/health || echo "服务未运行或健康检查失败" - -.PHONY: logs -logs: ## 查看服务日志 - @echo "查看服务日志..." - @if [ -f ./logs/passport.log ]; then \ - tail -f ./logs/passport.log; \ - else \ - echo "日志文件不存在"; \ - fi - -.PHONY: all -all: clean deps proto build test lint ## 执行完整的构建流程 - -# 默认目标 -.DEFAULT_GOAL := help diff --git a/module/base/passport/docker-compose.yml b/module/base/passport/docker-compose.yml deleted file mode 100644 index 8211854..0000000 --- a/module/base/passport/docker-compose.yml +++ /dev/null @@ -1,180 +0,0 @@ -version: '3.8' - -services: - # Passport Service - passport-service: - build: - context: . - dockerfile: Dockerfile - container_name: passport-service - restart: unless-stopped - ports: - - "12426:12426" # gRPC port - - "12425:12425" # HTTP Gateway port - environment: - - SERVICE_ENV=docker - - TZ=Asia/Shanghai - volumes: - - ./etc:/app/etc:ro - - ./logs:/app/logs - depends_on: - - postgres - - redis - - etcd - networks: - - passport-network - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:12425/health"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 40s - - # PostgreSQL Database - postgres: - image: postgres:15-alpine - container_name: passport-postgres - restart: unless-stopped - environment: - POSTGRES_DB: passport_db - POSTGRES_USER: postgres - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-passport_password} - TZ: Asia/Shanghai - volumes: - - postgres_data:/var/lib/postgresql/data - - ./scripts:/docker-entrypoint-initdb.d:ro - ports: - - "5432:5432" - networks: - - passport-network - healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgres"] - interval: 10s - timeout: 5s - retries: 5 - - # Redis Cache - redis: - image: redis:7-alpine - container_name: passport-redis - restart: unless-stopped - command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD:-passport_redis_password} - environment: - TZ: Asia/Shanghai - volumes: - - redis_data:/data - ports: - - "6379:6379" - networks: - - passport-network - healthcheck: - test: ["CMD", "redis-cli", "--raw", "incr", "ping"] - interval: 10s - timeout: 3s - retries: 5 - - # Etcd Service Discovery - etcd: - image: quay.io/coreos/etcd:v3.5.9 - container_name: passport-etcd - restart: unless-stopped - environment: - ETCD_NAME: etcd0 - ETCD_DATA_DIR: /etcd-data - ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379 - ETCD_ADVERTISE_CLIENT_URLS: http://etcd:2379 - ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380 - ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd:2380 - ETCD_INITIAL_CLUSTER: etcd0=http://etcd:2380 - ETCD_INITIAL_CLUSTER_TOKEN: etcd-cluster-1 - ETCD_INITIAL_CLUSTER_STATE: new - ETCD_AUTO_COMPACTION_RETENTION: 1 - TZ: Asia/Shanghai - volumes: - - etcd_data:/etcd-data - ports: - - "2379:2379" - - "2380:2380" - networks: - - passport-network - healthcheck: - test: ["CMD", "etcdctl", "endpoint", "health"] - interval: 10s - timeout: 5s - retries: 5 - - # Nginx Reverse Proxy (Optional) - nginx: - image: nginx:alpine - container_name: passport-nginx - restart: unless-stopped - ports: - - "80:80" - - "443:443" - volumes: - - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro - - ./nginx/ssl:/etc/nginx/ssl:ro - depends_on: - - passport-service - networks: - - passport-network - profiles: - - with-nginx - - # Prometheus Monitoring (Optional) - prometheus: - image: prom/prometheus:latest - container_name: passport-prometheus - restart: unless-stopped - ports: - - "9090:9090" - volumes: - - ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro - - prometheus_data:/prometheus - command: - - '--config.file=/etc/prometheus/prometheus.yml' - - '--storage.tsdb.path=/prometheus' - - '--web.console.libraries=/etc/prometheus/console_libraries' - - '--web.console.templates=/etc/prometheus/consoles' - - '--storage.tsdb.retention.time=200h' - - '--web.enable-lifecycle' - networks: - - passport-network - profiles: - - with-monitoring - - # Grafana Dashboard (Optional) - grafana: - image: grafana/grafana:latest - container_name: passport-grafana - restart: unless-stopped - ports: - - "3000:3000" - environment: - GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD:-admin} - volumes: - - grafana_data:/var/lib/grafana - - ./monitoring/grafana/dashboards:/etc/grafana/provisioning/dashboards:ro - - ./monitoring/grafana/datasources:/etc/grafana/provisioning/datasources:ro - depends_on: - - prometheus - networks: - - passport-network - profiles: - - with-monitoring - -volumes: - postgres_data: - driver: local - redis_data: - driver: local - etcd_data: - driver: local - prometheus_data: - driver: local - grafana_data: - driver: local - -networks: - passport-network: - driver: bridge diff --git a/module/base/passport/pb/account.pb.go b/module/base/passport/pb/account.pb.go index dbb65e8..f669759 100644 --- a/module/base/passport/pb/account.pb.go +++ b/module/base/passport/pb/account.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc (unknown) -// source: account.proto +// protoc v7.35.0 +// source: module/base/passport/proto/account.proto package passport import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -41,7 +42,7 @@ type GetFullReply struct { Cover string `protobuf:"bytes,15,opt,name=cover,proto3" json:"cover,omitempty"` // 背景&封面 Score int32 `protobuf:"varint,16,opt,name=score,proto3" json:"score,omitempty"` // 积分 Level int32 `protobuf:"varint,17,opt,name=level,proto3" json:"level,omitempty"` // 等级 - VerifyStatus *VerifyStatus `protobuf:"bytes,18,opt,name=verify_status,json=verifyStatus,proto3" json:"verify_status,omitempty"` // 用户验证状态 + VerifyStatus *protobuf.VerifyStatus `protobuf:"bytes,18,opt,name=verify_status,json=verifyStatus,proto3" json:"verify_status,omitempty"` // 用户验证状态 Tags []*TagItem `protobuf:"bytes,19,rep,name=tags,proto3" json:"tags,omitempty"` // 用户标签 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -49,7 +50,7 @@ type GetFullReply struct { func (x *GetFullReply) Reset() { *x = GetFullReply{} - mi := &file_account_proto_msgTypes[0] + mi := &file_module_base_passport_proto_account_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -61,7 +62,7 @@ func (x *GetFullReply) String() string { func (*GetFullReply) ProtoMessage() {} func (x *GetFullReply) ProtoReflect() protoreflect.Message { - mi := &file_account_proto_msgTypes[0] + mi := &file_module_base_passport_proto_account_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -74,7 +75,7 @@ func (x *GetFullReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFullReply.ProtoReflect.Descriptor instead. func (*GetFullReply) Descriptor() ([]byte, []int) { - return file_account_proto_rawDescGZIP(), []int{0} + return file_module_base_passport_proto_account_proto_rawDescGZIP(), []int{0} } func (x *GetFullReply) GetIdentity() string { @@ -196,7 +197,7 @@ func (x *GetFullReply) GetLevel() int32 { return 0 } -func (x *GetFullReply) GetVerifyStatus() *VerifyStatus { +func (x *GetFullReply) GetVerifyStatus() *protobuf.VerifyStatus { if x != nil { return x.VerifyStatus } @@ -220,7 +221,7 @@ type TagItem struct { func (x *TagItem) Reset() { *x = TagItem{} - mi := &file_account_proto_msgTypes[1] + mi := &file_module_base_passport_proto_account_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -232,7 +233,7 @@ func (x *TagItem) String() string { func (*TagItem) ProtoMessage() {} func (x *TagItem) ProtoReflect() protoreflect.Message { - mi := &file_account_proto_msgTypes[1] + mi := &file_module_base_passport_proto_account_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -245,7 +246,7 @@ func (x *TagItem) ProtoReflect() protoreflect.Message { // Deprecated: Use TagItem.ProtoReflect.Descriptor instead. func (*TagItem) Descriptor() ([]byte, []int) { - return file_account_proto_rawDescGZIP(), []int{1} + return file_module_base_passport_proto_account_proto_rawDescGZIP(), []int{1} } func (x *TagItem) GetName() string { @@ -282,7 +283,7 @@ type SetDataRequest struct { func (x *SetDataRequest) Reset() { *x = SetDataRequest{} - mi := &file_account_proto_msgTypes[2] + mi := &file_module_base_passport_proto_account_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -294,7 +295,7 @@ func (x *SetDataRequest) String() string { func (*SetDataRequest) ProtoMessage() {} func (x *SetDataRequest) ProtoReflect() protoreflect.Message { - mi := &file_account_proto_msgTypes[2] + mi := &file_module_base_passport_proto_account_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -307,7 +308,7 @@ func (x *SetDataRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetDataRequest.ProtoReflect.Descriptor instead. func (*SetDataRequest) Descriptor() ([]byte, []int) { - return file_account_proto_rawDescGZIP(), []int{2} + return file_module_base_passport_proto_account_proto_rawDescGZIP(), []int{2} } func (x *SetDataRequest) GetNickname() string { @@ -404,7 +405,7 @@ type SetPasswordRequest struct { func (x *SetPasswordRequest) Reset() { *x = SetPasswordRequest{} - mi := &file_account_proto_msgTypes[3] + mi := &file_module_base_passport_proto_account_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -416,7 +417,7 @@ func (x *SetPasswordRequest) String() string { func (*SetPasswordRequest) ProtoMessage() {} func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message { - mi := &file_account_proto_msgTypes[3] + mi := &file_module_base_passport_proto_account_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -429,7 +430,7 @@ func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetPasswordRequest.ProtoReflect.Descriptor instead. func (*SetPasswordRequest) Descriptor() ([]byte, []int) { - return file_account_proto_rawDescGZIP(), []int{3} + return file_module_base_passport_proto_account_proto_rawDescGZIP(), []int{3} } func (x *SetPasswordRequest) GetOldPassword() string { @@ -455,7 +456,7 @@ type StatisticsRequest struct { func (x *StatisticsRequest) Reset() { *x = StatisticsRequest{} - mi := &file_account_proto_msgTypes[4] + mi := &file_module_base_passport_proto_account_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -467,7 +468,7 @@ func (x *StatisticsRequest) String() string { func (*StatisticsRequest) ProtoMessage() {} func (x *StatisticsRequest) ProtoReflect() protoreflect.Message { - mi := &file_account_proto_msgTypes[4] + mi := &file_module_base_passport_proto_account_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -480,7 +481,7 @@ func (x *StatisticsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StatisticsRequest.ProtoReflect.Descriptor instead. func (*StatisticsRequest) Descriptor() ([]byte, []int) { - return file_account_proto_rawDescGZIP(), []int{4} + return file_module_base_passport_proto_account_proto_rawDescGZIP(), []int{4} } func (x *StatisticsRequest) GetField() []string { @@ -499,7 +500,7 @@ type StatisticsReply struct { func (x *StatisticsReply) Reset() { *x = StatisticsReply{} - mi := &file_account_proto_msgTypes[5] + mi := &file_module_base_passport_proto_account_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -511,7 +512,7 @@ func (x *StatisticsReply) String() string { func (*StatisticsReply) ProtoMessage() {} func (x *StatisticsReply) ProtoReflect() protoreflect.Message { - mi := &file_account_proto_msgTypes[5] + mi := &file_module_base_passport_proto_account_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -524,7 +525,7 @@ func (x *StatisticsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use StatisticsReply.ProtoReflect.Descriptor instead. func (*StatisticsReply) Descriptor() ([]byte, []int) { - return file_account_proto_rawDescGZIP(), []int{5} + return file_module_base_passport_proto_account_proto_rawDescGZIP(), []int{5} } func (x *StatisticsReply) GetData() map[string]int64 { @@ -534,11 +535,11 @@ func (x *StatisticsReply) GetData() map[string]int64 { return nil } -var File_account_proto protoreflect.FileDescriptor +var File_module_base_passport_proto_account_proto protoreflect.FileDescriptor -const file_account_proto_rawDesc = "" + +const file_module_base_passport_proto_account_proto_rawDesc = "" + "\n" + - "\x1bbase/passport/account.proto\x12\bpassport\x1a\x15passport/blocks.proto\"\x82\x04\n" + + "(module/base/passport/proto/account.proto\x12\bpassport\x1a\x15protobuf/blocks.proto\"\x80\x04\n" + "\fGetFullReply\x12\x1a\n" + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" + "\aaccount\x18\x02 \x01(\tR\aaccount\x12\x14\n" + @@ -557,8 +558,8 @@ const file_account_proto_rawDesc = "" + "\x04sign\x18\x0e \x01(\tR\x04sign\x12\x14\n" + "\x05cover\x18\x0f \x01(\tR\x05cover\x12\x14\n" + "\x05score\x18\x10 \x01(\x05R\x05score\x12\x14\n" + - "\x05level\x18\x11 \x01(\x05R\x05level\x12;\n" + - "\rverify_status\x18\x12 \x01(\v2\x16.passport.VerifyStatusR\fverifyStatus\x12%\n" + + "\x05level\x18\x11 \x01(\x05R\x05level\x129\n" + + "\rverify_status\x18\x12 \x01(\v2\x14.blocks.VerifyStatusR\fverifyStatus\x12%\n" + "\x04tags\x18\x13 \x03(\v2\x11.passport.TagItemR\x04tags\"1\n" + "\aTagItem\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" + @@ -586,58 +587,57 @@ const file_account_proto_rawDesc = "" + "\x04Data\x18\x01 \x03(\v2#.passport.StatisticsReply.DataEntryR\x04Data\x1a7\n" + "\tDataEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x012\xfe\x02\n" + - "\aAccount\x120\n" + - "\x03Get\x12\x0f.passport.Empty\x1a\x16.passport.GetFullReply\"\x00\x12<\n" + - "\aSetData\x12\x18.passport.SetDataRequest\x1a\x15.passport.StatusReply\"\x00\x12D\n" + - "\vSetPassword\x12\x1c.passport.SetPasswordRequest\x1a\x15.passport.StatusReply\"\x00\x127\n" + - "\tTagCreate\x12\x11.passport.TagItem\x1a\x15.passport.StatusReply\"\x00\x12<\n" + - "\tTagRemove\x12\x16.passport.IdentRequest\x1a\x15.passport.StatusReply\"\x00\x12F\n" + + "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x012\xf2\x02\n" + + "\aAccount\x12.\n" + + "\x03Get\x12\r.blocks.Empty\x1a\x16.passport.GetFullReply\"\x00\x12:\n" + + "\aSetData\x12\x18.passport.SetDataRequest\x1a\x13.blocks.StatusReply\"\x00\x12B\n" + + "\vSetPassword\x12\x1c.passport.SetPasswordRequest\x1a\x13.blocks.StatusReply\"\x00\x125\n" + + "\tTagCreate\x12\x11.passport.TagItem\x1a\x13.blocks.StatusReply\"\x00\x128\n" + + "\tTagRemove\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\"\x00\x12F\n" + "\n" + - "Statistics\x12\x1b.passport.StatisticsRequest\x1a\x19.passport.StatisticsReply\"\x00B\fZ\n" + - ".;passportb\x06proto3" + "Statistics\x12\x1b.passport.StatisticsRequest\x1a\x19.passport.StatisticsReply\"\x00B+Z)bsm/full/module/base/passport/pb;passportb\x06proto3" var ( - file_account_proto_rawDescOnce sync.Once - file_account_proto_rawDescData []byte + file_module_base_passport_proto_account_proto_rawDescOnce sync.Once + file_module_base_passport_proto_account_proto_rawDescData []byte ) -func file_account_proto_rawDescGZIP() []byte { - file_account_proto_rawDescOnce.Do(func() { - file_account_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_account_proto_rawDesc), len(file_account_proto_rawDesc))) +func file_module_base_passport_proto_account_proto_rawDescGZIP() []byte { + file_module_base_passport_proto_account_proto_rawDescOnce.Do(func() { + file_module_base_passport_proto_account_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_passport_proto_account_proto_rawDesc), len(file_module_base_passport_proto_account_proto_rawDesc))) }) - return file_account_proto_rawDescData + return file_module_base_passport_proto_account_proto_rawDescData } -var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_account_proto_goTypes = []any{ - (*GetFullReply)(nil), // 0: passport.GetFullReply - (*TagItem)(nil), // 1: passport.TagItem - (*SetDataRequest)(nil), // 2: passport.SetDataRequest - (*SetPasswordRequest)(nil), // 3: passport.SetPasswordRequest - (*StatisticsRequest)(nil), // 4: passport.StatisticsRequest - (*StatisticsReply)(nil), // 5: passport.StatisticsReply - nil, // 6: passport.StatisticsReply.DataEntry - (*VerifyStatus)(nil), // 7: passport.VerifyStatus - (*Empty)(nil), // 8: passport.Empty - (*IdentRequest)(nil), // 9: passport.IdentRequest - (*StatusReply)(nil), // 10: passport.StatusReply +var file_module_base_passport_proto_account_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_module_base_passport_proto_account_proto_goTypes = []any{ + (*GetFullReply)(nil), // 0: passport.GetFullReply + (*TagItem)(nil), // 1: passport.TagItem + (*SetDataRequest)(nil), // 2: passport.SetDataRequest + (*SetPasswordRequest)(nil), // 3: passport.SetPasswordRequest + (*StatisticsRequest)(nil), // 4: passport.StatisticsRequest + (*StatisticsReply)(nil), // 5: passport.StatisticsReply + nil, // 6: passport.StatisticsReply.DataEntry + (*protobuf.VerifyStatus)(nil), // 7: blocks.VerifyStatus + (*protobuf.Empty)(nil), // 8: blocks.Empty + (*protobuf.IdentRequest)(nil), // 9: blocks.IdentRequest + (*protobuf.StatusReply)(nil), // 10: blocks.StatusReply } -var file_account_proto_depIdxs = []int32{ - 7, // 0: passport.GetFullReply.verify_status:type_name -> passport.VerifyStatus +var file_module_base_passport_proto_account_proto_depIdxs = []int32{ + 7, // 0: passport.GetFullReply.verify_status:type_name -> blocks.VerifyStatus 1, // 1: passport.GetFullReply.tags:type_name -> passport.TagItem 6, // 2: passport.StatisticsReply.Data:type_name -> passport.StatisticsReply.DataEntry - 8, // 3: passport.Account.Get:input_type -> passport.Empty + 8, // 3: passport.Account.Get:input_type -> blocks.Empty 2, // 4: passport.Account.SetData:input_type -> passport.SetDataRequest 3, // 5: passport.Account.SetPassword:input_type -> passport.SetPasswordRequest 1, // 6: passport.Account.TagCreate:input_type -> passport.TagItem - 9, // 7: passport.Account.TagRemove:input_type -> passport.IdentRequest + 9, // 7: passport.Account.TagRemove:input_type -> blocks.IdentRequest 4, // 8: passport.Account.Statistics:input_type -> passport.StatisticsRequest 0, // 9: passport.Account.Get:output_type -> passport.GetFullReply - 10, // 10: passport.Account.SetData:output_type -> passport.StatusReply - 10, // 11: passport.Account.SetPassword:output_type -> passport.StatusReply - 10, // 12: passport.Account.TagCreate:output_type -> passport.StatusReply - 10, // 13: passport.Account.TagRemove:output_type -> passport.StatusReply + 10, // 10: passport.Account.SetData:output_type -> blocks.StatusReply + 10, // 11: passport.Account.SetPassword:output_type -> blocks.StatusReply + 10, // 12: passport.Account.TagCreate:output_type -> blocks.StatusReply + 10, // 13: passport.Account.TagRemove:output_type -> blocks.StatusReply 5, // 14: passport.Account.Statistics:output_type -> passport.StatisticsReply 9, // [9:15] is the sub-list for method output_type 3, // [3:9] is the sub-list for method input_type @@ -646,27 +646,26 @@ var file_account_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_account_proto_init() } -func file_account_proto_init() { - if File_account_proto != nil { +func init() { file_module_base_passport_proto_account_proto_init() } +func file_module_base_passport_proto_account_proto_init() { + if File_module_base_passport_proto_account_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_account_proto_rawDesc), len(file_account_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_passport_proto_account_proto_rawDesc), len(file_module_base_passport_proto_account_proto_rawDesc)), NumEnums: 0, NumMessages: 7, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_account_proto_goTypes, - DependencyIndexes: file_account_proto_depIdxs, - MessageInfos: file_account_proto_msgTypes, + GoTypes: file_module_base_passport_proto_account_proto_goTypes, + DependencyIndexes: file_module_base_passport_proto_account_proto_depIdxs, + MessageInfos: file_module_base_passport_proto_account_proto_msgTypes, }.Build() - File_account_proto = out.File - file_account_proto_goTypes = nil - file_account_proto_depIdxs = nil + File_module_base_passport_proto_account_proto = out.File + file_module_base_passport_proto_account_proto_goTypes = nil + file_module_base_passport_proto_account_proto_depIdxs = nil } diff --git a/module/base/passport/pb/account.pb.gw.go b/module/base/passport/pb/account.pb.gw.go index 103a481..6808fee 100644 --- a/module/base/passport/pb/account.pb.gw.go +++ b/module/base/passport/pb/account.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: account.proto +// source: module/base/passport/proto/account.proto /* Package passport is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package passport import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Account_Get_0(ctx context.Context, marshaler runtime.Marshaler, client AccountClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Account_Get_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Account_Get_0(ctx context.Context, marshaler runtime.Marshaler, server AccountServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -145,7 +146,7 @@ func local_request_Account_TagCreate_0(ctx context.Context, marshaler runtime.Ma func request_Account_TagRemove_0(ctx context.Context, marshaler runtime.Marshaler, client AccountClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -160,7 +161,7 @@ func request_Account_TagRemove_0(ctx context.Context, marshaler runtime.Marshale func local_request_Account_TagRemove_0(ctx context.Context, marshaler runtime.Marshaler, server AccountServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/base/passport/pb/account_grpc.pb.go b/module/base/passport/pb/account_grpc.pb.go index bc57118..8c2c96f 100644 --- a/module/base/passport/pb/account_grpc.pb.go +++ b/module/base/passport/pb/account_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.6.1 -// - protoc (unknown) -// source: account.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/passport/proto/account.proto package passport import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -34,15 +35,15 @@ const ( // assport通行证模块-帐号数据 type AccountClient interface { // 通过会员所有信息 - Get(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetFullReply, error) + Get(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*GetFullReply, error) // 更新会员的信息数据,字段值为空或是0,将不更新此数据 - SetData(ctx context.Context, in *SetDataRequest, opts ...grpc.CallOption) (*StatusReply, error) + SetData(ctx context.Context, in *SetDataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 更新会员的密码 - SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error) + SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 新增标签 - TagCreate(ctx context.Context, in *TagItem, opts ...grpc.CallOption) (*StatusReply, error) + TagCreate(ctx context.Context, in *TagItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 删除标签 - TagRemove(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + TagRemove(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 获取会员的相关统计数据 Statistics(ctx context.Context, in *StatisticsRequest, opts ...grpc.CallOption) (*StatisticsReply, error) } @@ -55,7 +56,7 @@ func NewAccountClient(cc grpc.ClientConnInterface) AccountClient { return &accountClient{cc} } -func (c *accountClient) Get(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetFullReply, error) { +func (c *accountClient) Get(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*GetFullReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetFullReply) err := c.cc.Invoke(ctx, Account_Get_FullMethodName, in, out, cOpts...) @@ -65,9 +66,9 @@ func (c *accountClient) Get(ctx context.Context, in *Empty, opts ...grpc.CallOpt return out, nil } -func (c *accountClient) SetData(ctx context.Context, in *SetDataRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *accountClient) SetData(ctx context.Context, in *SetDataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Account_SetData_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -75,9 +76,9 @@ func (c *accountClient) SetData(ctx context.Context, in *SetDataRequest, opts .. return out, nil } -func (c *accountClient) SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *accountClient) SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Account_SetPassword_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -85,9 +86,9 @@ func (c *accountClient) SetPassword(ctx context.Context, in *SetPasswordRequest, return out, nil } -func (c *accountClient) TagCreate(ctx context.Context, in *TagItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *accountClient) TagCreate(ctx context.Context, in *TagItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Account_TagCreate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -95,9 +96,9 @@ func (c *accountClient) TagCreate(ctx context.Context, in *TagItem, opts ...grpc return out, nil } -func (c *accountClient) TagRemove(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *accountClient) TagRemove(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Account_TagRemove_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -116,53 +117,51 @@ func (c *accountClient) Statistics(ctx context.Context, in *StatisticsRequest, o } // AccountServer is the server API for Account service. -// All implementations must embed UnimplementedAccountServer +// All implementations should embed UnimplementedAccountServer // for forward compatibility. // // assport通行证模块-帐号数据 type AccountServer interface { // 通过会员所有信息 - Get(context.Context, *Empty) (*GetFullReply, error) + Get(context.Context, *protobuf.Empty) (*GetFullReply, error) // 更新会员的信息数据,字段值为空或是0,将不更新此数据 - SetData(context.Context, *SetDataRequest) (*StatusReply, error) + SetData(context.Context, *SetDataRequest) (*protobuf.StatusReply, error) // 更新会员的密码 - SetPassword(context.Context, *SetPasswordRequest) (*StatusReply, error) + SetPassword(context.Context, *SetPasswordRequest) (*protobuf.StatusReply, error) // 新增标签 - TagCreate(context.Context, *TagItem) (*StatusReply, error) + TagCreate(context.Context, *TagItem) (*protobuf.StatusReply, error) // 删除标签 - TagRemove(context.Context, *IdentRequest) (*StatusReply, error) + TagRemove(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) // 获取会员的相关统计数据 Statistics(context.Context, *StatisticsRequest) (*StatisticsReply, error) - mustEmbedUnimplementedAccountServer() } -// UnimplementedAccountServer must be embedded to have +// UnimplementedAccountServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedAccountServer struct{} -func (UnimplementedAccountServer) Get(context.Context, *Empty) (*GetFullReply, error) { +func (UnimplementedAccountServer) Get(context.Context, *protobuf.Empty) (*GetFullReply, error) { return nil, status.Error(codes.Unimplemented, "method Get not implemented") } -func (UnimplementedAccountServer) SetData(context.Context, *SetDataRequest) (*StatusReply, error) { +func (UnimplementedAccountServer) SetData(context.Context, *SetDataRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method SetData not implemented") } -func (UnimplementedAccountServer) SetPassword(context.Context, *SetPasswordRequest) (*StatusReply, error) { +func (UnimplementedAccountServer) SetPassword(context.Context, *SetPasswordRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method SetPassword not implemented") } -func (UnimplementedAccountServer) TagCreate(context.Context, *TagItem) (*StatusReply, error) { +func (UnimplementedAccountServer) TagCreate(context.Context, *TagItem) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method TagCreate not implemented") } -func (UnimplementedAccountServer) TagRemove(context.Context, *IdentRequest) (*StatusReply, error) { +func (UnimplementedAccountServer) TagRemove(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method TagRemove not implemented") } func (UnimplementedAccountServer) Statistics(context.Context, *StatisticsRequest) (*StatisticsReply, error) { return nil, status.Error(codes.Unimplemented, "method Statistics not implemented") } -func (UnimplementedAccountServer) mustEmbedUnimplementedAccountServer() {} -func (UnimplementedAccountServer) testEmbeddedByValue() {} +func (UnimplementedAccountServer) testEmbeddedByValue() {} // UnsafeAccountServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AccountServer will @@ -183,7 +182,7 @@ func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer) { } func _Account_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -195,7 +194,7 @@ func _Account_Get_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Account_Get_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountServer).Get(ctx, req.(*Empty)) + return srv.(AccountServer).Get(ctx, req.(*protobuf.Empty)) } return interceptor(ctx, in, info, handler) } @@ -255,7 +254,7 @@ func _Account_TagCreate_Handler(srv interface{}, ctx context.Context, dec func(i } func _Account_TagRemove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -267,7 +266,7 @@ func _Account_TagRemove_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: Account_TagRemove_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountServer).TagRemove(ctx, req.(*IdentRequest)) + return srv.(AccountServer).TagRemove(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -323,5 +322,5 @@ var Account_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "account.proto", + Metadata: "module/base/passport/proto/account.proto", } diff --git a/module/base/passport/pb/blocks.pb.go b/module/base/passport/pb/blocks.pb.go deleted file mode 100644 index 9efbceb..0000000 --- a/module/base/passport/pb/blocks.pb.go +++ /dev/null @@ -1,493 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc (unknown) -// source: blocks.proto - -package passport - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type FetchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PageNo int64 `protobuf:"varint,1,opt,name=page_no,json=pageNo,proto3" json:"page_no,omitempty"` // 页数 - PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页记录数 - Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:category_id=?,vlaue=11 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchRequest) Reset() { - *x = FetchRequest{} - mi := &file_blocks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRequest) ProtoMessage() {} - -func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. -func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{0} -} - -func (x *FetchRequest) GetPageNo() int64 { - if x != nil { - return x.PageNo - } - return 0 -} - -func (x *FetchRequest) GetPageSize() int64 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *FetchRequest) GetParams() map[string]string { - if x != nil { - return x.Params - } - return nil -} - -type IdentRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IdentRequest) Reset() { - *x = IdentRequest{} - mi := &file_blocks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IdentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IdentRequest) ProtoMessage() {} - -func (x *IdentRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. -func (*IdentRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{1} -} - -func (x *IdentRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *IdentRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -type VersionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 时序版本号 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *VersionRequest) Reset() { - *x = VersionRequest{} - mi := &file_blocks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *VersionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersionRequest) ProtoMessage() {} - -func (x *VersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. -func (*VersionRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{2} -} - -func (x *VersionRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type SearchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` //关键词 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchRequest) Reset() { - *x = SearchRequest{} - mi := &file_blocks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchRequest) ProtoMessage() {} - -func (x *SearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. -func (*SearchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{3} -} - -func (x *SearchRequest) GetKeyword() string { - if x != nil { - return x.Keyword - } - return "" -} - -type StatusReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // 状态码 - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 状态说明 - Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` // 数据 - Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusReply) Reset() { - *x = StatusReply{} - mi := &file_blocks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusReply) ProtoMessage() {} - -func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. -func (*StatusReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{4} -} - -func (x *StatusReply) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *StatusReply) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *StatusReply) GetDetails() string { - if x != nil { - return x.Details - } - return "" -} - -func (x *StatusReply) GetTimeseq() int64 { - if x != nil { - return x.Timeseq - } - return 0 -} - -type VerifyStatus struct { - state protoimpl.MessageState `protogen:"open.v1"` - EmailVerify int32 `protobuf:"varint,1,opt,name=email_verify,json=emailVerify,proto3" json:"email_verify,omitempty"` // 邮箱是否已验证 - PhoneVerify int32 `protobuf:"varint,2,opt,name=phone_verify,json=phoneVerify,proto3" json:"phone_verify,omitempty"` // 手机是否已验证 - FaceVerify int32 `protobuf:"varint,3,opt,name=face_verify,json=faceVerify,proto3" json:"face_verify,omitempty"` // 人脸或照片是否已验证 - DocumentVerify int32 `protobuf:"varint,4,opt,name=document_verify,json=documentVerify,proto3" json:"document_verify,omitempty"` // 证件是否已验证 - KycVerify int32 `protobuf:"varint,5,opt,name=kyc_verify,json=kycVerify,proto3" json:"kyc_verify,omitempty"` // 实名是否已验证 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *VerifyStatus) Reset() { - *x = VerifyStatus{} - mi := &file_blocks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *VerifyStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyStatus) ProtoMessage() {} - -func (x *VerifyStatus) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VerifyStatus.ProtoReflect.Descriptor instead. -func (*VerifyStatus) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{5} -} - -func (x *VerifyStatus) GetEmailVerify() int32 { - if x != nil { - return x.EmailVerify - } - return 0 -} - -func (x *VerifyStatus) GetPhoneVerify() int32 { - if x != nil { - return x.PhoneVerify - } - return 0 -} - -func (x *VerifyStatus) GetFaceVerify() int32 { - if x != nil { - return x.FaceVerify - } - return 0 -} - -func (x *VerifyStatus) GetDocumentVerify() int32 { - if x != nil { - return x.DocumentVerify - } - return 0 -} - -func (x *VerifyStatus) GetKycVerify() int32 { - if x != nil { - return x.KycVerify - } - return 0 -} - -type Empty struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Empty) Reset() { - *x = Empty{} - mi := &file_blocks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Empty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Empty) ProtoMessage() {} - -func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{6} -} - -var File_blocks_proto protoreflect.FileDescriptor - -const file_blocks_proto_rawDesc = "" + - "\n" + - "\x15passport/blocks.proto\x12\bpassport\"\xbb\x01\n" + - "\fFetchRequest\x12\x17\n" + - "\apage_no\x18\x01 \x01(\x03R\x06pageNo\x12\x1b\n" + - "\tpage_size\x18\x02 \x01(\x03R\bpageSize\x12:\n" + - "\x06params\x18\x03 \x03(\v2\".passport.FetchRequest.ParamsEntryR\x06params\x1a9\n" + - "\vParamsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" + - "\fIdentRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\"*\n" + - "\x0eVersionRequest\x12\x18\n" + - "\aversion\x18\x01 \x01(\x03R\aversion\")\n" + - "\rSearchRequest\x12\x18\n" + - "\akeyword\x18\x01 \x01(\tR\akeyword\"o\n" + - "\vStatusReply\x12\x12\n" + - "\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessage\x12\x18\n" + - "\adetails\x18\x03 \x01(\tR\adetails\x12\x18\n" + - "\atimeseq\x18\x04 \x01(\x03R\atimeseq\"\xbd\x01\n" + - "\fVerifyStatus\x12!\n" + - "\femail_verify\x18\x01 \x01(\x05R\vemailVerify\x12!\n" + - "\fphone_verify\x18\x02 \x01(\x05R\vphoneVerify\x12\x1f\n" + - "\vface_verify\x18\x03 \x01(\x05R\n" + - "faceVerify\x12'\n" + - "\x0fdocument_verify\x18\x04 \x01(\x05R\x0edocumentVerify\x12\x1d\n" + - "\n" + - "kyc_verify\x18\x05 \x01(\x05R\tkycVerify\"\a\n" + - "\x05EmptyB\fZ\n" + - ".;passportb\x06proto3" - -var ( - file_blocks_proto_rawDescOnce sync.Once - file_blocks_proto_rawDescData []byte -) - -func file_blocks_proto_rawDescGZIP() []byte { - file_blocks_proto_rawDescOnce.Do(func() { - file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc))) - }) - return file_blocks_proto_rawDescData -} - -var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_blocks_proto_goTypes = []any{ - (*FetchRequest)(nil), // 0: passport.FetchRequest - (*IdentRequest)(nil), // 1: passport.IdentRequest - (*VersionRequest)(nil), // 2: passport.VersionRequest - (*SearchRequest)(nil), // 3: passport.SearchRequest - (*StatusReply)(nil), // 4: passport.StatusReply - (*VerifyStatus)(nil), // 5: passport.VerifyStatus - (*Empty)(nil), // 6: passport.Empty - nil, // 7: passport.FetchRequest.ParamsEntry -} -var file_blocks_proto_depIdxs = []int32{ - 7, // 0: passport.FetchRequest.params:type_name -> passport.FetchRequest.ParamsEntry - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_blocks_proto_init() } -func file_blocks_proto_init() { - if File_blocks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_blocks_proto_goTypes, - DependencyIndexes: file_blocks_proto_depIdxs, - MessageInfos: file_blocks_proto_msgTypes, - }.Build() - File_blocks_proto = out.File - file_blocks_proto_goTypes = nil - file_blocks_proto_depIdxs = nil -} diff --git a/module/base/passport/pb/blocks_compat.go b/module/base/passport/pb/blocks_compat.go new file mode 100644 index 0000000..0fccef9 --- /dev/null +++ b/module/base/passport/pb/blocks_compat.go @@ -0,0 +1,11 @@ +package passport + +import blocks "bsm/full/protobuf" + +type Empty = blocks.Empty +type FetchRequest = blocks.FetchRequest +type IdentRequest = blocks.IdentRequest +type VersionRequest = blocks.VersionRequest +type SearchRequest = blocks.SearchRequest +type StatusReply = blocks.StatusReply +type VerifyStatus = blocks.VerifyStatus diff --git a/module/base/passport/pb/forget.pb.go b/module/base/passport/pb/forget.pb.go index 0533853..dc2b941 100644 --- a/module/base/passport/pb/forget.pb.go +++ b/module/base/passport/pb/forget.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc (unknown) -// source: forget.proto +// protoc v7.35.0 +// source: module/base/passport/proto/forget.proto package passport import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -31,7 +32,7 @@ type ForgetVerifyRequest struct { func (x *ForgetVerifyRequest) Reset() { *x = ForgetVerifyRequest{} - mi := &file_forget_proto_msgTypes[0] + mi := &file_module_base_passport_proto_forget_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -43,7 +44,7 @@ func (x *ForgetVerifyRequest) String() string { func (*ForgetVerifyRequest) ProtoMessage() {} func (x *ForgetVerifyRequest) ProtoReflect() protoreflect.Message { - mi := &file_forget_proto_msgTypes[0] + mi := &file_module_base_passport_proto_forget_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -56,7 +57,7 @@ func (x *ForgetVerifyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ForgetVerifyRequest.ProtoReflect.Descriptor instead. func (*ForgetVerifyRequest) Descriptor() ([]byte, []int) { - return file_forget_proto_rawDescGZIP(), []int{0} + return file_module_base_passport_proto_forget_proto_rawDescGZIP(), []int{0} } func (x *ForgetVerifyRequest) GetPhone() string { @@ -83,7 +84,7 @@ type ForgetResetRequest struct { func (x *ForgetResetRequest) Reset() { *x = ForgetResetRequest{} - mi := &file_forget_proto_msgTypes[1] + mi := &file_module_base_passport_proto_forget_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -95,7 +96,7 @@ func (x *ForgetResetRequest) String() string { func (*ForgetResetRequest) ProtoMessage() {} func (x *ForgetResetRequest) ProtoReflect() protoreflect.Message { - mi := &file_forget_proto_msgTypes[1] + mi := &file_module_base_passport_proto_forget_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108,7 +109,7 @@ func (x *ForgetResetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ForgetResetRequest.ProtoReflect.Descriptor instead. func (*ForgetResetRequest) Descriptor() ([]byte, []int) { - return file_forget_proto_rawDescGZIP(), []int{1} + return file_module_base_passport_proto_forget_proto_rawDescGZIP(), []int{1} } func (x *ForgetResetRequest) GetIdentity() string { @@ -125,45 +126,44 @@ func (x *ForgetResetRequest) GetPassword() string { return "" } -var File_forget_proto protoreflect.FileDescriptor +var File_module_base_passport_proto_forget_proto protoreflect.FileDescriptor -const file_forget_proto_rawDesc = "" + +const file_module_base_passport_proto_forget_proto_rawDesc = "" + "\n" + - "\x1abase/passport/forget.proto\x12\bpassport\x1a\x15passport/blocks.proto\"?\n" + + "'module/base/passport/proto/forget.proto\x12\bpassport\x1a\x15protobuf/blocks.proto\"?\n" + "\x13ForgetVerifyRequest\x12\x14\n" + "\x05phone\x18\x01 \x01(\tR\x05phone\x12\x12\n" + "\x04code\x18\x02 \x01(\tR\x04code\"L\n" + "\x12ForgetResetRequest\x12\x1a\n" + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1a\n" + - "\bpassword\x18\x02 \x01(\tR\bpassword2\x8a\x01\n" + - "\x06Forget\x12@\n" + - "\x06Verify\x12\x1d.passport.ForgetVerifyRequest\x1a\x15.passport.StatusReply\"\x00\x12>\n" + - "\x05Reset\x12\x1c.passport.ForgetResetRequest\x1a\x15.passport.StatusReply\"\x00B\fZ\n" + - ".;passportb\x06proto3" + "\bpassword\x18\x02 \x01(\tR\bpassword2\x86\x01\n" + + "\x06Forget\x12>\n" + + "\x06Verify\x12\x1d.passport.ForgetVerifyRequest\x1a\x13.blocks.StatusReply\"\x00\x12<\n" + + "\x05Reset\x12\x1c.passport.ForgetResetRequest\x1a\x13.blocks.StatusReply\"\x00B+Z)bsm/full/module/base/passport/pb;passportb\x06proto3" var ( - file_forget_proto_rawDescOnce sync.Once - file_forget_proto_rawDescData []byte + file_module_base_passport_proto_forget_proto_rawDescOnce sync.Once + file_module_base_passport_proto_forget_proto_rawDescData []byte ) -func file_forget_proto_rawDescGZIP() []byte { - file_forget_proto_rawDescOnce.Do(func() { - file_forget_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_forget_proto_rawDesc), len(file_forget_proto_rawDesc))) +func file_module_base_passport_proto_forget_proto_rawDescGZIP() []byte { + file_module_base_passport_proto_forget_proto_rawDescOnce.Do(func() { + file_module_base_passport_proto_forget_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_passport_proto_forget_proto_rawDesc), len(file_module_base_passport_proto_forget_proto_rawDesc))) }) - return file_forget_proto_rawDescData + return file_module_base_passport_proto_forget_proto_rawDescData } -var file_forget_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_forget_proto_goTypes = []any{ - (*ForgetVerifyRequest)(nil), // 0: passport.ForgetVerifyRequest - (*ForgetResetRequest)(nil), // 1: passport.ForgetResetRequest - (*StatusReply)(nil), // 2: passport.StatusReply +var file_module_base_passport_proto_forget_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_module_base_passport_proto_forget_proto_goTypes = []any{ + (*ForgetVerifyRequest)(nil), // 0: passport.ForgetVerifyRequest + (*ForgetResetRequest)(nil), // 1: passport.ForgetResetRequest + (*protobuf.StatusReply)(nil), // 2: blocks.StatusReply } -var file_forget_proto_depIdxs = []int32{ +var file_module_base_passport_proto_forget_proto_depIdxs = []int32{ 0, // 0: passport.Forget.Verify:input_type -> passport.ForgetVerifyRequest 1, // 1: passport.Forget.Reset:input_type -> passport.ForgetResetRequest - 2, // 2: passport.Forget.Verify:output_type -> passport.StatusReply - 2, // 3: passport.Forget.Reset:output_type -> passport.StatusReply + 2, // 2: passport.Forget.Verify:output_type -> blocks.StatusReply + 2, // 3: passport.Forget.Reset:output_type -> blocks.StatusReply 2, // [2:4] is the sub-list for method output_type 0, // [0:2] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -171,27 +171,26 @@ var file_forget_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_forget_proto_init() } -func file_forget_proto_init() { - if File_forget_proto != nil { +func init() { file_module_base_passport_proto_forget_proto_init() } +func file_module_base_passport_proto_forget_proto_init() { + if File_module_base_passport_proto_forget_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_forget_proto_rawDesc), len(file_forget_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_passport_proto_forget_proto_rawDesc), len(file_module_base_passport_proto_forget_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_forget_proto_goTypes, - DependencyIndexes: file_forget_proto_depIdxs, - MessageInfos: file_forget_proto_msgTypes, + GoTypes: file_module_base_passport_proto_forget_proto_goTypes, + DependencyIndexes: file_module_base_passport_proto_forget_proto_depIdxs, + MessageInfos: file_module_base_passport_proto_forget_proto_msgTypes, }.Build() - File_forget_proto = out.File - file_forget_proto_goTypes = nil - file_forget_proto_depIdxs = nil + File_module_base_passport_proto_forget_proto = out.File + file_module_base_passport_proto_forget_proto_goTypes = nil + file_module_base_passport_proto_forget_proto_depIdxs = nil } diff --git a/module/base/passport/pb/forget.pb.gw.go b/module/base/passport/pb/forget.pb.gw.go index a309ef5..a17d7f3 100644 --- a/module/base/passport/pb/forget.pb.gw.go +++ b/module/base/passport/pb/forget.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: forget.proto +// source: module/base/passport/proto/forget.proto /* Package passport is a reverse proxy. diff --git a/module/base/passport/pb/forget_grpc.pb.go b/module/base/passport/pb/forget_grpc.pb.go index d563a3d..c32d064 100644 --- a/module/base/passport/pb/forget_grpc.pb.go +++ b/module/base/passport/pb/forget_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.6.1 -// - protoc (unknown) -// source: forget.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/passport/proto/forget.proto package passport import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -30,9 +31,9 @@ const ( // Passport通行证模块-找回密码 type ForgetClient interface { // 验证手机号和验证码 - Verify(ctx context.Context, in *ForgetVerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) + Verify(ctx context.Context, in *ForgetVerifyRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // 重罢密码 - Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*StatusReply, error) + Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type forgetClient struct { @@ -43,9 +44,9 @@ func NewForgetClient(cc grpc.ClientConnInterface) ForgetClient { return &forgetClient{cc} } -func (c *forgetClient) Verify(ctx context.Context, in *ForgetVerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *forgetClient) Verify(ctx context.Context, in *ForgetVerifyRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Forget_Verify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -53,9 +54,9 @@ func (c *forgetClient) Verify(ctx context.Context, in *ForgetVerifyRequest, opts return out, nil } -func (c *forgetClient) Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *forgetClient) Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Forget_Reset_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -64,33 +65,31 @@ func (c *forgetClient) Reset(ctx context.Context, in *ForgetResetRequest, opts . } // ForgetServer is the server API for Forget service. -// All implementations must embed UnimplementedForgetServer +// All implementations should embed UnimplementedForgetServer // for forward compatibility. // // Passport通行证模块-找回密码 type ForgetServer interface { // 验证手机号和验证码 - Verify(context.Context, *ForgetVerifyRequest) (*StatusReply, error) + Verify(context.Context, *ForgetVerifyRequest) (*protobuf.StatusReply, error) // 重罢密码 - Reset(context.Context, *ForgetResetRequest) (*StatusReply, error) - mustEmbedUnimplementedForgetServer() + Reset(context.Context, *ForgetResetRequest) (*protobuf.StatusReply, error) } -// UnimplementedForgetServer must be embedded to have +// UnimplementedForgetServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedForgetServer struct{} -func (UnimplementedForgetServer) Verify(context.Context, *ForgetVerifyRequest) (*StatusReply, error) { +func (UnimplementedForgetServer) Verify(context.Context, *ForgetVerifyRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Verify not implemented") } -func (UnimplementedForgetServer) Reset(context.Context, *ForgetResetRequest) (*StatusReply, error) { +func (UnimplementedForgetServer) Reset(context.Context, *ForgetResetRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Reset not implemented") } -func (UnimplementedForgetServer) mustEmbedUnimplementedForgetServer() {} -func (UnimplementedForgetServer) testEmbeddedByValue() {} +func (UnimplementedForgetServer) testEmbeddedByValue() {} // UnsafeForgetServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ForgetServer will @@ -163,5 +162,5 @@ var Forget_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "forget.proto", + Metadata: "module/base/passport/proto/forget.proto", } diff --git a/module/base/passport/pb/login.pb.go b/module/base/passport/pb/login.pb.go index a1e0059..49e1371 100644 --- a/module/base/passport/pb/login.pb.go +++ b/module/base/passport/pb/login.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc (unknown) -// source: login.proto +// protoc v7.35.0 +// source: module/base/passport/proto/login.proto package passport import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -31,7 +32,7 @@ type LoginByPwdRequest struct { func (x *LoginByPwdRequest) Reset() { *x = LoginByPwdRequest{} - mi := &file_login_proto_msgTypes[0] + mi := &file_module_base_passport_proto_login_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -43,7 +44,7 @@ func (x *LoginByPwdRequest) String() string { func (*LoginByPwdRequest) ProtoMessage() {} func (x *LoginByPwdRequest) ProtoReflect() protoreflect.Message { - mi := &file_login_proto_msgTypes[0] + mi := &file_module_base_passport_proto_login_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -56,7 +57,7 @@ func (x *LoginByPwdRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LoginByPwdRequest.ProtoReflect.Descriptor instead. func (*LoginByPwdRequest) Descriptor() ([]byte, []int) { - return file_login_proto_rawDescGZIP(), []int{0} + return file_module_base_passport_proto_login_proto_rawDescGZIP(), []int{0} } func (x *LoginByPwdRequest) GetAccount() string { @@ -88,7 +89,7 @@ type LoginByCodeRequest struct { func (x *LoginByCodeRequest) Reset() { *x = LoginByCodeRequest{} - mi := &file_login_proto_msgTypes[1] + mi := &file_module_base_passport_proto_login_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -100,7 +101,7 @@ func (x *LoginByCodeRequest) String() string { func (*LoginByCodeRequest) ProtoMessage() {} func (x *LoginByCodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_login_proto_msgTypes[1] + mi := &file_module_base_passport_proto_login_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113,7 +114,7 @@ func (x *LoginByCodeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LoginByCodeRequest.ProtoReflect.Descriptor instead. func (*LoginByCodeRequest) Descriptor() ([]byte, []int) { - return file_login_proto_rawDescGZIP(), []int{1} + return file_module_base_passport_proto_login_proto_rawDescGZIP(), []int{1} } func (x *LoginByCodeRequest) GetCountry() string { @@ -171,14 +172,14 @@ type LoginReply struct { Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` //用户唯一码 Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` //用户凭证 Extend map[string]string `protobuf:"bytes,4,rep,name=extend,proto3" json:"extend,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` //扩展字段 - VerifyStatus *VerifyStatus `protobuf:"bytes,5,opt,name=verify_status,json=verifyStatus,proto3" json:"verify_status,omitempty"` // 用户验证状态 + VerifyStatus *protobuf.VerifyStatus `protobuf:"bytes,5,opt,name=verify_status,json=verifyStatus,proto3" json:"verify_status,omitempty"` // 用户验证状态 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *LoginReply) Reset() { *x = LoginReply{} - mi := &file_login_proto_msgTypes[2] + mi := &file_module_base_passport_proto_login_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -190,7 +191,7 @@ func (x *LoginReply) String() string { func (*LoginReply) ProtoMessage() {} func (x *LoginReply) ProtoReflect() protoreflect.Message { - mi := &file_login_proto_msgTypes[2] + mi := &file_module_base_passport_proto_login_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -203,7 +204,7 @@ func (x *LoginReply) ProtoReflect() protoreflect.Message { // Deprecated: Use LoginReply.ProtoReflect.Descriptor instead. func (*LoginReply) Descriptor() ([]byte, []int) { - return file_login_proto_rawDescGZIP(), []int{2} + return file_module_base_passport_proto_login_proto_rawDescGZIP(), []int{2} } func (x *LoginReply) GetId() int64 { @@ -234,18 +235,18 @@ func (x *LoginReply) GetExtend() map[string]string { return nil } -func (x *LoginReply) GetVerifyStatus() *VerifyStatus { +func (x *LoginReply) GetVerifyStatus() *protobuf.VerifyStatus { if x != nil { return x.VerifyStatus } return nil } -var File_login_proto protoreflect.FileDescriptor +var File_module_base_passport_proto_login_proto protoreflect.FileDescriptor -const file_login_proto_rawDesc = "" + +const file_module_base_passport_proto_login_proto_rawDesc = "" + "\n" + - "\x19base/passport/login.proto\x12\bpassport\x1a\x15passport/blocks.proto\"I\n" + + "&module/base/passport/proto/login.proto\x12\bpassport\x1a\x15protobuf/blocks.proto\"I\n" + "\x11LoginByPwdRequest\x12\x18\n" + "\aaccount\x18\x01 \x01(\tR\aaccount\x12\x1a\n" + "\bpassword\x18\x02 \x01(\tR\bpassword\"\xd4\x01\n" + @@ -256,46 +257,45 @@ const file_login_proto_rawDesc = "" + "\tagency_id\x18\x04 \x01(\x03R\bagencyId\x12\x19\n" + "\bstaff_id\x18\x05 \x01(\x03R\astaffId\x12\x1a\n" + "\bowner_id\x18\x06 \x01(\x03R\bowner_id\x12&\n" + - "\x0eowner_identity\x18\a \x01(\tR\x0eowner_identity\"\x80\x02\n" + + "\x0eowner_identity\x18\a \x01(\tR\x0eowner_identity\"\xfe\x01\n" + "\n" + "LoginReply\x12\x0e\n" + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x14\n" + "\x05token\x18\x03 \x01(\tR\x05token\x128\n" + - "\x06extend\x18\x04 \x03(\v2 .passport.LoginReply.ExtendEntryR\x06extend\x12;\n" + - "\rverify_status\x18\x05 \x01(\v2\x16.passport.VerifyStatusR\fverifyStatus\x1a9\n" + + "\x06extend\x18\x04 \x03(\v2 .passport.LoginReply.ExtendEntryR\x06extend\x129\n" + + "\rverify_status\x18\x05 \x01(\v2\x14.blocks.VerifyStatusR\fverifyStatus\x1a9\n" + "\vExtendEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\xc0\x01\n" + "\x05Login\x12:\n" + "\x03Pwd\x12\x1b.passport.LoginByPwdRequest\x1a\x14.passport.LoginReply\"\x00\x12<\n" + "\x04Code\x12\x1c.passport.LoginByCodeRequest\x1a\x14.passport.LoginReply\"\x00\x12=\n" + - "\x05Quick\x12\x1c.passport.LoginByCodeRequest\x1a\x14.passport.LoginReply\"\x00B\fZ\n" + - ".;passportb\x06proto3" + "\x05Quick\x12\x1c.passport.LoginByCodeRequest\x1a\x14.passport.LoginReply\"\x00B+Z)bsm/full/module/base/passport/pb;passportb\x06proto3" var ( - file_login_proto_rawDescOnce sync.Once - file_login_proto_rawDescData []byte + file_module_base_passport_proto_login_proto_rawDescOnce sync.Once + file_module_base_passport_proto_login_proto_rawDescData []byte ) -func file_login_proto_rawDescGZIP() []byte { - file_login_proto_rawDescOnce.Do(func() { - file_login_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_login_proto_rawDesc), len(file_login_proto_rawDesc))) +func file_module_base_passport_proto_login_proto_rawDescGZIP() []byte { + file_module_base_passport_proto_login_proto_rawDescOnce.Do(func() { + file_module_base_passport_proto_login_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_passport_proto_login_proto_rawDesc), len(file_module_base_passport_proto_login_proto_rawDesc))) }) - return file_login_proto_rawDescData + return file_module_base_passport_proto_login_proto_rawDescData } -var file_login_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_login_proto_goTypes = []any{ - (*LoginByPwdRequest)(nil), // 0: passport.LoginByPwdRequest - (*LoginByCodeRequest)(nil), // 1: passport.LoginByCodeRequest - (*LoginReply)(nil), // 2: passport.LoginReply - nil, // 3: passport.LoginReply.ExtendEntry - (*VerifyStatus)(nil), // 4: passport.VerifyStatus +var file_module_base_passport_proto_login_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_module_base_passport_proto_login_proto_goTypes = []any{ + (*LoginByPwdRequest)(nil), // 0: passport.LoginByPwdRequest + (*LoginByCodeRequest)(nil), // 1: passport.LoginByCodeRequest + (*LoginReply)(nil), // 2: passport.LoginReply + nil, // 3: passport.LoginReply.ExtendEntry + (*protobuf.VerifyStatus)(nil), // 4: blocks.VerifyStatus } -var file_login_proto_depIdxs = []int32{ +var file_module_base_passport_proto_login_proto_depIdxs = []int32{ 3, // 0: passport.LoginReply.extend:type_name -> passport.LoginReply.ExtendEntry - 4, // 1: passport.LoginReply.verify_status:type_name -> passport.VerifyStatus + 4, // 1: passport.LoginReply.verify_status:type_name -> blocks.VerifyStatus 0, // 2: passport.Login.Pwd:input_type -> passport.LoginByPwdRequest 1, // 3: passport.Login.Code:input_type -> passport.LoginByCodeRequest 1, // 4: passport.Login.Quick:input_type -> passport.LoginByCodeRequest @@ -309,27 +309,26 @@ var file_login_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_login_proto_init() } -func file_login_proto_init() { - if File_login_proto != nil { +func init() { file_module_base_passport_proto_login_proto_init() } +func file_module_base_passport_proto_login_proto_init() { + if File_module_base_passport_proto_login_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_login_proto_rawDesc), len(file_login_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_passport_proto_login_proto_rawDesc), len(file_module_base_passport_proto_login_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_login_proto_goTypes, - DependencyIndexes: file_login_proto_depIdxs, - MessageInfos: file_login_proto_msgTypes, + GoTypes: file_module_base_passport_proto_login_proto_goTypes, + DependencyIndexes: file_module_base_passport_proto_login_proto_depIdxs, + MessageInfos: file_module_base_passport_proto_login_proto_msgTypes, }.Build() - File_login_proto = out.File - file_login_proto_goTypes = nil - file_login_proto_depIdxs = nil + File_module_base_passport_proto_login_proto = out.File + file_module_base_passport_proto_login_proto_goTypes = nil + file_module_base_passport_proto_login_proto_depIdxs = nil } diff --git a/module/base/passport/pb/login.pb.gw.go b/module/base/passport/pb/login.pb.gw.go index 67d07dc..92c58be 100644 --- a/module/base/passport/pb/login.pb.gw.go +++ b/module/base/passport/pb/login.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: login.proto +// source: module/base/passport/proto/login.proto /* Package passport is a reverse proxy. diff --git a/module/base/passport/pb/login_grpc.pb.go b/module/base/passport/pb/login_grpc.pb.go index d9eea38..5a3a1e2 100644 --- a/module/base/passport/pb/login_grpc.pb.go +++ b/module/base/passport/pb/login_grpc.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.6.1 -// - protoc (unknown) -// source: login.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/passport/proto/login.proto package passport @@ -77,7 +77,7 @@ func (c *loginClient) Quick(ctx context.Context, in *LoginByCodeRequest, opts .. } // LoginServer is the server API for Login service. -// All implementations must embed UnimplementedLoginServer +// All implementations should embed UnimplementedLoginServer // for forward compatibility. // // Passport-通行证模块-登录 @@ -88,10 +88,9 @@ type LoginServer interface { Code(context.Context, *LoginByCodeRequest) (*LoginReply, error) // 通过验证码快捷登录并注册 Quick(context.Context, *LoginByCodeRequest) (*LoginReply, error) - mustEmbedUnimplementedLoginServer() } -// UnimplementedLoginServer must be embedded to have +// UnimplementedLoginServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -107,8 +106,7 @@ func (UnimplementedLoginServer) Code(context.Context, *LoginByCodeRequest) (*Log func (UnimplementedLoginServer) Quick(context.Context, *LoginByCodeRequest) (*LoginReply, error) { return nil, status.Error(codes.Unimplemented, "method Quick not implemented") } -func (UnimplementedLoginServer) mustEmbedUnimplementedLoginServer() {} -func (UnimplementedLoginServer) testEmbeddedByValue() {} +func (UnimplementedLoginServer) testEmbeddedByValue() {} // UnsafeLoginServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to LoginServer will @@ -203,5 +201,5 @@ var Login_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "login.proto", + Metadata: "module/base/passport/proto/login.proto", } diff --git a/module/base/passport/pb/register.pb.go b/module/base/passport/pb/register.pb.go index 9a7e643..57c2056 100644 --- a/module/base/passport/pb/register.pb.go +++ b/module/base/passport/pb/register.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc (unknown) -// source: register.proto +// protoc v7.35.0 +// source: module/base/passport/proto/register.proto package passport import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -39,7 +40,7 @@ type RegisterRequest struct { func (x *RegisterRequest) Reset() { *x = RegisterRequest{} - mi := &file_register_proto_msgTypes[0] + mi := &file_module_base_passport_proto_register_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -51,7 +52,7 @@ func (x *RegisterRequest) String() string { func (*RegisterRequest) ProtoMessage() {} func (x *RegisterRequest) ProtoReflect() protoreflect.Message { - mi := &file_register_proto_msgTypes[0] + mi := &file_module_base_passport_proto_register_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64,7 +65,7 @@ func (x *RegisterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead. func (*RegisterRequest) Descriptor() ([]byte, []int) { - return file_register_proto_rawDescGZIP(), []int{0} + return file_module_base_passport_proto_register_proto_rawDescGZIP(), []int{0} } func (x *RegisterRequest) GetCountry() string { @@ -143,14 +144,14 @@ type RegisterReply struct { Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` //用户唯一码 Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` //用户Header所需Token Extend map[string]string `protobuf:"bytes,5,rep,name=extend,proto3" json:"extend,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` //扩展字段 - VerifyStatus *VerifyStatus `protobuf:"bytes,6,opt,name=verify_status,json=verifyStatus,proto3" json:"verify_status,omitempty"` // 用户验证状态 + VerifyStatus *protobuf.VerifyStatus `protobuf:"bytes,6,opt,name=verify_status,json=verifyStatus,proto3" json:"verify_status,omitempty"` // 用户验证状态 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *RegisterReply) Reset() { *x = RegisterReply{} - mi := &file_register_proto_msgTypes[1] + mi := &file_module_base_passport_proto_register_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -162,7 +163,7 @@ func (x *RegisterReply) String() string { func (*RegisterReply) ProtoMessage() {} func (x *RegisterReply) ProtoReflect() protoreflect.Message { - mi := &file_register_proto_msgTypes[1] + mi := &file_module_base_passport_proto_register_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -175,7 +176,7 @@ func (x *RegisterReply) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterReply.ProtoReflect.Descriptor instead. func (*RegisterReply) Descriptor() ([]byte, []int) { - return file_register_proto_rawDescGZIP(), []int{1} + return file_module_base_passport_proto_register_proto_rawDescGZIP(), []int{1} } func (x *RegisterReply) GetId() int64 { @@ -206,18 +207,18 @@ func (x *RegisterReply) GetExtend() map[string]string { return nil } -func (x *RegisterReply) GetVerifyStatus() *VerifyStatus { +func (x *RegisterReply) GetVerifyStatus() *protobuf.VerifyStatus { if x != nil { return x.VerifyStatus } return nil } -var File_register_proto protoreflect.FileDescriptor +var File_module_base_passport_proto_register_proto protoreflect.FileDescriptor -const file_register_proto_rawDesc = "" + +const file_module_base_passport_proto_register_proto_rawDesc = "" + "\n" + - "\x1cbase/passport/register.proto\x12\bpassport\x1a\x15passport/blocks.proto\"\x9d\x02\n" + + ")module/base/passport/proto/register.proto\x12\bpassport\x1a\x15protobuf/blocks.proto\"\x9d\x02\n" + "\x0fRegisterRequest\x12\x18\n" + "\acountry\x18\x01 \x01(\tR\acountry\x12\x14\n" + "\x05email\x18\x02 \x01(\tR\x05email\x12\x18\n" + @@ -229,43 +230,42 @@ const file_register_proto_rawDesc = "" + "\bstaff_id\x18\b \x01(\x03R\astaffId\x12\x1a\n" + "\bowner_id\x18\t \x01(\x03R\bowner_id\x12&\n" + "\x0eowner_identity\x18\n" + - " \x01(\tR\x0eowner_identity\"\x86\x02\n" + + " \x01(\tR\x0eowner_identity\"\x84\x02\n" + "\rRegisterReply\x12\x0e\n" + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x14\n" + "\x05token\x18\x04 \x01(\tR\x05token\x12;\n" + - "\x06extend\x18\x05 \x03(\v2#.passport.RegisterReply.ExtendEntryR\x06extend\x12;\n" + - "\rverify_status\x18\x06 \x01(\v2\x16.passport.VerifyStatusR\fverifyStatus\x1a9\n" + + "\x06extend\x18\x05 \x03(\v2#.passport.RegisterReply.ExtendEntryR\x06extend\x129\n" + + "\rverify_status\x18\x06 \x01(\v2\x14.blocks.VerifyStatusR\fverifyStatus\x1a9\n" + "\vExtendEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\x85\x01\n" + "\bRegister\x12;\n" + "\x03Pwd\x12\x19.passport.RegisterRequest\x1a\x17.passport.RegisterReply\"\x00\x12<\n" + - "\x04Code\x12\x19.passport.RegisterRequest\x1a\x17.passport.RegisterReply\"\x00B\fZ\n" + - ".;passportb\x06proto3" + "\x04Code\x12\x19.passport.RegisterRequest\x1a\x17.passport.RegisterReply\"\x00B+Z)bsm/full/module/base/passport/pb;passportb\x06proto3" var ( - file_register_proto_rawDescOnce sync.Once - file_register_proto_rawDescData []byte + file_module_base_passport_proto_register_proto_rawDescOnce sync.Once + file_module_base_passport_proto_register_proto_rawDescData []byte ) -func file_register_proto_rawDescGZIP() []byte { - file_register_proto_rawDescOnce.Do(func() { - file_register_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_register_proto_rawDesc), len(file_register_proto_rawDesc))) +func file_module_base_passport_proto_register_proto_rawDescGZIP() []byte { + file_module_base_passport_proto_register_proto_rawDescOnce.Do(func() { + file_module_base_passport_proto_register_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_passport_proto_register_proto_rawDesc), len(file_module_base_passport_proto_register_proto_rawDesc))) }) - return file_register_proto_rawDescData + return file_module_base_passport_proto_register_proto_rawDescData } -var file_register_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_register_proto_goTypes = []any{ - (*RegisterRequest)(nil), // 0: passport.RegisterRequest - (*RegisterReply)(nil), // 1: passport.RegisterReply - nil, // 2: passport.RegisterReply.ExtendEntry - (*VerifyStatus)(nil), // 3: passport.VerifyStatus +var file_module_base_passport_proto_register_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_module_base_passport_proto_register_proto_goTypes = []any{ + (*RegisterRequest)(nil), // 0: passport.RegisterRequest + (*RegisterReply)(nil), // 1: passport.RegisterReply + nil, // 2: passport.RegisterReply.ExtendEntry + (*protobuf.VerifyStatus)(nil), // 3: blocks.VerifyStatus } -var file_register_proto_depIdxs = []int32{ +var file_module_base_passport_proto_register_proto_depIdxs = []int32{ 2, // 0: passport.RegisterReply.extend:type_name -> passport.RegisterReply.ExtendEntry - 3, // 1: passport.RegisterReply.verify_status:type_name -> passport.VerifyStatus + 3, // 1: passport.RegisterReply.verify_status:type_name -> blocks.VerifyStatus 0, // 2: passport.Register.Pwd:input_type -> passport.RegisterRequest 0, // 3: passport.Register.Code:input_type -> passport.RegisterRequest 1, // 4: passport.Register.Pwd:output_type -> passport.RegisterReply @@ -277,27 +277,26 @@ var file_register_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_register_proto_init() } -func file_register_proto_init() { - if File_register_proto != nil { +func init() { file_module_base_passport_proto_register_proto_init() } +func file_module_base_passport_proto_register_proto_init() { + if File_module_base_passport_proto_register_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_register_proto_rawDesc), len(file_register_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_passport_proto_register_proto_rawDesc), len(file_module_base_passport_proto_register_proto_rawDesc)), NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_register_proto_goTypes, - DependencyIndexes: file_register_proto_depIdxs, - MessageInfos: file_register_proto_msgTypes, + GoTypes: file_module_base_passport_proto_register_proto_goTypes, + DependencyIndexes: file_module_base_passport_proto_register_proto_depIdxs, + MessageInfos: file_module_base_passport_proto_register_proto_msgTypes, }.Build() - File_register_proto = out.File - file_register_proto_goTypes = nil - file_register_proto_depIdxs = nil + File_module_base_passport_proto_register_proto = out.File + file_module_base_passport_proto_register_proto_goTypes = nil + file_module_base_passport_proto_register_proto_depIdxs = nil } diff --git a/module/base/passport/pb/register.pb.gw.go b/module/base/passport/pb/register.pb.gw.go index acb1ac5..a0e1415 100644 --- a/module/base/passport/pb/register.pb.gw.go +++ b/module/base/passport/pb/register.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: register.proto +// source: module/base/passport/proto/register.proto /* Package passport is a reverse proxy. diff --git a/module/base/passport/pb/register_grpc.pb.go b/module/base/passport/pb/register_grpc.pb.go index 2969977..11c98ba 100644 --- a/module/base/passport/pb/register_grpc.pb.go +++ b/module/base/passport/pb/register_grpc.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.6.1 -// - protoc (unknown) -// source: register.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/passport/proto/register.proto package passport @@ -64,7 +64,7 @@ func (c *registerClient) Code(ctx context.Context, in *RegisterRequest, opts ... } // RegisterServer is the server API for Register service. -// All implementations must embed UnimplementedRegisterServer +// All implementations should embed UnimplementedRegisterServer // for forward compatibility. // // Passport-通行证模块-注册 @@ -73,10 +73,9 @@ type RegisterServer interface { Pwd(context.Context, *RegisterRequest) (*RegisterReply, error) // 手机验证码注册 Code(context.Context, *RegisterRequest) (*RegisterReply, error) - mustEmbedUnimplementedRegisterServer() } -// UnimplementedRegisterServer must be embedded to have +// UnimplementedRegisterServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -89,8 +88,7 @@ func (UnimplementedRegisterServer) Pwd(context.Context, *RegisterRequest) (*Regi func (UnimplementedRegisterServer) Code(context.Context, *RegisterRequest) (*RegisterReply, error) { return nil, status.Error(codes.Unimplemented, "method Code not implemented") } -func (UnimplementedRegisterServer) mustEmbedUnimplementedRegisterServer() {} -func (UnimplementedRegisterServer) testEmbeddedByValue() {} +func (UnimplementedRegisterServer) testEmbeddedByValue() {} // UnsafeRegisterServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RegisterServer will @@ -163,5 +161,5 @@ var Register_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "register.proto", + Metadata: "module/base/passport/proto/register.proto", } diff --git a/module/base/passport/pb/verify.pb.go b/module/base/passport/pb/verify.pb.go index cd99a17..cf916e2 100644 --- a/module/base/passport/pb/verify.pb.go +++ b/module/base/passport/pb/verify.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc (unknown) -// source: verify.proto +// protoc v7.35.0 +// source: module/base/passport/proto/verify.proto package passport import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -31,7 +32,7 @@ type VerifyRequest struct { func (x *VerifyRequest) Reset() { *x = VerifyRequest{} - mi := &file_verify_proto_msgTypes[0] + mi := &file_module_base_passport_proto_verify_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -43,7 +44,7 @@ func (x *VerifyRequest) String() string { func (*VerifyRequest) ProtoMessage() {} func (x *VerifyRequest) ProtoReflect() protoreflect.Message { - mi := &file_verify_proto_msgTypes[0] + mi := &file_module_base_passport_proto_verify_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -56,7 +57,7 @@ func (x *VerifyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead. func (*VerifyRequest) Descriptor() ([]byte, []int) { - return file_verify_proto_rawDescGZIP(), []int{0} + return file_module_base_passport_proto_verify_proto_rawDescGZIP(), []int{0} } func (x *VerifyRequest) GetProvider() string { @@ -90,7 +91,7 @@ type JumioCallbackPayload struct { func (x *JumioCallbackPayload) Reset() { *x = JumioCallbackPayload{} - mi := &file_verify_proto_msgTypes[1] + mi := &file_module_base_passport_proto_verify_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -102,7 +103,7 @@ func (x *JumioCallbackPayload) String() string { func (*JumioCallbackPayload) ProtoMessage() {} func (x *JumioCallbackPayload) ProtoReflect() protoreflect.Message { - mi := &file_verify_proto_msgTypes[1] + mi := &file_module_base_passport_proto_verify_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115,7 +116,7 @@ func (x *JumioCallbackPayload) ProtoReflect() protoreflect.Message { // Deprecated: Use JumioCallbackPayload.ProtoReflect.Descriptor instead. func (*JumioCallbackPayload) Descriptor() ([]byte, []int) { - return file_verify_proto_rawDescGZIP(), []int{1} + return file_module_base_passport_proto_verify_proto_rawDescGZIP(), []int{1} } func (x *JumioCallbackPayload) GetScanReference() string { @@ -184,7 +185,7 @@ type VerificationStatus struct { func (x *VerificationStatus) Reset() { *x = VerificationStatus{} - mi := &file_verify_proto_msgTypes[2] + mi := &file_module_base_passport_proto_verify_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -196,7 +197,7 @@ func (x *VerificationStatus) String() string { func (*VerificationStatus) ProtoMessage() {} func (x *VerificationStatus) ProtoReflect() protoreflect.Message { - mi := &file_verify_proto_msgTypes[2] + mi := &file_module_base_passport_proto_verify_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -209,7 +210,7 @@ func (x *VerificationStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use VerificationStatus.ProtoReflect.Descriptor instead. func (*VerificationStatus) Descriptor() ([]byte, []int) { - return file_verify_proto_rawDescGZIP(), []int{2} + return file_module_base_passport_proto_verify_proto_rawDescGZIP(), []int{2} } func (x *VerificationStatus) GetState() string { @@ -238,7 +239,7 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - mi := &file_verify_proto_msgTypes[3] + mi := &file_module_base_passport_proto_verify_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -250,7 +251,7 @@ func (x *Document) String() string { func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { - mi := &file_verify_proto_msgTypes[3] + mi := &file_module_base_passport_proto_verify_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -263,7 +264,7 @@ func (x *Document) ProtoReflect() protoreflect.Message { // Deprecated: Use Document.ProtoReflect.Descriptor instead. func (*Document) Descriptor() ([]byte, []int) { - return file_verify_proto_rawDescGZIP(), []int{3} + return file_module_base_passport_proto_verify_proto_rawDescGZIP(), []int{3} } func (x *Document) GetStatus() string { @@ -306,7 +307,7 @@ type PersonalInformation struct { func (x *PersonalInformation) Reset() { *x = PersonalInformation{} - mi := &file_verify_proto_msgTypes[4] + mi := &file_module_base_passport_proto_verify_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -318,7 +319,7 @@ func (x *PersonalInformation) String() string { func (*PersonalInformation) ProtoMessage() {} func (x *PersonalInformation) ProtoReflect() protoreflect.Message { - mi := &file_verify_proto_msgTypes[4] + mi := &file_module_base_passport_proto_verify_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -331,7 +332,7 @@ func (x *PersonalInformation) ProtoReflect() protoreflect.Message { // Deprecated: Use PersonalInformation.ProtoReflect.Descriptor instead. func (*PersonalInformation) Descriptor() ([]byte, []int) { - return file_verify_proto_rawDescGZIP(), []int{4} + return file_module_base_passport_proto_verify_proto_rawDescGZIP(), []int{4} } func (x *PersonalInformation) GetFirstName() string { @@ -372,7 +373,7 @@ type FaceMap struct { func (x *FaceMap) Reset() { *x = FaceMap{} - mi := &file_verify_proto_msgTypes[5] + mi := &file_module_base_passport_proto_verify_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -384,7 +385,7 @@ func (x *FaceMap) String() string { func (*FaceMap) ProtoMessage() {} func (x *FaceMap) ProtoReflect() protoreflect.Message { - mi := &file_verify_proto_msgTypes[5] + mi := &file_module_base_passport_proto_verify_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -397,7 +398,7 @@ func (x *FaceMap) ProtoReflect() protoreflect.Message { // Deprecated: Use FaceMap.ProtoReflect.Descriptor instead. func (*FaceMap) Descriptor() ([]byte, []int) { - return file_verify_proto_rawDescGZIP(), []int{5} + return file_module_base_passport_proto_verify_proto_rawDescGZIP(), []int{5} } func (x *FaceMap) GetStatus() string { @@ -414,11 +415,11 @@ func (x *FaceMap) GetSimilarity() float32 { return 0 } -var File_verify_proto protoreflect.FileDescriptor +var File_module_base_passport_proto_verify_proto protoreflect.FileDescriptor -const file_verify_proto_rawDesc = "" + +const file_module_base_passport_proto_verify_proto_rawDesc = "" + "\n" + - "\x1abase/passport/verify.proto\x12\bpassport\x1a\x15passport/blocks.proto\"\x9b\x01\n" + + "'module/base/passport/proto/verify.proto\x12\bpassport\x1a\x15protobuf/blocks.proto\"\x9b\x01\n" + "\rVerifyRequest\x12\x1a\n" + "\bprovider\x18\x01 \x01(\tR\bprovider\x125\n" + "\x04args\x18\x02 \x03(\v2!.passport.VerifyRequest.ArgsEntryR\x04args\x1a7\n" + @@ -452,26 +453,25 @@ const file_verify_proto_rawDesc = "" + "\x06status\x18\x01 \x01(\tR\x06status\x12\x1e\n" + "\n" + "similarity\x18\x02 \x01(\x02R\n" + - "similarity2\x8f\x01\n" + - "\x06Verify\x12;\n" + - "\aRequest\x12\x17.passport.VerifyRequest\x1a\x15.passport.StatusReply\"\x00\x12H\n" + - "\rJumioCallback\x12\x1e.passport.JumioCallbackPayload\x1a\x15.passport.StatusReply\"\x00B\fZ\n" + - ".;passportb\x06proto3" + "similarity2\x8b\x01\n" + + "\x06Verify\x129\n" + + "\aRequest\x12\x17.passport.VerifyRequest\x1a\x13.blocks.StatusReply\"\x00\x12F\n" + + "\rJumioCallback\x12\x1e.passport.JumioCallbackPayload\x1a\x13.blocks.StatusReply\"\x00B+Z)bsm/full/module/base/passport/pb;passportb\x06proto3" var ( - file_verify_proto_rawDescOnce sync.Once - file_verify_proto_rawDescData []byte + file_module_base_passport_proto_verify_proto_rawDescOnce sync.Once + file_module_base_passport_proto_verify_proto_rawDescData []byte ) -func file_verify_proto_rawDescGZIP() []byte { - file_verify_proto_rawDescOnce.Do(func() { - file_verify_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_verify_proto_rawDesc), len(file_verify_proto_rawDesc))) +func file_module_base_passport_proto_verify_proto_rawDescGZIP() []byte { + file_module_base_passport_proto_verify_proto_rawDescOnce.Do(func() { + file_module_base_passport_proto_verify_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_passport_proto_verify_proto_rawDesc), len(file_module_base_passport_proto_verify_proto_rawDesc))) }) - return file_verify_proto_rawDescData + return file_module_base_passport_proto_verify_proto_rawDescData } -var file_verify_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_verify_proto_goTypes = []any{ +var file_module_base_passport_proto_verify_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_module_base_passport_proto_verify_proto_goTypes = []any{ (*VerifyRequest)(nil), // 0: passport.VerifyRequest (*JumioCallbackPayload)(nil), // 1: passport.JumioCallbackPayload (*VerificationStatus)(nil), // 2: passport.VerificationStatus @@ -479,9 +479,9 @@ var file_verify_proto_goTypes = []any{ (*PersonalInformation)(nil), // 4: passport.PersonalInformation (*FaceMap)(nil), // 5: passport.FaceMap nil, // 6: passport.VerifyRequest.ArgsEntry - (*StatusReply)(nil), // 7: passport.StatusReply + (*protobuf.StatusReply)(nil), // 7: blocks.StatusReply } -var file_verify_proto_depIdxs = []int32{ +var file_module_base_passport_proto_verify_proto_depIdxs = []int32{ 6, // 0: passport.VerifyRequest.args:type_name -> passport.VerifyRequest.ArgsEntry 2, // 1: passport.JumioCallbackPayload.verification_status:type_name -> passport.VerificationStatus 3, // 2: passport.JumioCallbackPayload.document:type_name -> passport.Document @@ -489,8 +489,8 @@ var file_verify_proto_depIdxs = []int32{ 5, // 4: passport.JumioCallbackPayload.face_map:type_name -> passport.FaceMap 0, // 5: passport.Verify.Request:input_type -> passport.VerifyRequest 1, // 6: passport.Verify.JumioCallback:input_type -> passport.JumioCallbackPayload - 7, // 7: passport.Verify.Request:output_type -> passport.StatusReply - 7, // 8: passport.Verify.JumioCallback:output_type -> passport.StatusReply + 7, // 7: passport.Verify.Request:output_type -> blocks.StatusReply + 7, // 8: passport.Verify.JumioCallback:output_type -> blocks.StatusReply 7, // [7:9] is the sub-list for method output_type 5, // [5:7] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name @@ -498,27 +498,26 @@ var file_verify_proto_depIdxs = []int32{ 0, // [0:5] is the sub-list for field type_name } -func init() { file_verify_proto_init() } -func file_verify_proto_init() { - if File_verify_proto != nil { +func init() { file_module_base_passport_proto_verify_proto_init() } +func file_module_base_passport_proto_verify_proto_init() { + if File_module_base_passport_proto_verify_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_verify_proto_rawDesc), len(file_verify_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_passport_proto_verify_proto_rawDesc), len(file_module_base_passport_proto_verify_proto_rawDesc)), NumEnums: 0, NumMessages: 7, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_verify_proto_goTypes, - DependencyIndexes: file_verify_proto_depIdxs, - MessageInfos: file_verify_proto_msgTypes, + GoTypes: file_module_base_passport_proto_verify_proto_goTypes, + DependencyIndexes: file_module_base_passport_proto_verify_proto_depIdxs, + MessageInfos: file_module_base_passport_proto_verify_proto_msgTypes, }.Build() - File_verify_proto = out.File - file_verify_proto_goTypes = nil - file_verify_proto_depIdxs = nil + File_module_base_passport_proto_verify_proto = out.File + file_module_base_passport_proto_verify_proto_goTypes = nil + file_module_base_passport_proto_verify_proto_depIdxs = nil } diff --git a/module/base/passport/pb/verify.pb.gw.go b/module/base/passport/pb/verify.pb.gw.go index bd451d4..d13a924 100644 --- a/module/base/passport/pb/verify.pb.gw.go +++ b/module/base/passport/pb/verify.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: verify.proto +// source: module/base/passport/proto/verify.proto /* Package passport is a reverse proxy. diff --git a/module/base/passport/pb/verify_grpc.pb.go b/module/base/passport/pb/verify_grpc.pb.go index ec8fbb5..8799b9d 100644 --- a/module/base/passport/pb/verify_grpc.pb.go +++ b/module/base/passport/pb/verify_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.6.1 -// - protoc (unknown) -// source: verify.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/passport/proto/verify.proto package passport import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -30,9 +31,9 @@ const ( // Passport(会员通行证)-验证 type VerifyClient interface { // 认证请求 - Request(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) + Request(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) // KYC 认证回调 - JumioCallback(ctx context.Context, in *JumioCallbackPayload, opts ...grpc.CallOption) (*StatusReply, error) + JumioCallback(ctx context.Context, in *JumioCallbackPayload, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type verifyClient struct { @@ -43,9 +44,9 @@ func NewVerifyClient(cc grpc.ClientConnInterface) VerifyClient { return &verifyClient{cc} } -func (c *verifyClient) Request(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *verifyClient) Request(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Verify_Request_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -53,9 +54,9 @@ func (c *verifyClient) Request(ctx context.Context, in *VerifyRequest, opts ...g return out, nil } -func (c *verifyClient) JumioCallback(ctx context.Context, in *JumioCallbackPayload, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *verifyClient) JumioCallback(ctx context.Context, in *JumioCallbackPayload, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Verify_JumioCallback_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -64,33 +65,31 @@ func (c *verifyClient) JumioCallback(ctx context.Context, in *JumioCallbackPaylo } // VerifyServer is the server API for Verify service. -// All implementations must embed UnimplementedVerifyServer +// All implementations should embed UnimplementedVerifyServer // for forward compatibility. // // Passport(会员通行证)-验证 type VerifyServer interface { // 认证请求 - Request(context.Context, *VerifyRequest) (*StatusReply, error) + Request(context.Context, *VerifyRequest) (*protobuf.StatusReply, error) // KYC 认证回调 - JumioCallback(context.Context, *JumioCallbackPayload) (*StatusReply, error) - mustEmbedUnimplementedVerifyServer() + JumioCallback(context.Context, *JumioCallbackPayload) (*protobuf.StatusReply, error) } -// UnimplementedVerifyServer must be embedded to have +// UnimplementedVerifyServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedVerifyServer struct{} -func (UnimplementedVerifyServer) Request(context.Context, *VerifyRequest) (*StatusReply, error) { +func (UnimplementedVerifyServer) Request(context.Context, *VerifyRequest) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method Request not implemented") } -func (UnimplementedVerifyServer) JumioCallback(context.Context, *JumioCallbackPayload) (*StatusReply, error) { +func (UnimplementedVerifyServer) JumioCallback(context.Context, *JumioCallbackPayload) (*protobuf.StatusReply, error) { return nil, status.Error(codes.Unimplemented, "method JumioCallback not implemented") } -func (UnimplementedVerifyServer) mustEmbedUnimplementedVerifyServer() {} -func (UnimplementedVerifyServer) testEmbeddedByValue() {} +func (UnimplementedVerifyServer) testEmbeddedByValue() {} // UnsafeVerifyServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to VerifyServer will @@ -163,5 +162,5 @@ var Verify_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "verify.proto", + Metadata: "module/base/passport/proto/verify.proto", } diff --git a/module/base/passport/proto/account.proto b/module/base/passport/proto/account.proto index 874c3cc..ff8e46c 100644 --- a/module/base/passport/proto/account.proto +++ b/module/base/passport/proto/account.proto @@ -1,25 +1,25 @@ syntax = "proto3"; package passport; -option go_package = ".;passport"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/passport/pb;passport"; +import "protobuf/blocks.proto"; // assport通行证模块-帐号数据 service Account{ // 通过会员所有信息 - rpc Get(Empty) returns (GetFullReply) {} + rpc Get(blocks.Empty) returns (GetFullReply) {} // 更新会员的信息数据,字段值为空或是0,将不更新此数据 - rpc SetData(SetDataRequest) returns (StatusReply) {} + rpc SetData(SetDataRequest) returns (blocks.StatusReply) {} // 更新会员的密码 - rpc SetPassword(SetPasswordRequest) returns (StatusReply) {} + rpc SetPassword(SetPasswordRequest) returns (blocks.StatusReply) {} // 新增标签 - rpc TagCreate(TagItem) returns (StatusReply) {} + rpc TagCreate(TagItem) returns (blocks.StatusReply) {} // 删除标签 - rpc TagRemove(IdentRequest) returns (StatusReply) {} - + rpc TagRemove(blocks.IdentRequest) returns (blocks.StatusReply) {} + // 获取会员的相关统计数据 rpc Statistics(StatisticsRequest) returns (StatisticsReply) {} } @@ -43,7 +43,7 @@ message GetFullReply { string cover = 15; // 背景&封面 int32 score = 16; // 积分 int32 level = 17; // 等级 - VerifyStatus verify_status = 18; // 用户验证状态 + blocks.VerifyStatus verify_status = 18; // 用户验证状态 repeated TagItem tags = 19; // 用户标签 } diff --git a/module/base/passport/proto/blocks.proto b/module/base/passport/proto/blocks.proto deleted file mode 100644 index c8d50bf..0000000 --- a/module/base/passport/proto/blocks.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; -package passport; -option go_package = ".;passport"; - -message FetchRequest { - int64 page_no=1; // 页数 - int64 page_size=2; // 每页记录数 - map params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11 -} - -message IdentRequest{ - int64 id = 1; // 唯一ID - string identity = 2; // 唯一码 -} - -message VersionRequest { - int64 version=1; // 时序版本号 -} - - -message SearchRequest { - string keyword=1; //关键词 -} - - -message StatusReply{ - int32 code=1; // 状态码 - string message=2; // 状态说明 - string details=3; // 数据 - int64 timeseq=4; // 响应时间序列 -} - -message VerifyStatus { - int32 email_verify=1; // 邮箱是否已验证 - int32 phone_verify=2; // 手机是否已验证 - int32 face_verify=3; // 人脸或照片是否已验证 - int32 document_verify=4; // 证件是否已验证 - int32 kyc_verify=5; // 实名是否已验证 -} - - -message Empty{ -} \ No newline at end of file diff --git a/module/base/passport/proto/forget.proto b/module/base/passport/proto/forget.proto index 60b0761..6b71123 100644 --- a/module/base/passport/proto/forget.proto +++ b/module/base/passport/proto/forget.proto @@ -1,15 +1,15 @@ syntax = "proto3"; package passport; -option go_package = ".;passport"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/passport/pb;passport"; +import "protobuf/blocks.proto"; // Passport通行证模块-找回密码 service Forget{ // 验证手机号和验证码 - rpc Verify(ForgetVerifyRequest) returns(StatusReply) {} + rpc Verify(ForgetVerifyRequest) returns(blocks.StatusReply) {} // 重罢密码 - rpc Reset(ForgetResetRequest) returns (StatusReply) {} + rpc Reset(ForgetResetRequest) returns (blocks.StatusReply) {} } message ForgetVerifyRequest { diff --git a/module/base/passport/proto/login.proto b/module/base/passport/proto/login.proto index 95905ef..1de43d2 100644 --- a/module/base/passport/proto/login.proto +++ b/module/base/passport/proto/login.proto @@ -1,18 +1,18 @@ syntax = "proto3"; package passport; -option go_package = ".;passport"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/passport/pb;passport"; +import "protobuf/blocks.proto"; // Passport-通行证模块-登录 service Login{ // 通过密码登录 - rpc Pwd(LoginByPwdRequest) returns (LoginReply) {} + rpc Pwd(LoginByPwdRequest) returns (LoginReply) {} // 通过验证码登录 - rpc Code(LoginByCodeRequest) returns (LoginReply) {} - + rpc Code(LoginByCodeRequest) returns (LoginReply) {} + // 通过验证码快捷登录并注册 - rpc Quick(LoginByCodeRequest) returns (LoginReply) {} + rpc Quick(LoginByCodeRequest) returns (LoginReply) {} } @@ -37,6 +37,6 @@ message LoginReply { string identity = 2; //用户唯一码 string token = 3; //用户凭证 map extend = 4; //扩展字段 - VerifyStatus verify_status = 5; // 用户验证状态 + blocks.VerifyStatus verify_status = 5; // 用户验证状态 } diff --git a/module/base/passport/proto/register.proto b/module/base/passport/proto/register.proto index 2b65622..8e8dc53 100644 --- a/module/base/passport/proto/register.proto +++ b/module/base/passport/proto/register.proto @@ -1,15 +1,15 @@ syntax = "proto3"; package passport; -option go_package = ".;passport"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/passport/pb;passport"; +import "protobuf/blocks.proto"; // Passport-通行证模块-注册 service Register{ // 帐号密码注册 - rpc Pwd(RegisterRequest) returns (RegisterReply) {} + rpc Pwd(RegisterRequest) returns (RegisterReply) {} // 手机验证码注册 - rpc Code(RegisterRequest) returns (RegisterReply) {} + rpc Code(RegisterRequest) returns (RegisterReply) {} } @@ -31,5 +31,5 @@ message RegisterReply { string identity = 2; //用户唯一码 string token = 4; //用户Header所需Token map extend = 5; //扩展字段 - VerifyStatus verify_status = 6; // 用户验证状态 + blocks.VerifyStatus verify_status = 6; // 用户验证状态 } diff --git a/module/base/passport/proto/verify.proto b/module/base/passport/proto/verify.proto index ef59854..b5feaa0 100644 --- a/module/base/passport/proto/verify.proto +++ b/module/base/passport/proto/verify.proto @@ -1,15 +1,15 @@ syntax = "proto3"; package passport; -option go_package = ".;passport"; -import "blocks.proto"; +option go_package = "bsm/full/module/base/passport/pb;passport"; +import "protobuf/blocks.proto"; // Passport(会员通行证)-验证 service Verify{ // 认证请求 - rpc Request(VerifyRequest) returns (StatusReply) {} + rpc Request(VerifyRequest) returns (blocks.StatusReply) {} // KYC 认证回调 - rpc JumioCallback(JumioCallbackPayload) returns (StatusReply) {} + rpc JumioCallback(JumioCallbackPayload) returns (blocks.StatusReply) {} } message VerifyRequest { diff --git a/module/base/sender/CHANGELOG.md b/module/base/sender/CHANGELOG.md deleted file mode 100644 index 5d5eb7d..0000000 --- a/module/base/sender/CHANGELOG.md +++ /dev/null @@ -1,57 +0,0 @@ -# 更新日志 - -所有对此项目的重要更改都将记录在此文件中。 - -此项目遵循[语义化版本控制](https://semver.org/lang/zh-CN/)。 - -## [未发布] - -### 新增 -- 升级Go版本到1.25.1,支持最新的语言特性和性能改进 -- 添加完整的Dockerfile支持容器化部署 -- 添加全面的Makefile支持构建、测试、部署等开发流程 -- 添加docker-compose.yml支持本地开发环境 -- 添加PostgreSQL和Redis依赖服务支持 -- 添加Mailhog用于开发环境邮件测试 -- 添加Nginx反向代理配置支持 - -### 改进 -- 优化依赖包版本,升级到最新稳定版本 -- 改进代码注释为简体中文,提高可读性 -- 优化配置结构,增强错误处理能力 -- 增强Docker镜像构建过程,使用多阶段构建减小镜像大小 -- 添加健康检查机制,提高服务可用性监控 - -### 变更 -- Go版本从1.24.0升级到1.25.1 -- 依赖包版本更新到最新稳定版本 -- Docker基础镜像更新到Go 1.25 - -### 修复 -- 修复依赖包版本冲突问题 -- 优化配置文件加载逻辑 - -### 安全性 -- 更新所有依赖包到最新版本,修复已知安全漏洞 -- 添加非root用户运行容器,提高安全性 -- 优化Docker镜像安全配置 - ---- - -## [1.0.0] - 2024年初始版本 - -### 新增 -- 邮件发送服务 (SMTP) -- 短信发送服务 (SMS) -- 支持阿里云和腾讯云短信服务 -- gRPC和HTTP Gateway双协议支持 -- 配置文件管理 -- 基础的服务注册和发现 - -### 特性 -- 支持多种邮件服务商 -- 支持多种短信服务商 -- 模板化消息发送 -- 验证码生成和验证 -- 黑名单过滤 -- 发送频率限制 diff --git a/module/base/sender/Dockerfile b/module/base/sender/Dockerfile deleted file mode 100644 index 72453eb..0000000 --- a/module/base/sender/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -# 使用统一的 Go 工具链作为构建环境 -FROM golang:1.26.5-alpine AS builder - -# 设置工作目录 -WORKDIR /app - -# 安装必要的工具 -RUN apk add --no-cache git ca-certificates tzdata - -# 设置Go环境变量 -ENV GO111MODULE=on \ - GOPROXY=https://goproxy.cn,direct \ - GOPRIVATE=git.apinb.com/* \ - GONOPROXY=git.apinb.com/* \ - GOINSECURE=git.apinb.com/* \ - GONOSUMDB=git.apinb.com/* \ - GOEXPERIMENT=jsonv2 - -# 复制go.mod和go.sum文件 -COPY go.mod go.sum ./ - -# 下载依赖 -RUN go mod download - -# 复制源代码 -COPY . . - -# 构建应用 -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ - -ldflags='-w -s -extldflags "-static"' \ - -a -installsuffix cgo \ - -o sender \ - ./cmd/main/main.go - -# 使用最小的alpine镜像作为运行环境 -FROM alpine:latest - -# 安装必要的包 -RUN apk --no-cache add ca-certificates tzdata - -# 设置时区 -ENV TZ=Asia/Shanghai - -# 创建非root用户 -RUN addgroup -g 1001 -S appgroup && \ - adduser -u 1001 -S appuser -G appgroup - -# 设置工作目录 -WORKDIR /app - -# 从构建阶段复制二进制文件 -COPY --from=builder /app/sender . - -# 复制配置文件和其他必要文件 -COPY --from=builder /app/etc ./etc -COPY --from=builder /app/swagger ./swagger - -# 创建日志目录 -RUN mkdir -p /app/logs && \ - chown -R appuser:appgroup /app - -# 切换到非root用户 -USER appuser - -# 暴露端口 -EXPOSE 12201 12202 - -# 健康检查 -HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD wget --no-verbose --tries=1 --spider http://localhost:12202/health || exit 1 - -# 启动应用 -CMD ["./sender"] diff --git a/module/base/sender/Makefile b/module/base/sender/Makefile deleted file mode 100644 index 8b669d3..0000000 --- a/module/base/sender/Makefile +++ /dev/null @@ -1,215 +0,0 @@ -# Sender Service Makefile - -# 变量定义 -APP_NAME := sender -VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "v1.0.0") -BUILD_TIME := $(shell date +%Y-%m-%d\ %H:%M:%S) -GIT_COMMIT := $(shell git rev-parse HEAD 2>/dev/null || echo "unknown") -GO_VERSION := $(shell go version | awk '{print $$3}') - -# 构建标志 -LDFLAGS := -ldflags "-X main.Version=$(VERSION) -X main.BuildTime=$(BUILD_TIME) -X main.GitCommit=$(GIT_COMMIT) -w -s" -BUILD_FLAGS := -trimpath $(LDFLAGS) - -# 目录 -BUILD_DIR := build -PROTO_DIR := proto -PB_DIR := pb - -# Go环境变量 -export GO111MODULE=on -export GOPROXY=https://goproxy.cn,direct -export GOPRIVATE=git.apinb.com/* -export GONOPROXY=git.apinb.com/* -export GOINSECURE=git.apinb.com/* -export GONOSUMDB=git.apinb.com/* -export GOEXPERIMENT=jsonv2 - -.PHONY: help -help: ## 显示帮助信息 - @echo "Sender Service - 可用的命令:" - @echo "" - @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) - -.PHONY: deps -deps: ## 下载依赖 - @echo "下载Go依赖..." - go mod download - go mod tidy - -.PHONY: proto -proto: ## 生成protobuf代码 - @echo "生成protobuf代码..." - buf generate - -.PHONY: build -build: deps ## 构建应用 - @echo "构建应用..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME) ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)" - -.PHONY: build-linux -build-linux: deps ## 构建Linux版本 - @echo "构建Linux版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-linux-amd64 ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-linux-amd64" - -.PHONY: build-windows -build-windows: deps ## 构建Windows版本 - @echo "构建Windows版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-windows-amd64.exe ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-windows-amd64.exe" - -.PHONY: build-darwin -build-darwin: deps ## 构建macOS版本 - @echo "构建macOS版本..." - @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP_NAME)-darwin-amd64 ./cmd/main/main.go - @echo "构建完成: $(BUILD_DIR)/$(APP_NAME)-darwin-amd64" - -.PHONY: build-all -build-all: build-linux build-windows build-darwin ## 构建所有平台版本 - -.PHONY: run -run: build ## 运行应用 - @echo "启动应用..." - ./$(BUILD_DIR)/$(APP_NAME) - -.PHONY: dev -dev: ## 开发模式运行 - @echo "开发模式启动..." - go run ./cmd/main/main.go - -.PHONY: test -test: ## 运行测试 - @echo "运行测试..." - go test -v ./... - -.PHONY: test-coverage -test-coverage: ## 运行测试并生成覆盖率报告 - @echo "运行测试覆盖率..." - go test -v -coverprofile=coverage.out ./... - go tool cover -html=coverage.out -o coverage.html - @echo "覆盖率报告生成: coverage.html" - -.PHONY: test-mail -test-mail: ## 运行邮件测试 - @echo "运行邮件测试..." - go test -v ./test/mail_test.go - -.PHONY: test-sms -test-sms: ## 运行短信测试 - @echo "运行短信测试..." - go test -v ./test/sms_test.go - -.PHONY: lint -lint: ## 运行代码检查 - @echo "运行代码检查..." - @if command -v golangci-lint >/dev/null 2>&1; then \ - golangci-lint run; \ - else \ - echo "golangci-lint 未安装,使用go vet..."; \ - go vet ./...; \ - fi - -.PHONY: fmt -fmt: ## 格式化代码 - @echo "格式化代码..." - go fmt ./... - @if command -v goimports >/dev/null 2>&1; then \ - goimports -w .; \ - fi - -.PHONY: security -security: ## 安全检查 - @echo "运行安全检查..." - @if command -v gosec >/dev/null 2>&1; then \ - gosec ./...; \ - else \ - echo "gosec 未安装,请运行: go install github.com/securego/gosec/v2/cmd/gosec@latest"; \ - fi - -.PHONY: docker-build -docker-build: ## 构建Docker镜像 - @echo "构建Docker镜像..." - docker build -t $(APP_NAME):$(VERSION) . - docker tag $(APP_NAME):$(VERSION) $(APP_NAME):latest - -.PHONY: docker-run -docker-run: ## 运行Docker容器 - @echo "运行Docker容器..." - docker run -d --name $(APP_NAME) -p 12201:12201 -p 12202:12202 $(APP_NAME):latest - -.PHONY: docker-stop -docker-stop: ## 停止Docker容器 - @echo "停止Docker容器..." - docker stop $(APP_NAME) || true - docker rm $(APP_NAME) || true - -.PHONY: docker-compose-up -docker-compose-up: ## 启动docker-compose服务 - @echo "启动docker-compose服务..." - docker-compose up -d - -.PHONY: docker-compose-down -docker-compose-down: ## 停止docker-compose服务 - @echo "停止docker-compose服务..." - docker-compose down - -.PHONY: docker-compose-logs -docker-compose-logs: ## 查看docker-compose日志 - docker-compose logs -f - -.PHONY: clean -clean: ## 清理构建文件 - @echo "清理构建文件..." - rm -rf $(BUILD_DIR) - rm -f coverage.out coverage.html - docker system prune -f - -.PHONY: install-tools -install-tools: ## 安装开发工具 - @echo "安装开发工具..." - go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - go install golang.org/x/tools/cmd/goimports@latest - go install github.com/securego/gosec/v2/cmd/gosec@latest - go install github.com/bufbuild/buf/cmd/buf@latest - -.PHONY: mod-update -mod-update: ## 更新依赖 - @echo "更新依赖..." - go get -u ./... - go mod tidy - -.PHONY: version -version: ## 显示版本信息 - @echo "应用名称: $(APP_NAME)" - @echo "版本: $(VERSION)" - @echo "构建时间: $(BUILD_TIME)" - @echo "Git提交: $(GIT_COMMIT)" - @echo "Go版本: $(GO_VERSION)" - -.PHONY: swagger -swagger: ## 生成Swagger文档 - @echo "Swagger文档已通过protobuf生成在swagger目录" - -.PHONY: init-config -init-config: ## 初始化配置文件 - @echo "配置文件位于etc目录:" - @echo "- etc/sender_dev.yaml (开发环境)" - @echo "- etc/sender_test.yaml (测试环境)" - @echo "- etc/sender_prod.yaml (生产环境)" - -.PHONY: backup-config -backup-config: ## 备份配置文件 - @echo "备份配置文件..." - tar -czf config_backup_$(shell date +%Y%m%d_%H%M%S).tar.gz etc/ - -.PHONY: all -all: clean deps proto build test lint ## 执行完整的构建流程 - -# 默认目标 -.DEFAULT_GOAL := help diff --git a/module/base/sender/docker-compose.yml b/module/base/sender/docker-compose.yml deleted file mode 100644 index 2ba542d..0000000 --- a/module/base/sender/docker-compose.yml +++ /dev/null @@ -1,114 +0,0 @@ -version: '3.8' - -services: - # Sender Service - sender-service: - build: - context: . - dockerfile: Dockerfile - container_name: sender-service - restart: unless-stopped - ports: - - "12201:12201" # gRPC port - - "12202:12202" # HTTP Gateway port - environment: - - SERVICE_ENV=docker - - TZ=Asia/Shanghai - volumes: - - ./etc:/app/etc:ro - - ./logs:/app/logs - depends_on: - - postgres - - redis - networks: - - sender-network - healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:12202/health"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 40s - - # PostgreSQL Database - postgres: - image: postgres:15-alpine - container_name: sender-postgres - restart: unless-stopped - environment: - POSTGRES_DB: sender_db - POSTGRES_USER: postgres - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-sender_password} - TZ: Asia/Shanghai - volumes: - - postgres_data:/var/lib/postgresql/data - - ./scripts:/docker-entrypoint-initdb.d:ro - ports: - - "5432:5432" - networks: - - sender-network - healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgres"] - interval: 10s - timeout: 5s - retries: 5 - - # Redis Cache - redis: - image: redis:7-alpine - container_name: sender-redis - restart: unless-stopped - command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD:-sender_redis_password} - environment: - TZ: Asia/Shanghai - volumes: - - redis_data:/data - ports: - - "6379:6379" - networks: - - sender-network - healthcheck: - test: ["CMD", "redis-cli", "--raw", "incr", "ping"] - interval: 10s - timeout: 3s - retries: 5 - - # Nginx Reverse Proxy (Optional) - nginx: - image: nginx:alpine - container_name: sender-nginx - restart: unless-stopped - ports: - - "80:80" - - "443:443" - volumes: - - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro - - ./nginx/ssl:/etc/nginx/ssl:ro - depends_on: - - sender-service - networks: - - sender-network - profiles: - - with-nginx - - # Mailhog for Email Testing (Development Only) - mailhog: - image: mailhog/mailhog:latest - container_name: sender-mailhog - restart: unless-stopped - ports: - - "1025:1025" # SMTP port - - "8025:8025" # Web UI port - networks: - - sender-network - profiles: - - development - -volumes: - postgres_data: - driver: local - redis_data: - driver: local - -networks: - sender-network: - driver: bridge diff --git a/module/base/sender/pb/mail.pb.go b/module/base/sender/pb/mail.pb.go index ab070a7..14e5b90 100644 --- a/module/base/sender/pb/mail.pb.go +++ b/module/base/sender/pb/mail.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: mail.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/base/sender/proto/mail.proto package sender @@ -35,7 +35,7 @@ type SendMailRequest struct { func (x *SendMailRequest) Reset() { *x = SendMailRequest{} - mi := &file_mail_proto_msgTypes[0] + mi := &file_module_base_sender_proto_mail_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +47,7 @@ func (x *SendMailRequest) String() string { func (*SendMailRequest) ProtoMessage() {} func (x *SendMailRequest) ProtoReflect() protoreflect.Message { - mi := &file_mail_proto_msgTypes[0] + mi := &file_module_base_sender_proto_mail_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +60,7 @@ func (x *SendMailRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SendMailRequest.ProtoReflect.Descriptor instead. func (*SendMailRequest) Descriptor() ([]byte, []int) { - return file_mail_proto_rawDescGZIP(), []int{0} + return file_module_base_sender_proto_mail_proto_rawDescGZIP(), []int{0} } func (x *SendMailRequest) GetProvider() string { @@ -107,7 +107,7 @@ type SendMailReply struct { func (x *SendMailReply) Reset() { *x = SendMailReply{} - mi := &file_mail_proto_msgTypes[1] + mi := &file_module_base_sender_proto_mail_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -119,7 +119,7 @@ func (x *SendMailReply) String() string { func (*SendMailReply) ProtoMessage() {} func (x *SendMailReply) ProtoReflect() protoreflect.Message { - mi := &file_mail_proto_msgTypes[1] + mi := &file_module_base_sender_proto_mail_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -132,7 +132,7 @@ func (x *SendMailReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SendMailReply.ProtoReflect.Descriptor instead. func (*SendMailReply) Descriptor() ([]byte, []int) { - return file_mail_proto_rawDescGZIP(), []int{1} + return file_module_base_sender_proto_mail_proto_rawDescGZIP(), []int{1} } func (x *SendMailReply) GetData() string { @@ -142,12 +142,11 @@ func (x *SendMailReply) GetData() string { return "" } -var File_mail_proto protoreflect.FileDescriptor +var File_module_base_sender_proto_mail_proto protoreflect.FileDescriptor -const file_mail_proto_rawDesc = "" + +const file_module_base_sender_proto_mail_proto_rawDesc = "" + "\n" + - "\x16" + - "base/sender/mail.proto\x12\x06sender\"\x84\x02\n" + + "#module/base/sender/proto/mail.proto\x12\x06sender\"\x84\x02\n" + "\x0fSendMailRequest\x12\x1a\n" + "\bprovider\x18\x01 \x01(\tR\bprovider\x12!\n" + "\ftemplate_key\x18\x02 \x01(\tR\vtemplateKey\x12\x0e\n" + @@ -160,28 +159,27 @@ const file_mail_proto_rawDesc = "" + "\rSendMailReply\x12\x12\n" + "\x04data\x18\x01 \x01(\tR\x04data2>\n" + "\x04Mail\x126\n" + - "\x04Send\x12\x17.sender.SendMailRequest\x1a\x15.sender.SendMailReplyB\n" + - "Z\b.;senderb\x06proto3" + "\x04Send\x12\x17.sender.SendMailRequest\x1a\x15.sender.SendMailReplyB'Z%bsm/full/module/base/sender/pb;senderb\x06proto3" var ( - file_mail_proto_rawDescOnce sync.Once - file_mail_proto_rawDescData []byte + file_module_base_sender_proto_mail_proto_rawDescOnce sync.Once + file_module_base_sender_proto_mail_proto_rawDescData []byte ) -func file_mail_proto_rawDescGZIP() []byte { - file_mail_proto_rawDescOnce.Do(func() { - file_mail_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_mail_proto_rawDesc), len(file_mail_proto_rawDesc))) +func file_module_base_sender_proto_mail_proto_rawDescGZIP() []byte { + file_module_base_sender_proto_mail_proto_rawDescOnce.Do(func() { + file_module_base_sender_proto_mail_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_sender_proto_mail_proto_rawDesc), len(file_module_base_sender_proto_mail_proto_rawDesc))) }) - return file_mail_proto_rawDescData + return file_module_base_sender_proto_mail_proto_rawDescData } -var file_mail_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_mail_proto_goTypes = []any{ +var file_module_base_sender_proto_mail_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_module_base_sender_proto_mail_proto_goTypes = []any{ (*SendMailRequest)(nil), // 0: sender.SendMailRequest (*SendMailReply)(nil), // 1: sender.SendMailReply nil, // 2: sender.SendMailRequest.ParamtersEntry } -var file_mail_proto_depIdxs = []int32{ +var file_module_base_sender_proto_mail_proto_depIdxs = []int32{ 2, // 0: sender.SendMailRequest.paramters:type_name -> sender.SendMailRequest.ParamtersEntry 0, // 1: sender.Mail.Send:input_type -> sender.SendMailRequest 1, // 2: sender.Mail.Send:output_type -> sender.SendMailReply @@ -192,26 +190,26 @@ var file_mail_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_mail_proto_init() } -func file_mail_proto_init() { - if File_mail_proto != nil { +func init() { file_module_base_sender_proto_mail_proto_init() } +func file_module_base_sender_proto_mail_proto_init() { + if File_module_base_sender_proto_mail_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_mail_proto_rawDesc), len(file_mail_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_sender_proto_mail_proto_rawDesc), len(file_module_base_sender_proto_mail_proto_rawDesc)), NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_mail_proto_goTypes, - DependencyIndexes: file_mail_proto_depIdxs, - MessageInfos: file_mail_proto_msgTypes, + GoTypes: file_module_base_sender_proto_mail_proto_goTypes, + DependencyIndexes: file_module_base_sender_proto_mail_proto_depIdxs, + MessageInfos: file_module_base_sender_proto_mail_proto_msgTypes, }.Build() - File_mail_proto = out.File - file_mail_proto_goTypes = nil - file_mail_proto_depIdxs = nil + File_module_base_sender_proto_mail_proto = out.File + file_module_base_sender_proto_mail_proto_goTypes = nil + file_module_base_sender_proto_mail_proto_depIdxs = nil } diff --git a/module/base/sender/pb/mail.pb.gw.go b/module/base/sender/pb/mail.pb.gw.go index 488ece7..a17e3d5 100644 --- a/module/base/sender/pb/mail.pb.gw.go +++ b/module/base/sender/pb/mail.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: mail.proto +// source: module/base/sender/proto/mail.proto /* Package sender is a reverse proxy. diff --git a/module/base/sender/pb/mail_grpc.pb.go b/module/base/sender/pb/mail_grpc.pb.go index 5e62e06..0e7c2ab 100644 --- a/module/base/sender/pb/mail_grpc.pb.go +++ b/module/base/sender/pb/mail_grpc.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: mail.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/sender/proto/mail.proto package sender @@ -50,16 +50,15 @@ func (c *mailClient) Send(ctx context.Context, in *SendMailRequest, opts ...grpc } // MailServer is the server API for Mail service. -// All implementations must embed UnimplementedMailServer +// All implementations should embed UnimplementedMailServer // for forward compatibility. // // Mail method type MailServer interface { Send(context.Context, *SendMailRequest) (*SendMailReply, error) - mustEmbedUnimplementedMailServer() } -// UnimplementedMailServer must be embedded to have +// UnimplementedMailServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -67,10 +66,9 @@ type MailServer interface { type UnimplementedMailServer struct{} func (UnimplementedMailServer) Send(context.Context, *SendMailRequest) (*SendMailReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Send not implemented") + return nil, status.Error(codes.Unimplemented, "method Send not implemented") } -func (UnimplementedMailServer) mustEmbedUnimplementedMailServer() {} -func (UnimplementedMailServer) testEmbeddedByValue() {} +func (UnimplementedMailServer) testEmbeddedByValue() {} // UnsafeMailServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MailServer will @@ -80,7 +78,7 @@ type UnsafeMailServer interface { } func RegisterMailServer(s grpc.ServiceRegistrar, srv MailServer) { - // If the following call pancis, it indicates UnimplementedMailServer was + // If the following call panics, it indicates UnimplementedMailServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -121,5 +119,5 @@ var Mail_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "mail.proto", + Metadata: "module/base/sender/proto/mail.proto", } diff --git a/module/base/sender/pb/push_xiaomi.pb.go b/module/base/sender/pb/push_xiaomi.pb.go deleted file mode 100644 index e598821..0000000 --- a/module/base/sender/pb/push_xiaomi.pb.go +++ /dev/null @@ -1,553 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: push_xiaomi.proto - -package sender - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type StatusReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Status int64 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // 状态码 - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 标识码 - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` //状态说明 - Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusReply) Reset() { - *x = StatusReply{} - mi := &file_push_xiaomi_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusReply) ProtoMessage() {} - -func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_push_xiaomi_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. -func (*StatusReply) Descriptor() ([]byte, []int) { - return file_push_xiaomi_proto_rawDescGZIP(), []int{0} -} - -func (x *StatusReply) GetStatus() int64 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *StatusReply) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *StatusReply) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *StatusReply) GetTimeseq() int64 { - if x != nil { - return x.Timeseq - } - return 0 -} - -type BaseItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - Payload string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // 消息的内容。(注意:需要对payload字符串做urlencode处理) - RestrictedPackageName string `protobuf:"bytes,2,opt,name=restricted_package_name,json=restrictedPackageName,proto3" json:"restricted_package_name,omitempty"` // App的包名。备注:中间用逗号分割。 - Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` // 通知栏展示的通知的标题,不允许全是空白字符,长度小于50, 一个中英文字符均计算为1(通知栏消息必填)。 - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // 通知栏展示的通知的描述,不允许全是空白字符,长度小于128,一个中英文字符均计算为1(通知栏消息必填)。 - TimeToLive int64 `protobuf:"varint,5,opt,name=time_to_live,json=timeToLive,proto3" json:"time_to_live,omitempty"` // 可选项。如果用户离线,设置消息在服务器保存的时间,单位:ms。服务器默认最长保留两周。 - TimeToSend int64 `protobuf:"varint,6,opt,name=time_to_send,json=timeToSend,proto3" json:"time_to_send,omitempty"` // 可选项。定时发送消息。用自1970年1月1日以来00:00:00.0 UTC时间表示(以毫秒为单位的时间)。注:仅支持七天内的定时消息。 - SoundUri string `protobuf:"bytes,7,opt,name=sound_uri,json=soundUri,proto3" json:"sound_uri,omitempty"` // 可选项,自定义通知栏消息铃声url - SenderForeground string `protobuf:"bytes,8,opt,name=sender_foreground,json=senderForeground,proto3" json:"sender_foreground,omitempty"` // 可选项 '1'弹出通知栏消息(默认);'0'不会弹出通知栏消息 - SenderEffect string `protobuf:"bytes,9,opt,name=sender_effect,json=senderEffect,proto3" json:"sender_effect,omitempty"` // 可选项,预定义通知栏消息的点击行为;"1":打开app的Launcher Activity。"2":打开app的任一Activity(需要extra.intent_uri)。"3":打开网页(需要传入extra.web_uri) - IntentUri string `protobuf:"bytes,10,opt,name=intent_uri,json=intentUri,proto3" json:"intent_uri,omitempty"` // 可选项,打开当前app的任一组件。 - WebUri string `protobuf:"bytes,11,opt,name=web_uri,json=webUri,proto3" json:"web_uri,omitempty"` // 可选项,打开某一个网页。 - Jobkey string `protobuf:"bytes,12,opt,name=jobkey,proto3" json:"jobkey,omitempty"` // 可选项,使用推送批次(JobKey)功能聚合消息。由数字([0-9]),大小写字母([a-zA-Z]),下划线(_)和中划线(-)组成,长度不大于20个字符 - AppVersion string `protobuf:"bytes,13,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"` // 可以接收消息的app版本号,用逗号分割。目前支持MiPush_SDK_Client_2_2_12_sdk.jar(及以后)的版本。 - AppVersionNotIn string `protobuf:"bytes,14,opt,name=app_version_not_in,json=appVersionNotIn,proto3" json:"app_version_not_in,omitempty"` // 无法接收消息的app版本号,用逗号分割。 - Connpt string `protobuf:"bytes,15,opt,name=connpt,proto3" json:"connpt,omitempty"` // 可选项,指定在特定的网络环境下才能接收到消息。目前仅支持指定"wifi"。 - OnlySendOnce string `protobuf:"bytes,16,opt,name=only_send_once,json=onlySendOnce,proto3" json:"only_send_once,omitempty"` // 可选项,extra.only_send_once的值设置为'1',表示该消息仅在设备在线时发送一次,不缓存离线消息进行多次下发 - SenderId int32 `protobuf:"varint,17,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"` // 可选项。默认情况下,通知栏只显示一条推送消息。如果通知栏要显示多条推送消息,需要针对不同的消息设置不同的sender_id(相同sender_id的通知栏消息会覆盖之前的),且要求sender_id为取值在0~2147483647的整数。 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BaseItem) Reset() { - *x = BaseItem{} - mi := &file_push_xiaomi_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BaseItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BaseItem) ProtoMessage() {} - -func (x *BaseItem) ProtoReflect() protoreflect.Message { - mi := &file_push_xiaomi_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BaseItem.ProtoReflect.Descriptor instead. -func (*BaseItem) Descriptor() ([]byte, []int) { - return file_push_xiaomi_proto_rawDescGZIP(), []int{1} -} - -func (x *BaseItem) GetPayload() string { - if x != nil { - return x.Payload - } - return "" -} - -func (x *BaseItem) GetRestrictedPackageName() string { - if x != nil { - return x.RestrictedPackageName - } - return "" -} - -func (x *BaseItem) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *BaseItem) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *BaseItem) GetTimeToLive() int64 { - if x != nil { - return x.TimeToLive - } - return 0 -} - -func (x *BaseItem) GetTimeToSend() int64 { - if x != nil { - return x.TimeToSend - } - return 0 -} - -func (x *BaseItem) GetSoundUri() string { - if x != nil { - return x.SoundUri - } - return "" -} - -func (x *BaseItem) GetSenderForeground() string { - if x != nil { - return x.SenderForeground - } - return "" -} - -func (x *BaseItem) GetSenderEffect() string { - if x != nil { - return x.SenderEffect - } - return "" -} - -func (x *BaseItem) GetIntentUri() string { - if x != nil { - return x.IntentUri - } - return "" -} - -func (x *BaseItem) GetWebUri() string { - if x != nil { - return x.WebUri - } - return "" -} - -func (x *BaseItem) GetJobkey() string { - if x != nil { - return x.Jobkey - } - return "" -} - -func (x *BaseItem) GetAppVersion() string { - if x != nil { - return x.AppVersion - } - return "" -} - -func (x *BaseItem) GetAppVersionNotIn() string { - if x != nil { - return x.AppVersionNotIn - } - return "" -} - -func (x *BaseItem) GetConnpt() string { - if x != nil { - return x.Connpt - } - return "" -} - -func (x *BaseItem) GetOnlySendOnce() string { - if x != nil { - return x.OnlySendOnce - } - return "" -} - -func (x *BaseItem) GetSenderId() int32 { - if x != nil { - return x.SenderId - } - return 0 -} - -type ARequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PushType string `protobuf:"bytes,1,opt,name=push_type,json=pushType,proto3" json:"push_type,omitempty"` // 推送类型:"alias";"registration_id"; 注:需要与push_id对应 - PushId []string `protobuf:"bytes,2,rep,name=push_id,json=pushId,proto3" json:"push_id,omitempty"` // 根据alias或registration_id或account,发送消息到指定设备上,用逗号分割。 - Message *BaseItem `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ARequest) Reset() { - *x = ARequest{} - mi := &file_push_xiaomi_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ARequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ARequest) ProtoMessage() {} - -func (x *ARequest) ProtoReflect() protoreflect.Message { - mi := &file_push_xiaomi_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ARequest.ProtoReflect.Descriptor instead. -func (*ARequest) Descriptor() ([]byte, []int) { - return file_push_xiaomi_proto_rawDescGZIP(), []int{2} -} - -func (x *ARequest) GetPushType() string { - if x != nil { - return x.PushType - } - return "" -} - -func (x *ARequest) GetPushId() []string { - if x != nil { - return x.PushId - } - return nil -} - -func (x *ARequest) GetMessage() *BaseItem { - if x != nil { - return x.Message - } - return nil -} - -type TopicRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` // 根据topic,发送消息给订阅了该topic的所有设备 - Message *BaseItem `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TopicRequest) Reset() { - *x = TopicRequest{} - mi := &file_push_xiaomi_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TopicRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TopicRequest) ProtoMessage() {} - -func (x *TopicRequest) ProtoReflect() protoreflect.Message { - mi := &file_push_xiaomi_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TopicRequest.ProtoReflect.Descriptor instead. -func (*TopicRequest) Descriptor() ([]byte, []int) { - return file_push_xiaomi_proto_rawDescGZIP(), []int{3} -} - -func (x *TopicRequest) GetTopic() string { - if x != nil { - return x.Topic - } - return "" -} - -func (x *TopicRequest) GetMessage() *BaseItem { - if x != nil { - return x.Message - } - return nil -} - -type MultiTopicRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Topics string `protobuf:"bytes,1,opt,name=topics,proto3" json:"topics,omitempty"` // topic列表,使用;$;分割。注: topics参数需要和topic_op参数配合使用,另外topic的数量不能超过5。 - TopicOp string `protobuf:"bytes,2,opt,name=topic_op,json=topicOp,proto3" json:"topic_op,omitempty"` // topic之间的操作关系。支持以下三种:UNION并集INTERSECTION交集EXCEPT差集例如:topics的列表元素是[A, B, C, D],则并集结果是A∪B∪C∪D,交集的结果是A ∩B ∩C ∩D,差集的结果是A-B-C-D。 - Message *BaseItem `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MultiTopicRequest) Reset() { - *x = MultiTopicRequest{} - mi := &file_push_xiaomi_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MultiTopicRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MultiTopicRequest) ProtoMessage() {} - -func (x *MultiTopicRequest) ProtoReflect() protoreflect.Message { - mi := &file_push_xiaomi_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MultiTopicRequest.ProtoReflect.Descriptor instead. -func (*MultiTopicRequest) Descriptor() ([]byte, []int) { - return file_push_xiaomi_proto_rawDescGZIP(), []int{4} -} - -func (x *MultiTopicRequest) GetTopics() string { - if x != nil { - return x.Topics - } - return "" -} - -func (x *MultiTopicRequest) GetTopicOp() string { - if x != nil { - return x.TopicOp - } - return "" -} - -func (x *MultiTopicRequest) GetMessage() *BaseItem { - if x != nil { - return x.Message - } - return nil -} - -var File_push_xiaomi_proto protoreflect.FileDescriptor - -const file_push_xiaomi_proto_rawDesc = "" + - "\n" + - "\x1dbase/sender/push_xiaomi.proto\x12\x06sender\"u\n" + - "\vStatusReply\x12\x16\n" + - "\x06status\x18\x01 \x01(\x03R\x06status\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x18\n" + - "\amessage\x18\x03 \x01(\tR\amessage\x12\x18\n" + - "\atimeseq\x18\x04 \x01(\x03R\atimeseq\"\xc0\x04\n" + - "\bBaseItem\x12\x18\n" + - "\apayload\x18\x01 \x01(\tR\apayload\x126\n" + - "\x17restricted_package_name\x18\x02 \x01(\tR\x15restrictedPackageName\x12\x14\n" + - "\x05title\x18\x03 \x01(\tR\x05title\x12 \n" + - "\vdescription\x18\x04 \x01(\tR\vdescription\x12 \n" + - "\ftime_to_live\x18\x05 \x01(\x03R\n" + - "timeToLive\x12 \n" + - "\ftime_to_send\x18\x06 \x01(\x03R\n" + - "timeToSend\x12\x1b\n" + - "\tsound_uri\x18\a \x01(\tR\bsoundUri\x12+\n" + - "\x11sender_foreground\x18\b \x01(\tR\x10senderForeground\x12#\n" + - "\rsender_effect\x18\t \x01(\tR\fsenderEffect\x12\x1d\n" + - "\n" + - "intent_uri\x18\n" + - " \x01(\tR\tintentUri\x12\x17\n" + - "\aweb_uri\x18\v \x01(\tR\x06webUri\x12\x16\n" + - "\x06jobkey\x18\f \x01(\tR\x06jobkey\x12\x1f\n" + - "\vapp_version\x18\r \x01(\tR\n" + - "appVersion\x12+\n" + - "\x12app_version_not_in\x18\x0e \x01(\tR\x0fappVersionNotIn\x12\x16\n" + - "\x06connpt\x18\x0f \x01(\tR\x06connpt\x12$\n" + - "\x0eonly_send_once\x18\x10 \x01(\tR\fonlySendOnce\x12\x1b\n" + - "\tsender_id\x18\x11 \x01(\x05R\bsenderId\"l\n" + - "\bARequest\x12\x1b\n" + - "\tpush_type\x18\x01 \x01(\tR\bpushType\x12\x17\n" + - "\apush_id\x18\x02 \x03(\tR\x06pushId\x12*\n" + - "\amessage\x18\x03 \x01(\v2\x10.sender.BaseItemR\amessage\"P\n" + - "\fTopicRequest\x12\x14\n" + - "\x05topic\x18\x01 \x01(\tR\x05topic\x12*\n" + - "\amessage\x18\x02 \x01(\v2\x10.sender.BaseItemR\amessage\"r\n" + - "\x11MultiTopicRequest\x12\x16\n" + - "\x06topics\x18\x01 \x01(\tR\x06topics\x12\x19\n" + - "\btopic_op\x18\x02 \x01(\tR\atopicOp\x12*\n" + - "\amessage\x18\x03 \x01(\v2\x10.sender.BaseItemR\amessage2\x92\x02\n" + - "\x06Xiaomi\x120\n" + - "\x05Regid\x12\x10.sender.ARequest\x1a\x13.sender.StatusReply\"\x00\x120\n" + - "\x05Alias\x12\x10.sender.ARequest\x1a\x13.sender.StatusReply\"\x00\x124\n" + - "\x05Topic\x12\x14.sender.TopicRequest\x1a\x13.sender.StatusReply\"\x00\x12>\n" + - "\n" + - "MultiTopic\x12\x19.sender.MultiTopicRequest\x1a\x13.sender.StatusReply\"\x00\x12.\n" + - "\x03All\x12\x10.sender.BaseItem\x1a\x13.sender.StatusReply\"\x00B\n" + - "Z\b./senderb\x06proto3" - -var ( - file_push_xiaomi_proto_rawDescOnce sync.Once - file_push_xiaomi_proto_rawDescData []byte -) - -func file_push_xiaomi_proto_rawDescGZIP() []byte { - file_push_xiaomi_proto_rawDescOnce.Do(func() { - file_push_xiaomi_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_push_xiaomi_proto_rawDesc), len(file_push_xiaomi_proto_rawDesc))) - }) - return file_push_xiaomi_proto_rawDescData -} - -var file_push_xiaomi_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_push_xiaomi_proto_goTypes = []any{ - (*StatusReply)(nil), // 0: sender.StatusReply - (*BaseItem)(nil), // 1: sender.BaseItem - (*ARequest)(nil), // 2: sender.ARequest - (*TopicRequest)(nil), // 3: sender.TopicRequest - (*MultiTopicRequest)(nil), // 4: sender.MultiTopicRequest -} -var file_push_xiaomi_proto_depIdxs = []int32{ - 1, // 0: sender.ARequest.message:type_name -> sender.BaseItem - 1, // 1: sender.TopicRequest.message:type_name -> sender.BaseItem - 1, // 2: sender.MultiTopicRequest.message:type_name -> sender.BaseItem - 2, // 3: sender.Xiaomi.Regid:input_type -> sender.ARequest - 2, // 4: sender.Xiaomi.Alias:input_type -> sender.ARequest - 3, // 5: sender.Xiaomi.Topic:input_type -> sender.TopicRequest - 4, // 6: sender.Xiaomi.MultiTopic:input_type -> sender.MultiTopicRequest - 1, // 7: sender.Xiaomi.All:input_type -> sender.BaseItem - 0, // 8: sender.Xiaomi.Regid:output_type -> sender.StatusReply - 0, // 9: sender.Xiaomi.Alias:output_type -> sender.StatusReply - 0, // 10: sender.Xiaomi.Topic:output_type -> sender.StatusReply - 0, // 11: sender.Xiaomi.MultiTopic:output_type -> sender.StatusReply - 0, // 12: sender.Xiaomi.All:output_type -> sender.StatusReply - 8, // [8:13] is the sub-list for method output_type - 3, // [3:8] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_push_xiaomi_proto_init() } -func file_push_xiaomi_proto_init() { - if File_push_xiaomi_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_push_xiaomi_proto_rawDesc), len(file_push_xiaomi_proto_rawDesc)), - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_push_xiaomi_proto_goTypes, - DependencyIndexes: file_push_xiaomi_proto_depIdxs, - MessageInfos: file_push_xiaomi_proto_msgTypes, - }.Build() - File_push_xiaomi_proto = out.File - file_push_xiaomi_proto_goTypes = nil - file_push_xiaomi_proto_depIdxs = nil -} diff --git a/module/base/sender/pb/push_xiaomi_grpc.pb.go b/module/base/sender/pb/push_xiaomi_grpc.pb.go deleted file mode 100644 index 748301a..0000000 --- a/module/base/sender/pb/push_xiaomi_grpc.pb.go +++ /dev/null @@ -1,284 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: push_xiaomi.proto - -package sender - -import ( - context "context" - - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Xiaomi_Regid_FullMethodName = "/sender.Xiaomi/Regid" - Xiaomi_Alias_FullMethodName = "/sender.Xiaomi/Alias" - Xiaomi_Topic_FullMethodName = "/sender.Xiaomi/Topic" - Xiaomi_MultiTopic_FullMethodName = "/sender.Xiaomi/MultiTopic" - Xiaomi_All_FullMethodName = "/sender.Xiaomi/All" -) - -// XiaomiClient is the client API for Xiaomi service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type XiaomiClient interface { - // 向一组regid列表或alias列表推送单条消息(这些regId可以属于不同的包名) - Regid(ctx context.Context, in *ARequest, opts ...grpc.CallOption) (*StatusReply, error) - // 向某个alias或一组alias列表推送某条消息(这些alias可以属于不同的包名) - Alias(ctx context.Context, in *ARequest, opts ...grpc.CallOption) (*StatusReply, error) - // 向某个topic推送单条消息 - Topic(ctx context.Context, in *TopicRequest, opts ...grpc.CallOption) (*StatusReply, error) - // 向多个topic推送单条消息(可以指定一个或多个包名) - MultiTopic(ctx context.Context, in *MultiTopicRequest, opts ...grpc.CallOption) (*StatusReply, error) - // 向所有设备推送某条消息(可以指定一个或多个包名) - All(ctx context.Context, in *BaseItem, opts ...grpc.CallOption) (*StatusReply, error) -} - -type xiaomiClient struct { - cc grpc.ClientConnInterface -} - -func NewXiaomiClient(cc grpc.ClientConnInterface) XiaomiClient { - return &xiaomiClient{cc} -} - -func (c *xiaomiClient) Regid(ctx context.Context, in *ARequest, opts ...grpc.CallOption) (*StatusReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) - err := c.cc.Invoke(ctx, Xiaomi_Regid_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *xiaomiClient) Alias(ctx context.Context, in *ARequest, opts ...grpc.CallOption) (*StatusReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) - err := c.cc.Invoke(ctx, Xiaomi_Alias_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *xiaomiClient) Topic(ctx context.Context, in *TopicRequest, opts ...grpc.CallOption) (*StatusReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) - err := c.cc.Invoke(ctx, Xiaomi_Topic_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *xiaomiClient) MultiTopic(ctx context.Context, in *MultiTopicRequest, opts ...grpc.CallOption) (*StatusReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) - err := c.cc.Invoke(ctx, Xiaomi_MultiTopic_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *xiaomiClient) All(ctx context.Context, in *BaseItem, opts ...grpc.CallOption) (*StatusReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) - err := c.cc.Invoke(ctx, Xiaomi_All_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// XiaomiServer is the server API for Xiaomi service. -// All implementations must embed UnimplementedXiaomiServer -// for forward compatibility. -type XiaomiServer interface { - // 向一组regid列表或alias列表推送单条消息(这些regId可以属于不同的包名) - Regid(context.Context, *ARequest) (*StatusReply, error) - // 向某个alias或一组alias列表推送某条消息(这些alias可以属于不同的包名) - Alias(context.Context, *ARequest) (*StatusReply, error) - // 向某个topic推送单条消息 - Topic(context.Context, *TopicRequest) (*StatusReply, error) - // 向多个topic推送单条消息(可以指定一个或多个包名) - MultiTopic(context.Context, *MultiTopicRequest) (*StatusReply, error) - // 向所有设备推送某条消息(可以指定一个或多个包名) - All(context.Context, *BaseItem) (*StatusReply, error) - mustEmbedUnimplementedXiaomiServer() -} - -// UnimplementedXiaomiServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedXiaomiServer struct{} - -func (UnimplementedXiaomiServer) Regid(context.Context, *ARequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Regid not implemented") -} -func (UnimplementedXiaomiServer) Alias(context.Context, *ARequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Alias not implemented") -} -func (UnimplementedXiaomiServer) Topic(context.Context, *TopicRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Topic not implemented") -} -func (UnimplementedXiaomiServer) MultiTopic(context.Context, *MultiTopicRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MultiTopic not implemented") -} -func (UnimplementedXiaomiServer) All(context.Context, *BaseItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method All not implemented") -} -func (UnimplementedXiaomiServer) mustEmbedUnimplementedXiaomiServer() {} -func (UnimplementedXiaomiServer) testEmbeddedByValue() {} - -// UnsafeXiaomiServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to XiaomiServer will -// result in compilation errors. -type UnsafeXiaomiServer interface { - mustEmbedUnimplementedXiaomiServer() -} - -func RegisterXiaomiServer(s grpc.ServiceRegistrar, srv XiaomiServer) { - // If the following call pancis, it indicates UnimplementedXiaomiServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Xiaomi_ServiceDesc, srv) -} - -func _Xiaomi_Regid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ARequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(XiaomiServer).Regid(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Xiaomi_Regid_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(XiaomiServer).Regid(ctx, req.(*ARequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Xiaomi_Alias_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ARequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(XiaomiServer).Alias(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Xiaomi_Alias_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(XiaomiServer).Alias(ctx, req.(*ARequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Xiaomi_Topic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TopicRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(XiaomiServer).Topic(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Xiaomi_Topic_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(XiaomiServer).Topic(ctx, req.(*TopicRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Xiaomi_MultiTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MultiTopicRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(XiaomiServer).MultiTopic(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Xiaomi_MultiTopic_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(XiaomiServer).MultiTopic(ctx, req.(*MultiTopicRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Xiaomi_All_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BaseItem) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(XiaomiServer).All(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Xiaomi_All_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(XiaomiServer).All(ctx, req.(*BaseItem)) - } - return interceptor(ctx, in, info, handler) -} - -// Xiaomi_ServiceDesc is the grpc.ServiceDesc for Xiaomi service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Xiaomi_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "sender.Xiaomi", - HandlerType: (*XiaomiServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Regid", - Handler: _Xiaomi_Regid_Handler, - }, - { - MethodName: "Alias", - Handler: _Xiaomi_Alias_Handler, - }, - { - MethodName: "Topic", - Handler: _Xiaomi_Topic_Handler, - }, - { - MethodName: "MultiTopic", - Handler: _Xiaomi_MultiTopic_Handler, - }, - { - MethodName: "All", - Handler: _Xiaomi_All_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "push_xiaomi.proto", -} diff --git a/module/base/sender/pb/sms.pb.go b/module/base/sender/pb/sms.pb.go index fd246c9..56c75c2 100644 --- a/module/base/sender/pb/sms.pb.go +++ b/module/base/sender/pb/sms.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: sms.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/base/sender/proto/sms.proto package sender @@ -36,7 +36,7 @@ type SmsSendRequest struct { func (x *SmsSendRequest) Reset() { *x = SmsSendRequest{} - mi := &file_sms_proto_msgTypes[0] + mi := &file_module_base_sender_proto_sms_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -48,7 +48,7 @@ func (x *SmsSendRequest) String() string { func (*SmsSendRequest) ProtoMessage() {} func (x *SmsSendRequest) ProtoReflect() protoreflect.Message { - mi := &file_sms_proto_msgTypes[0] + mi := &file_module_base_sender_proto_sms_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61,7 +61,7 @@ func (x *SmsSendRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SmsSendRequest.ProtoReflect.Descriptor instead. func (*SmsSendRequest) Descriptor() ([]byte, []int) { - return file_sms_proto_rawDescGZIP(), []int{0} + return file_module_base_sender_proto_sms_proto_rawDescGZIP(), []int{0} } func (x *SmsSendRequest) GetProvider() string { @@ -115,7 +115,7 @@ type SmsReply struct { func (x *SmsReply) Reset() { *x = SmsReply{} - mi := &file_sms_proto_msgTypes[1] + mi := &file_module_base_sender_proto_sms_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -127,7 +127,7 @@ func (x *SmsReply) String() string { func (*SmsReply) ProtoMessage() {} func (x *SmsReply) ProtoReflect() protoreflect.Message { - mi := &file_sms_proto_msgTypes[1] + mi := &file_module_base_sender_proto_sms_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -140,7 +140,7 @@ func (x *SmsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SmsReply.ProtoReflect.Descriptor instead. func (*SmsReply) Descriptor() ([]byte, []int) { - return file_sms_proto_rawDescGZIP(), []int{1} + return file_module_base_sender_proto_sms_proto_rawDescGZIP(), []int{1} } func (x *SmsReply) GetReply() string { @@ -160,7 +160,7 @@ type SmsVerifyRequest struct { func (x *SmsVerifyRequest) Reset() { *x = SmsVerifyRequest{} - mi := &file_sms_proto_msgTypes[2] + mi := &file_module_base_sender_proto_sms_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -172,7 +172,7 @@ func (x *SmsVerifyRequest) String() string { func (*SmsVerifyRequest) ProtoMessage() {} func (x *SmsVerifyRequest) ProtoReflect() protoreflect.Message { - mi := &file_sms_proto_msgTypes[2] + mi := &file_module_base_sender_proto_sms_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -185,7 +185,7 @@ func (x *SmsVerifyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SmsVerifyRequest.ProtoReflect.Descriptor instead. func (*SmsVerifyRequest) Descriptor() ([]byte, []int) { - return file_sms_proto_rawDescGZIP(), []int{2} + return file_module_base_sender_proto_sms_proto_rawDescGZIP(), []int{2} } func (x *SmsVerifyRequest) GetPhone() string { @@ -202,11 +202,11 @@ func (x *SmsVerifyRequest) GetCode() string { return "" } -var File_sms_proto protoreflect.FileDescriptor +var File_module_base_sender_proto_sms_proto protoreflect.FileDescriptor -const file_sms_proto_rawDesc = "" + +const file_module_base_sender_proto_sms_proto_rawDesc = "" + "\n" + - "\x15base/sender/sms.proto\x12\x06sender\"\xa7\x02\n" + + "\"module/base/sender/proto/sms.proto\x12\x06sender\"\xa7\x02\n" + "\x0eSmsSendRequest\x12\x1a\n" + "\bprovider\x18\x01 \x01(\tR\bprovider\x12\x1b\n" + "\tsign_name\x18\x02 \x01(\tR\bsignName\x12#\n" + @@ -224,29 +224,28 @@ const file_sms_proto_rawDesc = "" + "\x04code\x18\x02 \x01(\tR\x04code2m\n" + "\x03Sms\x120\n" + "\x04Send\x12\x16.sender.SmsSendRequest\x1a\x10.sender.SmsReply\x124\n" + - "\x06Verify\x12\x18.sender.SmsVerifyRequest\x1a\x10.sender.SmsReplyB\n" + - "Z\b.;senderb\x06proto3" + "\x06Verify\x12\x18.sender.SmsVerifyRequest\x1a\x10.sender.SmsReplyB'Z%bsm/full/module/base/sender/pb;senderb\x06proto3" var ( - file_sms_proto_rawDescOnce sync.Once - file_sms_proto_rawDescData []byte + file_module_base_sender_proto_sms_proto_rawDescOnce sync.Once + file_module_base_sender_proto_sms_proto_rawDescData []byte ) -func file_sms_proto_rawDescGZIP() []byte { - file_sms_proto_rawDescOnce.Do(func() { - file_sms_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_sms_proto_rawDesc), len(file_sms_proto_rawDesc))) +func file_module_base_sender_proto_sms_proto_rawDescGZIP() []byte { + file_module_base_sender_proto_sms_proto_rawDescOnce.Do(func() { + file_module_base_sender_proto_sms_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_base_sender_proto_sms_proto_rawDesc), len(file_module_base_sender_proto_sms_proto_rawDesc))) }) - return file_sms_proto_rawDescData + return file_module_base_sender_proto_sms_proto_rawDescData } -var file_sms_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_sms_proto_goTypes = []any{ +var file_module_base_sender_proto_sms_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_module_base_sender_proto_sms_proto_goTypes = []any{ (*SmsSendRequest)(nil), // 0: sender.SmsSendRequest (*SmsReply)(nil), // 1: sender.SmsReply (*SmsVerifyRequest)(nil), // 2: sender.SmsVerifyRequest nil, // 3: sender.SmsSendRequest.ParamtersEntry } -var file_sms_proto_depIdxs = []int32{ +var file_module_base_sender_proto_sms_proto_depIdxs = []int32{ 3, // 0: sender.SmsSendRequest.paramters:type_name -> sender.SmsSendRequest.ParamtersEntry 0, // 1: sender.Sms.Send:input_type -> sender.SmsSendRequest 2, // 2: sender.Sms.Verify:input_type -> sender.SmsVerifyRequest @@ -259,26 +258,26 @@ var file_sms_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_sms_proto_init() } -func file_sms_proto_init() { - if File_sms_proto != nil { +func init() { file_module_base_sender_proto_sms_proto_init() } +func file_module_base_sender_proto_sms_proto_init() { + if File_module_base_sender_proto_sms_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_sms_proto_rawDesc), len(file_sms_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_base_sender_proto_sms_proto_rawDesc), len(file_module_base_sender_proto_sms_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_sms_proto_goTypes, - DependencyIndexes: file_sms_proto_depIdxs, - MessageInfos: file_sms_proto_msgTypes, + GoTypes: file_module_base_sender_proto_sms_proto_goTypes, + DependencyIndexes: file_module_base_sender_proto_sms_proto_depIdxs, + MessageInfos: file_module_base_sender_proto_sms_proto_msgTypes, }.Build() - File_sms_proto = out.File - file_sms_proto_goTypes = nil - file_sms_proto_depIdxs = nil + File_module_base_sender_proto_sms_proto = out.File + file_module_base_sender_proto_sms_proto_goTypes = nil + file_module_base_sender_proto_sms_proto_depIdxs = nil } diff --git a/module/base/sender/pb/sms.pb.gw.go b/module/base/sender/pb/sms.pb.gw.go index 75bca47..d94d6c0 100644 --- a/module/base/sender/pb/sms.pb.gw.go +++ b/module/base/sender/pb/sms.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: sms.proto +// source: module/base/sender/proto/sms.proto /* Package sender is a reverse proxy. diff --git a/module/base/sender/pb/sms_grpc.pb.go b/module/base/sender/pb/sms_grpc.pb.go index c2110c4..0d45b98 100644 --- a/module/base/sender/pb/sms_grpc.pb.go +++ b/module/base/sender/pb/sms_grpc.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: sms.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/base/sender/proto/sms.proto package sender @@ -62,17 +62,16 @@ func (c *smsClient) Verify(ctx context.Context, in *SmsVerifyRequest, opts ...gr } // SmsServer is the server API for Sms service. -// All implementations must embed UnimplementedSmsServer +// All implementations should embed UnimplementedSmsServer // for forward compatibility. // // sms method type SmsServer interface { Send(context.Context, *SmsSendRequest) (*SmsReply, error) Verify(context.Context, *SmsVerifyRequest) (*SmsReply, error) - mustEmbedUnimplementedSmsServer() } -// UnimplementedSmsServer must be embedded to have +// UnimplementedSmsServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -80,13 +79,12 @@ type SmsServer interface { type UnimplementedSmsServer struct{} func (UnimplementedSmsServer) Send(context.Context, *SmsSendRequest) (*SmsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Send not implemented") + return nil, status.Error(codes.Unimplemented, "method Send not implemented") } func (UnimplementedSmsServer) Verify(context.Context, *SmsVerifyRequest) (*SmsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") + return nil, status.Error(codes.Unimplemented, "method Verify not implemented") } -func (UnimplementedSmsServer) mustEmbedUnimplementedSmsServer() {} -func (UnimplementedSmsServer) testEmbeddedByValue() {} +func (UnimplementedSmsServer) testEmbeddedByValue() {} // UnsafeSmsServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SmsServer will @@ -96,7 +94,7 @@ type UnsafeSmsServer interface { } func RegisterSmsServer(s grpc.ServiceRegistrar, srv SmsServer) { - // If the following call pancis, it indicates UnimplementedSmsServer was + // If the following call panics, it indicates UnimplementedSmsServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -159,5 +157,5 @@ var Sms_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "sms.proto", + Metadata: "module/base/sender/proto/sms.proto", } diff --git a/module/base/sender/proto/mail.proto b/module/base/sender/proto/mail.proto index 08c26aa..e27a408 100644 --- a/module/base/sender/proto/mail.proto +++ b/module/base/sender/proto/mail.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package sender; -option go_package=".;sender"; +option go_package = "bsm/full/module/base/sender/pb;sender"; // Mail method service Mail { diff --git a/module/base/sender/proto/sms.proto b/module/base/sender/proto/sms.proto index 3cb1de9..864ecbd 100644 --- a/module/base/sender/proto/sms.proto +++ b/module/base/sender/proto/sms.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package sender ; -option go_package=".;sender"; +option go_package = "bsm/full/module/base/sender/pb;sender"; // sms method service Sms { diff --git a/module/ec/address/pb/address.pb.go b/module/ec/address/pb/address.pb.go index e5f40e5..9f339cc 100644 --- a/module/ec/address/pb/address.pb.go +++ b/module/ec/address/pb/address.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc (unknown) -// source: address.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/address/proto/address.proto package address @@ -41,7 +41,7 @@ type AddressItem struct { func (x *AddressItem) Reset() { *x = AddressItem{} - mi := &file_address_proto_msgTypes[0] + mi := &file_module_ec_address_proto_address_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -53,7 +53,7 @@ func (x *AddressItem) String() string { func (*AddressItem) ProtoMessage() {} func (x *AddressItem) ProtoReflect() protoreflect.Message { - mi := &file_address_proto_msgTypes[0] + mi := &file_module_ec_address_proto_address_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66,7 +66,7 @@ func (x *AddressItem) ProtoReflect() protoreflect.Message { // Deprecated: Use AddressItem.ProtoReflect.Descriptor instead. func (*AddressItem) Descriptor() ([]byte, []int) { - return file_address_proto_rawDescGZIP(), []int{0} + return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{0} } func (x *AddressItem) GetId() int64 { @@ -162,16 +162,16 @@ type AddressCreateRequest struct { Area string `protobuf:"bytes,5,opt,name=area,proto3" json:"area,omitempty"` // 区 Detail string `protobuf:"bytes,6,opt,name=detail,proto3" json:"detail,omitempty"` // 详情地址 Contact string `protobuf:"bytes,7,opt,name=contact,proto3" json:"contact,omitempty"` // 联系人 - Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name,omitempty"` - Pics string `protobuf:"bytes,9,opt,name=pics,proto3" json:"pics,omitempty"` - Status int32 `protobuf:"varint,10,opt,name=status,proto3" json:"status,omitempty"` // 状态 -1为删除,1为正常,2为设置成默认 + Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name,omitempty"` // 名称 + Pics string `protobuf:"bytes,9,opt,name=pics,proto3" json:"pics,omitempty"` // 图片 + Status int32 `protobuf:"varint,10,opt,name=status,proto3" json:"status,omitempty"` // 状态 -1为删除,1为正常,2为设置成默认 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *AddressCreateRequest) Reset() { *x = AddressCreateRequest{} - mi := &file_address_proto_msgTypes[1] + mi := &file_module_ec_address_proto_address_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -183,7 +183,7 @@ func (x *AddressCreateRequest) String() string { func (*AddressCreateRequest) ProtoMessage() {} func (x *AddressCreateRequest) ProtoReflect() protoreflect.Message { - mi := &file_address_proto_msgTypes[1] + mi := &file_module_ec_address_proto_address_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -196,7 +196,7 @@ func (x *AddressCreateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddressCreateRequest.ProtoReflect.Descriptor instead. func (*AddressCreateRequest) Descriptor() ([]byte, []int) { - return file_address_proto_rawDescGZIP(), []int{1} + return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{1} } func (x *AddressCreateRequest) GetPhone() string { @@ -280,7 +280,7 @@ type FetchRequest struct { func (x *FetchRequest) Reset() { *x = FetchRequest{} - mi := &file_address_proto_msgTypes[2] + mi := &file_module_ec_address_proto_address_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -292,7 +292,7 @@ func (x *FetchRequest) String() string { func (*FetchRequest) ProtoMessage() {} func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_address_proto_msgTypes[2] + mi := &file_module_ec_address_proto_address_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -305,7 +305,7 @@ func (x *FetchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_address_proto_rawDescGZIP(), []int{2} + return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{2} } func (x *FetchRequest) GetPageNo() int64 { @@ -339,7 +339,7 @@ type IdentRequest struct { func (x *IdentRequest) Reset() { *x = IdentRequest{} - mi := &file_address_proto_msgTypes[3] + mi := &file_module_ec_address_proto_address_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -351,7 +351,7 @@ func (x *IdentRequest) String() string { func (*IdentRequest) ProtoMessage() {} func (x *IdentRequest) ProtoReflect() protoreflect.Message { - mi := &file_address_proto_msgTypes[3] + mi := &file_module_ec_address_proto_address_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -364,7 +364,7 @@ func (x *IdentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. func (*IdentRequest) Descriptor() ([]byte, []int) { - return file_address_proto_rawDescGZIP(), []int{3} + return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{3} } func (x *IdentRequest) GetId() int64 { @@ -393,7 +393,7 @@ type StatusReply struct { func (x *StatusReply) Reset() { *x = StatusReply{} - mi := &file_address_proto_msgTypes[4] + mi := &file_module_ec_address_proto_address_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -405,7 +405,7 @@ func (x *StatusReply) String() string { func (*StatusReply) ProtoMessage() {} func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_address_proto_msgTypes[4] + mi := &file_module_ec_address_proto_address_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -418,7 +418,7 @@ func (x *StatusReply) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. func (*StatusReply) Descriptor() ([]byte, []int) { - return file_address_proto_rawDescGZIP(), []int{4} + return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{4} } func (x *StatusReply) GetCode() int32 { @@ -458,7 +458,7 @@ type AddressListReply struct { func (x *AddressListReply) Reset() { *x = AddressListReply{} - mi := &file_address_proto_msgTypes[5] + mi := &file_module_ec_address_proto_address_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -470,7 +470,7 @@ func (x *AddressListReply) String() string { func (*AddressListReply) ProtoMessage() {} func (x *AddressListReply) ProtoReflect() protoreflect.Message { - mi := &file_address_proto_msgTypes[5] + mi := &file_module_ec_address_proto_address_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -483,7 +483,7 @@ func (x *AddressListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use AddressListReply.ProtoReflect.Descriptor instead. func (*AddressListReply) Descriptor() ([]byte, []int) { - return file_address_proto_rawDescGZIP(), []int{5} + return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{5} } func (x *AddressListReply) GetData() []*AddressItem { @@ -502,7 +502,7 @@ type AddressDeleteRequest struct { func (x *AddressDeleteRequest) Reset() { *x = AddressDeleteRequest{} - mi := &file_address_proto_msgTypes[6] + mi := &file_module_ec_address_proto_address_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -514,7 +514,7 @@ func (x *AddressDeleteRequest) String() string { func (*AddressDeleteRequest) ProtoMessage() {} func (x *AddressDeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_address_proto_msgTypes[6] + mi := &file_module_ec_address_proto_address_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -527,7 +527,7 @@ func (x *AddressDeleteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddressDeleteRequest.ProtoReflect.Descriptor instead. func (*AddressDeleteRequest) Descriptor() ([]byte, []int) { - return file_address_proto_rawDescGZIP(), []int{6} + return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{6} } func (x *AddressDeleteRequest) GetId() []int64 { @@ -537,11 +537,11 @@ func (x *AddressDeleteRequest) GetId() []int64 { return nil } -var File_address_proto protoreflect.FileDescriptor +var File_module_ec_address_proto_address_proto protoreflect.FileDescriptor -const file_address_proto_rawDesc = "" + +const file_module_ec_address_proto_address_proto_rawDesc = "" + "\n" + - "\x18ec/address/address.proto\x12\aaddress\"\x9f\x02\n" + + "%module/ec/address/proto/address.proto\x12\aaddress\"\x9f\x02\n" + "\vAddressItem\x12\x0e\n" + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x14\n" + @@ -592,22 +592,22 @@ const file_address_proto_rawDesc = "" + "\x06Modify\x12\x14.address.AddressItem\x1a\x14.address.StatusReply\"\x00\x124\n" + "\x03Get\x12\x15.address.IdentRequest\x1a\x14.address.AddressItem\"\x00\x12;\n" + "\x05Fetch\x12\x15.address.IdentRequest\x1a\x19.address.AddressListReply\"\x00\x12?\n" + - "\x06Delete\x12\x1d.address.AddressDeleteRequest\x1a\x14.address.StatusReply\"\x00B\vZ\t./addressb\x06proto3" + "\x06Delete\x12\x1d.address.AddressDeleteRequest\x1a\x14.address.StatusReply\"\x00B'Z%bsm/full/module/ec/address/pb;addressb\x06proto3" var ( - file_address_proto_rawDescOnce sync.Once - file_address_proto_rawDescData []byte + file_module_ec_address_proto_address_proto_rawDescOnce sync.Once + file_module_ec_address_proto_address_proto_rawDescData []byte ) -func file_address_proto_rawDescGZIP() []byte { - file_address_proto_rawDescOnce.Do(func() { - file_address_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_address_proto_rawDesc), len(file_address_proto_rawDesc))) +func file_module_ec_address_proto_address_proto_rawDescGZIP() []byte { + file_module_ec_address_proto_address_proto_rawDescOnce.Do(func() { + file_module_ec_address_proto_address_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_address_proto_address_proto_rawDesc), len(file_module_ec_address_proto_address_proto_rawDesc))) }) - return file_address_proto_rawDescData + return file_module_ec_address_proto_address_proto_rawDescData } -var file_address_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_address_proto_goTypes = []any{ +var file_module_ec_address_proto_address_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_module_ec_address_proto_address_proto_goTypes = []any{ (*AddressItem)(nil), // 0: address.AddressItem (*AddressCreateRequest)(nil), // 1: address.AddressCreateRequest (*FetchRequest)(nil), // 2: address.FetchRequest @@ -617,7 +617,7 @@ var file_address_proto_goTypes = []any{ (*AddressDeleteRequest)(nil), // 6: address.AddressDeleteRequest nil, // 7: address.FetchRequest.ParamsEntry } -var file_address_proto_depIdxs = []int32{ +var file_module_ec_address_proto_address_proto_depIdxs = []int32{ 7, // 0: address.FetchRequest.params:type_name -> address.FetchRequest.ParamsEntry 0, // 1: address.AddressListReply.data:type_name -> address.AddressItem 1, // 2: address.Library.Create:input_type -> address.AddressCreateRequest @@ -637,26 +637,26 @@ var file_address_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_address_proto_init() } -func file_address_proto_init() { - if File_address_proto != nil { +func init() { file_module_ec_address_proto_address_proto_init() } +func file_module_ec_address_proto_address_proto_init() { + if File_module_ec_address_proto_address_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_address_proto_rawDesc), len(file_address_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_address_proto_address_proto_rawDesc), len(file_module_ec_address_proto_address_proto_rawDesc)), NumEnums: 0, NumMessages: 8, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_address_proto_goTypes, - DependencyIndexes: file_address_proto_depIdxs, - MessageInfos: file_address_proto_msgTypes, + GoTypes: file_module_ec_address_proto_address_proto_goTypes, + DependencyIndexes: file_module_ec_address_proto_address_proto_depIdxs, + MessageInfos: file_module_ec_address_proto_address_proto_msgTypes, }.Build() - File_address_proto = out.File - file_address_proto_goTypes = nil - file_address_proto_depIdxs = nil + File_module_ec_address_proto_address_proto = out.File + file_module_ec_address_proto_address_proto_goTypes = nil + file_module_ec_address_proto_address_proto_depIdxs = nil } diff --git a/module/ec/address/pb/address.pb.gw.go b/module/ec/address/pb/address.pb.gw.go index 11ea402..4d21d6c 100644 --- a/module/ec/address/pb/address.pb.gw.go +++ b/module/ec/address/pb/address.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: address.proto +// source: module/ec/address/proto/address.proto /* Package address is a reverse proxy. @@ -43,6 +43,9 @@ func request_Library_Create_0(ctx context.Context, marshaler runtime.Marshaler, if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Create(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -67,6 +70,9 @@ func request_Library_Modify_0(ctx context.Context, marshaler runtime.Marshaler, if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Modify(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -91,6 +97,9 @@ func request_Library_Get_0(ctx context.Context, marshaler runtime.Marshaler, cli if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -115,6 +124,9 @@ func request_Library_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, c if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Fetch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -139,6 +151,9 @@ func request_Library_Delete_0(ctx context.Context, marshaler runtime.Marshaler, if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } diff --git a/module/ec/address/pb/address_grpc.pb.go b/module/ec/address/pb/address_grpc.pb.go index 94aa44c..fdffea7 100644 --- a/module/ec/address/pb/address_grpc.pb.go +++ b/module/ec/address/pb/address_grpc.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: address.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/address/proto/address.proto package address @@ -103,7 +103,7 @@ func (c *libraryClient) Delete(ctx context.Context, in *AddressDeleteRequest, op } // LibraryServer is the server API for Library service. -// All implementations must embed UnimplementedLibraryServer +// All implementations should embed UnimplementedLibraryServer // for forward compatibility. // // 地址库 @@ -118,10 +118,9 @@ type LibraryServer interface { Fetch(context.Context, *IdentRequest) (*AddressListReply, error) // 删除一个地址 Delete(context.Context, *AddressDeleteRequest) (*StatusReply, error) - mustEmbedUnimplementedLibraryServer() } -// UnimplementedLibraryServer must be embedded to have +// UnimplementedLibraryServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -129,22 +128,21 @@ type LibraryServer interface { type UnimplementedLibraryServer struct{} func (UnimplementedLibraryServer) Create(context.Context, *AddressCreateRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") + return nil, status.Error(codes.Unimplemented, "method Create not implemented") } func (UnimplementedLibraryServer) Modify(context.Context, *AddressItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented") + return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } func (UnimplementedLibraryServer) Get(context.Context, *IdentRequest) (*AddressItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") + return nil, status.Error(codes.Unimplemented, "method Get not implemented") } func (UnimplementedLibraryServer) Fetch(context.Context, *IdentRequest) (*AddressListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } func (UnimplementedLibraryServer) Delete(context.Context, *AddressDeleteRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") + return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedLibraryServer) mustEmbedUnimplementedLibraryServer() {} -func (UnimplementedLibraryServer) testEmbeddedByValue() {} +func (UnimplementedLibraryServer) testEmbeddedByValue() {} // UnsafeLibraryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to LibraryServer will @@ -154,7 +152,7 @@ type UnsafeLibraryServer interface { } func RegisterLibraryServer(s grpc.ServiceRegistrar, srv LibraryServer) { - // If the following call pancis, it indicates UnimplementedLibraryServer was + // If the following call panics, it indicates UnimplementedLibraryServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -283,5 +281,5 @@ var Library_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "address.proto", + Metadata: "module/ec/address/proto/address.proto", } diff --git a/module/ec/address/proto/address.proto b/module/ec/address/proto/address.proto index 32b598b..d92ca26 100644 --- a/module/ec/address/proto/address.proto +++ b/module/ec/address/proto/address.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package address; -option go_package = "./address"; +option go_package = "bsm/full/module/ec/address/pb;address"; // 地址库 @@ -52,7 +52,7 @@ message AddressCreateRequest { message FetchRequest { int64 page_no=1; // 页数 int64 page_size=2; // 每页记录数 - map params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11 + map params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11 } message IdentRequest{ diff --git a/module/ec/delivery/cmd/main.go b/module/ec/delivery/cmd/main.go index 5dc4657..432655a 100644 --- a/module/ec/delivery/cmd/main.go +++ b/module/ec/delivery/cmd/main.go @@ -1,11 +1,11 @@ package service import ( + "log" + "net" + "bsm/full/module/ec/delivery/internal/impl" "bsm/full/module/ec/delivery/internal/svc" - - "github.com/zeromicro/go-zero/core/logx" - "github.com/zeromicro/go-zero/zrpc" "google.golang.org/grpc" "google.golang.org/grpc/reflection" @@ -15,33 +15,26 @@ import ( teamServer "bsm/full/module/ec/delivery/internal/server/team" ) -var ( - ServiceKey = "delivery" -) +const ServiceKey = "delivery" func Run() { - - impl.NewService(ServiceKey) - + if err := impl.NewService(ServiceKey); err != nil { + log.Fatal(err) + } ctx := svc.NewServiceContext(impl.Configure) - - service, err := zrpc.NewServer(impl.Configure.RpcServerConf, func(grpcServer *grpc.Server) { - - //将服务注册到GRPC - pb.RegisterTeamServer(grpcServer, teamServer.NewTeamServer(ctx)) - pb.RegisterMemberServer(grpcServer, memberServer.NewMemberServer(ctx)) - pb.RegisterCarServer(grpcServer, carServer.NewCarServer(ctx)) - - reflection.Register(grpcServer) - }) - - logx.Must(err) - - defer service.Stop() - - service.Start() + listener, err := net.Listen("tcp", impl.Configure.ListenOn) + if err != nil { + log.Fatal(err) + } + server := grpc.NewServer() + pb.RegisterTeamServer(server, teamServer.NewTeamServer(ctx)) + pb.RegisterMemberServer(server, memberServer.NewMemberServer(ctx)) + pb.RegisterCarServer(server, carServer.NewCarServer(ctx)) + reflection.Register(server) + log.Printf("%s listening on %s", ServiceKey, impl.Configure.ListenOn) + if err := server.Serve(listener); err != nil { + log.Fatal(err) + } } -func main() { - Run() -} +func main() { Run() } diff --git a/module/ec/delivery/external/client/car/car.go b/module/ec/delivery/external/client/car/car.go index 7a69399..8d4c8a5 100644 --- a/module/ec/delivery/external/client/car/car.go +++ b/module/ec/delivery/external/client/car/car.go @@ -8,7 +8,7 @@ import ( "bsm/full/module/ec/delivery/external/pb/delivery" - "github.com/zeromicro/go-zero/zrpc" + "bsm/full/shared/grpcconn" "google.golang.org/grpc" ) @@ -40,11 +40,11 @@ type ( } defaultCar struct { - cli zrpc.Client + cli grpcconn.Provider } ) -func NewCar(cli zrpc.Client) Car { +func NewCar(cli grpcconn.Provider) Car { return &defaultCar{ cli: cli, } diff --git a/module/ec/delivery/external/client/member/member.go b/module/ec/delivery/external/client/member/member.go index ce8e2ed..29e6ec0 100644 --- a/module/ec/delivery/external/client/member/member.go +++ b/module/ec/delivery/external/client/member/member.go @@ -8,7 +8,7 @@ import ( "bsm/full/module/ec/delivery/external/pb/delivery" - "github.com/zeromicro/go-zero/zrpc" + "bsm/full/shared/grpcconn" "google.golang.org/grpc" ) @@ -40,11 +40,11 @@ type ( } defaultMember struct { - cli zrpc.Client + cli grpcconn.Provider } ) -func NewMember(cli zrpc.Client) Member { +func NewMember(cli grpcconn.Provider) Member { return &defaultMember{ cli: cli, } diff --git a/module/ec/delivery/external/client/team/team.go b/module/ec/delivery/external/client/team/team.go index 4c7eee9..693a470 100644 --- a/module/ec/delivery/external/client/team/team.go +++ b/module/ec/delivery/external/client/team/team.go @@ -8,7 +8,7 @@ import ( "bsm/full/module/ec/delivery/external/pb/delivery" - "github.com/zeromicro/go-zero/zrpc" + "bsm/full/shared/grpcconn" "google.golang.org/grpc" ) @@ -40,11 +40,11 @@ type ( } defaultTeam struct { - cli zrpc.Client + cli grpcconn.Provider } ) -func NewTeam(cli zrpc.Client) Team { +func NewTeam(cli grpcconn.Provider) Team { return &defaultTeam{ cli: cli, } diff --git a/module/ec/delivery/external/pb/delivery/blocks_compat.go b/module/ec/delivery/external/pb/delivery/blocks_compat.go new file mode 100644 index 0000000..6752229 --- /dev/null +++ b/module/ec/delivery/external/pb/delivery/blocks_compat.go @@ -0,0 +1,10 @@ +package delivery + +import blocks "bsm/full/protobuf" + +type Empty = blocks.Empty +type FetchRequest = blocks.FetchRequest +type IdentRequest = blocks.IdentRequest +type VersionRequest = blocks.VersionRequest +type SearchRequest = blocks.SearchRequest +type StatusReply = blocks.DeliveryStatusReply diff --git a/module/ec/delivery/external/pb/delivery/car.pb.go b/module/ec/delivery/external/pb/delivery/car.pb.go new file mode 100644 index 0000000..056f3a6 --- /dev/null +++ b/module/ec/delivery/external/pb/delivery/car.pb.go @@ -0,0 +1,271 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/delivery/proto/car.proto + +package delivery + +import ( + protobuf "bsm/full/protobuf" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CarListReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + List []*CarItem `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CarListReply) Reset() { + *x = CarListReply{} + mi := &file_module_ec_delivery_proto_car_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CarListReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CarListReply) ProtoMessage() {} + +func (x *CarListReply) ProtoReflect() protoreflect.Message { + mi := &file_module_ec_delivery_proto_car_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CarListReply.ProtoReflect.Descriptor instead. +func (*CarListReply) Descriptor() ([]byte, []int) { + return file_module_ec_delivery_proto_car_proto_rawDescGZIP(), []int{0} +} + +func (x *CarListReply) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *CarListReply) GetList() []*CarItem { + if x != nil { + return x.List + } + return nil +} + +type CarItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 + Brand string `protobuf:"bytes,2,opt,name=brand,proto3" json:"brand,omitempty"` // 品牌 + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // 型号 + LicenseNumber string `protobuf:"bytes,4,opt,name=license_number,json=licenseNumber,proto3" json:"license_number,omitempty"` // 车牌号 + TeamIdentity string `protobuf:"bytes,5,opt,name=team_identity,json=teamIdentity,proto3" json:"team_identity,omitempty"` // 团队唯一标识 + Contacts string `protobuf:"bytes,6,opt,name=contacts,proto3" json:"contacts,omitempty"` // 联系人姓名 + Phone string `protobuf:"bytes,7,opt,name=phone,proto3" json:"phone,omitempty"` // 联系人电话 + Status int64 `protobuf:"varint,8,opt,name=status,proto3" json:"status,omitempty"` // 状态:1正常;-1禁用 + Picture string `protobuf:"bytes,9,opt,name=picture,proto3" json:"picture,omitempty"` // 车辆图片 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CarItem) Reset() { + *x = CarItem{} + mi := &file_module_ec_delivery_proto_car_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CarItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CarItem) ProtoMessage() {} + +func (x *CarItem) ProtoReflect() protoreflect.Message { + mi := &file_module_ec_delivery_proto_car_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CarItem.ProtoReflect.Descriptor instead. +func (*CarItem) Descriptor() ([]byte, []int) { + return file_module_ec_delivery_proto_car_proto_rawDescGZIP(), []int{1} +} + +func (x *CarItem) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *CarItem) GetBrand() string { + if x != nil { + return x.Brand + } + return "" +} + +func (x *CarItem) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *CarItem) GetLicenseNumber() string { + if x != nil { + return x.LicenseNumber + } + return "" +} + +func (x *CarItem) GetTeamIdentity() string { + if x != nil { + return x.TeamIdentity + } + return "" +} + +func (x *CarItem) GetContacts() string { + if x != nil { + return x.Contacts + } + return "" +} + +func (x *CarItem) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *CarItem) GetStatus() int64 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *CarItem) GetPicture() string { + if x != nil { + return x.Picture + } + return "" +} + +var File_module_ec_delivery_proto_car_proto protoreflect.FileDescriptor + +const file_module_ec_delivery_proto_car_proto_rawDesc = "" + + "\n" + + "\"module/ec/delivery/proto/car.proto\x12\bdelivery\x1a\x15protobuf/blocks.proto\"K\n" + + "\fCarListReply\x12\x14\n" + + "\x05count\x18\x01 \x01(\x03R\x05count\x12%\n" + + "\x04list\x18\x02 \x03(\v2\x11.delivery.CarItemR\x04list\"\x85\x02\n" + + "\aCarItem\x12\x1a\n" + + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x14\n" + + "\x05brand\x18\x02 \x01(\tR\x05brand\x12\x18\n" + + "\aversion\x18\x03 \x01(\tR\aversion\x12%\n" + + "\x0elicense_number\x18\x04 \x01(\tR\rlicenseNumber\x12#\n" + + "\rteam_identity\x18\x05 \x01(\tR\fteamIdentity\x12\x1a\n" + + "\bcontacts\x18\x06 \x01(\tR\bcontacts\x12\x14\n" + + "\x05phone\x18\a \x01(\tR\x05phone\x12\x16\n" + + "\x06status\x18\b \x01(\x03R\x06status\x12\x18\n" + + "\apicture\x18\t \x01(\tR\apicture2\xac\x02\n" + + "\x03Car\x129\n" + + "\aCarList\x12\x14.blocks.FetchRequest\x1a\x16.delivery.CarListReply\"\x00\x12:\n" + + "\x06CarAdd\x12\x11.delivery.CarItem\x1a\x1b.blocks.DeliveryStatusReply\"\x00\x123\n" + + "\x06CarGet\x12\x14.blocks.IdentRequest\x1a\x11.delivery.CarItem\"\x00\x12:\n" + + "\x06CarSet\x12\x11.delivery.CarItem\x1a\x1b.blocks.DeliveryStatusReply\"\x00\x12=\n" + + "\x06CarDel\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.DeliveryStatusReply\"\x00B;Z9bsm/full/module/ec/delivery/external/pb/delivery;deliveryb\x06proto3" + +var ( + file_module_ec_delivery_proto_car_proto_rawDescOnce sync.Once + file_module_ec_delivery_proto_car_proto_rawDescData []byte +) + +func file_module_ec_delivery_proto_car_proto_rawDescGZIP() []byte { + file_module_ec_delivery_proto_car_proto_rawDescOnce.Do(func() { + file_module_ec_delivery_proto_car_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_delivery_proto_car_proto_rawDesc), len(file_module_ec_delivery_proto_car_proto_rawDesc))) + }) + return file_module_ec_delivery_proto_car_proto_rawDescData +} + +var file_module_ec_delivery_proto_car_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_module_ec_delivery_proto_car_proto_goTypes = []any{ + (*CarListReply)(nil), // 0: delivery.CarListReply + (*CarItem)(nil), // 1: delivery.CarItem + (*protobuf.FetchRequest)(nil), // 2: blocks.FetchRequest + (*protobuf.IdentRequest)(nil), // 3: blocks.IdentRequest + (*protobuf.DeliveryStatusReply)(nil), // 4: blocks.DeliveryStatusReply +} +var file_module_ec_delivery_proto_car_proto_depIdxs = []int32{ + 1, // 0: delivery.CarListReply.list:type_name -> delivery.CarItem + 2, // 1: delivery.Car.CarList:input_type -> blocks.FetchRequest + 1, // 2: delivery.Car.CarAdd:input_type -> delivery.CarItem + 3, // 3: delivery.Car.CarGet:input_type -> blocks.IdentRequest + 1, // 4: delivery.Car.CarSet:input_type -> delivery.CarItem + 3, // 5: delivery.Car.CarDel:input_type -> blocks.IdentRequest + 0, // 6: delivery.Car.CarList:output_type -> delivery.CarListReply + 4, // 7: delivery.Car.CarAdd:output_type -> blocks.DeliveryStatusReply + 1, // 8: delivery.Car.CarGet:output_type -> delivery.CarItem + 4, // 9: delivery.Car.CarSet:output_type -> blocks.DeliveryStatusReply + 4, // 10: delivery.Car.CarDel:output_type -> blocks.DeliveryStatusReply + 6, // [6:11] is the sub-list for method output_type + 1, // [1:6] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_module_ec_delivery_proto_car_proto_init() } +func file_module_ec_delivery_proto_car_proto_init() { + if File_module_ec_delivery_proto_car_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_delivery_proto_car_proto_rawDesc), len(file_module_ec_delivery_proto_car_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_module_ec_delivery_proto_car_proto_goTypes, + DependencyIndexes: file_module_ec_delivery_proto_car_proto_depIdxs, + MessageInfos: file_module_ec_delivery_proto_car_proto_msgTypes, + }.Build() + File_module_ec_delivery_proto_car_proto = out.File + file_module_ec_delivery_proto_car_proto_goTypes = nil + file_module_ec_delivery_proto_car_proto_depIdxs = nil +} diff --git a/module/ec/delivery/external/pb/delivery/car.pb.gw.go b/module/ec/delivery/external/pb/delivery/car.pb.gw.go new file mode 100644 index 0000000..20a1671 --- /dev/null +++ b/module/ec/delivery/external/pb/delivery/car.pb.gw.go @@ -0,0 +1,422 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: module/ec/delivery/proto/car.proto + +/* +Package delivery is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package delivery + +import ( + "bsm/full/protobuf" + "context" + "errors" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) + +func request_Car_CarList_0(ctx context.Context, marshaler runtime.Marshaler, client CarClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq blocks.FetchRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + msg, err := client.CarList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Car_CarList_0(ctx context.Context, marshaler runtime.Marshaler, server CarServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq blocks.FetchRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.CarList(ctx, &protoReq) + return msg, metadata, err +} + +func request_Car_CarAdd_0(ctx context.Context, marshaler runtime.Marshaler, client CarClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq CarItem + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + msg, err := client.CarAdd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Car_CarAdd_0(ctx context.Context, marshaler runtime.Marshaler, server CarServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq CarItem + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.CarAdd(ctx, &protoReq) + return msg, metadata, err +} + +func request_Car_CarGet_0(ctx context.Context, marshaler runtime.Marshaler, client CarClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq blocks.IdentRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + msg, err := client.CarGet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Car_CarGet_0(ctx context.Context, marshaler runtime.Marshaler, server CarServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq blocks.IdentRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.CarGet(ctx, &protoReq) + return msg, metadata, err +} + +func request_Car_CarSet_0(ctx context.Context, marshaler runtime.Marshaler, client CarClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq CarItem + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + msg, err := client.CarSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Car_CarSet_0(ctx context.Context, marshaler runtime.Marshaler, server CarServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq CarItem + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.CarSet(ctx, &protoReq) + return msg, metadata, err +} + +func request_Car_CarDel_0(ctx context.Context, marshaler runtime.Marshaler, client CarClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq blocks.IdentRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + msg, err := client.CarDel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Car_CarDel_0(ctx context.Context, marshaler runtime.Marshaler, server CarServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq blocks.IdentRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.CarDel(ctx, &protoReq) + return msg, metadata, err +} + +// RegisterCarHandlerServer registers the http handlers for service Car to "mux". +// UnaryRPC :call CarServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCarHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. +func RegisterCarHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CarServer) error { + mux.Handle(http.MethodPost, pattern_Car_CarList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Car/CarList", runtime.WithHTTPPathPattern("/delivery.Car/CarList")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Car_CarList_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Car_CarList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Car_CarAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Car/CarAdd", runtime.WithHTTPPathPattern("/delivery.Car/CarAdd")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Car_CarAdd_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Car_CarAdd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Car_CarGet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Car/CarGet", runtime.WithHTTPPathPattern("/delivery.Car/CarGet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Car_CarGet_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Car_CarGet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Car_CarSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Car/CarSet", runtime.WithHTTPPathPattern("/delivery.Car/CarSet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Car_CarSet_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Car_CarSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Car_CarDel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Car/CarDel", runtime.WithHTTPPathPattern("/delivery.Car/CarDel")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Car_CarDel_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Car_CarDel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + return nil +} + +// RegisterCarHandlerFromEndpoint is same as RegisterCarHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterCarHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + return RegisterCarHandler(ctx, mux, conn) +} + +// RegisterCarHandler registers the http handlers for service Car to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterCarHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterCarHandlerClient(ctx, mux, NewCarClient(conn)) +} + +// RegisterCarHandlerClient registers the http handlers for service Car +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CarClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CarClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "CarClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterCarHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CarClient) error { + mux.Handle(http.MethodPost, pattern_Car_CarList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Car/CarList", runtime.WithHTTPPathPattern("/delivery.Car/CarList")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Car_CarList_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Car_CarList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Car_CarAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Car/CarAdd", runtime.WithHTTPPathPattern("/delivery.Car/CarAdd")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Car_CarAdd_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Car_CarAdd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Car_CarGet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Car/CarGet", runtime.WithHTTPPathPattern("/delivery.Car/CarGet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Car_CarGet_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Car_CarGet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Car_CarSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Car/CarSet", runtime.WithHTTPPathPattern("/delivery.Car/CarSet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Car_CarSet_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Car_CarSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Car_CarDel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Car/CarDel", runtime.WithHTTPPathPattern("/delivery.Car/CarDel")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Car_CarDel_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Car_CarDel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + return nil +} + +var ( + pattern_Car_CarList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Car", "CarList"}, "")) + pattern_Car_CarAdd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Car", "CarAdd"}, "")) + pattern_Car_CarGet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Car", "CarGet"}, "")) + pattern_Car_CarSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Car", "CarSet"}, "")) + pattern_Car_CarDel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Car", "CarDel"}, "")) +) + +var ( + forward_Car_CarList_0 = runtime.ForwardResponseMessage + forward_Car_CarAdd_0 = runtime.ForwardResponseMessage + forward_Car_CarGet_0 = runtime.ForwardResponseMessage + forward_Car_CarSet_0 = runtime.ForwardResponseMessage + forward_Car_CarDel_0 = runtime.ForwardResponseMessage +) diff --git a/module/ec/delivery/external/pb/delivery/car_grpc.pb.go b/module/ec/delivery/external/pb/delivery/car_grpc.pb.go new file mode 100644 index 0000000..7764227 --- /dev/null +++ b/module/ec/delivery/external/pb/delivery/car_grpc.pb.go @@ -0,0 +1,286 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/delivery/proto/car.proto + +package delivery + +import ( + protobuf "bsm/full/protobuf" + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Car_CarList_FullMethodName = "/delivery.Car/CarList" + Car_CarAdd_FullMethodName = "/delivery.Car/CarAdd" + Car_CarGet_FullMethodName = "/delivery.Car/CarGet" + Car_CarSet_FullMethodName = "/delivery.Car/CarSet" + Car_CarDel_FullMethodName = "/delivery.Car/CarDel" +) + +// CarClient is the client API for Car service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Delivery(配送)微服务 +type CarClient interface { + // 配送车辆列表 + CarList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*CarListReply, error) + // 添加配送车辆信息 + CarAdd(ctx context.Context, in *CarItem, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) + // 获取配送车辆信息 + CarGet(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CarItem, error) + // 修改配送车辆信息 + CarSet(ctx context.Context, in *CarItem, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) + // 删除配送车辆信息 + CarDel(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) +} + +type carClient struct { + cc grpc.ClientConnInterface +} + +func NewCarClient(cc grpc.ClientConnInterface) CarClient { + return &carClient{cc} +} + +func (c *carClient) CarList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*CarListReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CarListReply) + err := c.cc.Invoke(ctx, Car_CarList_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *carClient) CarAdd(ctx context.Context, in *CarItem, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(protobuf.DeliveryStatusReply) + err := c.cc.Invoke(ctx, Car_CarAdd_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *carClient) CarGet(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CarItem, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CarItem) + err := c.cc.Invoke(ctx, Car_CarGet_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *carClient) CarSet(ctx context.Context, in *CarItem, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(protobuf.DeliveryStatusReply) + err := c.cc.Invoke(ctx, Car_CarSet_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *carClient) CarDel(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(protobuf.DeliveryStatusReply) + err := c.cc.Invoke(ctx, Car_CarDel_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CarServer is the server API for Car service. +// All implementations should embed UnimplementedCarServer +// for forward compatibility. +// +// Delivery(配送)微服务 +type CarServer interface { + // 配送车辆列表 + CarList(context.Context, *protobuf.FetchRequest) (*CarListReply, error) + // 添加配送车辆信息 + CarAdd(context.Context, *CarItem) (*protobuf.DeliveryStatusReply, error) + // 获取配送车辆信息 + CarGet(context.Context, *protobuf.IdentRequest) (*CarItem, error) + // 修改配送车辆信息 + CarSet(context.Context, *CarItem) (*protobuf.DeliveryStatusReply, error) + // 删除配送车辆信息 + CarDel(context.Context, *protobuf.IdentRequest) (*protobuf.DeliveryStatusReply, error) +} + +// UnimplementedCarServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedCarServer struct{} + +func (UnimplementedCarServer) CarList(context.Context, *protobuf.FetchRequest) (*CarListReply, error) { + return nil, status.Error(codes.Unimplemented, "method CarList not implemented") +} +func (UnimplementedCarServer) CarAdd(context.Context, *CarItem) (*protobuf.DeliveryStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CarAdd not implemented") +} +func (UnimplementedCarServer) CarGet(context.Context, *protobuf.IdentRequest) (*CarItem, error) { + return nil, status.Error(codes.Unimplemented, "method CarGet not implemented") +} +func (UnimplementedCarServer) CarSet(context.Context, *CarItem) (*protobuf.DeliveryStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CarSet not implemented") +} +func (UnimplementedCarServer) CarDel(context.Context, *protobuf.IdentRequest) (*protobuf.DeliveryStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CarDel not implemented") +} +func (UnimplementedCarServer) testEmbeddedByValue() {} + +// UnsafeCarServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CarServer will +// result in compilation errors. +type UnsafeCarServer interface { + mustEmbedUnimplementedCarServer() +} + +func RegisterCarServer(s grpc.ServiceRegistrar, srv CarServer) { + // If the following call panics, it indicates UnimplementedCarServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Car_ServiceDesc, srv) +} + +func _Car_CarList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(protobuf.FetchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CarServer).CarList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Car_CarList_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CarServer).CarList(ctx, req.(*protobuf.FetchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Car_CarAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CarItem) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CarServer).CarAdd(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Car_CarAdd_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CarServer).CarAdd(ctx, req.(*CarItem)) + } + return interceptor(ctx, in, info, handler) +} + +func _Car_CarGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(protobuf.IdentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CarServer).CarGet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Car_CarGet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CarServer).CarGet(ctx, req.(*protobuf.IdentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Car_CarSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CarItem) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CarServer).CarSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Car_CarSet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CarServer).CarSet(ctx, req.(*CarItem)) + } + return interceptor(ctx, in, info, handler) +} + +func _Car_CarDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(protobuf.IdentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CarServer).CarDel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Car_CarDel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CarServer).CarDel(ctx, req.(*protobuf.IdentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Car_ServiceDesc is the grpc.ServiceDesc for Car service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Car_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "delivery.Car", + HandlerType: (*CarServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CarList", + Handler: _Car_CarList_Handler, + }, + { + MethodName: "CarAdd", + Handler: _Car_CarAdd_Handler, + }, + { + MethodName: "CarGet", + Handler: _Car_CarGet_Handler, + }, + { + MethodName: "CarSet", + Handler: _Car_CarSet_Handler, + }, + { + MethodName: "CarDel", + Handler: _Car_CarDel_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "module/ec/delivery/proto/car.proto", +} diff --git a/module/ec/delivery/external/pb/delivery/delivery.pb.go b/module/ec/delivery/external/pb/delivery/delivery.pb.go deleted file mode 100644 index e732dfc..0000000 --- a/module/ec/delivery/external/pb/delivery/delivery.pb.go +++ /dev/null @@ -1,1199 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.33.0 -// protoc v3.19.4 -// source: proto/delivery.proto - -package delivery - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type FetchRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PageNo int64 `protobuf:"varint,1,opt,name=page_no,json=pageNo,proto3" json:"page_no,omitempty"` // 页数 - PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页记录数 - Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 条件参数,key=val,eg key:category_id=?,vlaue=11 -} - -func (x *FetchRequest) Reset() { - *x = FetchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_delivery_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FetchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRequest) ProtoMessage() {} - -func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_delivery_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. -func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_proto_delivery_proto_rawDescGZIP(), []int{0} -} - -func (x *FetchRequest) GetPageNo() int64 { - if x != nil { - return x.PageNo - } - return 0 -} - -func (x *FetchRequest) GetPageSize() int64 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *FetchRequest) GetParams() map[string]string { - if x != nil { - return x.Params - } - return nil -} - -type IdentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码 -} - -func (x *IdentRequest) Reset() { - *x = IdentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_delivery_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IdentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IdentRequest) ProtoMessage() {} - -func (x *IdentRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_delivery_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. -func (*IdentRequest) Descriptor() ([]byte, []int) { - return file_proto_delivery_proto_rawDescGZIP(), []int{1} -} - -func (x *IdentRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *IdentRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -type VersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 时序版本号 -} - -func (x *VersionRequest) Reset() { - *x = VersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_delivery_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VersionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersionRequest) ProtoMessage() {} - -func (x *VersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_delivery_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. -func (*VersionRequest) Descriptor() ([]byte, []int) { - return file_proto_delivery_proto_rawDescGZIP(), []int{2} -} - -func (x *VersionRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type SearchRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` //关键词 -} - -func (x *SearchRequest) Reset() { - *x = SearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_delivery_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SearchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchRequest) ProtoMessage() {} - -func (x *SearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_delivery_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. -func (*SearchRequest) Descriptor() ([]byte, []int) { - return file_proto_delivery_proto_rawDescGZIP(), []int{3} -} - -func (x *SearchRequest) GetKeyword() string { - if x != nil { - return x.Keyword - } - return "" -} - -type StatusReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status int64 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // 状态码 - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 标识码 - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` //状态说明 - Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列 -} - -func (x *StatusReply) Reset() { - *x = StatusReply{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_delivery_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatusReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusReply) ProtoMessage() {} - -func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_delivery_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. -func (*StatusReply) Descriptor() ([]byte, []int) { - return file_proto_delivery_proto_rawDescGZIP(), []int{4} -} - -func (x *StatusReply) GetStatus() int64 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *StatusReply) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *StatusReply) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *StatusReply) GetTimeseq() int64 { - if x != nil { - return x.Timeseq - } - return 0 -} - -type Empty struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Empty) Reset() { - *x = Empty{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_delivery_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Empty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Empty) ProtoMessage() {} - -func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_proto_delivery_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { - return file_proto_delivery_proto_rawDescGZIP(), []int{5} -} - -type CarListReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - List []*CarItem `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` -} - -func (x *CarListReply) Reset() { - *x = CarListReply{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_delivery_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CarListReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CarListReply) ProtoMessage() {} - -func (x *CarListReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_delivery_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CarListReply.ProtoReflect.Descriptor instead. -func (*CarListReply) Descriptor() ([]byte, []int) { - return file_proto_delivery_proto_rawDescGZIP(), []int{6} -} - -func (x *CarListReply) GetCount() int64 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *CarListReply) GetList() []*CarItem { - if x != nil { - return x.List - } - return nil -} - -type CarItem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - Brand string `protobuf:"bytes,2,opt,name=brand,proto3" json:"brand,omitempty"` // 品牌 - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // 型号 - LicenseNumber string `protobuf:"bytes,4,opt,name=license_number,json=licenseNumber,proto3" json:"license_number,omitempty"` // 车牌号 - TeamIdentity string `protobuf:"bytes,5,opt,name=team_identity,json=teamIdentity,proto3" json:"team_identity,omitempty"` // 团队唯一标识 - Contacts string `protobuf:"bytes,6,opt,name=contacts,proto3" json:"contacts,omitempty"` // 联系人姓名 - Phone string `protobuf:"bytes,7,opt,name=phone,proto3" json:"phone,omitempty"` // 联系人电话 - Status int64 `protobuf:"varint,8,opt,name=status,proto3" json:"status,omitempty"` // 状态:1正常;-1禁用 - Picture string `protobuf:"bytes,9,opt,name=picture,proto3" json:"picture,omitempty"` // 车辆图片 -} - -func (x *CarItem) Reset() { - *x = CarItem{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_delivery_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CarItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CarItem) ProtoMessage() {} - -func (x *CarItem) ProtoReflect() protoreflect.Message { - mi := &file_proto_delivery_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CarItem.ProtoReflect.Descriptor instead. -func (*CarItem) Descriptor() ([]byte, []int) { - return file_proto_delivery_proto_rawDescGZIP(), []int{7} -} - -func (x *CarItem) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *CarItem) GetBrand() string { - if x != nil { - return x.Brand - } - return "" -} - -func (x *CarItem) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *CarItem) GetLicenseNumber() string { - if x != nil { - return x.LicenseNumber - } - return "" -} - -func (x *CarItem) GetTeamIdentity() string { - if x != nil { - return x.TeamIdentity - } - return "" -} - -func (x *CarItem) GetContacts() string { - if x != nil { - return x.Contacts - } - return "" -} - -func (x *CarItem) GetPhone() string { - if x != nil { - return x.Phone - } - return "" -} - -func (x *CarItem) GetStatus() int64 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *CarItem) GetPicture() string { - if x != nil { - return x.Picture - } - return "" -} - -type MemberItem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 姓名 - TeamIdentity string `protobuf:"bytes,3,opt,name=team_identity,json=teamIdentity,proto3" json:"team_identity,omitempty"` // 团队唯一标识 - Picture string `protobuf:"bytes,4,opt,name=picture,proto3" json:"picture,omitempty"` // 头像 - Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` // 联系人电话 - Status int64 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` // 状态:1正常;-1禁用 - Turnover int64 `protobuf:"varint,7,opt,name=turnover,proto3" json:"turnover,omitempty"` // 总成交量 -} - -func (x *MemberItem) Reset() { - *x = MemberItem{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_delivery_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MemberItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MemberItem) ProtoMessage() {} - -func (x *MemberItem) ProtoReflect() protoreflect.Message { - mi := &file_proto_delivery_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MemberItem.ProtoReflect.Descriptor instead. -func (*MemberItem) Descriptor() ([]byte, []int) { - return file_proto_delivery_proto_rawDescGZIP(), []int{8} -} - -func (x *MemberItem) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *MemberItem) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *MemberItem) GetTeamIdentity() string { - if x != nil { - return x.TeamIdentity - } - return "" -} - -func (x *MemberItem) GetPicture() string { - if x != nil { - return x.Picture - } - return "" -} - -func (x *MemberItem) GetPhone() string { - if x != nil { - return x.Phone - } - return "" -} - -func (x *MemberItem) GetStatus() int64 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *MemberItem) GetTurnover() int64 { - if x != nil { - return x.Turnover - } - return 0 -} - -type MemberListReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - List []*MemberItem `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` -} - -func (x *MemberListReply) Reset() { - *x = MemberListReply{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_delivery_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MemberListReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MemberListReply) ProtoMessage() {} - -func (x *MemberListReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_delivery_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MemberListReply.ProtoReflect.Descriptor instead. -func (*MemberListReply) Descriptor() ([]byte, []int) { - return file_proto_delivery_proto_rawDescGZIP(), []int{9} -} - -func (x *MemberListReply) GetCount() int64 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *MemberListReply) GetList() []*MemberItem { - if x != nil { - return x.List - } - return nil -} - -type TeamListReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - List []*TeamItem `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` -} - -func (x *TeamListReply) Reset() { - *x = TeamListReply{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_delivery_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TeamListReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TeamListReply) ProtoMessage() {} - -func (x *TeamListReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_delivery_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TeamListReply.ProtoReflect.Descriptor instead. -func (*TeamListReply) Descriptor() ([]byte, []int) { - return file_proto_delivery_proto_rawDescGZIP(), []int{10} -} - -func (x *TeamListReply) GetCount() int64 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *TeamListReply) GetList() []*TeamItem { - if x != nil { - return x.List - } - return nil -} - -type TeamItem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` // 团队名称 - Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` // 归属者唯一标识 - Contacts string `protobuf:"bytes,4,opt,name=contacts,proto3" json:"contacts,omitempty"` // 联系人姓名 - Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` // 联系人电话 - Status int64 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` // 状态:1正常;-1禁用 - Logo string `protobuf:"bytes,7,opt,name=logo,proto3" json:"logo,omitempty"` // 团队图标地址 -} - -func (x *TeamItem) Reset() { - *x = TeamItem{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_delivery_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TeamItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TeamItem) ProtoMessage() {} - -func (x *TeamItem) ProtoReflect() protoreflect.Message { - mi := &file_proto_delivery_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TeamItem.ProtoReflect.Descriptor instead. -func (*TeamItem) Descriptor() ([]byte, []int) { - return file_proto_delivery_proto_rawDescGZIP(), []int{11} -} - -func (x *TeamItem) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *TeamItem) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *TeamItem) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *TeamItem) GetContacts() string { - if x != nil { - return x.Contacts - } - return "" -} - -func (x *TeamItem) GetPhone() string { - if x != nil { - return x.Phone - } - return "" -} - -func (x *TeamItem) GetStatus() int64 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *TeamItem) GetLogo() string { - if x != nil { - return x.Logo - } - return "" -} - -var File_proto_delivery_proto protoreflect.FileDescriptor - -var file_proto_delivery_proto_rawDesc = []byte{ - 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, - 0x22, 0xbb, 0x01, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x6f, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x06, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, - 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, - 0x72, 0x79, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3a, - 0x0a, 0x0c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x2a, 0x0a, 0x0e, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, - 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, - 0x64, 0x22, 0x75, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x65, 0x71, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x07, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x65, 0x71, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x4b, 0x0a, 0x0c, 0x43, 0x61, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x43, 0x61, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x85, - 0x02, 0x0a, 0x07, 0x43, 0x61, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, - 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x23, 0x0a, - 0x0d, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, - 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x22, 0xc5, 0x01, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, - 0x61, 0x6d, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x69, - 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x69, 0x63, - 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x76, 0x65, 0x72, 0x22, 0x51, - 0x0a, 0x0f, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x6c, 0x69, 0x73, - 0x74, 0x22, 0x4d, 0x0a, 0x0d, 0x54, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, - 0x22, 0xb0, 0x01, 0x0a, 0x08, 0x54, 0x65, 0x61, 0x6d, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, - 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, - 0x6f, 0x67, 0x6f, 0x32, 0xa0, 0x02, 0x0a, 0x03, 0x43, 0x61, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x43, - 0x61, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x43, 0x61, 0x72, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x06, 0x43, 0x61, 0x72, 0x41, - 0x64, 0x64, 0x12, 0x11, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x43, 0x61, - 0x72, 0x49, 0x74, 0x65, 0x6d, 0x1a, 0x15, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x35, - 0x0a, 0x06, 0x43, 0x61, 0x72, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, - 0x65, 0x72, 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x11, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x43, 0x61, 0x72, 0x49, - 0x74, 0x65, 0x6d, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x06, 0x43, 0x61, 0x72, 0x53, 0x65, 0x74, 0x12, - 0x11, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x43, 0x61, 0x72, 0x49, 0x74, - 0x65, 0x6d, 0x1a, 0x15, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x06, 0x43, - 0x61, 0x72, 0x44, 0x65, 0x6c, 0x12, 0x16, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, - 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xbe, 0x02, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x41, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x16, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, - 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x09, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 0x64, - 0x64, 0x12, 0x14, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x1a, 0x15, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, - 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, - 0x12, 0x3b, 0x0a, 0x09, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, - 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x00, 0x12, 0x3a, 0x0a, - 0x09, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x14, 0x2e, 0x64, 0x65, 0x6c, - 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, - 0x1a, 0x15, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x09, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x12, 0x16, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, - 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xaa, 0x02, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, - 0x12, 0x3d, 0x0a, 0x08, 0x54, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x64, - 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x54, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, - 0x36, 0x0a, 0x07, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x64, 0x64, 0x12, 0x12, 0x2e, 0x64, 0x65, 0x6c, - 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x49, 0x74, 0x65, 0x6d, 0x1a, 0x15, - 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x07, 0x54, 0x65, 0x61, 0x6d, 0x47, - 0x65, 0x74, 0x12, 0x16, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x64, 0x65, 0x6c, - 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x00, - 0x12, 0x36, 0x0a, 0x07, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x74, 0x12, 0x12, 0x2e, 0x64, 0x65, - 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x49, 0x74, 0x65, 0x6d, 0x1a, - 0x15, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x07, 0x54, 0x65, 0x61, 0x6d, - 0x44, 0x65, 0x6c, 0x12, 0x16, 0x2e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x64, 0x65, - 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x00, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, - 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_delivery_proto_rawDescOnce sync.Once - file_proto_delivery_proto_rawDescData = file_proto_delivery_proto_rawDesc -) - -func file_proto_delivery_proto_rawDescGZIP() []byte { - file_proto_delivery_proto_rawDescOnce.Do(func() { - file_proto_delivery_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_delivery_proto_rawDescData) - }) - return file_proto_delivery_proto_rawDescData -} - -var file_proto_delivery_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_proto_delivery_proto_goTypes = []interface{}{ - (*FetchRequest)(nil), // 0: delivery.FetchRequest - (*IdentRequest)(nil), // 1: delivery.IdentRequest - (*VersionRequest)(nil), // 2: delivery.VersionRequest - (*SearchRequest)(nil), // 3: delivery.SearchRequest - (*StatusReply)(nil), // 4: delivery.StatusReply - (*Empty)(nil), // 5: delivery.Empty - (*CarListReply)(nil), // 6: delivery.CarListReply - (*CarItem)(nil), // 7: delivery.CarItem - (*MemberItem)(nil), // 8: delivery.MemberItem - (*MemberListReply)(nil), // 9: delivery.MemberListReply - (*TeamListReply)(nil), // 10: delivery.TeamListReply - (*TeamItem)(nil), // 11: delivery.TeamItem - nil, // 12: delivery.FetchRequest.ParamsEntry -} -var file_proto_delivery_proto_depIdxs = []int32{ - 12, // 0: delivery.FetchRequest.params:type_name -> delivery.FetchRequest.ParamsEntry - 7, // 1: delivery.CarListReply.list:type_name -> delivery.CarItem - 8, // 2: delivery.MemberListReply.list:type_name -> delivery.MemberItem - 11, // 3: delivery.TeamListReply.list:type_name -> delivery.TeamItem - 0, // 4: delivery.Car.CarList:input_type -> delivery.FetchRequest - 7, // 5: delivery.Car.CarAdd:input_type -> delivery.CarItem - 1, // 6: delivery.Car.CarGet:input_type -> delivery.IdentRequest - 7, // 7: delivery.Car.CarSet:input_type -> delivery.CarItem - 1, // 8: delivery.Car.CarDel:input_type -> delivery.IdentRequest - 0, // 9: delivery.Member.MemberList:input_type -> delivery.FetchRequest - 8, // 10: delivery.Member.MemberAdd:input_type -> delivery.MemberItem - 1, // 11: delivery.Member.MemberGet:input_type -> delivery.IdentRequest - 8, // 12: delivery.Member.MemberSet:input_type -> delivery.MemberItem - 1, // 13: delivery.Member.MemberDel:input_type -> delivery.IdentRequest - 0, // 14: delivery.Team.TeamList:input_type -> delivery.FetchRequest - 11, // 15: delivery.Team.TeamAdd:input_type -> delivery.TeamItem - 1, // 16: delivery.Team.TeamGet:input_type -> delivery.IdentRequest - 11, // 17: delivery.Team.TeamSet:input_type -> delivery.TeamItem - 1, // 18: delivery.Team.TeamDel:input_type -> delivery.IdentRequest - 6, // 19: delivery.Car.CarList:output_type -> delivery.CarListReply - 4, // 20: delivery.Car.CarAdd:output_type -> delivery.StatusReply - 7, // 21: delivery.Car.CarGet:output_type -> delivery.CarItem - 4, // 22: delivery.Car.CarSet:output_type -> delivery.StatusReply - 4, // 23: delivery.Car.CarDel:output_type -> delivery.StatusReply - 9, // 24: delivery.Member.MemberList:output_type -> delivery.MemberListReply - 4, // 25: delivery.Member.MemberAdd:output_type -> delivery.StatusReply - 8, // 26: delivery.Member.MemberGet:output_type -> delivery.MemberItem - 4, // 27: delivery.Member.MemberSet:output_type -> delivery.StatusReply - 4, // 28: delivery.Member.MemberDel:output_type -> delivery.StatusReply - 10, // 29: delivery.Team.TeamList:output_type -> delivery.TeamListReply - 4, // 30: delivery.Team.TeamAdd:output_type -> delivery.StatusReply - 11, // 31: delivery.Team.TeamGet:output_type -> delivery.TeamItem - 4, // 32: delivery.Team.TeamSet:output_type -> delivery.StatusReply - 4, // 33: delivery.Team.TeamDel:output_type -> delivery.StatusReply - 19, // [19:34] is the sub-list for method output_type - 4, // [4:19] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_proto_delivery_proto_init() } -func file_proto_delivery_proto_init() { - if File_proto_delivery_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_delivery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FetchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_delivery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IdentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_delivery_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_delivery_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_delivery_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_delivery_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Empty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_delivery_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CarListReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_delivery_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CarItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_delivery_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MemberItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_delivery_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MemberListReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_delivery_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamListReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_delivery_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_delivery_proto_rawDesc, - NumEnums: 0, - NumMessages: 13, - NumExtensions: 0, - NumServices: 3, - }, - GoTypes: file_proto_delivery_proto_goTypes, - DependencyIndexes: file_proto_delivery_proto_depIdxs, - MessageInfos: file_proto_delivery_proto_msgTypes, - }.Build() - File_proto_delivery_proto = out.File - file_proto_delivery_proto_rawDesc = nil - file_proto_delivery_proto_goTypes = nil - file_proto_delivery_proto_depIdxs = nil -} diff --git a/module/ec/delivery/external/pb/delivery/delivery_grpc.pb.go b/module/ec/delivery/external/pb/delivery/delivery_grpc.pb.go deleted file mode 100644 index 0e63e2c..0000000 --- a/module/ec/delivery/external/pb/delivery/delivery_grpc.pb.go +++ /dev/null @@ -1,763 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v3.19.4 -// source: proto/delivery.proto - -package delivery - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - Car_CarList_FullMethodName = "/delivery.Car/CarList" - Car_CarAdd_FullMethodName = "/delivery.Car/CarAdd" - Car_CarGet_FullMethodName = "/delivery.Car/CarGet" - Car_CarSet_FullMethodName = "/delivery.Car/CarSet" - Car_CarDel_FullMethodName = "/delivery.Car/CarDel" -) - -// CarClient is the client API for Car service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type CarClient interface { - // 配送车辆列表 - CarList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*CarListReply, error) - // 添加配送车辆信息 - CarAdd(ctx context.Context, in *CarItem, opts ...grpc.CallOption) (*StatusReply, error) - // 获取配送车辆信息 - CarGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CarItem, error) - // 修改配送车辆信息 - CarSet(ctx context.Context, in *CarItem, opts ...grpc.CallOption) (*StatusReply, error) - // 删除配送车辆信息 - CarDel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) -} - -type carClient struct { - cc grpc.ClientConnInterface -} - -func NewCarClient(cc grpc.ClientConnInterface) CarClient { - return &carClient{cc} -} - -func (c *carClient) CarList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*CarListReply, error) { - out := new(CarListReply) - err := c.cc.Invoke(ctx, Car_CarList_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *carClient) CarAdd(ctx context.Context, in *CarItem, opts ...grpc.CallOption) (*StatusReply, error) { - out := new(StatusReply) - err := c.cc.Invoke(ctx, Car_CarAdd_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *carClient) CarGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CarItem, error) { - out := new(CarItem) - err := c.cc.Invoke(ctx, Car_CarGet_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *carClient) CarSet(ctx context.Context, in *CarItem, opts ...grpc.CallOption) (*StatusReply, error) { - out := new(StatusReply) - err := c.cc.Invoke(ctx, Car_CarSet_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *carClient) CarDel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { - out := new(StatusReply) - err := c.cc.Invoke(ctx, Car_CarDel_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CarServer is the server API for Car service. -// All implementations must embed UnimplementedCarServer -// for forward compatibility -type CarServer interface { - // 配送车辆列表 - CarList(context.Context, *FetchRequest) (*CarListReply, error) - // 添加配送车辆信息 - CarAdd(context.Context, *CarItem) (*StatusReply, error) - // 获取配送车辆信息 - CarGet(context.Context, *IdentRequest) (*CarItem, error) - // 修改配送车辆信息 - CarSet(context.Context, *CarItem) (*StatusReply, error) - // 删除配送车辆信息 - CarDel(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedCarServer() -} - -// UnimplementedCarServer must be embedded to have forward compatible implementations. -type UnimplementedCarServer struct { -} - -func (UnimplementedCarServer) CarList(context.Context, *FetchRequest) (*CarListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CarList not implemented") -} -func (UnimplementedCarServer) CarAdd(context.Context, *CarItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CarAdd not implemented") -} -func (UnimplementedCarServer) CarGet(context.Context, *IdentRequest) (*CarItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method CarGet not implemented") -} -func (UnimplementedCarServer) CarSet(context.Context, *CarItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CarSet not implemented") -} -func (UnimplementedCarServer) CarDel(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CarDel not implemented") -} -func (UnimplementedCarServer) mustEmbedUnimplementedCarServer() {} - -// UnsafeCarServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to CarServer will -// result in compilation errors. -type UnsafeCarServer interface { - mustEmbedUnimplementedCarServer() -} - -func RegisterCarServer(s grpc.ServiceRegistrar, srv CarServer) { - s.RegisterService(&Car_ServiceDesc, srv) -} - -func _Car_CarList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CarServer).CarList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Car_CarList_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CarServer).CarList(ctx, req.(*FetchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Car_CarAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CarItem) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CarServer).CarAdd(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Car_CarAdd_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CarServer).CarAdd(ctx, req.(*CarItem)) - } - return interceptor(ctx, in, info, handler) -} - -func _Car_CarGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CarServer).CarGet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Car_CarGet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CarServer).CarGet(ctx, req.(*IdentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Car_CarSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CarItem) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CarServer).CarSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Car_CarSet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CarServer).CarSet(ctx, req.(*CarItem)) - } - return interceptor(ctx, in, info, handler) -} - -func _Car_CarDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CarServer).CarDel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Car_CarDel_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CarServer).CarDel(ctx, req.(*IdentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Car_ServiceDesc is the grpc.ServiceDesc for Car service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Car_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "delivery.Car", - HandlerType: (*CarServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CarList", - Handler: _Car_CarList_Handler, - }, - { - MethodName: "CarAdd", - Handler: _Car_CarAdd_Handler, - }, - { - MethodName: "CarGet", - Handler: _Car_CarGet_Handler, - }, - { - MethodName: "CarSet", - Handler: _Car_CarSet_Handler, - }, - { - MethodName: "CarDel", - Handler: _Car_CarDel_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/delivery.proto", -} - -const ( - Member_MemberList_FullMethodName = "/delivery.Member/MemberList" - Member_MemberAdd_FullMethodName = "/delivery.Member/MemberAdd" - Member_MemberGet_FullMethodName = "/delivery.Member/MemberGet" - Member_MemberSet_FullMethodName = "/delivery.Member/MemberSet" - Member_MemberDel_FullMethodName = "/delivery.Member/MemberDel" -) - -// MemberClient is the client API for Member service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type MemberClient interface { - // 获取配送员列表 - MemberList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*MemberListReply, error) - // 添加配送员 - MemberAdd(ctx context.Context, in *MemberItem, opts ...grpc.CallOption) (*StatusReply, error) - // 获取配送员数据 - MemberGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*MemberItem, error) - // 修改配送员 - MemberSet(ctx context.Context, in *MemberItem, opts ...grpc.CallOption) (*StatusReply, error) - // 删除配送员 - MemberDel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) -} - -type memberClient struct { - cc grpc.ClientConnInterface -} - -func NewMemberClient(cc grpc.ClientConnInterface) MemberClient { - return &memberClient{cc} -} - -func (c *memberClient) MemberList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*MemberListReply, error) { - out := new(MemberListReply) - err := c.cc.Invoke(ctx, Member_MemberList_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *memberClient) MemberAdd(ctx context.Context, in *MemberItem, opts ...grpc.CallOption) (*StatusReply, error) { - out := new(StatusReply) - err := c.cc.Invoke(ctx, Member_MemberAdd_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *memberClient) MemberGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*MemberItem, error) { - out := new(MemberItem) - err := c.cc.Invoke(ctx, Member_MemberGet_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *memberClient) MemberSet(ctx context.Context, in *MemberItem, opts ...grpc.CallOption) (*StatusReply, error) { - out := new(StatusReply) - err := c.cc.Invoke(ctx, Member_MemberSet_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *memberClient) MemberDel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { - out := new(StatusReply) - err := c.cc.Invoke(ctx, Member_MemberDel_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MemberServer is the server API for Member service. -// All implementations must embed UnimplementedMemberServer -// for forward compatibility -type MemberServer interface { - // 获取配送员列表 - MemberList(context.Context, *FetchRequest) (*MemberListReply, error) - // 添加配送员 - MemberAdd(context.Context, *MemberItem) (*StatusReply, error) - // 获取配送员数据 - MemberGet(context.Context, *IdentRequest) (*MemberItem, error) - // 修改配送员 - MemberSet(context.Context, *MemberItem) (*StatusReply, error) - // 删除配送员 - MemberDel(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedMemberServer() -} - -// UnimplementedMemberServer must be embedded to have forward compatible implementations. -type UnimplementedMemberServer struct { -} - -func (UnimplementedMemberServer) MemberList(context.Context, *FetchRequest) (*MemberListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MemberList not implemented") -} -func (UnimplementedMemberServer) MemberAdd(context.Context, *MemberItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MemberAdd not implemented") -} -func (UnimplementedMemberServer) MemberGet(context.Context, *IdentRequest) (*MemberItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method MemberGet not implemented") -} -func (UnimplementedMemberServer) MemberSet(context.Context, *MemberItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MemberSet not implemented") -} -func (UnimplementedMemberServer) MemberDel(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MemberDel not implemented") -} -func (UnimplementedMemberServer) mustEmbedUnimplementedMemberServer() {} - -// UnsafeMemberServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MemberServer will -// result in compilation errors. -type UnsafeMemberServer interface { - mustEmbedUnimplementedMemberServer() -} - -func RegisterMemberServer(s grpc.ServiceRegistrar, srv MemberServer) { - s.RegisterService(&Member_ServiceDesc, srv) -} - -func _Member_MemberList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MemberServer).MemberList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Member_MemberList_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MemberServer).MemberList(ctx, req.(*FetchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Member_MemberAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MemberItem) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MemberServer).MemberAdd(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Member_MemberAdd_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MemberServer).MemberAdd(ctx, req.(*MemberItem)) - } - return interceptor(ctx, in, info, handler) -} - -func _Member_MemberGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MemberServer).MemberGet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Member_MemberGet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MemberServer).MemberGet(ctx, req.(*IdentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Member_MemberSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MemberItem) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MemberServer).MemberSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Member_MemberSet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MemberServer).MemberSet(ctx, req.(*MemberItem)) - } - return interceptor(ctx, in, info, handler) -} - -func _Member_MemberDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MemberServer).MemberDel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Member_MemberDel_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MemberServer).MemberDel(ctx, req.(*IdentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Member_ServiceDesc is the grpc.ServiceDesc for Member service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Member_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "delivery.Member", - HandlerType: (*MemberServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "MemberList", - Handler: _Member_MemberList_Handler, - }, - { - MethodName: "MemberAdd", - Handler: _Member_MemberAdd_Handler, - }, - { - MethodName: "MemberGet", - Handler: _Member_MemberGet_Handler, - }, - { - MethodName: "MemberSet", - Handler: _Member_MemberSet_Handler, - }, - { - MethodName: "MemberDel", - Handler: _Member_MemberDel_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/delivery.proto", -} - -const ( - Team_TeamList_FullMethodName = "/delivery.Team/TeamList" - Team_TeamAdd_FullMethodName = "/delivery.Team/TeamAdd" - Team_TeamGet_FullMethodName = "/delivery.Team/TeamGet" - Team_TeamSet_FullMethodName = "/delivery.Team/TeamSet" - Team_TeamDel_FullMethodName = "/delivery.Team/TeamDel" -) - -// TeamClient is the client API for Team service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type TeamClient interface { - // 配送团队列表 - TeamList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*TeamListReply, error) - // 添加配送团队 - TeamAdd(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*StatusReply, error) - // 配送团队详情 - TeamGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*TeamItem, error) - // 修改配送团队信息 - TeamSet(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*StatusReply, error) - // 删除配送团队 - TeamDel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) -} - -type teamClient struct { - cc grpc.ClientConnInterface -} - -func NewTeamClient(cc grpc.ClientConnInterface) TeamClient { - return &teamClient{cc} -} - -func (c *teamClient) TeamList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*TeamListReply, error) { - out := new(TeamListReply) - err := c.cc.Invoke(ctx, Team_TeamList_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *teamClient) TeamAdd(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*StatusReply, error) { - out := new(StatusReply) - err := c.cc.Invoke(ctx, Team_TeamAdd_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *teamClient) TeamGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*TeamItem, error) { - out := new(TeamItem) - err := c.cc.Invoke(ctx, Team_TeamGet_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *teamClient) TeamSet(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*StatusReply, error) { - out := new(StatusReply) - err := c.cc.Invoke(ctx, Team_TeamSet_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *teamClient) TeamDel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { - out := new(StatusReply) - err := c.cc.Invoke(ctx, Team_TeamDel_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TeamServer is the server API for Team service. -// All implementations must embed UnimplementedTeamServer -// for forward compatibility -type TeamServer interface { - // 配送团队列表 - TeamList(context.Context, *FetchRequest) (*TeamListReply, error) - // 添加配送团队 - TeamAdd(context.Context, *TeamItem) (*StatusReply, error) - // 配送团队详情 - TeamGet(context.Context, *IdentRequest) (*TeamItem, error) - // 修改配送团队信息 - TeamSet(context.Context, *TeamItem) (*StatusReply, error) - // 删除配送团队 - TeamDel(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedTeamServer() -} - -// UnimplementedTeamServer must be embedded to have forward compatible implementations. -type UnimplementedTeamServer struct { -} - -func (UnimplementedTeamServer) TeamList(context.Context, *FetchRequest) (*TeamListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method TeamList not implemented") -} -func (UnimplementedTeamServer) TeamAdd(context.Context, *TeamItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method TeamAdd not implemented") -} -func (UnimplementedTeamServer) TeamGet(context.Context, *IdentRequest) (*TeamItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method TeamGet not implemented") -} -func (UnimplementedTeamServer) TeamSet(context.Context, *TeamItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method TeamSet not implemented") -} -func (UnimplementedTeamServer) TeamDel(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method TeamDel not implemented") -} -func (UnimplementedTeamServer) mustEmbedUnimplementedTeamServer() {} - -// UnsafeTeamServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TeamServer will -// result in compilation errors. -type UnsafeTeamServer interface { - mustEmbedUnimplementedTeamServer() -} - -func RegisterTeamServer(s grpc.ServiceRegistrar, srv TeamServer) { - s.RegisterService(&Team_ServiceDesc, srv) -} - -func _Team_TeamList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TeamServer).TeamList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Team_TeamList_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TeamServer).TeamList(ctx, req.(*FetchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Team_TeamAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TeamItem) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TeamServer).TeamAdd(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Team_TeamAdd_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TeamServer).TeamAdd(ctx, req.(*TeamItem)) - } - return interceptor(ctx, in, info, handler) -} - -func _Team_TeamGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TeamServer).TeamGet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Team_TeamGet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TeamServer).TeamGet(ctx, req.(*IdentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Team_TeamSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TeamItem) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TeamServer).TeamSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Team_TeamSet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TeamServer).TeamSet(ctx, req.(*TeamItem)) - } - return interceptor(ctx, in, info, handler) -} - -func _Team_TeamDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TeamServer).TeamDel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Team_TeamDel_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TeamServer).TeamDel(ctx, req.(*IdentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Team_ServiceDesc is the grpc.ServiceDesc for Team service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Team_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "delivery.Team", - HandlerType: (*TeamServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "TeamList", - Handler: _Team_TeamList_Handler, - }, - { - MethodName: "TeamAdd", - Handler: _Team_TeamAdd_Handler, - }, - { - MethodName: "TeamGet", - Handler: _Team_TeamGet_Handler, - }, - { - MethodName: "TeamSet", - Handler: _Team_TeamSet_Handler, - }, - { - MethodName: "TeamDel", - Handler: _Team_TeamDel_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/delivery.proto", -} diff --git a/module/ec/delivery/external/pb/delivery/member.pb.go b/module/ec/delivery/external/pb/delivery/member.pb.go new file mode 100644 index 0000000..7946470 --- /dev/null +++ b/module/ec/delivery/external/pb/delivery/member.pb.go @@ -0,0 +1,255 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/delivery/proto/member.proto + +package delivery + +import ( + protobuf "bsm/full/protobuf" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type MemberItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 姓名 + TeamIdentity string `protobuf:"bytes,3,opt,name=team_identity,json=teamIdentity,proto3" json:"team_identity,omitempty"` // 团队唯一标识 + Picture string `protobuf:"bytes,4,opt,name=picture,proto3" json:"picture,omitempty"` // 头像 + Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` // 联系人电话 + Status int64 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` // 状态:1正常;-1禁用 + Turnover int64 `protobuf:"varint,7,opt,name=turnover,proto3" json:"turnover,omitempty"` // 总成交量 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemberItem) Reset() { + *x = MemberItem{} + mi := &file_module_ec_delivery_proto_member_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemberItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemberItem) ProtoMessage() {} + +func (x *MemberItem) ProtoReflect() protoreflect.Message { + mi := &file_module_ec_delivery_proto_member_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemberItem.ProtoReflect.Descriptor instead. +func (*MemberItem) Descriptor() ([]byte, []int) { + return file_module_ec_delivery_proto_member_proto_rawDescGZIP(), []int{0} +} + +func (x *MemberItem) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *MemberItem) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MemberItem) GetTeamIdentity() string { + if x != nil { + return x.TeamIdentity + } + return "" +} + +func (x *MemberItem) GetPicture() string { + if x != nil { + return x.Picture + } + return "" +} + +func (x *MemberItem) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *MemberItem) GetStatus() int64 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *MemberItem) GetTurnover() int64 { + if x != nil { + return x.Turnover + } + return 0 +} + +type MemberListReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + List []*MemberItem `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemberListReply) Reset() { + *x = MemberListReply{} + mi := &file_module_ec_delivery_proto_member_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemberListReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemberListReply) ProtoMessage() {} + +func (x *MemberListReply) ProtoReflect() protoreflect.Message { + mi := &file_module_ec_delivery_proto_member_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemberListReply.ProtoReflect.Descriptor instead. +func (*MemberListReply) Descriptor() ([]byte, []int) { + return file_module_ec_delivery_proto_member_proto_rawDescGZIP(), []int{1} +} + +func (x *MemberListReply) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *MemberListReply) GetList() []*MemberItem { + if x != nil { + return x.List + } + return nil +} + +var File_module_ec_delivery_proto_member_proto protoreflect.FileDescriptor + +const file_module_ec_delivery_proto_member_proto_rawDesc = "" + + "\n" + + "%module/ec/delivery/proto/member.proto\x12\bdelivery\x1a\x15protobuf/blocks.proto\"\xc5\x01\n" + + "\n" + + "MemberItem\x12\x1a\n" + + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12#\n" + + "\rteam_identity\x18\x03 \x01(\tR\fteamIdentity\x12\x18\n" + + "\apicture\x18\x04 \x01(\tR\apicture\x12\x14\n" + + "\x05phone\x18\x05 \x01(\tR\x05phone\x12\x16\n" + + "\x06status\x18\x06 \x01(\x03R\x06status\x12\x1a\n" + + "\bturnover\x18\a \x01(\x03R\bturnover\"Q\n" + + "\x0fMemberListReply\x12\x14\n" + + "\x05count\x18\x01 \x01(\x03R\x05count\x12(\n" + + "\x04list\x18\x02 \x03(\v2\x14.delivery.MemberItemR\x04list2\xca\x02\n" + + "\x06Member\x12?\n" + + "\n" + + "MemberList\x12\x14.blocks.FetchRequest\x1a\x19.delivery.MemberListReply\"\x00\x12@\n" + + "\tMemberAdd\x12\x14.delivery.MemberItem\x1a\x1b.blocks.DeliveryStatusReply\"\x00\x129\n" + + "\tMemberGet\x12\x14.blocks.IdentRequest\x1a\x14.delivery.MemberItem\"\x00\x12@\n" + + "\tMemberSet\x12\x14.delivery.MemberItem\x1a\x1b.blocks.DeliveryStatusReply\"\x00\x12@\n" + + "\tMemberDel\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.DeliveryStatusReply\"\x00B;Z9bsm/full/module/ec/delivery/external/pb/delivery;deliveryb\x06proto3" + +var ( + file_module_ec_delivery_proto_member_proto_rawDescOnce sync.Once + file_module_ec_delivery_proto_member_proto_rawDescData []byte +) + +func file_module_ec_delivery_proto_member_proto_rawDescGZIP() []byte { + file_module_ec_delivery_proto_member_proto_rawDescOnce.Do(func() { + file_module_ec_delivery_proto_member_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_delivery_proto_member_proto_rawDesc), len(file_module_ec_delivery_proto_member_proto_rawDesc))) + }) + return file_module_ec_delivery_proto_member_proto_rawDescData +} + +var file_module_ec_delivery_proto_member_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_module_ec_delivery_proto_member_proto_goTypes = []any{ + (*MemberItem)(nil), // 0: delivery.MemberItem + (*MemberListReply)(nil), // 1: delivery.MemberListReply + (*protobuf.FetchRequest)(nil), // 2: blocks.FetchRequest + (*protobuf.IdentRequest)(nil), // 3: blocks.IdentRequest + (*protobuf.DeliveryStatusReply)(nil), // 4: blocks.DeliveryStatusReply +} +var file_module_ec_delivery_proto_member_proto_depIdxs = []int32{ + 0, // 0: delivery.MemberListReply.list:type_name -> delivery.MemberItem + 2, // 1: delivery.Member.MemberList:input_type -> blocks.FetchRequest + 0, // 2: delivery.Member.MemberAdd:input_type -> delivery.MemberItem + 3, // 3: delivery.Member.MemberGet:input_type -> blocks.IdentRequest + 0, // 4: delivery.Member.MemberSet:input_type -> delivery.MemberItem + 3, // 5: delivery.Member.MemberDel:input_type -> blocks.IdentRequest + 1, // 6: delivery.Member.MemberList:output_type -> delivery.MemberListReply + 4, // 7: delivery.Member.MemberAdd:output_type -> blocks.DeliveryStatusReply + 0, // 8: delivery.Member.MemberGet:output_type -> delivery.MemberItem + 4, // 9: delivery.Member.MemberSet:output_type -> blocks.DeliveryStatusReply + 4, // 10: delivery.Member.MemberDel:output_type -> blocks.DeliveryStatusReply + 6, // [6:11] is the sub-list for method output_type + 1, // [1:6] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_module_ec_delivery_proto_member_proto_init() } +func file_module_ec_delivery_proto_member_proto_init() { + if File_module_ec_delivery_proto_member_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_delivery_proto_member_proto_rawDesc), len(file_module_ec_delivery_proto_member_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_module_ec_delivery_proto_member_proto_goTypes, + DependencyIndexes: file_module_ec_delivery_proto_member_proto_depIdxs, + MessageInfos: file_module_ec_delivery_proto_member_proto_msgTypes, + }.Build() + File_module_ec_delivery_proto_member_proto = out.File + file_module_ec_delivery_proto_member_proto_goTypes = nil + file_module_ec_delivery_proto_member_proto_depIdxs = nil +} diff --git a/module/ec/delivery/external/pb/delivery/member.pb.gw.go b/module/ec/delivery/external/pb/delivery/member.pb.gw.go new file mode 100644 index 0000000..82edb3a --- /dev/null +++ b/module/ec/delivery/external/pb/delivery/member.pb.gw.go @@ -0,0 +1,422 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: module/ec/delivery/proto/member.proto + +/* +Package delivery is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package delivery + +import ( + "bsm/full/protobuf" + "context" + "errors" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) + +func request_Member_MemberList_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq blocks.FetchRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + msg, err := client.MemberList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Member_MemberList_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq blocks.FetchRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.MemberList(ctx, &protoReq) + return msg, metadata, err +} + +func request_Member_MemberAdd_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq MemberItem + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + msg, err := client.MemberAdd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Member_MemberAdd_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq MemberItem + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.MemberAdd(ctx, &protoReq) + return msg, metadata, err +} + +func request_Member_MemberGet_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq blocks.IdentRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + msg, err := client.MemberGet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Member_MemberGet_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq blocks.IdentRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.MemberGet(ctx, &protoReq) + return msg, metadata, err +} + +func request_Member_MemberSet_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq MemberItem + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + msg, err := client.MemberSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Member_MemberSet_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq MemberItem + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.MemberSet(ctx, &protoReq) + return msg, metadata, err +} + +func request_Member_MemberDel_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq blocks.IdentRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + msg, err := client.MemberDel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Member_MemberDel_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq blocks.IdentRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.MemberDel(ctx, &protoReq) + return msg, metadata, err +} + +// RegisterMemberHandlerServer registers the http handlers for service Member to "mux". +// UnaryRPC :call MemberServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMemberHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. +func RegisterMemberHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MemberServer) error { + mux.Handle(http.MethodPost, pattern_Member_MemberList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Member/MemberList", runtime.WithHTTPPathPattern("/delivery.Member/MemberList")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Member_MemberList_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Member_MemberList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Member_MemberAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Member/MemberAdd", runtime.WithHTTPPathPattern("/delivery.Member/MemberAdd")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Member_MemberAdd_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Member_MemberAdd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Member_MemberGet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Member/MemberGet", runtime.WithHTTPPathPattern("/delivery.Member/MemberGet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Member_MemberGet_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Member_MemberGet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Member_MemberSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Member/MemberSet", runtime.WithHTTPPathPattern("/delivery.Member/MemberSet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Member_MemberSet_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Member_MemberSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Member_MemberDel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Member/MemberDel", runtime.WithHTTPPathPattern("/delivery.Member/MemberDel")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Member_MemberDel_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Member_MemberDel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + return nil +} + +// RegisterMemberHandlerFromEndpoint is same as RegisterMemberHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMemberHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + return RegisterMemberHandler(ctx, mux, conn) +} + +// RegisterMemberHandler registers the http handlers for service Member to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMemberHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMemberHandlerClient(ctx, mux, NewMemberClient(conn)) +} + +// RegisterMemberHandlerClient registers the http handlers for service Member +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MemberClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MemberClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MemberClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterMemberHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MemberClient) error { + mux.Handle(http.MethodPost, pattern_Member_MemberList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Member/MemberList", runtime.WithHTTPPathPattern("/delivery.Member/MemberList")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Member_MemberList_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Member_MemberList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Member_MemberAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Member/MemberAdd", runtime.WithHTTPPathPattern("/delivery.Member/MemberAdd")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Member_MemberAdd_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Member_MemberAdd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Member_MemberGet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Member/MemberGet", runtime.WithHTTPPathPattern("/delivery.Member/MemberGet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Member_MemberGet_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Member_MemberGet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Member_MemberSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Member/MemberSet", runtime.WithHTTPPathPattern("/delivery.Member/MemberSet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Member_MemberSet_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Member_MemberSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_Member_MemberDel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Member/MemberDel", runtime.WithHTTPPathPattern("/delivery.Member/MemberDel")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Member_MemberDel_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Member_MemberDel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + return nil +} + +var ( + pattern_Member_MemberList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Member", "MemberList"}, "")) + pattern_Member_MemberAdd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Member", "MemberAdd"}, "")) + pattern_Member_MemberGet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Member", "MemberGet"}, "")) + pattern_Member_MemberSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Member", "MemberSet"}, "")) + pattern_Member_MemberDel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Member", "MemberDel"}, "")) +) + +var ( + forward_Member_MemberList_0 = runtime.ForwardResponseMessage + forward_Member_MemberAdd_0 = runtime.ForwardResponseMessage + forward_Member_MemberGet_0 = runtime.ForwardResponseMessage + forward_Member_MemberSet_0 = runtime.ForwardResponseMessage + forward_Member_MemberDel_0 = runtime.ForwardResponseMessage +) diff --git a/module/ec/delivery/external/pb/delivery/member_grpc.pb.go b/module/ec/delivery/external/pb/delivery/member_grpc.pb.go new file mode 100644 index 0000000..538f8e2 --- /dev/null +++ b/module/ec/delivery/external/pb/delivery/member_grpc.pb.go @@ -0,0 +1,286 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/delivery/proto/member.proto + +package delivery + +import ( + protobuf "bsm/full/protobuf" + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Member_MemberList_FullMethodName = "/delivery.Member/MemberList" + Member_MemberAdd_FullMethodName = "/delivery.Member/MemberAdd" + Member_MemberGet_FullMethodName = "/delivery.Member/MemberGet" + Member_MemberSet_FullMethodName = "/delivery.Member/MemberSet" + Member_MemberDel_FullMethodName = "/delivery.Member/MemberDel" +) + +// MemberClient is the client API for Member service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Delivery(配送)微服务 +type MemberClient interface { + // 获取配送员列表 + MemberList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*MemberListReply, error) + // 添加配送员 + MemberAdd(ctx context.Context, in *MemberItem, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) + // 获取配送员数据 + MemberGet(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*MemberItem, error) + // 修改配送员 + MemberSet(ctx context.Context, in *MemberItem, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) + // 删除配送员 + MemberDel(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) +} + +type memberClient struct { + cc grpc.ClientConnInterface +} + +func NewMemberClient(cc grpc.ClientConnInterface) MemberClient { + return &memberClient{cc} +} + +func (c *memberClient) MemberList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*MemberListReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MemberListReply) + err := c.cc.Invoke(ctx, Member_MemberList_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *memberClient) MemberAdd(ctx context.Context, in *MemberItem, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(protobuf.DeliveryStatusReply) + err := c.cc.Invoke(ctx, Member_MemberAdd_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *memberClient) MemberGet(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*MemberItem, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MemberItem) + err := c.cc.Invoke(ctx, Member_MemberGet_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *memberClient) MemberSet(ctx context.Context, in *MemberItem, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(protobuf.DeliveryStatusReply) + err := c.cc.Invoke(ctx, Member_MemberSet_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *memberClient) MemberDel(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(protobuf.DeliveryStatusReply) + err := c.cc.Invoke(ctx, Member_MemberDel_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MemberServer is the server API for Member service. +// All implementations should embed UnimplementedMemberServer +// for forward compatibility. +// +// Delivery(配送)微服务 +type MemberServer interface { + // 获取配送员列表 + MemberList(context.Context, *protobuf.FetchRequest) (*MemberListReply, error) + // 添加配送员 + MemberAdd(context.Context, *MemberItem) (*protobuf.DeliveryStatusReply, error) + // 获取配送员数据 + MemberGet(context.Context, *protobuf.IdentRequest) (*MemberItem, error) + // 修改配送员 + MemberSet(context.Context, *MemberItem) (*protobuf.DeliveryStatusReply, error) + // 删除配送员 + MemberDel(context.Context, *protobuf.IdentRequest) (*protobuf.DeliveryStatusReply, error) +} + +// UnimplementedMemberServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedMemberServer struct{} + +func (UnimplementedMemberServer) MemberList(context.Context, *protobuf.FetchRequest) (*MemberListReply, error) { + return nil, status.Error(codes.Unimplemented, "method MemberList not implemented") +} +func (UnimplementedMemberServer) MemberAdd(context.Context, *MemberItem) (*protobuf.DeliveryStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method MemberAdd not implemented") +} +func (UnimplementedMemberServer) MemberGet(context.Context, *protobuf.IdentRequest) (*MemberItem, error) { + return nil, status.Error(codes.Unimplemented, "method MemberGet not implemented") +} +func (UnimplementedMemberServer) MemberSet(context.Context, *MemberItem) (*protobuf.DeliveryStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method MemberSet not implemented") +} +func (UnimplementedMemberServer) MemberDel(context.Context, *protobuf.IdentRequest) (*protobuf.DeliveryStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method MemberDel not implemented") +} +func (UnimplementedMemberServer) testEmbeddedByValue() {} + +// UnsafeMemberServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MemberServer will +// result in compilation errors. +type UnsafeMemberServer interface { + mustEmbedUnimplementedMemberServer() +} + +func RegisterMemberServer(s grpc.ServiceRegistrar, srv MemberServer) { + // If the following call panics, it indicates UnimplementedMemberServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Member_ServiceDesc, srv) +} + +func _Member_MemberList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(protobuf.FetchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MemberServer).MemberList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Member_MemberList_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MemberServer).MemberList(ctx, req.(*protobuf.FetchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Member_MemberAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MemberItem) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MemberServer).MemberAdd(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Member_MemberAdd_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MemberServer).MemberAdd(ctx, req.(*MemberItem)) + } + return interceptor(ctx, in, info, handler) +} + +func _Member_MemberGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(protobuf.IdentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MemberServer).MemberGet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Member_MemberGet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MemberServer).MemberGet(ctx, req.(*protobuf.IdentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Member_MemberSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MemberItem) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MemberServer).MemberSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Member_MemberSet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MemberServer).MemberSet(ctx, req.(*MemberItem)) + } + return interceptor(ctx, in, info, handler) +} + +func _Member_MemberDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(protobuf.IdentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MemberServer).MemberDel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Member_MemberDel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MemberServer).MemberDel(ctx, req.(*protobuf.IdentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Member_ServiceDesc is the grpc.ServiceDesc for Member service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Member_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "delivery.Member", + HandlerType: (*MemberServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "MemberList", + Handler: _Member_MemberList_Handler, + }, + { + MethodName: "MemberAdd", + Handler: _Member_MemberAdd_Handler, + }, + { + MethodName: "MemberGet", + Handler: _Member_MemberGet_Handler, + }, + { + MethodName: "MemberSet", + Handler: _Member_MemberSet_Handler, + }, + { + MethodName: "MemberDel", + Handler: _Member_MemberDel_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "module/ec/delivery/proto/member.proto", +} diff --git a/module/ec/delivery/external/pb/delivery/team.pb.go b/module/ec/delivery/external/pb/delivery/team.pb.go new file mode 100644 index 0000000..179b0d8 --- /dev/null +++ b/module/ec/delivery/external/pb/delivery/team.pb.go @@ -0,0 +1,253 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/delivery/proto/team.proto + +package delivery + +import ( + protobuf "bsm/full/protobuf" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TeamListReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + List []*TeamItem `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TeamListReply) Reset() { + *x = TeamListReply{} + mi := &file_module_ec_delivery_proto_team_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TeamListReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TeamListReply) ProtoMessage() {} + +func (x *TeamListReply) ProtoReflect() protoreflect.Message { + mi := &file_module_ec_delivery_proto_team_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TeamListReply.ProtoReflect.Descriptor instead. +func (*TeamListReply) Descriptor() ([]byte, []int) { + return file_module_ec_delivery_proto_team_proto_rawDescGZIP(), []int{0} +} + +func (x *TeamListReply) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *TeamListReply) GetList() []*TeamItem { + if x != nil { + return x.List + } + return nil +} + +type TeamItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` // 团队名称 + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` // 归属者唯一标识 + Contacts string `protobuf:"bytes,4,opt,name=contacts,proto3" json:"contacts,omitempty"` // 联系人姓名 + Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` // 联系人电话 + Status int64 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` // 状态:1正常;-1禁用 + Logo string `protobuf:"bytes,7,opt,name=logo,proto3" json:"logo,omitempty"` // 团队图标地址 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TeamItem) Reset() { + *x = TeamItem{} + mi := &file_module_ec_delivery_proto_team_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TeamItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TeamItem) ProtoMessage() {} + +func (x *TeamItem) ProtoReflect() protoreflect.Message { + mi := &file_module_ec_delivery_proto_team_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TeamItem.ProtoReflect.Descriptor instead. +func (*TeamItem) Descriptor() ([]byte, []int) { + return file_module_ec_delivery_proto_team_proto_rawDescGZIP(), []int{1} +} + +func (x *TeamItem) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *TeamItem) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *TeamItem) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *TeamItem) GetContacts() string { + if x != nil { + return x.Contacts + } + return "" +} + +func (x *TeamItem) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *TeamItem) GetStatus() int64 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *TeamItem) GetLogo() string { + if x != nil { + return x.Logo + } + return "" +} + +var File_module_ec_delivery_proto_team_proto protoreflect.FileDescriptor + +const file_module_ec_delivery_proto_team_proto_rawDesc = "" + + "\n" + + "#module/ec/delivery/proto/team.proto\x12\bdelivery\x1a\x15protobuf/blocks.proto\"M\n" + + "\rTeamListReply\x12\x14\n" + + "\x05count\x18\x01 \x01(\x03R\x05count\x12&\n" + + "\x04list\x18\x02 \x03(\v2\x12.delivery.TeamItemR\x04list\"\xb0\x01\n" + + "\bTeamItem\x12\x1a\n" + + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x14\n" + + "\x05title\x18\x02 \x01(\tR\x05title\x12\x14\n" + + "\x05owner\x18\x03 \x01(\tR\x05owner\x12\x1a\n" + + "\bcontacts\x18\x04 \x01(\tR\bcontacts\x12\x14\n" + + "\x05phone\x18\x05 \x01(\tR\x05phone\x12\x16\n" + + "\x06status\x18\x06 \x01(\x03R\x06status\x12\x12\n" + + "\x04logo\x18\a \x01(\tR\x04logo2\xb6\x02\n" + + "\x04Team\x12;\n" + + "\bTeamList\x12\x14.blocks.FetchRequest\x1a\x17.delivery.TeamListReply\"\x00\x12<\n" + + "\aTeamAdd\x12\x12.delivery.TeamItem\x1a\x1b.blocks.DeliveryStatusReply\"\x00\x125\n" + + "\aTeamGet\x12\x14.blocks.IdentRequest\x1a\x12.delivery.TeamItem\"\x00\x12<\n" + + "\aTeamSet\x12\x12.delivery.TeamItem\x1a\x1b.blocks.DeliveryStatusReply\"\x00\x12>\n" + + "\aTeamDel\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.DeliveryStatusReply\"\x00B;Z9bsm/full/module/ec/delivery/external/pb/delivery;deliveryb\x06proto3" + +var ( + file_module_ec_delivery_proto_team_proto_rawDescOnce sync.Once + file_module_ec_delivery_proto_team_proto_rawDescData []byte +) + +func file_module_ec_delivery_proto_team_proto_rawDescGZIP() []byte { + file_module_ec_delivery_proto_team_proto_rawDescOnce.Do(func() { + file_module_ec_delivery_proto_team_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_delivery_proto_team_proto_rawDesc), len(file_module_ec_delivery_proto_team_proto_rawDesc))) + }) + return file_module_ec_delivery_proto_team_proto_rawDescData +} + +var file_module_ec_delivery_proto_team_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_module_ec_delivery_proto_team_proto_goTypes = []any{ + (*TeamListReply)(nil), // 0: delivery.TeamListReply + (*TeamItem)(nil), // 1: delivery.TeamItem + (*protobuf.FetchRequest)(nil), // 2: blocks.FetchRequest + (*protobuf.IdentRequest)(nil), // 3: blocks.IdentRequest + (*protobuf.DeliveryStatusReply)(nil), // 4: blocks.DeliveryStatusReply +} +var file_module_ec_delivery_proto_team_proto_depIdxs = []int32{ + 1, // 0: delivery.TeamListReply.list:type_name -> delivery.TeamItem + 2, // 1: delivery.Team.TeamList:input_type -> blocks.FetchRequest + 1, // 2: delivery.Team.TeamAdd:input_type -> delivery.TeamItem + 3, // 3: delivery.Team.TeamGet:input_type -> blocks.IdentRequest + 1, // 4: delivery.Team.TeamSet:input_type -> delivery.TeamItem + 3, // 5: delivery.Team.TeamDel:input_type -> blocks.IdentRequest + 0, // 6: delivery.Team.TeamList:output_type -> delivery.TeamListReply + 4, // 7: delivery.Team.TeamAdd:output_type -> blocks.DeliveryStatusReply + 1, // 8: delivery.Team.TeamGet:output_type -> delivery.TeamItem + 4, // 9: delivery.Team.TeamSet:output_type -> blocks.DeliveryStatusReply + 4, // 10: delivery.Team.TeamDel:output_type -> blocks.DeliveryStatusReply + 6, // [6:11] is the sub-list for method output_type + 1, // [1:6] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_module_ec_delivery_proto_team_proto_init() } +func file_module_ec_delivery_proto_team_proto_init() { + if File_module_ec_delivery_proto_team_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_delivery_proto_team_proto_rawDesc), len(file_module_ec_delivery_proto_team_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_module_ec_delivery_proto_team_proto_goTypes, + DependencyIndexes: file_module_ec_delivery_proto_team_proto_depIdxs, + MessageInfos: file_module_ec_delivery_proto_team_proto_msgTypes, + }.Build() + File_module_ec_delivery_proto_team_proto = out.File + file_module_ec_delivery_proto_team_proto_goTypes = nil + file_module_ec_delivery_proto_team_proto_depIdxs = nil +} diff --git a/module/base/sender/pb/push_xiaomi.pb.gw.go b/module/ec/delivery/external/pb/delivery/team.pb.gw.go similarity index 58% rename from module/base/sender/pb/push_xiaomi.pb.gw.go rename to module/ec/delivery/external/pb/delivery/team.pb.gw.go index dc069ca..49d00a4 100644 --- a/module/base/sender/pb/push_xiaomi.pb.gw.go +++ b/module/ec/delivery/external/pb/delivery/team.pb.gw.go @@ -1,14 +1,15 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: push_xiaomi.proto +// source: module/ec/delivery/proto/team.proto /* -Package sender is a reverse proxy. +Package delivery is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package sender +package delivery import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -35,9 +36,9 @@ var ( _ = metadata.Join ) -func request_Xiaomi_Regid_0(ctx context.Context, marshaler runtime.Marshaler, client XiaomiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Team_TeamList_0(ctx context.Context, marshaler runtime.Marshaler, client TeamClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq ARequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -46,25 +47,25 @@ func request_Xiaomi_Regid_0(ctx context.Context, marshaler runtime.Marshaler, cl if req.Body != nil { _, _ = io.Copy(io.Discard, req.Body) } - msg, err := client.Regid(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.TeamList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Xiaomi_Regid_0(ctx context.Context, marshaler runtime.Marshaler, server XiaomiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Team_TeamList_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq ARequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Regid(ctx, &protoReq) + msg, err := server.TeamList(ctx, &protoReq) return msg, metadata, err } -func request_Xiaomi_Alias_0(ctx context.Context, marshaler runtime.Marshaler, client XiaomiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Team_TeamAdd_0(ctx context.Context, marshaler runtime.Marshaler, client TeamClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq ARequest + protoReq TeamItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -73,25 +74,25 @@ func request_Xiaomi_Alias_0(ctx context.Context, marshaler runtime.Marshaler, cl if req.Body != nil { _, _ = io.Copy(io.Discard, req.Body) } - msg, err := client.Alias(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.TeamAdd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Xiaomi_Alias_0(ctx context.Context, marshaler runtime.Marshaler, server XiaomiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Team_TeamAdd_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq ARequest + protoReq TeamItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Alias(ctx, &protoReq) + msg, err := server.TeamAdd(ctx, &protoReq) return msg, metadata, err } -func request_Xiaomi_Topic_0(ctx context.Context, marshaler runtime.Marshaler, client XiaomiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Team_TeamGet_0(ctx context.Context, marshaler runtime.Marshaler, client TeamClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq TopicRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -100,25 +101,25 @@ func request_Xiaomi_Topic_0(ctx context.Context, marshaler runtime.Marshaler, cl if req.Body != nil { _, _ = io.Copy(io.Discard, req.Body) } - msg, err := client.Topic(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.TeamGet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Xiaomi_Topic_0(ctx context.Context, marshaler runtime.Marshaler, server XiaomiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Team_TeamGet_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq TopicRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Topic(ctx, &protoReq) + msg, err := server.TeamGet(ctx, &protoReq) return msg, metadata, err } -func request_Xiaomi_MultiTopic_0(ctx context.Context, marshaler runtime.Marshaler, client XiaomiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Team_TeamSet_0(ctx context.Context, marshaler runtime.Marshaler, client TeamClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq MultiTopicRequest + protoReq TeamItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -127,25 +128,25 @@ func request_Xiaomi_MultiTopic_0(ctx context.Context, marshaler runtime.Marshale if req.Body != nil { _, _ = io.Copy(io.Discard, req.Body) } - msg, err := client.MultiTopic(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.TeamSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Xiaomi_MultiTopic_0(ctx context.Context, marshaler runtime.Marshaler, server XiaomiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Team_TeamSet_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq MultiTopicRequest + protoReq TeamItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.MultiTopic(ctx, &protoReq) + msg, err := server.TeamSet(ctx, &protoReq) return msg, metadata, err } -func request_Xiaomi_All_0(ctx context.Context, marshaler runtime.Marshaler, client XiaomiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Team_TeamDel_0(ctx context.Context, marshaler runtime.Marshaler, client TeamClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq BaseItem + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -154,135 +155,135 @@ func request_Xiaomi_All_0(ctx context.Context, marshaler runtime.Marshaler, clie if req.Body != nil { _, _ = io.Copy(io.Discard, req.Body) } - msg, err := client.All(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.TeamDel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Xiaomi_All_0(ctx context.Context, marshaler runtime.Marshaler, server XiaomiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Team_TeamDel_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq BaseItem + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.All(ctx, &protoReq) + msg, err := server.TeamDel(ctx, &protoReq) return msg, metadata, err } -// RegisterXiaomiHandlerServer registers the http handlers for service Xiaomi to "mux". -// UnaryRPC :call XiaomiServer directly. +// RegisterTeamHandlerServer registers the http handlers for service Team to "mux". +// UnaryRPC :call TeamServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterXiaomiHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTeamHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. -func RegisterXiaomiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server XiaomiServer) error { - mux.Handle(http.MethodPost, pattern_Xiaomi_Regid_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { +func RegisterTeamHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TeamServer) error { + mux.Handle(http.MethodPost, pattern_Team_TeamList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/sender.Xiaomi/Regid", runtime.WithHTTPPathPattern("/sender.Xiaomi/Regid")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Team/TeamList", runtime.WithHTTPPathPattern("/delivery.Team/TeamList")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Xiaomi_Regid_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Team_TeamList_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Xiaomi_Regid_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Team_TeamList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodPost, pattern_Xiaomi_Alias_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_Team_TeamAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/sender.Xiaomi/Alias", runtime.WithHTTPPathPattern("/sender.Xiaomi/Alias")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Team/TeamAdd", runtime.WithHTTPPathPattern("/delivery.Team/TeamAdd")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Xiaomi_Alias_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Team_TeamAdd_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Xiaomi_Alias_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Team_TeamAdd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodPost, pattern_Xiaomi_Topic_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_Team_TeamGet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/sender.Xiaomi/Topic", runtime.WithHTTPPathPattern("/sender.Xiaomi/Topic")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Team/TeamGet", runtime.WithHTTPPathPattern("/delivery.Team/TeamGet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Xiaomi_Topic_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Team_TeamGet_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Xiaomi_Topic_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Team_TeamGet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodPost, pattern_Xiaomi_MultiTopic_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_Team_TeamSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/sender.Xiaomi/MultiTopic", runtime.WithHTTPPathPattern("/sender.Xiaomi/MultiTopic")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Team/TeamSet", runtime.WithHTTPPathPattern("/delivery.Team/TeamSet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Xiaomi_MultiTopic_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Team_TeamSet_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Xiaomi_MultiTopic_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Team_TeamSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodPost, pattern_Xiaomi_All_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_Team_TeamDel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/sender.Xiaomi/All", runtime.WithHTTPPathPattern("/sender.Xiaomi/All")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/delivery.Team/TeamDel", runtime.WithHTTPPathPattern("/delivery.Team/TeamDel")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Xiaomi_All_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Team_TeamDel_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Xiaomi_All_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Team_TeamDel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil } -// RegisterXiaomiHandlerFromEndpoint is same as RegisterXiaomiHandler but +// RegisterTeamHandlerFromEndpoint is same as RegisterTeamHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterXiaomiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterTeamHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err @@ -301,121 +302,121 @@ func RegisterXiaomiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMu } }() }() - return RegisterXiaomiHandler(ctx, mux, conn) + return RegisterTeamHandler(ctx, mux, conn) } -// RegisterXiaomiHandler registers the http handlers for service Xiaomi to "mux". +// RegisterTeamHandler registers the http handlers for service Team to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterXiaomiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterXiaomiHandlerClient(ctx, mux, NewXiaomiClient(conn)) +func RegisterTeamHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterTeamHandlerClient(ctx, mux, NewTeamClient(conn)) } -// RegisterXiaomiHandlerClient registers the http handlers for service Xiaomi -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "XiaomiClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "XiaomiClient" +// RegisterTeamHandlerClient registers the http handlers for service Team +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TeamClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TeamClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "XiaomiClient" to call the correct interceptors. This client ignores the HTTP middlewares. -func RegisterXiaomiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client XiaomiClient) error { - mux.Handle(http.MethodPost, pattern_Xiaomi_Regid_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { +// "TeamClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterTeamHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TeamClient) error { + mux.Handle(http.MethodPost, pattern_Team_TeamList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/sender.Xiaomi/Regid", runtime.WithHTTPPathPattern("/sender.Xiaomi/Regid")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Team/TeamList", runtime.WithHTTPPathPattern("/delivery.Team/TeamList")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Xiaomi_Regid_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Team_TeamList_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Xiaomi_Regid_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Team_TeamList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodPost, pattern_Xiaomi_Alias_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_Team_TeamAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/sender.Xiaomi/Alias", runtime.WithHTTPPathPattern("/sender.Xiaomi/Alias")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Team/TeamAdd", runtime.WithHTTPPathPattern("/delivery.Team/TeamAdd")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Xiaomi_Alias_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Team_TeamAdd_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Xiaomi_Alias_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Team_TeamAdd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodPost, pattern_Xiaomi_Topic_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_Team_TeamGet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/sender.Xiaomi/Topic", runtime.WithHTTPPathPattern("/sender.Xiaomi/Topic")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Team/TeamGet", runtime.WithHTTPPathPattern("/delivery.Team/TeamGet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Xiaomi_Topic_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Team_TeamGet_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Xiaomi_Topic_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Team_TeamGet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodPost, pattern_Xiaomi_MultiTopic_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_Team_TeamSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/sender.Xiaomi/MultiTopic", runtime.WithHTTPPathPattern("/sender.Xiaomi/MultiTopic")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Team/TeamSet", runtime.WithHTTPPathPattern("/delivery.Team/TeamSet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Xiaomi_MultiTopic_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Team_TeamSet_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Xiaomi_MultiTopic_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Team_TeamSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodPost, pattern_Xiaomi_All_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_Team_TeamDel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/sender.Xiaomi/All", runtime.WithHTTPPathPattern("/sender.Xiaomi/All")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/delivery.Team/TeamDel", runtime.WithHTTPPathPattern("/delivery.Team/TeamDel")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Xiaomi_All_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Team_TeamDel_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Xiaomi_All_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Team_TeamDel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil } var ( - pattern_Xiaomi_Regid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"sender.Xiaomi", "Regid"}, "")) - pattern_Xiaomi_Alias_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"sender.Xiaomi", "Alias"}, "")) - pattern_Xiaomi_Topic_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"sender.Xiaomi", "Topic"}, "")) - pattern_Xiaomi_MultiTopic_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"sender.Xiaomi", "MultiTopic"}, "")) - pattern_Xiaomi_All_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"sender.Xiaomi", "All"}, "")) + pattern_Team_TeamList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Team", "TeamList"}, "")) + pattern_Team_TeamAdd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Team", "TeamAdd"}, "")) + pattern_Team_TeamGet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Team", "TeamGet"}, "")) + pattern_Team_TeamSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Team", "TeamSet"}, "")) + pattern_Team_TeamDel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"delivery.Team", "TeamDel"}, "")) ) var ( - forward_Xiaomi_Regid_0 = runtime.ForwardResponseMessage - forward_Xiaomi_Alias_0 = runtime.ForwardResponseMessage - forward_Xiaomi_Topic_0 = runtime.ForwardResponseMessage - forward_Xiaomi_MultiTopic_0 = runtime.ForwardResponseMessage - forward_Xiaomi_All_0 = runtime.ForwardResponseMessage + forward_Team_TeamList_0 = runtime.ForwardResponseMessage + forward_Team_TeamAdd_0 = runtime.ForwardResponseMessage + forward_Team_TeamGet_0 = runtime.ForwardResponseMessage + forward_Team_TeamSet_0 = runtime.ForwardResponseMessage + forward_Team_TeamDel_0 = runtime.ForwardResponseMessage ) diff --git a/module/ec/delivery/external/pb/delivery/team_grpc.pb.go b/module/ec/delivery/external/pb/delivery/team_grpc.pb.go new file mode 100644 index 0000000..ecbf835 --- /dev/null +++ b/module/ec/delivery/external/pb/delivery/team_grpc.pb.go @@ -0,0 +1,286 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/delivery/proto/team.proto + +package delivery + +import ( + protobuf "bsm/full/protobuf" + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Team_TeamList_FullMethodName = "/delivery.Team/TeamList" + Team_TeamAdd_FullMethodName = "/delivery.Team/TeamAdd" + Team_TeamGet_FullMethodName = "/delivery.Team/TeamGet" + Team_TeamSet_FullMethodName = "/delivery.Team/TeamSet" + Team_TeamDel_FullMethodName = "/delivery.Team/TeamDel" +) + +// TeamClient is the client API for Team service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Delivery(配送)微服务 +type TeamClient interface { + // 配送团队列表 + TeamList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*TeamListReply, error) + // 添加配送团队 + TeamAdd(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) + // 配送团队详情 + TeamGet(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*TeamItem, error) + // 修改配送团队信息 + TeamSet(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) + // 删除配送团队 + TeamDel(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) +} + +type teamClient struct { + cc grpc.ClientConnInterface +} + +func NewTeamClient(cc grpc.ClientConnInterface) TeamClient { + return &teamClient{cc} +} + +func (c *teamClient) TeamList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*TeamListReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TeamListReply) + err := c.cc.Invoke(ctx, Team_TeamList_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *teamClient) TeamAdd(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(protobuf.DeliveryStatusReply) + err := c.cc.Invoke(ctx, Team_TeamAdd_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *teamClient) TeamGet(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*TeamItem, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TeamItem) + err := c.cc.Invoke(ctx, Team_TeamGet_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *teamClient) TeamSet(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(protobuf.DeliveryStatusReply) + err := c.cc.Invoke(ctx, Team_TeamSet_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *teamClient) TeamDel(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DeliveryStatusReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(protobuf.DeliveryStatusReply) + err := c.cc.Invoke(ctx, Team_TeamDel_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TeamServer is the server API for Team service. +// All implementations should embed UnimplementedTeamServer +// for forward compatibility. +// +// Delivery(配送)微服务 +type TeamServer interface { + // 配送团队列表 + TeamList(context.Context, *protobuf.FetchRequest) (*TeamListReply, error) + // 添加配送团队 + TeamAdd(context.Context, *TeamItem) (*protobuf.DeliveryStatusReply, error) + // 配送团队详情 + TeamGet(context.Context, *protobuf.IdentRequest) (*TeamItem, error) + // 修改配送团队信息 + TeamSet(context.Context, *TeamItem) (*protobuf.DeliveryStatusReply, error) + // 删除配送团队 + TeamDel(context.Context, *protobuf.IdentRequest) (*protobuf.DeliveryStatusReply, error) +} + +// UnimplementedTeamServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedTeamServer struct{} + +func (UnimplementedTeamServer) TeamList(context.Context, *protobuf.FetchRequest) (*TeamListReply, error) { + return nil, status.Error(codes.Unimplemented, "method TeamList not implemented") +} +func (UnimplementedTeamServer) TeamAdd(context.Context, *TeamItem) (*protobuf.DeliveryStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method TeamAdd not implemented") +} +func (UnimplementedTeamServer) TeamGet(context.Context, *protobuf.IdentRequest) (*TeamItem, error) { + return nil, status.Error(codes.Unimplemented, "method TeamGet not implemented") +} +func (UnimplementedTeamServer) TeamSet(context.Context, *TeamItem) (*protobuf.DeliveryStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method TeamSet not implemented") +} +func (UnimplementedTeamServer) TeamDel(context.Context, *protobuf.IdentRequest) (*protobuf.DeliveryStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method TeamDel not implemented") +} +func (UnimplementedTeamServer) testEmbeddedByValue() {} + +// UnsafeTeamServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TeamServer will +// result in compilation errors. +type UnsafeTeamServer interface { + mustEmbedUnimplementedTeamServer() +} + +func RegisterTeamServer(s grpc.ServiceRegistrar, srv TeamServer) { + // If the following call panics, it indicates UnimplementedTeamServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Team_ServiceDesc, srv) +} + +func _Team_TeamList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(protobuf.FetchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServer).TeamList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Team_TeamList_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServer).TeamList(ctx, req.(*protobuf.FetchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Team_TeamAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TeamItem) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServer).TeamAdd(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Team_TeamAdd_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServer).TeamAdd(ctx, req.(*TeamItem)) + } + return interceptor(ctx, in, info, handler) +} + +func _Team_TeamGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(protobuf.IdentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServer).TeamGet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Team_TeamGet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServer).TeamGet(ctx, req.(*protobuf.IdentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Team_TeamSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TeamItem) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServer).TeamSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Team_TeamSet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServer).TeamSet(ctx, req.(*TeamItem)) + } + return interceptor(ctx, in, info, handler) +} + +func _Team_TeamDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(protobuf.IdentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServer).TeamDel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Team_TeamDel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServer).TeamDel(ctx, req.(*protobuf.IdentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Team_ServiceDesc is the grpc.ServiceDesc for Team service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Team_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "delivery.Team", + HandlerType: (*TeamServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "TeamList", + Handler: _Team_TeamList_Handler, + }, + { + MethodName: "TeamAdd", + Handler: _Team_TeamAdd_Handler, + }, + { + MethodName: "TeamGet", + Handler: _Team_TeamGet_Handler, + }, + { + MethodName: "TeamSet", + Handler: _Team_TeamSet_Handler, + }, + { + MethodName: "TeamDel", + Handler: _Team_TeamDel_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "module/ec/delivery/proto/team.proto", +} diff --git a/module/ec/delivery/go.mod b/module/ec/delivery/go.mod index 4b846e9..07d8aca 100644 --- a/module/ec/delivery/go.mod +++ b/module/ec/delivery/go.mod @@ -3,133 +3,41 @@ module bsm/full/module/ec/delivery go 1.26.5 require ( - git.apinb.com/bsm-sdk/engine v1.3.2 - github.com/FishGoddess/cachego v0.6.1 - github.com/zeromicro/go-zero v1.7.2 + git.apinb.com/bsm-sdk/core v0.0.0-00010101000000-000000000000 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 google.golang.org/grpc v1.83.0 google.golang.org/protobuf v1.36.11 + gopkg.in/yaml.v3 v3.0.1 gorm.io/gorm v1.31.2 ) require ( - github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.2 // indirect - github.com/AthenZ/athenz v1.11.66 // indirect - github.com/DataDog/zstd v1.5.6 // indirect - github.com/apache/pulsar-client-go v0.14.0 // indirect - github.com/ardielle/ardielle-go v1.5.2 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/bits-and-blooms/bitset v1.14.3 // indirect - github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.7.0 // indirect - github.com/danieljoos/wincred v1.2.2 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/dvsekhvalnov/jose2go v1.7.0 // indirect - github.com/emicklei/go-restful/v3 v3.12.1 // indirect - github.com/fatih/color v1.17.0 // indirect - github.com/frankban/quicktest v1.14.6 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect - github.com/go-jose/go-jose/v4 v4.1.4 // indirect - github.com/go-logr/logr v1.4.3 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-openapi/jsonpointer v0.22.1 // indirect - github.com/go-openapi/jsonreference v0.21.2 // indirect - github.com/go-openapi/swag v0.23.0 // indirect - github.com/go-openapi/swag/jsonname v0.25.1 // indirect - github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect - github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.3.1 // indirect - github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.7.0 // indirect - github.com/google/gofuzz v1.2.0 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 // indirect - github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/hamba/avro/v2 v2.26.0 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/pgx/v5 v5.10.0 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.18.5 // indirect - github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.22 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mtibben/percent v0.2.1 // indirect - github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/oklog/ulid/v2 v2.1.1 // indirect - github.com/openzipkin/zipkin-go v0.4.3 // indirect - github.com/pelletier/go-toml/v2 v2.3.1 // indirect - github.com/pierrec/lz4 v2.6.1+incompatible // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.20.5 // indirect - github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.62.0 // indirect - github.com/prometheus/procfs v0.15.1 // indirect - github.com/redis/go-redis/v9 v9.20.0 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect - github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/tklauser/go-sysconf v0.4.0 // indirect - github.com/x448/float16 v0.8.4 // indirect - github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.etcd.io/etcd/api/v3 v3.6.12 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.6.12 // indirect - go.etcd.io/etcd/client/v3 v3.6.12 // indirect - go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/otel v1.44.0 // indirect - go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0 // indirect - go.opentelemetry.io/otel/exporters/zipkin v1.30.0 // indirect - go.opentelemetry.io/otel/metric v1.44.0 // indirect - go.opentelemetry.io/otel/sdk v1.44.0 // indirect - go.opentelemetry.io/otel/trace v1.44.0 // indirect - go.opentelemetry.io/proto/otlp v1.9.0 // indirect - go.uber.org/atomic v1.11.0 // indirect - go.uber.org/automaxprocs v1.6.0 // indirect + github.com/oklog/ulid/v2 v2.1.2 // indirect + github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect + go.etcd.io/etcd/api/v3 v3.7.1 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.7.1 // indirect + go.etcd.io/etcd/client/v3 v3.7.1 // indirect + go.opentelemetry.io/otel/sdk/metric v1.45.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.28.0 // indirect - golang.org/x/crypto v0.52.0 // indirect - golang.org/x/mod v0.36.0 // indirect - golang.org/x/net v0.55.0 // indirect - golang.org/x/oauth2 v0.36.0 // indirect - golang.org/x/sync v0.20.0 // indirect - golang.org/x/sys v0.45.0 // indirect - golang.org/x/term v0.43.0 // indirect - golang.org/x/text v0.37.0 // indirect - golang.org/x/time v0.7.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect - gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - gorm.io/driver/postgres v1.6.0 // indirect - k8s.io/api v0.31.1 // indirect - k8s.io/apimachinery v0.31.1 // indirect - k8s.io/client-go v0.31.1 // indirect - k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect - k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect + golang.org/x/net v0.57.0 // indirect + golang.org/x/sync v0.22.0 // indirect + golang.org/x/sys v0.47.0 // indirect + golang.org/x/text v0.40.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260807164820-c8921c73eeea // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260807164820-c8921c73eeea // indirect + gorm.io/driver/postgres v1.6.2 // indirect ) replace git.apinb.com/bsm-sdk/core => D:/work/bsm-sdk/core diff --git a/module/ec/delivery/go.sum b/module/ec/delivery/go.sum index 74e9590..dcdb735 100644 --- a/module/ec/delivery/go.sum +++ b/module/ec/delivery/go.sum @@ -1,144 +1,26 @@ -dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= -dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -git.apinb.com/bsm-sdk/engine v1.3.2 h1:QJ20jveUIHcn3Tu0ktrkZI9zGRaPuJRZ+YTbSa1Zj1w= -git.apinb.com/bsm-sdk/engine v1.3.2/go.mod h1:OXRlO6Cdidqagw+LJjCngvpuuX1rwhxDwZlL/MhwiKQ= -github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= -github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= -github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= -github.com/AthenZ/athenz v1.11.66 h1:ws1CGlIlxCzwzxmAImBBljDPVP8rda0ZvRRVqBukX5s= -github.com/AthenZ/athenz v1.11.66/go.mod h1:KiYVBbyVesOggJa8Ycghoc1RM2q+wgwEdc9zySrfevs= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/DataDog/zstd v1.5.6 h1:LbEglqepa/ipmmQJUDnSsfvA8e8IStVcGaFWDuxvGOY= -github.com/DataDog/zstd v1.5.6/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/FishGoddess/cachego v0.6.1 h1:mbytec3loqw5dcO177LyRGyStKG0AngP5g2GR3SzSh0= -github.com/FishGoddess/cachego v0.6.1/go.mod h1:VLSMwWRlRPazjGYer8pq+4aDrIe1Otj3Yy9HAb0eo3c= -github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= -github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/Microsoft/hcsshim v0.11.5 h1:haEcLNpj9Ka1gd3B3tAEs9CpE0c+1IhoL59w/exYU38= -github.com/Microsoft/hcsshim v0.11.5/go.mod h1:MV8xMfmECjl5HdO7U/3/hFVnkmSBjAjmA09d4bExKcU= -github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 h1:uvdUDbHQHO85qeSydJtItA4T55Pw6BtAejd0APRJOCE= -github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= -github.com/alicebob/miniredis/v2 v2.33.0 h1:uvTF0EDeu9RLnUEG27Db5I68ESoIxTiXbNUiji6lZrA= -github.com/alicebob/miniredis/v2 v2.33.0/go.mod h1:MhP4a3EU7aENRi9aO+tHfTBZicLqQevyi/DJpoj6mi0= -github.com/apache/pulsar-client-go v0.14.0 h1:P7yfAQhQ52OCAu8yVmtdbNQ81vV8bF54S2MLmCPJC9w= -github.com/apache/pulsar-client-go v0.14.0/go.mod h1:PNUE29x9G1EHMvm41Bs2vcqwgv7N8AEjeej+nEVYbX8= -github.com/ardielle/ardielle-go v1.5.2 h1:TilHTpHIQJ27R1Tl/iITBzMwiUGSlVfiVhwDNGM3Zj4= -github.com/ardielle/ardielle-go v1.5.2/go.mod h1:I4hy1n795cUhaVt/ojz83SNVCYIGsAFAONtv2Dr7HUI= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bits-and-blooms/bitset v1.14.3 h1:Gd2c8lSNf9pKXom5JtD7AaKO8o7fGQ2LtFj1436qilA= -github.com/bits-and-blooms/bitset v1.14.3/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= -github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= -github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= -github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/containerd/containerd v1.7.18 h1:jqjZTQNfXGoEaZdW1WwPU0RqSn1Bm2Ay/KJPUuO8nao= -github.com/containerd/containerd v1.7.18/go.mod h1:IYEk9/IO6wAPUz2bCMVUbsfXjzw5UNP5fLz4PsUygQ4= -github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= -github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0= -github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= -github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA= github.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7Ybq9o0BQhMwD0w= -github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= -github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0= -github.com/danieljoos/wincred v1.2.2/go.mod h1:w7w4Utbrz8lqeMbDAK0lkNJUv5sAOkFi7nd/ogr0Uh8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= -github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0= -github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= -github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= -github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= -github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= -github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= -github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= -github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= -github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= -github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= -github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA= -github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= -github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk= -github.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM= -github.com/go-openapi/jsonreference v0.21.2 h1:Wxjda4M/BBQllegefXrY/9aq1fxBA8sI5M/lFU6tSWU= -github.com/go-openapi/jsonreference v0.21.2/go.mod h1:pp3PEjIsJ9CZDGCNOyXIQxsNuroxm8FAJ/+quA0yKzQ= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/go-openapi/swag/jsonname v0.25.1 h1:Sgx+qbwa4ej6AomWC6pEfXrA6uP2RkaNjA9BR8a1RJU= -github.com/go-openapi/swag/jsonname v0.25.1/go.mod h1:71Tekow6UOLBD3wS7XhdT98g5J5GR13NOTQ9/6Q11Zo= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= -github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY= github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 h1:5VipnvEpbqr2gA2VbM+nYVbkIF28c5ZQfqCBQ5g2xfk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0/go.mod h1:Hyl3n6Twe1hvtd9XUXDec4pTvgMSEixRuQKPTMH2bNs= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= -github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= -github.com/hamba/avro/v2 v2.26.0 h1:IaT5l6W3zh7K67sMrT2+RreJyDTllBGVJm4+Hedk9qE= -github.com/hamba/avro/v2 v2.26.0/go.mod h1:I8glyswHnpED3Nlx2ZdUe+4LJnCOOyiCzLMno9i/Uu0= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 h1:/Tnpcb2E0Pz/tN9s3bfEY2Q8ePCEX9iuS+cneUwncnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0/go.mod h1:zOBXOsUaBSjKgmH4OGzV1esUpR3oUSCPYVd2cUBjKYY= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= @@ -151,291 +33,80 @@ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.18.5 h1:/h1gH5Ce+VWNLSWqPzOVn6XBO+vJbCNGvjoaGBFW2IE= -github.com/klauspost/compress v1.18.5/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= -github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= -github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4= -github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4= github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= -github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= -github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= -github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= -github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= -github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= -github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= -github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= -github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= -github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= -github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s= -github.com/oklog/ulid/v2 v2.1.1/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= -github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= -github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= -github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg= -github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c= +github.com/oklog/ulid/v2 v2.1.2 h1:IEclFb9JNvzYA6MW2SCxbLzcHTVsfqm3PrqGQJH5zec= +github.com/oklog/ulid/v2 v2.1.2/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -github.com/pelletier/go-toml/v2 v2.3.1 h1:MYEvvGnQjeNkRF1qUuGolNtNExTDwct51yp7olPtrEc= -github.com/pelletier/go-toml/v2 v2.3.1/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= -github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= -github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= -github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= -github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= -github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= -github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/redis/go-redis/v9 v9.20.0 h1:WnQYxLkgO2xiXTCJY0ldIiI8dNqCDlQAG+AtaH7a2a0= -github.com/redis/go-redis/v9 v9.20.0/go.mod h1:v/M13XI1PVCDcm01VtPFOADfZtHf8YW3baQf57KlIkA= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= -github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4= -github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= +github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -github.com/testcontainers/testcontainers-go v0.32.0 h1:ug1aK08L3gCHdhknlTTwWjPHPS+/alvLJU/DRxTD/ME= -github.com/testcontainers/testcontainers-go v0.32.0/go.mod h1:CRHrzHLQhlXUsa5gXjTOfqIEJcrK5+xMDmBr/WMI88E= -github.com/tklauser/go-sysconf v0.4.0 h1:7H0uAN+7RkwWRaxhYXDLqa5V3LPrJeV8wmD9dRUgPQU= -github.com/tklauser/go-sysconf v0.4.0/go.mod h1:8mTNWyog7H+MpKijp4VmKJAd2bbYQ2zuUwkYRbUArPI= -github.com/tklauser/numcpus v0.12.0 h1:NR85qdvHA9pFse3x3weVZ0r0ST8R6l5RHbZrlRaqob4= -github.com/tklauser/numcpus v0.12.0/go.mod h1:ABHeXzJnr/qqwguhClkZKT1/8VABcYrsyUiUGobwWJg= -github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= -github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= -github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= -github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= -github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= -github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= -github.com/zeromicro/go-zero v1.7.2 h1:a8lyVOG3KXG4LrAy6ZmtJTJtisX4Ostc4Pst4fE704I= -github.com/zeromicro/go-zero v1.7.2/go.mod h1:WFXfF92Exw0O7WECifS6r99JSzv4KEN49x9RhAfgkMc= -go.etcd.io/etcd/api/v3 v3.6.12 h1:OLOZUKEuAA36TR48F0cIaa8FdzrWygjyfrJxXg4iDgs= -go.etcd.io/etcd/api/v3 v3.6.12/go.mod h1:p14EIQXHbuOQbVvL/WEes5uqKnxP9AgKJgpjbMVvzvE= -go.etcd.io/etcd/client/pkg/v3 v3.6.12 h1:36zzB+pQOdHbhN+kH2iJz/K8bJn0ZLtLfPPO7jozTDo= -go.etcd.io/etcd/client/pkg/v3 v3.6.12/go.mod h1:hh2+ZXtfLzs3o6mn92ntgNPBrTJJOvXqICM5g3L3DMY= -go.etcd.io/etcd/client/v3 v3.6.12 h1:kMSP6JcPZMqSJiX+TXdUIBU/4eXEZWBAaui4VihMbIc= -go.etcd.io/etcd/client/v3 v3.6.12/go.mod h1:CMs6fJWYiZQk4ytFjd4lE1diOvvRMmtbbn/alZXd3dQ= +go.etcd.io/etcd/api/v3 v3.7.1 h1:KJG0/DcWGfe3Y1otDf/fsBf0TSSgpxZ5RO/L8SFt73E= +go.etcd.io/etcd/api/v3 v3.7.1/go.mod h1:8bXIpCMeV7E3/XL0Ix123ATn3dB+0V7d9zklHbB0m78= +go.etcd.io/etcd/client/pkg/v3 v3.7.1 h1:rKYsj3pRkR0eK3yjT3XOgrhqfmIfj9pzNgxjh7mfFv4= +go.etcd.io/etcd/client/pkg/v3 v3.7.1/go.mod h1:cnzZGIUzSfjEwLC6UBVsSXlEK1eepS/JUD7wE6PLRT0= +go.etcd.io/etcd/client/v3 v3.7.1 h1:0PEMMC0KuZmVIN+RAbdqfkZ45pYTgKVtmBEbRCvZFUg= +go.etcd.io/etcd/client/v3 v3.7.1/go.mod h1:ffNqALa8tRCYhYo1F9oR489y23K39Gz+BSR3ApAGYq0= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= -go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= -go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= -go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 h1:lsInsfvhVIfOI6qHVyysXMNDnjO9Npvl7tlDPJFBVd4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0/go.mod h1:KQsVNh4OjgjTG0G6EiNi1jVpnaeeKsKMRwbLN+f1+8M= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 h1:m0yTiGDLUvVYaTFbAvCkVYIYcvwKt3G7OLoN77NUs/8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0/go.mod h1:wBQbT4UekBfegL2nx0Xk1vBcnzyBPsIVm9hRG4fYcr4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 h1:umZgi92IyxfXd/l4kaDhnKgY8rnN/cZcF1LKc6I8OQ8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0/go.mod h1:4lVs6obhSVRb1EW5FhOuBTyiQhtRtAnnva9vD3yRfq8= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0 h1:kn1BudCgwtE7PxLqcZkErpD8GKqLZ6BSzeW9QihQJeM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0/go.mod h1:ljkUDtAMdleoi9tIG1R6dJUpVwDcYjw3J2Q6Q/SuiC0= -go.opentelemetry.io/otel/exporters/zipkin v1.30.0 h1:1uYaSfxiCLdJATlGEtYjQe4jZYfqCjVwxeSTMXe8VF4= -go.opentelemetry.io/otel/exporters/zipkin v1.30.0/go.mod h1:r/4BhMc3kiKxD61wGh9J3NVQ3/cZ45F2NHkQgVnql48= -go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= -go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= -go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= -go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= -go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= -go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= -go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= -go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= -go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= +go.opentelemetry.io/otel v1.45.0 h1:pdrWmLHofpubmArBv1LgFSv1Z0Ie/ppdZzu+kUN5EeU= +go.opentelemetry.io/otel v1.45.0/go.mod h1:XZxIqPapzEYnhNSScF5DIqXhm/rYi0FzCe2XddAwZfQ= +go.opentelemetry.io/otel/metric v1.45.0 h1:7Eg1uH7CJ5cXv9is6tnBe1FI6rj1nwUdbFypRm3br/M= +go.opentelemetry.io/otel/metric v1.45.0/go.mod h1:HAPbm1nd3p1PmFH7v2dR+6BjXxw+Lq4a2+pndMAm08s= +go.opentelemetry.io/otel/sdk v1.45.0 h1:4VVSMgQ83dUgW2aoX5f6JgLvHwIvzcuLnF9lUdCSpCw= +go.opentelemetry.io/otel/sdk v1.45.0/go.mod h1:Sr40LgXV7DsKMMJMKOhUWOgMWTfAaqvm2kF0g7ilwuA= +go.opentelemetry.io/otel/sdk/metric v1.45.0 h1:oVFszMfyj1Am6s24Vtc7wBb8BKLcwepJjNEYILuiE3o= +go.opentelemetry.io/otel/sdk/metric v1.45.0/go.mod h1:vUWUxDZvu1WVRj8JA8S0AdhsPrZoDpA2DdZauIh4mDA= +go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOyVhxag= +go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo= go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q= -go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= -go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988= -golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4= -golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= -golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= -golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= -golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= -golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= -golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4= -golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc= -golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38= -golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= -golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c= -golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= +golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE= +golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU= +golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= +golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= +golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs= +golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= -google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa h1:Kjn0N0tCrDgiAFW+lGO4JZ3ck44CehvJQMAwj9QF0G8= -google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:q4lMZS6kskjT5HvCPrnnypcDPVJqT/f4nfxmkE7gryY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1:mZHHdPZl0dbGHCflZgAq/Q468DWVFcU2whhB2KAo8fk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/genproto/googleapis/api v0.0.0-20260807164820-c8921c73eeea h1:Jifw/kjs/r3B0uszvls/m3c3tmZs2YHGM9C+rvxP9gY= +google.golang.org/genproto/googleapis/api v0.0.0-20260807164820-c8921c73eeea/go.mod h1:K/+WGbmBY7aNW1HDw1fJnKYo10i0DkAX6pows00dLig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260807164820-c8921c73eeea h1:kVhQEPTpKQahD5+JSBTfBB19wcgQTTjAIn45MBqnyHk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260807164820-c8921c73eeea/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/grpc v1.83.0 h1:JeNZEKJFbQxArAMl+hiytHauacDNqJUllNfmIMmpqnQ= google.golang.org/grpc v1.83.0/go.mod h1:kDyl6SKsiHKt0uylY5gtn5cEjkrIOhQOGDgIc4JGwzQ= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= -gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/driver/postgres v1.6.0 h1:2dxzU8xJ+ivvqTRph34QX+WrRaJlmfyPqXmoGVjMBa4= -gorm.io/driver/postgres v1.6.0/go.mod h1:vUw0mrGgrTK+uPHEhAdV4sfFELrByKVGnaVRkXDhtWo= +gorm.io/driver/postgres v1.6.2 h1:BvXQ/cNUg63q5TFNg672DmDcowZSFrNLkkA3Xe6GXq4= +gorm.io/driver/postgres v1.6.2/go.mod h1:0c4fQA44XhOklXDkgtuKqysHCycTa5i9e3EIpDGCwXk= gorm.io/driver/sqlite v1.6.0 h1:WHRRrIiulaPiPFmDcod6prc4l2VGVWHz80KspNsxSfQ= gorm.io/driver/sqlite v1.6.0/go.mod h1:AO9V1qIQddBESngQUKWL9yoH93HIeA1X6V633rBwyT8= gorm.io/gorm v1.31.2 h1:3o8FXNo9v9S858gil+3LlZA1LkCOzgb4g5BL64FgaCo= gorm.io/gorm v1.31.2/go.mod h1:XyQVbO2k6YkOis7C2437jSit3SsDK72s7n7rsSHd+Gs= -k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= -k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= -k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= -k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= -k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= -k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= -k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo= -k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= -k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= -k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/module/ec/delivery/internal/config/config.go b/module/ec/delivery/internal/config/config.go index 7566786..485eaee 100644 --- a/module/ec/delivery/internal/config/config.go +++ b/module/ec/delivery/internal/config/config.go @@ -1,14 +1,54 @@ package config import ( - "git.apinb.com/bsm-sdk/engine/types" - "github.com/zeromicro/go-zero/zrpc" + "fmt" + "os" + "path/filepath" + "strings" + + "git.apinb.com/bsm-sdk/core/types" + "gopkg.in/yaml.v3" ) +// Config retains the legacy delivery YAML shape so existing deployments continue to work. +// Cache and Pulsar are deprecated and intentionally ignored because the service never used them. type Config struct { - zrpc.RpcServerConf - DSN string `json:",optional"` - Cache string `json:",optional"` - Anonymous types.AnonymousConf `json:",optional"` - Pulsar types.PulsarConf `json:",optional"` + Name string `yaml:"Name"` + ListenOn string `yaml:"ListenOn"` + DSN string `yaml:"Dsn"` + Cache string `yaml:"Cache"` + Anonymous types.AnonymousConf `yaml:"Anonymous"` + Pulsar types.PulsarConf `yaml:"Pulsar"` +} + +func Load(serviceKey string) (Config, error) { + mode := strings.ToLower(envOr("BlocksMesh_RuntimeMode", "dev")) + prefix := envOr("BlocksMesh_Prefix", ".") + workspace := envOr("BlocksMesh_Workspace", "def") + path := filepath.Join(prefix, "etc", fmt.Sprintf("%s_%s.yaml", serviceKey, mode)) + + data, err := os.ReadFile(path) + if err != nil { + return Config{}, fmt.Errorf("read config %s: %w", path, err) + } + replacer := strings.NewReplacer( + "{ServiceKey}", serviceKey, + "{Workspace}", workspace, + "{RuntimeMode}", mode, + ) + var cfg Config + if err := yaml.Unmarshal([]byte(os.ExpandEnv(replacer.Replace(string(data)))), &cfg); err != nil { + return Config{}, fmt.Errorf("parse config %s: %w", path, err) + } + if cfg.ListenOn == "" { + return Config{}, fmt.Errorf("ListenOn is required in %s", path) + } + return cfg, nil +} + +func envOr(key, fallback string) string { + if value := os.Getenv(key); value != "" { + return value + } + return fallback } diff --git a/module/ec/delivery/internal/impl/cache.go b/module/ec/delivery/internal/impl/cache.go deleted file mode 100644 index f93daff..0000000 --- a/module/ec/delivery/internal/impl/cache.go +++ /dev/null @@ -1,32 +0,0 @@ -package impl - -import ( - "strconv" - "strings" - - "git.apinb.com/bsm-sdk/engine/cache/mem" - "git.apinb.com/bsm-sdk/engine/cache/redis" - "git.apinb.com/bsm-sdk/engine/print" - "git.apinb.com/bsm-sdk/engine/vars" - "github.com/FishGoddess/cachego" -) - -var ( - MemCache *cachego.Cache - RedisCache *redis.RedisClient -) - -func withMemCache() { - m := mem.New() - MemCache = &m -} - -func withRedisCache() { - if Configure.Cache != "" { - addrs := strings.Split(Configure.ListenOn, ":") - port, _ := strconv.Atoi(addrs[1]) - RedisCache = redis.New(Configure.Cache, port) - - print.Info("[Blocks Service] %s Cache: %s, DB Index: %d", vars.ServiceKey, Configure.Cache, RedisCache.DB) - } -} diff --git a/module/ec/delivery/internal/impl/impl.go b/module/ec/delivery/internal/impl/impl.go index 7c28e0c..b4cf388 100644 --- a/module/ec/delivery/internal/impl/impl.go +++ b/module/ec/delivery/internal/impl/impl.go @@ -1,29 +1,21 @@ package impl import ( + "fmt" + "bsm/full/module/ec/delivery/internal/config" - - "git.apinb.com/bsm-sdk/engine/service" ) -var ( - Configure config.Config -) - -func NewService(srvKey string) { - // register service - service.Register(srvKey, &Configure) - service.RegisterAnonymous(&Configure.RpcServerConf, &Configure.Anonymous) - - service.Start(Configure.ListenOn) - - // with activating - withModel() // model - withMemCache() // mem cache - withRedisCache() // redis cache - withPulsar() // mq - pulsar - - // service done. - service.Done(&Configure.Prometheus, &Configure.Telemetry) +var Configure config.Config +func NewService(serviceKey string) error { + cfg, err := config.Load(serviceKey) + if err != nil { + return err + } + Configure = cfg + if err := withModel(); err != nil { + return fmt.Errorf("initialize model: %w", err) + } + return nil } diff --git a/module/ec/delivery/internal/impl/model.go b/module/ec/delivery/internal/impl/model.go index cfb4afa..2ae68b9 100644 --- a/module/ec/delivery/internal/impl/model.go +++ b/module/ec/delivery/internal/impl/model.go @@ -1,21 +1,10 @@ package impl -import ( - "os" +import "bsm/full/module/ec/delivery/internal/models" - "bsm/full/module/ec/delivery/internal/models" - - "git.apinb.com/bsm-sdk/engine/print" - "git.apinb.com/bsm-sdk/engine/vars" -) - -func withModel() { - if Configure.DSN != "" { - err := models.New(Configure.DSN, nil) - if err != nil { - print.Fail("[Blocks Service] %s Model Error: %d", vars.ServiceKey, err.Error()) - os.Exit(0) - } - print.Info("[Blocks Service] %s Database Source: %s", vars.ServiceKey, Configure.DSN) +func withModel() error { + if Configure.DSN == "" { + return nil } + return models.New(Configure.DSN, nil) } diff --git a/module/ec/delivery/internal/impl/mq.go b/module/ec/delivery/internal/impl/mq.go deleted file mode 100644 index c59c8d0..0000000 --- a/module/ec/delivery/internal/impl/mq.go +++ /dev/null @@ -1,24 +0,0 @@ -package impl - -import ( - "os" - - "git.apinb.com/bsm-sdk/engine/print" - "git.apinb.com/bsm-sdk/engine/queue/pulsar" - "git.apinb.com/bsm-sdk/engine/vars" -) - -var MQ *pulsar.Pulsar - -func withPulsar() { - if Configure.Pulsar.IsHas() { - mq, err := pulsar.NewPulsar(&Configure.Pulsar) - if err != nil { - print.Fail("[Blocks Service] %s Pulsar Error: %d", vars.ServiceKey, err.Error()) - os.Exit(0) - } else { - MQ = mq - print.Info("[Blocks Service] %s Queue/Pulsar Endpoint: %s", vars.ServiceKey, Configure.Pulsar.Endpoints) - } - } -} diff --git a/module/ec/delivery/internal/logic/car/car_add_logic.go b/module/ec/delivery/internal/logic/car/car_add_logic.go index 87a9040..bf67504 100644 --- a/module/ec/delivery/internal/logic/car/car_add_logic.go +++ b/module/ec/delivery/internal/logic/car/car_add_logic.go @@ -3,27 +3,29 @@ package deliverylogic import ( "context" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" - "git.apinb.com/bsm-sdk/engine/utils" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" + "git.apinb.com/bsm-sdk/core/utils" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type CarAddLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewCarAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CarAddLogic { return &CarAddLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -51,32 +53,32 @@ func (l *CarAddLogic) CarAdd(in *delivery.CarItem) (*delivery.StatusReply, error err = models.DBService.Create(&data).Error if err != nil { l.Logger.Error(err.Error()) - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } return &delivery.StatusReply{Status: 200, Identity: data.Identity, Message: ""}, nil } func carAddChick(in *delivery.CarItem) error { if in.GetBrand() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetPhone() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } // if in.GetTeamIdentity() == "" { - // return exception.ErrInvalidArgument + // return errcode.ErrInvalidArgument // } if in.GetContacts() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetVersion() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetPicture() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetLicenseNumber() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } return nil } diff --git a/module/ec/delivery/internal/logic/car/car_del_logic.go b/module/ec/delivery/internal/logic/car/car_del_logic.go index 79aa22e..0167eac 100644 --- a/module/ec/delivery/internal/logic/car/car_del_logic.go +++ b/module/ec/delivery/internal/logic/car/car_del_logic.go @@ -3,26 +3,28 @@ package deliverylogic import ( "context" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type CarDelLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewCarDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CarDelLogic { return &CarDelLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -33,14 +35,14 @@ func (l *CarDelLogic) CarDel(in *delivery.IdentRequest) (*delivery.StatusReply, return nil, err } if in.GetIdentity() == "" { - return nil, exception.ErrInvalidArgument + return nil, errcode.ErrInvalidArgument } //Todo: 删除是是否判定有未完成订单不能删除 err = models.DBService.Where("identity = ?", in.Identity).Delete(&models.DeliveryCar{}).Error if err != nil { l.Logger.Error(err.Error()) - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } return &delivery.StatusReply{Status: 200, Identity: in.Identity, Message: ""}, nil } diff --git a/module/ec/delivery/internal/logic/car/car_get_logic.go b/module/ec/delivery/internal/logic/car/car_get_logic.go index 0439713..c04ba5c 100644 --- a/module/ec/delivery/internal/logic/car/car_get_logic.go +++ b/module/ec/delivery/internal/logic/car/car_get_logic.go @@ -4,27 +4,29 @@ import ( "context" "errors" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" "gorm.io/gorm" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type CarGetLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewCarGetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CarGetLogic { return &CarGetLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -35,7 +37,7 @@ func (l *CarGetLogic) CarGet(in *delivery.IdentRequest) (*delivery.CarItem, erro return nil, err } if in.GetIdentity() == "" { - return nil, exception.ErrInvalidArgument + return nil, errcode.ErrInvalidArgument } var data = delivery.CarItem{} @@ -43,9 +45,9 @@ func (l *CarGetLogic) CarGet(in *delivery.IdentRequest) (*delivery.CarItem, erro if err != nil { l.Logger.Error(err.Error()) if errors.Is(err, gorm.ErrRecordNotFound) { - return nil, exception.ErrNotFound + return nil, errcode.ErrRecordNotFound } - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } return &data, nil } diff --git a/module/ec/delivery/internal/logic/car/car_list_logic.go b/module/ec/delivery/internal/logic/car/car_list_logic.go index f83a8f4..204e1d6 100644 --- a/module/ec/delivery/internal/logic/car/car_list_logic.go +++ b/module/ec/delivery/internal/logic/car/car_list_logic.go @@ -4,27 +4,29 @@ import ( "context" "errors" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" "gorm.io/gorm" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type CarListLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewCarListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CarListLogic { return &CarListLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -60,9 +62,9 @@ func (l *CarListLogic) CarList(in *delivery.FetchRequest) (*delivery.CarListRepl if err != nil { l.Logger.Error(err.Error()) if errors.Is(err, gorm.ErrRecordNotFound) { - return nil, exception.ErrNotFound + return nil, errcode.ErrRecordNotFound } - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } for _, v := range res { item := delivery.CarItem{ diff --git a/module/ec/delivery/internal/logic/car/car_set_logic.go b/module/ec/delivery/internal/logic/car/car_set_logic.go index 90ab7c7..5906bb4 100644 --- a/module/ec/delivery/internal/logic/car/car_set_logic.go +++ b/module/ec/delivery/internal/logic/car/car_set_logic.go @@ -3,26 +3,28 @@ package deliverylogic import ( "context" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type CarSetLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewCarSetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CarSetLogic { return &CarSetLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -49,35 +51,35 @@ func (l *CarSetLogic) CarSet(in *delivery.CarItem) (*delivery.StatusReply, error err = models.DBService.Where("identity = ?", in.Identity).Updates(&data).Error if err != nil { l.Logger.Error(err.Error()) - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } return &delivery.StatusReply{Status: 200, Identity: in.Identity, Message: ""}, nil } func carSetChick(in *delivery.CarItem) error { if in.GetIdentity() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetBrand() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetPhone() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } // if in.GetTeamIdentity() == "" { - // return exception.ErrInvalidArgument + // return errcode.ErrInvalidArgument // } if in.GetContacts() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetVersion() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetPicture() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetLicenseNumber() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } return nil } diff --git a/module/ec/delivery/internal/logic/member/member_add_logic.go b/module/ec/delivery/internal/logic/member/member_add_logic.go index 7b4e6b2..223a7a2 100644 --- a/module/ec/delivery/internal/logic/member/member_add_logic.go +++ b/module/ec/delivery/internal/logic/member/member_add_logic.go @@ -3,27 +3,29 @@ package deliverylogic import ( "context" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" - "git.apinb.com/bsm-sdk/engine/utils" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" + "git.apinb.com/bsm-sdk/core/utils" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type MemberAddLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewMemberAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MemberAddLogic { return &MemberAddLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -48,26 +50,26 @@ func (l *MemberAddLogic) MemberAdd(in *delivery.MemberItem) (*delivery.StatusRep err = models.DBService.Create(&data).Error if err != nil { l.Logger.Error(err.Error()) - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } return &delivery.StatusReply{Status: 200, Identity: data.Identity, Message: ""}, nil } func memberAddChick(in *delivery.MemberItem) error { if in.GetName() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetPhone() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } // if in.GetTeamIdentity() == "" { - // return exception.ErrInvalidArgument + // return errcode.ErrInvalidArgument // } if in.GetPicture() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetPhone() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } return nil } diff --git a/module/ec/delivery/internal/logic/member/member_del_logic.go b/module/ec/delivery/internal/logic/member/member_del_logic.go index dce6723..f08e602 100644 --- a/module/ec/delivery/internal/logic/member/member_del_logic.go +++ b/module/ec/delivery/internal/logic/member/member_del_logic.go @@ -3,26 +3,28 @@ package deliverylogic import ( "context" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type MemberDelLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewMemberDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MemberDelLogic { return &MemberDelLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -33,14 +35,14 @@ func (l *MemberDelLogic) MemberDel(in *delivery.IdentRequest) (*delivery.StatusR return nil, err } if in.GetIdentity() == "" { - return nil, exception.ErrInvalidArgument + return nil, errcode.ErrInvalidArgument } //Todo: 删除是是否判定有未完成订单不能删除 err = models.DBService.Where("identity = ?", in.Identity).Delete(&models.DeliveryMember{}).Error if err != nil { l.Logger.Error(err.Error()) - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } return &delivery.StatusReply{Status: 200, Identity: in.Identity, Message: ""}, nil } diff --git a/module/ec/delivery/internal/logic/member/member_get_logic.go b/module/ec/delivery/internal/logic/member/member_get_logic.go index 9ffc41e..9d47e00 100644 --- a/module/ec/delivery/internal/logic/member/member_get_logic.go +++ b/module/ec/delivery/internal/logic/member/member_get_logic.go @@ -4,27 +4,29 @@ import ( "context" "errors" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" "gorm.io/gorm" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type MemberGetLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewMemberGetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MemberGetLogic { return &MemberGetLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -35,7 +37,7 @@ func (l *MemberGetLogic) MemberGet(in *delivery.IdentRequest) (*delivery.MemberI return nil, err } if in.GetIdentity() == "" { - return nil, exception.ErrInvalidArgument + return nil, errcode.ErrInvalidArgument } var data = delivery.MemberItem{} @@ -43,9 +45,9 @@ func (l *MemberGetLogic) MemberGet(in *delivery.IdentRequest) (*delivery.MemberI if err != nil { l.Logger.Error(err.Error()) if errors.Is(err, gorm.ErrRecordNotFound) { - return nil, exception.ErrNotFound + return nil, errcode.ErrRecordNotFound } - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } return &data, nil } diff --git a/module/ec/delivery/internal/logic/member/member_list_logic.go b/module/ec/delivery/internal/logic/member/member_list_logic.go index 5ff6fd4..e708192 100644 --- a/module/ec/delivery/internal/logic/member/member_list_logic.go +++ b/module/ec/delivery/internal/logic/member/member_list_logic.go @@ -4,27 +4,29 @@ import ( "context" "errors" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" "gorm.io/gorm" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type MemberListLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewMemberListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MemberListLogic { return &MemberListLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -60,9 +62,9 @@ func (l *MemberListLogic) MemberList(in *delivery.FetchRequest) (*delivery.Membe if err != nil { l.Logger.Error(err.Error()) if errors.Is(err, gorm.ErrRecordNotFound) { - return nil, exception.ErrNotFound + return nil, errcode.ErrRecordNotFound } - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } for _, v := range res { item := delivery.MemberItem{ diff --git a/module/ec/delivery/internal/logic/member/member_set_logic.go b/module/ec/delivery/internal/logic/member/member_set_logic.go index c1da9e9..f10e575 100644 --- a/module/ec/delivery/internal/logic/member/member_set_logic.go +++ b/module/ec/delivery/internal/logic/member/member_set_logic.go @@ -3,26 +3,28 @@ package deliverylogic import ( "context" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type MemberSetLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewMemberSetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MemberSetLogic { return &MemberSetLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -47,7 +49,7 @@ func (l *MemberSetLogic) MemberSet(in *delivery.MemberItem) (*delivery.StatusRep err = models.DBService.Where("identity = ?", in.Identity).Updates(&data).Error if err != nil { l.Logger.Error(err.Error()) - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } return &delivery.StatusReply{Status: 200, Identity: in.Identity, Message: ""}, nil @@ -55,22 +57,22 @@ func (l *MemberSetLogic) MemberSet(in *delivery.MemberItem) (*delivery.StatusRep func memberSetChick(in *delivery.MemberItem) error { if in.GetIdentity() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetName() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetPhone() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } // if in.GetTeamIdentity() == "" { - // return exception.ErrInvalidArgument + // return errcode.ErrInvalidArgument // } if in.GetPicture() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetPhone() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } return nil } diff --git a/module/ec/delivery/internal/logic/team/team_add_logic.go b/module/ec/delivery/internal/logic/team/team_add_logic.go index 5952d1b..dd5875e 100644 --- a/module/ec/delivery/internal/logic/team/team_add_logic.go +++ b/module/ec/delivery/internal/logic/team/team_add_logic.go @@ -3,27 +3,29 @@ package deliverylogic import ( "context" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" - "git.apinb.com/bsm-sdk/engine/utils" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" + "git.apinb.com/bsm-sdk/core/utils" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type TeamAddLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewTeamAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) *TeamAddLogic { return &TeamAddLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -49,7 +51,7 @@ func (l *TeamAddLogic) TeamAdd(in *delivery.TeamItem) (*delivery.StatusReply, er err = models.DBService.Create(&data).Error if err != nil { l.Logger.Error(err.Error()) - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } return &delivery.StatusReply{Status: 200, Identity: data.Identity, Message: ""}, nil @@ -57,19 +59,19 @@ func (l *TeamAddLogic) TeamAdd(in *delivery.TeamItem) (*delivery.StatusReply, er func teamAddChick(in *delivery.TeamItem) error { if in.GetOwner() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetPhone() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetTitle() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetContacts() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetLogo() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } return nil } diff --git a/module/ec/delivery/internal/logic/team/team_del_logic.go b/module/ec/delivery/internal/logic/team/team_del_logic.go index b5f8ee9..288886a 100644 --- a/module/ec/delivery/internal/logic/team/team_del_logic.go +++ b/module/ec/delivery/internal/logic/team/team_del_logic.go @@ -3,26 +3,28 @@ package deliverylogic import ( "context" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type TeamDelLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewTeamDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *TeamDelLogic { return &TeamDelLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -33,14 +35,14 @@ func (l *TeamDelLogic) TeamDel(in *delivery.IdentRequest) (*delivery.StatusReply return nil, err } if in.GetIdentity() == "" { - return nil, exception.ErrInvalidArgument + return nil, errcode.ErrInvalidArgument } //Todo: 删除是是否判定有成员不能删除 err = models.DBService.Where("identity = ?", in.Identity).Delete(&models.DeliveryItem{}).Error if err != nil { l.Logger.Error(err.Error()) - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } return &delivery.StatusReply{Status: 200, Identity: in.Identity, Message: ""}, nil diff --git a/module/ec/delivery/internal/logic/team/team_get_logic.go b/module/ec/delivery/internal/logic/team/team_get_logic.go index 946460b..ae11a06 100644 --- a/module/ec/delivery/internal/logic/team/team_get_logic.go +++ b/module/ec/delivery/internal/logic/team/team_get_logic.go @@ -4,27 +4,29 @@ import ( "context" "errors" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" "gorm.io/gorm" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type TeamGetLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewTeamGetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *TeamGetLogic { return &TeamGetLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -35,7 +37,7 @@ func (l *TeamGetLogic) TeamGet(in *delivery.IdentRequest) (*delivery.TeamItem, e return nil, err } if in.GetIdentity() == "" { - return nil, exception.ErrInvalidArgument + return nil, errcode.ErrInvalidArgument } var data = delivery.TeamItem{} @@ -43,9 +45,9 @@ func (l *TeamGetLogic) TeamGet(in *delivery.IdentRequest) (*delivery.TeamItem, e if err != nil { l.Logger.Error(err.Error()) if errors.Is(err, gorm.ErrRecordNotFound) { - return nil, exception.ErrNotFound + return nil, errcode.ErrRecordNotFound } - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } return &data, nil } diff --git a/module/ec/delivery/internal/logic/team/team_list_logic.go b/module/ec/delivery/internal/logic/team/team_list_logic.go index b64ecd0..a6740f0 100644 --- a/module/ec/delivery/internal/logic/team/team_list_logic.go +++ b/module/ec/delivery/internal/logic/team/team_list_logic.go @@ -5,27 +5,29 @@ import ( "errors" "fmt" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" "gorm.io/gorm" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type TeamListLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewTeamListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *TeamListLogic { return &TeamListLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -62,10 +64,10 @@ func (l *TeamListLogic) TeamList(in *delivery.FetchRequest) (*delivery.TeamListR fmt.Println("err:", err.Error()) l.Logger.Error(err.Error()) if errors.Is(err, gorm.ErrRecordNotFound) { - return nil, exception.ErrNotFound + return nil, errcode.ErrRecordNotFound } - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } for _, v := range res { item := delivery.TeamItem{ diff --git a/module/ec/delivery/internal/logic/team/team_set_logic.go b/module/ec/delivery/internal/logic/team/team_set_logic.go index 812b73d..505993c 100644 --- a/module/ec/delivery/internal/logic/team/team_set_logic.go +++ b/module/ec/delivery/internal/logic/team/team_set_logic.go @@ -3,26 +3,28 @@ package deliverylogic import ( "context" - "git.apinb.com/bsm-sdk/engine/exception" - "git.apinb.com/bsm-sdk/engine/service" "bsm/full/module/ec/delivery/external/pb/delivery" "bsm/full/module/ec/delivery/internal/models" "bsm/full/module/ec/delivery/internal/svc" + "git.apinb.com/bsm-sdk/core/errcode" + "git.apinb.com/bsm-sdk/core/service" - "github.com/zeromicro/go-zero/core/logx" + "log/slog" + + "bsm/full/shared/logging" ) type TeamSetLogic struct { ctx context.Context svcCtx *svc.ServiceContext - logx.Logger + *slog.Logger } func NewTeamSetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *TeamSetLogic { return &TeamSetLogic{ ctx: ctx, svcCtx: svcCtx, - Logger: logx.WithContext(ctx), + Logger: logging.Context(ctx), } } @@ -47,30 +49,30 @@ func (l *TeamSetLogic) TeamSet(in *delivery.TeamItem) (*delivery.StatusReply, er err = models.DBService.Where("identity = ?", in.Identity).Updates(&data).Error if err != nil { l.Logger.Error(err.Error()) - return nil, exception.ErrDBFatal + return nil, errcode.ErrDB } return &delivery.StatusReply{Status: 200, Identity: in.Identity, Message: ""}, nil } func teamSetChick(in *delivery.TeamItem) error { if in.GetIdentity() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetOwner() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetPhone() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetTitle() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetContacts() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } if in.GetLogo() == "" { - return exception.ErrInvalidArgument + return errcode.ErrInvalidArgument } return nil } diff --git a/module/ec/delivery/internal/models/impl.go b/module/ec/delivery/internal/models/impl.go index 8fd3686..fe5957f 100644 --- a/module/ec/delivery/internal/models/impl.go +++ b/module/ec/delivery/internal/models/impl.go @@ -1,8 +1,8 @@ package models import ( - "git.apinb.com/bsm-sdk/engine/database/sql" - "git.apinb.com/bsm-sdk/engine/types" + "git.apinb.com/bsm-sdk/core/database/sql" + "git.apinb.com/bsm-sdk/core/types" "gorm.io/gorm" ) @@ -19,10 +19,5 @@ func New(dsn string, options *types.SqlOptions) (err error) { if err != nil { return err } - - err = DBService.AutoMigrate(migrateTables...) - if err != nil { - return err - } - return + return DBService.AutoMigrate(migrateTables...) } diff --git a/module/ec/delivery/proto/blocks.proto b/module/ec/delivery/proto/blocks.proto deleted file mode 100644 index a3eb5c8..0000000 --- a/module/ec/delivery/proto/blocks.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; -package feed; -option go_package = "./;feed"; - -message FetchRequest { - int64 page_no=1; // 页数 - int64 page_size=2; // 每页记录数 - map params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11 -} - -message IdentRequest{ - int64 id = 1; // 唯一ID - string identity = 2; // 唯一码 -} - -message VersionRequest { - int64 version=1; // 时序版本号 -} - - -message SearchRequest { - string keyword=1; //关键词 -} - - -message StatusReply{ - int64 status = 1; // 状态码 - string identity=2; // 标识码 - string message=3; //状态说明 - int64 timeseq=4; // 响应时间序列 -} - -message Empty{ -} - diff --git a/module/ec/delivery/proto/car.proto b/module/ec/delivery/proto/car.proto index b72f5e2..419ca18 100644 --- a/module/ec/delivery/proto/car.proto +++ b/module/ec/delivery/proto/car.proto @@ -1,29 +1,29 @@ syntax = "proto3"; package delivery; -option go_package = "./delivery"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/delivery/external/pb/delivery;delivery"; +import "protobuf/blocks.proto"; // Delivery(配送)微服务 service Car { // 配送车辆列表 - rpc CarList(FetchRequest) returns (CarListReply) {}; + rpc CarList(blocks.FetchRequest) returns (CarListReply) {}; // 添加配送车辆信息 - rpc CarAdd(CarItem) returns (StatusReply) {}; - + rpc CarAdd(CarItem) returns (blocks.DeliveryStatusReply) {}; + // 获取配送车辆信息 - rpc CarGet(IdentRequest)returns (CarItem) {}; - + rpc CarGet(blocks.IdentRequest)returns (CarItem) {}; + // 修改配送车辆信息 - rpc CarSet(CarItem) returns (StatusReply) {}; - + rpc CarSet(CarItem) returns (blocks.DeliveryStatusReply) {}; + // 删除配送车辆信息 - rpc CarDel(IdentRequest) returns (StatusReply) {}; - + rpc CarDel(blocks.IdentRequest) returns (blocks.DeliveryStatusReply) {}; + } message CarListReply{ - int64 count = 1; - repeated CarItem list = 2; + int64 count = 1; + repeated CarItem list = 2; } diff --git a/module/ec/delivery/proto/member.proto b/module/ec/delivery/proto/member.proto index eb14c2c..71cf0be 100644 --- a/module/ec/delivery/proto/member.proto +++ b/module/ec/delivery/proto/member.proto @@ -1,24 +1,24 @@ syntax = "proto3"; package delivery; -option go_package = "./delivery"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/delivery/external/pb/delivery;delivery"; +import "protobuf/blocks.proto"; // Delivery(配送)微服务 service Member { // 获取配送员列表 - rpc MemberList(FetchRequest) returns (MemberListReply) {}; + rpc MemberList(blocks.FetchRequest) returns (MemberListReply) {}; // 添加配送员 - rpc MemberAdd(MemberItem) returns (StatusReply) {}; - + rpc MemberAdd(MemberItem) returns (blocks.DeliveryStatusReply) {}; + // 获取配送员数据 - rpc MemberGet(IdentRequest)returns (MemberItem) {}; - + rpc MemberGet(blocks.IdentRequest)returns (MemberItem) {}; + // 修改配送员 - rpc MemberSet(MemberItem) returns (StatusReply) {}; - + rpc MemberSet(MemberItem) returns (blocks.DeliveryStatusReply) {}; + // 删除配送员 - rpc MemberDel(IdentRequest) returns (StatusReply) {}; + rpc MemberDel(blocks.IdentRequest) returns (blocks.DeliveryStatusReply) {}; } message MemberItem{ string identity = 1; // 唯一标识 @@ -30,6 +30,6 @@ message MemberItem{ int64 turnover = 7; // 总成交量 } message MemberListReply{ - int64 count = 1; - repeated MemberItem list = 2; + int64 count = 1; + repeated MemberItem list = 2; } \ No newline at end of file diff --git a/module/ec/delivery/proto/team.proto b/module/ec/delivery/proto/team.proto index 51638b3..2a2a59d 100644 --- a/module/ec/delivery/proto/team.proto +++ b/module/ec/delivery/proto/team.proto @@ -1,30 +1,30 @@ syntax = "proto3"; package delivery; -option go_package = "./delivery"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/delivery/external/pb/delivery;delivery"; +import "protobuf/blocks.proto"; // Delivery(配送)微服务 service Team { // 配送团队列表 - rpc TeamList(FetchRequest) returns (TeamListReply) {}; + rpc TeamList(blocks.FetchRequest) returns (TeamListReply) {}; // 添加配送团队 - rpc TeamAdd(TeamItem) returns (StatusReply) {}; + rpc TeamAdd(TeamItem) returns (blocks.DeliveryStatusReply) {}; // 配送团队详情 - rpc TeamGet(IdentRequest) returns (TeamItem) {}; + rpc TeamGet(blocks.IdentRequest) returns (TeamItem) {}; // 修改配送团队信息 - rpc TeamSet(TeamItem) returns (StatusReply) {}; + rpc TeamSet(TeamItem) returns (blocks.DeliveryStatusReply) {}; // 删除配送团队 - rpc TeamDel(IdentRequest) returns (StatusReply) {}; + rpc TeamDel(blocks.IdentRequest) returns (blocks.DeliveryStatusReply) {}; } message TeamListReply{ - int64 count = 1; - repeated TeamItem list = 2; + int64 count = 1; + repeated TeamItem list = 2; } message TeamItem{ string identity = 1; // 唯一标识 diff --git a/module/ec/delivery/test/rpc/basic.go b/module/ec/delivery/test/rpc/basic.go index d8dcad6..1c7dd7e 100644 --- a/module/ec/delivery/test/rpc/basic.go +++ b/module/ec/delivery/test/rpc/basic.go @@ -4,7 +4,7 @@ import ( "context" "os" - "git.apinb.com/bsm-sdk/engine/utils" + "git.apinb.com/bsm-sdk/core/utils" "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) diff --git a/module/ec/mall/pb/ads.pb.go b/module/ec/mall/pb/ads.pb.go index 3aa2a11..63d0991 100644 --- a/module/ec/mall/pb/ads.pb.go +++ b/module/ec/mall/pb/ads.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: ads.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/mall/proto/ads.proto package mall import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -31,7 +32,7 @@ type ByPosRequest struct { func (x *ByPosRequest) Reset() { *x = ByPosRequest{} - mi := &file_ads_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_ads_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -43,7 +44,7 @@ func (x *ByPosRequest) String() string { func (*ByPosRequest) ProtoMessage() {} func (x *ByPosRequest) ProtoReflect() protoreflect.Message { - mi := &file_ads_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_ads_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -56,7 +57,7 @@ func (x *ByPosRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ByPosRequest.ProtoReflect.Descriptor instead. func (*ByPosRequest) Descriptor() ([]byte, []int) { - return file_ads_proto_rawDescGZIP(), []int{0} + return file_module_ec_mall_proto_ads_proto_rawDescGZIP(), []int{0} } func (x *ByPosRequest) GetPosKey() []string { @@ -84,7 +85,7 @@ type AdsListReply struct { func (x *AdsListReply) Reset() { *x = AdsListReply{} - mi := &file_ads_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_ads_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -96,7 +97,7 @@ func (x *AdsListReply) String() string { func (*AdsListReply) ProtoMessage() {} func (x *AdsListReply) ProtoReflect() protoreflect.Message { - mi := &file_ads_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_ads_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109,7 +110,7 @@ func (x *AdsListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use AdsListReply.ProtoReflect.Descriptor instead. func (*AdsListReply) Descriptor() ([]byte, []int) { - return file_ads_proto_rawDescGZIP(), []int{1} + return file_module_ec_mall_proto_ads_proto_rawDescGZIP(), []int{1} } func (x *AdsListReply) GetData() []*AdsItem { @@ -142,7 +143,7 @@ type AdsItem struct { func (x *AdsItem) Reset() { *x = AdsItem{} - mi := &file_ads_proto_msgTypes[2] + mi := &file_module_ec_mall_proto_ads_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -154,7 +155,7 @@ func (x *AdsItem) String() string { func (*AdsItem) ProtoMessage() {} func (x *AdsItem) ProtoReflect() protoreflect.Message { - mi := &file_ads_proto_msgTypes[2] + mi := &file_module_ec_mall_proto_ads_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -167,7 +168,7 @@ func (x *AdsItem) ProtoReflect() protoreflect.Message { // Deprecated: Use AdsItem.ProtoReflect.Descriptor instead. func (*AdsItem) Descriptor() ([]byte, []int) { - return file_ads_proto_rawDescGZIP(), []int{2} + return file_module_ec_mall_proto_ads_proto_rawDescGZIP(), []int{2} } func (x *AdsItem) GetId() int64 { @@ -226,11 +227,11 @@ func (x *AdsItem) GetStatus() int64 { return 0 } -var File_ads_proto protoreflect.FileDescriptor +var File_module_ec_mall_proto_ads_proto protoreflect.FileDescriptor -const file_ads_proto_rawDesc = "" + +const file_module_ec_mall_proto_ads_proto_rawDesc = "" + "\n" + - "\x11ec/mall/ads.proto\x12\x04mall\x1a\x11mall/blocks.proto\"P\n" + + "\x1emodule/ec/mall/proto/ads.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"P\n" + "\fByPosRequest\x12\x18\n" + "\apos_key\x18\x01 \x03(\tR\apos_key\x12&\n" + "\x0estore_identity\x18\x02 \x01(\tR\x0estore_identity\"G\n" + @@ -247,47 +248,47 @@ const file_ads_proto_rawDesc = "" + "\n" + "created_at\x18\a \x01(\tR\n" + "created_at\x12\x16\n" + - "\x06status\x18\b \x01(\x03R\x06status2\xfa\x01\n" + + "\x06status\x18\b \x01(\x03R\x06status2\xa0\x02\n" + "\x03Ads\x121\n" + - "\x05ByPos\x12\x12.mall.ByPosRequest\x1a\x12.mall.AdsListReply\"\x00\x121\n" + - "\x05Fetch\x12\x12.mall.FetchRequest\x1a\x12.mall.AdsListReply\"\x00\x12,\n" + - "\x06Create\x12\r.mall.AdsItem\x1a\x11.mall.StatusReply\"\x00\x12,\n" + - "\x06Modify\x12\r.mall.AdsItem\x1a\x11.mall.StatusReply\"\x00\x121\n" + - "\x06Delete\x12\x12.mall.IdentRequest\x1a\x11.mall.StatusReply\"\x00B\bZ\x06.;mallb\x06proto3" + "\x05ByPos\x12\x12.mall.ByPosRequest\x1a\x12.mall.AdsListReply\"\x00\x127\n" + + "\x05Fetch\x12\x18.blocks.MallFetchRequest\x1a\x12.mall.AdsListReply\"\x00\x126\n" + + "\x06Create\x12\r.mall.AdsItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x126\n" + + "\x06Modify\x12\r.mall.AdsItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12=\n" + + "\x06Delete\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00B!Z\x1fbsm/full/module/ec/mall/pb;mallb\x06proto3" var ( - file_ads_proto_rawDescOnce sync.Once - file_ads_proto_rawDescData []byte + file_module_ec_mall_proto_ads_proto_rawDescOnce sync.Once + file_module_ec_mall_proto_ads_proto_rawDescData []byte ) -func file_ads_proto_rawDescGZIP() []byte { - file_ads_proto_rawDescOnce.Do(func() { - file_ads_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ads_proto_rawDesc), len(file_ads_proto_rawDesc))) +func file_module_ec_mall_proto_ads_proto_rawDescGZIP() []byte { + file_module_ec_mall_proto_ads_proto_rawDescOnce.Do(func() { + file_module_ec_mall_proto_ads_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_ads_proto_rawDesc), len(file_module_ec_mall_proto_ads_proto_rawDesc))) }) - return file_ads_proto_rawDescData + return file_module_ec_mall_proto_ads_proto_rawDescData } -var file_ads_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_ads_proto_goTypes = []any{ - (*ByPosRequest)(nil), // 0: mall.ByPosRequest - (*AdsListReply)(nil), // 1: mall.AdsListReply - (*AdsItem)(nil), // 2: mall.AdsItem - (*FetchRequest)(nil), // 3: mall.FetchRequest - (*IdentRequest)(nil), // 4: mall.IdentRequest - (*StatusReply)(nil), // 5: mall.StatusReply +var file_module_ec_mall_proto_ads_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_module_ec_mall_proto_ads_proto_goTypes = []any{ + (*ByPosRequest)(nil), // 0: mall.ByPosRequest + (*AdsListReply)(nil), // 1: mall.AdsListReply + (*AdsItem)(nil), // 2: mall.AdsItem + (*protobuf.MallFetchRequest)(nil), // 3: blocks.MallFetchRequest + (*protobuf.IdentRequest)(nil), // 4: blocks.IdentRequest + (*protobuf.IdentityStatusReply)(nil), // 5: blocks.IdentityStatusReply } -var file_ads_proto_depIdxs = []int32{ +var file_module_ec_mall_proto_ads_proto_depIdxs = []int32{ 2, // 0: mall.AdsListReply.data:type_name -> mall.AdsItem 0, // 1: mall.Ads.ByPos:input_type -> mall.ByPosRequest - 3, // 2: mall.Ads.Fetch:input_type -> mall.FetchRequest + 3, // 2: mall.Ads.Fetch:input_type -> blocks.MallFetchRequest 2, // 3: mall.Ads.Create:input_type -> mall.AdsItem 2, // 4: mall.Ads.Modify:input_type -> mall.AdsItem - 4, // 5: mall.Ads.Delete:input_type -> mall.IdentRequest + 4, // 5: mall.Ads.Delete:input_type -> blocks.IdentRequest 1, // 6: mall.Ads.ByPos:output_type -> mall.AdsListReply 1, // 7: mall.Ads.Fetch:output_type -> mall.AdsListReply - 5, // 8: mall.Ads.Create:output_type -> mall.StatusReply - 5, // 9: mall.Ads.Modify:output_type -> mall.StatusReply - 5, // 10: mall.Ads.Delete:output_type -> mall.StatusReply + 5, // 8: mall.Ads.Create:output_type -> blocks.IdentityStatusReply + 5, // 9: mall.Ads.Modify:output_type -> blocks.IdentityStatusReply + 5, // 10: mall.Ads.Delete:output_type -> blocks.IdentityStatusReply 6, // [6:11] is the sub-list for method output_type 1, // [1:6] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -295,27 +296,26 @@ var file_ads_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_ads_proto_init() } -func file_ads_proto_init() { - if File_ads_proto != nil { +func init() { file_module_ec_mall_proto_ads_proto_init() } +func file_module_ec_mall_proto_ads_proto_init() { + if File_module_ec_mall_proto_ads_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_ads_proto_rawDesc), len(file_ads_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_ads_proto_rawDesc), len(file_module_ec_mall_proto_ads_proto_rawDesc)), NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_ads_proto_goTypes, - DependencyIndexes: file_ads_proto_depIdxs, - MessageInfos: file_ads_proto_msgTypes, + GoTypes: file_module_ec_mall_proto_ads_proto_goTypes, + DependencyIndexes: file_module_ec_mall_proto_ads_proto_depIdxs, + MessageInfos: file_module_ec_mall_proto_ads_proto_msgTypes, }.Build() - File_ads_proto = out.File - file_ads_proto_goTypes = nil - file_ads_proto_depIdxs = nil + File_module_ec_mall_proto_ads_proto = out.File + file_module_ec_mall_proto_ads_proto_goTypes = nil + file_module_ec_mall_proto_ads_proto_depIdxs = nil } diff --git a/module/ec/mall/pb/ads.pb.gw.go b/module/ec/mall/pb/ads.pb.gw.go index 3e7f405..76091dc 100644 --- a/module/ec/mall/pb/ads.pb.gw.go +++ b/module/ec/mall/pb/ads.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: ads.proto +// source: module/ec/mall/proto/ads.proto /* Package mall is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package mall import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -64,7 +65,7 @@ func local_request_Ads_ByPos_0(ctx context.Context, marshaler runtime.Marshaler, func request_Ads_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client AdsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Ads_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, clien func local_request_Ads_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server AdsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -145,7 +146,7 @@ func local_request_Ads_Modify_0(ctx context.Context, marshaler runtime.Marshaler func request_Ads_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client AdsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -160,7 +161,7 @@ func request_Ads_Delete_0(ctx context.Context, marshaler runtime.Marshaler, clie func local_request_Ads_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server AdsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/ec/mall/pb/ads_grpc.pb.go b/module/ec/mall/pb/ads_grpc.pb.go index d9fb986..6d7ac87 100644 --- a/module/ec/mall/pb/ads_grpc.pb.go +++ b/module/ec/mall/pb/ads_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: ads.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/mall/proto/ads.proto package mall import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -32,16 +33,16 @@ const ( // // Store(店铺)微服务 - 广告 type AdsClient interface { - //通过广告位获取广告信息 + // 通过广告位获取广告信息 ByPos(ctx context.Context, in *ByPosRequest, opts ...grpc.CallOption) (*AdsListReply, error) // 广告列表 - Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*AdsListReply, error) + Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*AdsListReply, error) // 新建广告 - Create(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 修改广告 - Modify(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*StatusReply, error) + Modify(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 删除广告 - Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) } type adsClient struct { @@ -62,7 +63,7 @@ func (c *adsClient) ByPos(ctx context.Context, in *ByPosRequest, opts ...grpc.Ca return out, nil } -func (c *adsClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*AdsListReply, error) { +func (c *adsClient) Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*AdsListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AdsListReply) err := c.cc.Invoke(ctx, Ads_Fetch_FullMethodName, in, out, cOpts...) @@ -72,9 +73,9 @@ func (c *adsClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.Ca return out, nil } -func (c *adsClient) Create(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *adsClient) Create(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Ads_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -82,9 +83,9 @@ func (c *adsClient) Create(ctx context.Context, in *AdsItem, opts ...grpc.CallOp return out, nil } -func (c *adsClient) Modify(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *adsClient) Modify(ctx context.Context, in *AdsItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Ads_Modify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -92,9 +93,9 @@ func (c *adsClient) Modify(ctx context.Context, in *AdsItem, opts ...grpc.CallOp return out, nil } -func (c *adsClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *adsClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Ads_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -103,25 +104,24 @@ func (c *adsClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.C } // AdsServer is the server API for Ads service. -// All implementations must embed UnimplementedAdsServer +// All implementations should embed UnimplementedAdsServer // for forward compatibility. // // Store(店铺)微服务 - 广告 type AdsServer interface { - //通过广告位获取广告信息 + // 通过广告位获取广告信息 ByPos(context.Context, *ByPosRequest) (*AdsListReply, error) // 广告列表 - Fetch(context.Context, *FetchRequest) (*AdsListReply, error) + Fetch(context.Context, *protobuf.MallFetchRequest) (*AdsListReply, error) // 新建广告 - Create(context.Context, *AdsItem) (*StatusReply, error) + Create(context.Context, *AdsItem) (*protobuf.IdentityStatusReply, error) // 修改广告 - Modify(context.Context, *AdsItem) (*StatusReply, error) + Modify(context.Context, *AdsItem) (*protobuf.IdentityStatusReply, error) // 删除广告 - Delete(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedAdsServer() + Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) } -// UnimplementedAdsServer must be embedded to have +// UnimplementedAdsServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -129,22 +129,21 @@ type AdsServer interface { type UnimplementedAdsServer struct{} func (UnimplementedAdsServer) ByPos(context.Context, *ByPosRequest) (*AdsListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ByPos not implemented") + return nil, status.Error(codes.Unimplemented, "method ByPos not implemented") } -func (UnimplementedAdsServer) Fetch(context.Context, *FetchRequest) (*AdsListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") +func (UnimplementedAdsServer) Fetch(context.Context, *protobuf.MallFetchRequest) (*AdsListReply, error) { + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedAdsServer) Create(context.Context, *AdsItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +func (UnimplementedAdsServer) Create(context.Context, *AdsItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedAdsServer) Modify(context.Context, *AdsItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented") +func (UnimplementedAdsServer) Modify(context.Context, *AdsItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } -func (UnimplementedAdsServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +func (UnimplementedAdsServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedAdsServer) mustEmbedUnimplementedAdsServer() {} -func (UnimplementedAdsServer) testEmbeddedByValue() {} +func (UnimplementedAdsServer) testEmbeddedByValue() {} // UnsafeAdsServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AdsServer will @@ -154,7 +153,7 @@ type UnsafeAdsServer interface { } func RegisterAdsServer(s grpc.ServiceRegistrar, srv AdsServer) { - // If the following call pancis, it indicates UnimplementedAdsServer was + // If the following call panics, it indicates UnimplementedAdsServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -183,7 +182,7 @@ func _Ads_ByPos_Handler(srv interface{}, ctx context.Context, dec func(interface } func _Ads_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.MallFetchRequest) if err := dec(in); err != nil { return nil, err } @@ -195,7 +194,7 @@ func _Ads_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface FullMethod: Ads_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdsServer).Fetch(ctx, req.(*FetchRequest)) + return srv.(AdsServer).Fetch(ctx, req.(*protobuf.MallFetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -237,7 +236,7 @@ func _Ads_Modify_Handler(srv interface{}, ctx context.Context, dec func(interfac } func _Ads_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -249,7 +248,7 @@ func _Ads_Delete_Handler(srv interface{}, ctx context.Context, dec func(interfac FullMethod: Ads_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdsServer).Delete(ctx, req.(*IdentRequest)) + return srv.(AdsServer).Delete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -283,5 +282,5 @@ var Ads_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "ads.proto", + Metadata: "module/ec/mall/proto/ads.proto", } diff --git a/module/ec/mall/pb/blocks.pb.go b/module/ec/mall/pb/blocks.pb.go deleted file mode 100644 index 5ab4ce2..0000000 --- a/module/ec/mall/pb/blocks.pb.go +++ /dev/null @@ -1,518 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: blocks.proto - -package mall - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Empty struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Empty) Reset() { - *x = Empty{} - mi := &file_blocks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Empty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Empty) ProtoMessage() {} - -func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{0} -} - -type FetchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PageNo int64 `protobuf:"varint,1,opt,name=page_no,proto3" json:"page_no,omitempty"` // 页数 - PageSize int64 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // 每页记录数 - Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:categoryId=?,vlaue=11 - StoreIdentity string `protobuf:"bytes,4,opt,name=store_identity,proto3" json:"store_identity,omitempty"` // 店铺唯一标识 - Keyword string `protobuf:"bytes,5,opt,name=keyword,proto3" json:"keyword,omitempty"` // 关键词 - CategoryId []int64 `protobuf:"varint,6,rep,packed,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` // 分类ID - Sort string `protobuf:"bytes,7,opt,name=sort,proto3" json:"sort,omitempty"` // 排序字段 - MinPrice int64 `protobuf:"varint,8,opt,name=min_price,proto3" json:"min_price,omitempty"` // 最小价格 - MaxPrice int64 `protobuf:"varint,9,opt,name=max_price,proto3" json:"max_price,omitempty"` // 最大价格 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchRequest) Reset() { - *x = FetchRequest{} - mi := &file_blocks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRequest) ProtoMessage() {} - -func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. -func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{1} -} - -func (x *FetchRequest) GetPageNo() int64 { - if x != nil { - return x.PageNo - } - return 0 -} - -func (x *FetchRequest) GetPageSize() int64 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *FetchRequest) GetParams() map[string]string { - if x != nil { - return x.Params - } - return nil -} - -func (x *FetchRequest) GetStoreIdentity() string { - if x != nil { - return x.StoreIdentity - } - return "" -} - -func (x *FetchRequest) GetKeyword() string { - if x != nil { - return x.Keyword - } - return "" -} - -func (x *FetchRequest) GetCategoryId() []int64 { - if x != nil { - return x.CategoryId - } - return nil -} - -func (x *FetchRequest) GetSort() string { - if x != nil { - return x.Sort - } - return "" -} - -func (x *FetchRequest) GetMinPrice() int64 { - if x != nil { - return x.MinPrice - } - return 0 -} - -func (x *FetchRequest) GetMaxPrice() int64 { - if x != nil { - return x.MaxPrice - } - return 0 -} - -type IdentRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IdentRequest) Reset() { - *x = IdentRequest{} - mi := &file_blocks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IdentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IdentRequest) ProtoMessage() {} - -func (x *IdentRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. -func (*IdentRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{2} -} - -func (x *IdentRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *IdentRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -type StoreSerialRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - StoreIdentity string `protobuf:"bytes,1,opt,name=store_identity,proto3" json:"store_identity,omitempty"` // 店铺Identity - SerialId []string `protobuf:"bytes,2,rep,name=serial_id,proto3" json:"serial_id,omitempty"` // 序列Identity - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StoreSerialRequest) Reset() { - *x = StoreSerialRequest{} - mi := &file_blocks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StoreSerialRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StoreSerialRequest) ProtoMessage() {} - -func (x *StoreSerialRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StoreSerialRequest.ProtoReflect.Descriptor instead. -func (*StoreSerialRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{3} -} - -func (x *StoreSerialRequest) GetStoreIdentity() string { - if x != nil { - return x.StoreIdentity - } - return "" -} - -func (x *StoreSerialRequest) GetSerialId() []string { - if x != nil { - return x.SerialId - } - return nil -} - -type StatusReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // 状态码 - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 标识码 - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` //状态说明 - Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusReply) Reset() { - *x = StatusReply{} - mi := &file_blocks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusReply) ProtoMessage() {} - -func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. -func (*StatusReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{4} -} - -func (x *StatusReply) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *StatusReply) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *StatusReply) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *StatusReply) GetTimeseq() int64 { - if x != nil { - return x.Timeseq - } - return 0 -} - -type VersionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 时序版本号 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *VersionRequest) Reset() { - *x = VersionRequest{} - mi := &file_blocks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *VersionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersionRequest) ProtoMessage() {} - -func (x *VersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. -func (*VersionRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{5} -} - -func (x *VersionRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type SearchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` //关键词 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchRequest) Reset() { - *x = SearchRequest{} - mi := &file_blocks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchRequest) ProtoMessage() {} - -func (x *SearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. -func (*SearchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{6} -} - -func (x *SearchRequest) GetKeyword() string { - if x != nil { - return x.Keyword - } - return "" -} - -var File_blocks_proto protoreflect.FileDescriptor - -const file_blocks_proto_rawDesc = "" + - "\n" + - "\x11mall/blocks.proto\x12\x04mall\"\a\n" + - "\x05Empty\"\xec\x02\n" + - "\fFetchRequest\x12\x18\n" + - "\apage_no\x18\x01 \x01(\x03R\apage_no\x12\x1c\n" + - "\tpage_size\x18\x02 \x01(\x03R\tpage_size\x126\n" + - "\x06params\x18\x03 \x03(\v2\x1e.mall.FetchRequest.ParamsEntryR\x06params\x12&\n" + - "\x0estore_identity\x18\x04 \x01(\tR\x0estore_identity\x12\x18\n" + - "\akeyword\x18\x05 \x01(\tR\akeyword\x12\x1f\n" + - "\vcategory_id\x18\x06 \x03(\x03R\n" + - "categoryId\x12\x12\n" + - "\x04sort\x18\a \x01(\tR\x04sort\x12\x1c\n" + - "\tmin_price\x18\b \x01(\x03R\tmin_price\x12\x1c\n" + - "\tmax_price\x18\t \x01(\x03R\tmax_price\x1a9\n" + - "\vParamsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" + - "\fIdentRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\"Z\n" + - "\x12StoreSerialRequest\x12&\n" + - "\x0estore_identity\x18\x01 \x01(\tR\x0estore_identity\x12\x1c\n" + - "\tserial_id\x18\x02 \x03(\tR\tserial_id\"q\n" + - "\vStatusReply\x12\x12\n" + - "\x04code\x18\x01 \x01(\x05R\x04code\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x18\n" + - "\amessage\x18\x03 \x01(\tR\amessage\x12\x18\n" + - "\atimeseq\x18\x04 \x01(\x03R\atimeseq\"*\n" + - "\x0eVersionRequest\x12\x18\n" + - "\aversion\x18\x01 \x01(\x03R\aversion\")\n" + - "\rSearchRequest\x12\x18\n" + - "\akeyword\x18\x01 \x01(\tR\akeywordB\bZ\x06.;mallb\x06proto3" - -var ( - file_blocks_proto_rawDescOnce sync.Once - file_blocks_proto_rawDescData []byte -) - -func file_blocks_proto_rawDescGZIP() []byte { - file_blocks_proto_rawDescOnce.Do(func() { - file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc))) - }) - return file_blocks_proto_rawDescData -} - -var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_blocks_proto_goTypes = []any{ - (*Empty)(nil), // 0: mall.Empty - (*FetchRequest)(nil), // 1: mall.FetchRequest - (*IdentRequest)(nil), // 2: mall.IdentRequest - (*StoreSerialRequest)(nil), // 3: mall.StoreSerialRequest - (*StatusReply)(nil), // 4: mall.StatusReply - (*VersionRequest)(nil), // 5: mall.VersionRequest - (*SearchRequest)(nil), // 6: mall.SearchRequest - nil, // 7: mall.FetchRequest.ParamsEntry -} -var file_blocks_proto_depIdxs = []int32{ - 7, // 0: mall.FetchRequest.params:type_name -> mall.FetchRequest.ParamsEntry - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_blocks_proto_init() } -func file_blocks_proto_init() { - if File_blocks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_blocks_proto_goTypes, - DependencyIndexes: file_blocks_proto_depIdxs, - MessageInfos: file_blocks_proto_msgTypes, - }.Build() - File_blocks_proto = out.File - file_blocks_proto_goTypes = nil - file_blocks_proto_depIdxs = nil -} diff --git a/module/ec/mall/pb/blocks_compat.go b/module/ec/mall/pb/blocks_compat.go new file mode 100644 index 0000000..92c4a29 --- /dev/null +++ b/module/ec/mall/pb/blocks_compat.go @@ -0,0 +1,11 @@ +package mall + +import blocks "bsm/full/protobuf" + +type Empty = blocks.Empty +type FetchRequest = blocks.MallFetchRequest +type IdentRequest = blocks.IdentRequest +type StoreSerialRequest = blocks.StoreSerialRequest +type StatusReply = blocks.IdentityStatusReply +type VersionRequest = blocks.VersionRequest +type SearchRequest = blocks.SearchRequest diff --git a/module/ec/mall/pb/category.pb.go b/module/ec/mall/pb/category.pb.go index 30f7a3b..d8d410a 100644 --- a/module/ec/mall/pb/category.pb.go +++ b/module/ec/mall/pb/category.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: category.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/mall/proto/category.proto package mall import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -33,7 +34,7 @@ type CategoryFetchRequest struct { func (x *CategoryFetchRequest) Reset() { *x = CategoryFetchRequest{} - mi := &file_category_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_category_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -45,7 +46,7 @@ func (x *CategoryFetchRequest) String() string { func (*CategoryFetchRequest) ProtoMessage() {} func (x *CategoryFetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_category_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_category_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -58,7 +59,7 @@ func (x *CategoryFetchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CategoryFetchRequest.ProtoReflect.Descriptor instead. func (*CategoryFetchRequest) Descriptor() ([]byte, []int) { - return file_category_proto_rawDescGZIP(), []int{0} + return file_module_ec_mall_proto_category_proto_rawDescGZIP(), []int{0} } func (x *CategoryFetchRequest) GetTypes() string { @@ -99,7 +100,7 @@ type CategoryReply struct { func (x *CategoryReply) Reset() { *x = CategoryReply{} - mi := &file_category_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_category_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -111,7 +112,7 @@ func (x *CategoryReply) String() string { func (*CategoryReply) ProtoMessage() {} func (x *CategoryReply) ProtoReflect() protoreflect.Message { - mi := &file_category_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_category_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -124,7 +125,7 @@ func (x *CategoryReply) ProtoReflect() protoreflect.Message { // Deprecated: Use CategoryReply.ProtoReflect.Descriptor instead. func (*CategoryReply) Descriptor() ([]byte, []int) { - return file_category_proto_rawDescGZIP(), []int{1} + return file_module_ec_mall_proto_category_proto_rawDescGZIP(), []int{1} } func (x *CategoryReply) GetCount() int64 { @@ -162,7 +163,7 @@ type CategoryItem struct { func (x *CategoryItem) Reset() { *x = CategoryItem{} - mi := &file_category_proto_msgTypes[2] + mi := &file_module_ec_mall_proto_category_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -174,7 +175,7 @@ func (x *CategoryItem) String() string { func (*CategoryItem) ProtoMessage() {} func (x *CategoryItem) ProtoReflect() protoreflect.Message { - mi := &file_category_proto_msgTypes[2] + mi := &file_module_ec_mall_proto_category_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -187,7 +188,7 @@ func (x *CategoryItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CategoryItem.ProtoReflect.Descriptor instead. func (*CategoryItem) Descriptor() ([]byte, []int) { - return file_category_proto_rawDescGZIP(), []int{2} + return file_module_ec_mall_proto_category_proto_rawDescGZIP(), []int{2} } func (x *CategoryItem) GetId() int64 { @@ -281,11 +282,11 @@ func (x *CategoryItem) GetKeys() string { return "" } -var File_category_proto protoreflect.FileDescriptor +var File_module_ec_mall_proto_category_proto protoreflect.FileDescriptor -const file_category_proto_rawDesc = "" + +const file_module_ec_mall_proto_category_proto_rawDesc = "" + "\n" + - "\x16ec/mall/category.proto\x12\x04mall\x1a\x11mall/blocks.proto\"\x80\x01\n" + + "#module/ec/mall/proto/category.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"\x80\x01\n" + "\x14CategoryFetchRequest\x12\x14\n" + "\x05types\x18\x01 \x01(\tR\x05types\x12\x1a\n" + "\bkeywords\x18\x02 \x01(\tR\bkeywords\x12\x0e\n" + @@ -312,44 +313,44 @@ const file_category_proto_rawDesc = "" + "\n" + "categories\x18\f \x03(\v2\x12.mall.CategoryItemR\n" + "categories\x12\x12\n" + - "\x04keys\x18\r \x01(\tR\x04keys2\xdf\x01\n" + + "\x04keys\x18\r \x01(\tR\x04keys2\xff\x01\n" + "\bCategory\x12:\n" + - "\x05Fetch\x12\x1a.mall.CategoryFetchRequest\x1a\x13.mall.CategoryReply\"\x00\x121\n" + - "\x06Create\x12\x12.mall.CategoryItem\x1a\x11.mall.StatusReply\"\x00\x121\n" + - "\x06Delete\x12\x12.mall.IdentRequest\x1a\x11.mall.StatusReply\"\x00\x121\n" + - "\x06Modify\x12\x12.mall.CategoryItem\x1a\x11.mall.StatusReply\"\x00B\bZ\x06.;mallb\x06proto3" + "\x05Fetch\x12\x1a.mall.CategoryFetchRequest\x1a\x13.mall.CategoryReply\"\x00\x12;\n" + + "\x06Create\x12\x12.mall.CategoryItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12=\n" + + "\x06Delete\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12;\n" + + "\x06Modify\x12\x12.mall.CategoryItem\x1a\x1b.blocks.IdentityStatusReply\"\x00B!Z\x1fbsm/full/module/ec/mall/pb;mallb\x06proto3" var ( - file_category_proto_rawDescOnce sync.Once - file_category_proto_rawDescData []byte + file_module_ec_mall_proto_category_proto_rawDescOnce sync.Once + file_module_ec_mall_proto_category_proto_rawDescData []byte ) -func file_category_proto_rawDescGZIP() []byte { - file_category_proto_rawDescOnce.Do(func() { - file_category_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_category_proto_rawDesc), len(file_category_proto_rawDesc))) +func file_module_ec_mall_proto_category_proto_rawDescGZIP() []byte { + file_module_ec_mall_proto_category_proto_rawDescOnce.Do(func() { + file_module_ec_mall_proto_category_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_category_proto_rawDesc), len(file_module_ec_mall_proto_category_proto_rawDesc))) }) - return file_category_proto_rawDescData + return file_module_ec_mall_proto_category_proto_rawDescData } -var file_category_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_category_proto_goTypes = []any{ - (*CategoryFetchRequest)(nil), // 0: mall.CategoryFetchRequest - (*CategoryReply)(nil), // 1: mall.CategoryReply - (*CategoryItem)(nil), // 2: mall.CategoryItem - (*IdentRequest)(nil), // 3: mall.IdentRequest - (*StatusReply)(nil), // 4: mall.StatusReply +var file_module_ec_mall_proto_category_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_module_ec_mall_proto_category_proto_goTypes = []any{ + (*CategoryFetchRequest)(nil), // 0: mall.CategoryFetchRequest + (*CategoryReply)(nil), // 1: mall.CategoryReply + (*CategoryItem)(nil), // 2: mall.CategoryItem + (*protobuf.IdentRequest)(nil), // 3: blocks.IdentRequest + (*protobuf.IdentityStatusReply)(nil), // 4: blocks.IdentityStatusReply } -var file_category_proto_depIdxs = []int32{ +var file_module_ec_mall_proto_category_proto_depIdxs = []int32{ 2, // 0: mall.CategoryReply.data:type_name -> mall.CategoryItem 2, // 1: mall.CategoryItem.categories:type_name -> mall.CategoryItem 0, // 2: mall.Category.Fetch:input_type -> mall.CategoryFetchRequest 2, // 3: mall.Category.Create:input_type -> mall.CategoryItem - 3, // 4: mall.Category.Delete:input_type -> mall.IdentRequest + 3, // 4: mall.Category.Delete:input_type -> blocks.IdentRequest 2, // 5: mall.Category.Modify:input_type -> mall.CategoryItem 1, // 6: mall.Category.Fetch:output_type -> mall.CategoryReply - 4, // 7: mall.Category.Create:output_type -> mall.StatusReply - 4, // 8: mall.Category.Delete:output_type -> mall.StatusReply - 4, // 9: mall.Category.Modify:output_type -> mall.StatusReply + 4, // 7: mall.Category.Create:output_type -> blocks.IdentityStatusReply + 4, // 8: mall.Category.Delete:output_type -> blocks.IdentityStatusReply + 4, // 9: mall.Category.Modify:output_type -> blocks.IdentityStatusReply 6, // [6:10] is the sub-list for method output_type 2, // [2:6] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -357,27 +358,26 @@ var file_category_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_category_proto_init() } -func file_category_proto_init() { - if File_category_proto != nil { +func init() { file_module_ec_mall_proto_category_proto_init() } +func file_module_ec_mall_proto_category_proto_init() { + if File_module_ec_mall_proto_category_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_category_proto_rawDesc), len(file_category_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_category_proto_rawDesc), len(file_module_ec_mall_proto_category_proto_rawDesc)), NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_category_proto_goTypes, - DependencyIndexes: file_category_proto_depIdxs, - MessageInfos: file_category_proto_msgTypes, + GoTypes: file_module_ec_mall_proto_category_proto_goTypes, + DependencyIndexes: file_module_ec_mall_proto_category_proto_depIdxs, + MessageInfos: file_module_ec_mall_proto_category_proto_msgTypes, }.Build() - File_category_proto = out.File - file_category_proto_goTypes = nil - file_category_proto_depIdxs = nil + File_module_ec_mall_proto_category_proto = out.File + file_module_ec_mall_proto_category_proto_goTypes = nil + file_module_ec_mall_proto_category_proto_depIdxs = nil } diff --git a/module/ec/mall/pb/category.pb.gw.go b/module/ec/mall/pb/category.pb.gw.go index a547a56..8daa58d 100644 --- a/module/ec/mall/pb/category.pb.gw.go +++ b/module/ec/mall/pb/category.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: category.proto +// source: module/ec/mall/proto/category.proto /* Package mall is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package mall import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -91,7 +92,7 @@ func local_request_Category_Create_0(ctx context.Context, marshaler runtime.Mars func request_Category_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client CategoryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Category_Delete_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Category_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server CategoryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/ec/mall/pb/category_grpc.pb.go b/module/ec/mall/pb/category_grpc.pb.go index ecf2b2a..975e5e2 100644 --- a/module/ec/mall/pb/category_grpc.pb.go +++ b/module/ec/mall/pb/category_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: category.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/mall/proto/category.proto package mall import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -31,14 +32,14 @@ const ( // // Store(店铺)微服务-分类 type CategoryClient interface { - // 获取分类数据 + // 获取分类数据 Fetch(ctx context.Context, in *CategoryFetchRequest, opts ...grpc.CallOption) (*CategoryReply, error) - // 添加分类 - Create(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*StatusReply, error) - // 删除分类 - Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) - // 修改分类 - Modify(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*StatusReply, error) + // 添加分类 + Create(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) + // 删除分类 + Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) + // 修改分类 + Modify(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) } type categoryClient struct { @@ -59,9 +60,9 @@ func (c *categoryClient) Fetch(ctx context.Context, in *CategoryFetchRequest, op return out, nil } -func (c *categoryClient) Create(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *categoryClient) Create(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Category_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -69,9 +70,9 @@ func (c *categoryClient) Create(ctx context.Context, in *CategoryItem, opts ...g return out, nil } -func (c *categoryClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *categoryClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Category_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -79,9 +80,9 @@ func (c *categoryClient) Delete(ctx context.Context, in *IdentRequest, opts ...g return out, nil } -func (c *categoryClient) Modify(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *categoryClient) Modify(ctx context.Context, in *CategoryItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Category_Modify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -90,23 +91,22 @@ func (c *categoryClient) Modify(ctx context.Context, in *CategoryItem, opts ...g } // CategoryServer is the server API for Category service. -// All implementations must embed UnimplementedCategoryServer +// All implementations should embed UnimplementedCategoryServer // for forward compatibility. // // Store(店铺)微服务-分类 type CategoryServer interface { - // 获取分类数据 + // 获取分类数据 Fetch(context.Context, *CategoryFetchRequest) (*CategoryReply, error) - // 添加分类 - Create(context.Context, *CategoryItem) (*StatusReply, error) - // 删除分类 - Delete(context.Context, *IdentRequest) (*StatusReply, error) - // 修改分类 - Modify(context.Context, *CategoryItem) (*StatusReply, error) - mustEmbedUnimplementedCategoryServer() + // 添加分类 + Create(context.Context, *CategoryItem) (*protobuf.IdentityStatusReply, error) + // 删除分类 + Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) + // 修改分类 + Modify(context.Context, *CategoryItem) (*protobuf.IdentityStatusReply, error) } -// UnimplementedCategoryServer must be embedded to have +// UnimplementedCategoryServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -114,19 +114,18 @@ type CategoryServer interface { type UnimplementedCategoryServer struct{} func (UnimplementedCategoryServer) Fetch(context.Context, *CategoryFetchRequest) (*CategoryReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedCategoryServer) Create(context.Context, *CategoryItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +func (UnimplementedCategoryServer) Create(context.Context, *CategoryItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedCategoryServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +func (UnimplementedCategoryServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedCategoryServer) Modify(context.Context, *CategoryItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented") +func (UnimplementedCategoryServer) Modify(context.Context, *CategoryItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } -func (UnimplementedCategoryServer) mustEmbedUnimplementedCategoryServer() {} -func (UnimplementedCategoryServer) testEmbeddedByValue() {} +func (UnimplementedCategoryServer) testEmbeddedByValue() {} // UnsafeCategoryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CategoryServer will @@ -136,7 +135,7 @@ type UnsafeCategoryServer interface { } func RegisterCategoryServer(s grpc.ServiceRegistrar, srv CategoryServer) { - // If the following call pancis, it indicates UnimplementedCategoryServer was + // If the following call panics, it indicates UnimplementedCategoryServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -183,7 +182,7 @@ func _Category_Create_Handler(srv interface{}, ctx context.Context, dec func(int } func _Category_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -195,7 +194,7 @@ func _Category_Delete_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: Category_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CategoryServer).Delete(ctx, req.(*IdentRequest)) + return srv.(CategoryServer).Delete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -243,5 +242,5 @@ var Category_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "category.proto", + Metadata: "module/ec/mall/proto/category.proto", } diff --git a/module/ec/mall/pb/freight.pb.go b/module/ec/mall/pb/freight.pb.go index 27d8c76..f7f4bed 100644 --- a/module/ec/mall/pb/freight.pb.go +++ b/module/ec/mall/pb/freight.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: freight.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/mall/proto/freight.proto package mall import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -34,7 +35,7 @@ type DenyRegionItem struct { func (x *DenyRegionItem) Reset() { *x = DenyRegionItem{} - mi := &file_freight_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_freight_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +47,7 @@ func (x *DenyRegionItem) String() string { func (*DenyRegionItem) ProtoMessage() {} func (x *DenyRegionItem) ProtoReflect() protoreflect.Message { - mi := &file_freight_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_freight_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +60,7 @@ func (x *DenyRegionItem) ProtoReflect() protoreflect.Message { // Deprecated: Use DenyRegionItem.ProtoReflect.Descriptor instead. func (*DenyRegionItem) Descriptor() ([]byte, []int) { - return file_freight_proto_rawDescGZIP(), []int{0} + return file_module_ec_mall_proto_freight_proto_rawDescGZIP(), []int{0} } func (x *DenyRegionItem) GetId() int64 { @@ -114,7 +115,7 @@ type FreightItem struct { func (x *FreightItem) Reset() { *x = FreightItem{} - mi := &file_freight_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_freight_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -126,7 +127,7 @@ func (x *FreightItem) String() string { func (*FreightItem) ProtoMessage() {} func (x *FreightItem) ProtoReflect() protoreflect.Message { - mi := &file_freight_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_freight_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -139,7 +140,7 @@ func (x *FreightItem) ProtoReflect() protoreflect.Message { // Deprecated: Use FreightItem.ProtoReflect.Descriptor instead. func (*FreightItem) Descriptor() ([]byte, []int) { - return file_freight_proto_rawDescGZIP(), []int{1} + return file_module_ec_mall_proto_freight_proto_rawDescGZIP(), []int{1} } func (x *FreightItem) GetId() int64 { @@ -216,7 +217,7 @@ type RegionItem struct { func (x *RegionItem) Reset() { *x = RegionItem{} - mi := &file_freight_proto_msgTypes[2] + mi := &file_module_ec_mall_proto_freight_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -228,7 +229,7 @@ func (x *RegionItem) String() string { func (*RegionItem) ProtoMessage() {} func (x *RegionItem) ProtoReflect() protoreflect.Message { - mi := &file_freight_proto_msgTypes[2] + mi := &file_module_ec_mall_proto_freight_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -241,7 +242,7 @@ func (x *RegionItem) ProtoReflect() protoreflect.Message { // Deprecated: Use RegionItem.ProtoReflect.Descriptor instead. func (*RegionItem) Descriptor() ([]byte, []int) { - return file_freight_proto_rawDescGZIP(), []int{2} + return file_module_ec_mall_proto_freight_proto_rawDescGZIP(), []int{2} } func (x *RegionItem) GetId() int32 { @@ -284,7 +285,7 @@ type FreightAttrItem struct { func (x *FreightAttrItem) Reset() { *x = FreightAttrItem{} - mi := &file_freight_proto_msgTypes[3] + mi := &file_module_ec_mall_proto_freight_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -296,7 +297,7 @@ func (x *FreightAttrItem) String() string { func (*FreightAttrItem) ProtoMessage() {} func (x *FreightAttrItem) ProtoReflect() protoreflect.Message { - mi := &file_freight_proto_msgTypes[3] + mi := &file_module_ec_mall_proto_freight_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -309,7 +310,7 @@ func (x *FreightAttrItem) ProtoReflect() protoreflect.Message { // Deprecated: Use FreightAttrItem.ProtoReflect.Descriptor instead. func (*FreightAttrItem) Descriptor() ([]byte, []int) { - return file_freight_proto_rawDescGZIP(), []int{3} + return file_module_ec_mall_proto_freight_proto_rawDescGZIP(), []int{3} } func (x *FreightAttrItem) GetId() int64 { @@ -399,7 +400,7 @@ type FreightReply struct { func (x *FreightReply) Reset() { *x = FreightReply{} - mi := &file_freight_proto_msgTypes[4] + mi := &file_module_ec_mall_proto_freight_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -411,7 +412,7 @@ func (x *FreightReply) String() string { func (*FreightReply) ProtoMessage() {} func (x *FreightReply) ProtoReflect() protoreflect.Message { - mi := &file_freight_proto_msgTypes[4] + mi := &file_module_ec_mall_proto_freight_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -424,7 +425,7 @@ func (x *FreightReply) ProtoReflect() protoreflect.Message { // Deprecated: Use FreightReply.ProtoReflect.Descriptor instead. func (*FreightReply) Descriptor() ([]byte, []int) { - return file_freight_proto_rawDescGZIP(), []int{4} + return file_module_ec_mall_proto_freight_proto_rawDescGZIP(), []int{4} } func (x *FreightReply) GetCount() int64 { @@ -451,7 +452,7 @@ type DenyRegionReply struct { func (x *DenyRegionReply) Reset() { *x = DenyRegionReply{} - mi := &file_freight_proto_msgTypes[5] + mi := &file_module_ec_mall_proto_freight_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -463,7 +464,7 @@ func (x *DenyRegionReply) String() string { func (*DenyRegionReply) ProtoMessage() {} func (x *DenyRegionReply) ProtoReflect() protoreflect.Message { - mi := &file_freight_proto_msgTypes[5] + mi := &file_module_ec_mall_proto_freight_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -476,7 +477,7 @@ func (x *DenyRegionReply) ProtoReflect() protoreflect.Message { // Deprecated: Use DenyRegionReply.ProtoReflect.Descriptor instead. func (*DenyRegionReply) Descriptor() ([]byte, []int) { - return file_freight_proto_rawDescGZIP(), []int{5} + return file_module_ec_mall_proto_freight_proto_rawDescGZIP(), []int{5} } func (x *DenyRegionReply) GetCount() int64 { @@ -493,11 +494,11 @@ func (x *DenyRegionReply) GetData() []*DenyRegionItem { return nil } -var File_freight_proto protoreflect.FileDescriptor +var File_module_ec_mall_proto_freight_proto protoreflect.FileDescriptor -const file_freight_proto_rawDesc = "" + +const file_module_ec_mall_proto_freight_proto_rawDesc = "" + "\n" + - "\x15ec/mall/freight.proto\x12\x04mall\x1a\x11mall/blocks.proto\"\xa2\x01\n" + + "\"module/ec/mall/proto/freight.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"\xa2\x01\n" + "\x0eDenyRegionItem\x12\x0e\n" + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + "\bidentity\x18\x02 \x01(\tR\bidentity\x12$\n" + @@ -541,67 +542,67 @@ const file_freight_proto_rawDesc = "" + "\x04data\x18\x02 \x03(\v2\x11.mall.FreightItemR\x04data\"Q\n" + "\x0fDenyRegionReply\x12\x14\n" + "\x05count\x18\x01 \x01(\x03R\x05count\x12(\n" + - "\x04data\x18\x02 \x03(\v2\x14.mall.DenyRegionItemR\x04data2\x81\x04\n" + - "\aFreight\x121\n" + - "\x05Fetch\x12\x12.mall.FetchRequest\x1a\x12.mall.FreightReply\"\x00\x120\n" + - "\x06Modify\x12\x11.mall.FreightItem\x1a\x11.mall.StatusReply\"\x00\x121\n" + - "\x06Delete\x12\x12.mall.IdentRequest\x1a\x11.mall.StatusReply\"\x00\x120\n" + - "\x06Create\x12\x11.mall.FreightItem\x1a\x11.mall.StatusReply\"\x00\x121\n" + - "\x06Detail\x12\x12.mall.IdentRequest\x1a\x11.mall.FreightItem\"\x00\x12>\n" + - "\x0fDenyRegionFetch\x12\x12.mall.FetchRequest\x1a\x15.mall.DenyRegionReply\"\x00\x12=\n" + - "\x10DenyRegionCreate\x12\x14.mall.DenyRegionItem\x1a\x11.mall.StatusReply\"\x00\x12;\n" + - "\x10DenyRegionDelete\x12\x12.mall.IdentRequest\x1a\x11.mall.StatusReply\"\x00\x12=\n" + - "\x10DenyRegionModify\x12\x14.mall.DenyRegionItem\x1a\x11.mall.StatusReply\"\x00B\bZ\x06.;mallb\x06proto3" + "\x04data\x18\x02 \x03(\v2\x14.mall.DenyRegionItemR\x04data2\xcf\x04\n" + + "\aFreight\x127\n" + + "\x05Fetch\x12\x18.blocks.MallFetchRequest\x1a\x12.mall.FreightReply\"\x00\x12:\n" + + "\x06Modify\x12\x11.mall.FreightItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12=\n" + + "\x06Delete\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12:\n" + + "\x06Create\x12\x11.mall.FreightItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x123\n" + + "\x06Detail\x12\x14.blocks.IdentRequest\x1a\x11.mall.FreightItem\"\x00\x12D\n" + + "\x0fDenyRegionFetch\x12\x18.blocks.MallFetchRequest\x1a\x15.mall.DenyRegionReply\"\x00\x12G\n" + + "\x10DenyRegionCreate\x12\x14.mall.DenyRegionItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12G\n" + + "\x10DenyRegionDelete\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12G\n" + + "\x10DenyRegionModify\x12\x14.mall.DenyRegionItem\x1a\x1b.blocks.IdentityStatusReply\"\x00B!Z\x1fbsm/full/module/ec/mall/pb;mallb\x06proto3" var ( - file_freight_proto_rawDescOnce sync.Once - file_freight_proto_rawDescData []byte + file_module_ec_mall_proto_freight_proto_rawDescOnce sync.Once + file_module_ec_mall_proto_freight_proto_rawDescData []byte ) -func file_freight_proto_rawDescGZIP() []byte { - file_freight_proto_rawDescOnce.Do(func() { - file_freight_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_freight_proto_rawDesc), len(file_freight_proto_rawDesc))) +func file_module_ec_mall_proto_freight_proto_rawDescGZIP() []byte { + file_module_ec_mall_proto_freight_proto_rawDescOnce.Do(func() { + file_module_ec_mall_proto_freight_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_freight_proto_rawDesc), len(file_module_ec_mall_proto_freight_proto_rawDesc))) }) - return file_freight_proto_rawDescData + return file_module_ec_mall_proto_freight_proto_rawDescData } -var file_freight_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_freight_proto_goTypes = []any{ - (*DenyRegionItem)(nil), // 0: mall.DenyRegionItem - (*FreightItem)(nil), // 1: mall.FreightItem - (*RegionItem)(nil), // 2: mall.RegionItem - (*FreightAttrItem)(nil), // 3: mall.FreightAttrItem - (*FreightReply)(nil), // 4: mall.FreightReply - (*DenyRegionReply)(nil), // 5: mall.DenyRegionReply - (*FetchRequest)(nil), // 6: mall.FetchRequest - (*IdentRequest)(nil), // 7: mall.IdentRequest - (*StatusReply)(nil), // 8: mall.StatusReply +var file_module_ec_mall_proto_freight_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_module_ec_mall_proto_freight_proto_goTypes = []any{ + (*DenyRegionItem)(nil), // 0: mall.DenyRegionItem + (*FreightItem)(nil), // 1: mall.FreightItem + (*RegionItem)(nil), // 2: mall.RegionItem + (*FreightAttrItem)(nil), // 3: mall.FreightAttrItem + (*FreightReply)(nil), // 4: mall.FreightReply + (*DenyRegionReply)(nil), // 5: mall.DenyRegionReply + (*protobuf.MallFetchRequest)(nil), // 6: blocks.MallFetchRequest + (*protobuf.IdentRequest)(nil), // 7: blocks.IdentRequest + (*protobuf.IdentityStatusReply)(nil), // 8: blocks.IdentityStatusReply } -var file_freight_proto_depIdxs = []int32{ +var file_module_ec_mall_proto_freight_proto_depIdxs = []int32{ 2, // 0: mall.DenyRegionItem.region:type_name -> mall.RegionItem 3, // 1: mall.FreightItem.rules:type_name -> mall.FreightAttrItem 2, // 2: mall.RegionItem.second:type_name -> mall.RegionItem 2, // 3: mall.FreightAttrItem.region:type_name -> mall.RegionItem 1, // 4: mall.FreightReply.data:type_name -> mall.FreightItem 0, // 5: mall.DenyRegionReply.data:type_name -> mall.DenyRegionItem - 6, // 6: mall.Freight.Fetch:input_type -> mall.FetchRequest + 6, // 6: mall.Freight.Fetch:input_type -> blocks.MallFetchRequest 1, // 7: mall.Freight.Modify:input_type -> mall.FreightItem - 7, // 8: mall.Freight.Delete:input_type -> mall.IdentRequest + 7, // 8: mall.Freight.Delete:input_type -> blocks.IdentRequest 1, // 9: mall.Freight.Create:input_type -> mall.FreightItem - 7, // 10: mall.Freight.Detail:input_type -> mall.IdentRequest - 6, // 11: mall.Freight.DenyRegionFetch:input_type -> mall.FetchRequest + 7, // 10: mall.Freight.Detail:input_type -> blocks.IdentRequest + 6, // 11: mall.Freight.DenyRegionFetch:input_type -> blocks.MallFetchRequest 0, // 12: mall.Freight.DenyRegionCreate:input_type -> mall.DenyRegionItem - 7, // 13: mall.Freight.DenyRegionDelete:input_type -> mall.IdentRequest + 7, // 13: mall.Freight.DenyRegionDelete:input_type -> blocks.IdentRequest 0, // 14: mall.Freight.DenyRegionModify:input_type -> mall.DenyRegionItem 4, // 15: mall.Freight.Fetch:output_type -> mall.FreightReply - 8, // 16: mall.Freight.Modify:output_type -> mall.StatusReply - 8, // 17: mall.Freight.Delete:output_type -> mall.StatusReply - 8, // 18: mall.Freight.Create:output_type -> mall.StatusReply + 8, // 16: mall.Freight.Modify:output_type -> blocks.IdentityStatusReply + 8, // 17: mall.Freight.Delete:output_type -> blocks.IdentityStatusReply + 8, // 18: mall.Freight.Create:output_type -> blocks.IdentityStatusReply 1, // 19: mall.Freight.Detail:output_type -> mall.FreightItem 5, // 20: mall.Freight.DenyRegionFetch:output_type -> mall.DenyRegionReply - 8, // 21: mall.Freight.DenyRegionCreate:output_type -> mall.StatusReply - 8, // 22: mall.Freight.DenyRegionDelete:output_type -> mall.StatusReply - 8, // 23: mall.Freight.DenyRegionModify:output_type -> mall.StatusReply + 8, // 21: mall.Freight.DenyRegionCreate:output_type -> blocks.IdentityStatusReply + 8, // 22: mall.Freight.DenyRegionDelete:output_type -> blocks.IdentityStatusReply + 8, // 23: mall.Freight.DenyRegionModify:output_type -> blocks.IdentityStatusReply 15, // [15:24] is the sub-list for method output_type 6, // [6:15] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name @@ -609,27 +610,26 @@ var file_freight_proto_depIdxs = []int32{ 0, // [0:6] is the sub-list for field type_name } -func init() { file_freight_proto_init() } -func file_freight_proto_init() { - if File_freight_proto != nil { +func init() { file_module_ec_mall_proto_freight_proto_init() } +func file_module_ec_mall_proto_freight_proto_init() { + if File_module_ec_mall_proto_freight_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_freight_proto_rawDesc), len(file_freight_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_freight_proto_rawDesc), len(file_module_ec_mall_proto_freight_proto_rawDesc)), NumEnums: 0, NumMessages: 6, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_freight_proto_goTypes, - DependencyIndexes: file_freight_proto_depIdxs, - MessageInfos: file_freight_proto_msgTypes, + GoTypes: file_module_ec_mall_proto_freight_proto_goTypes, + DependencyIndexes: file_module_ec_mall_proto_freight_proto_depIdxs, + MessageInfos: file_module_ec_mall_proto_freight_proto_msgTypes, }.Build() - File_freight_proto = out.File - file_freight_proto_goTypes = nil - file_freight_proto_depIdxs = nil + File_module_ec_mall_proto_freight_proto = out.File + file_module_ec_mall_proto_freight_proto_goTypes = nil + file_module_ec_mall_proto_freight_proto_depIdxs = nil } diff --git a/module/ec/mall/pb/freight.pb.gw.go b/module/ec/mall/pb/freight.pb.gw.go index ad894da..6276a70 100644 --- a/module/ec/mall/pb/freight.pb.gw.go +++ b/module/ec/mall/pb/freight.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: freight.proto +// source: module/ec/mall/proto/freight.proto /* Package mall is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package mall import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Freight_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Freight_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, c func local_request_Freight_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -91,7 +92,7 @@ func local_request_Freight_Modify_0(ctx context.Context, marshaler runtime.Marsh func request_Freight_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Freight_Delete_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Freight_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -145,7 +146,7 @@ func local_request_Freight_Create_0(ctx context.Context, marshaler runtime.Marsh func request_Freight_Detail_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -160,7 +161,7 @@ func request_Freight_Detail_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Freight_Detail_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -172,7 +173,7 @@ func local_request_Freight_Detail_0(ctx context.Context, marshaler runtime.Marsh func request_Freight_DenyRegionFetch_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -187,7 +188,7 @@ func request_Freight_DenyRegionFetch_0(ctx context.Context, marshaler runtime.Ma func local_request_Freight_DenyRegionFetch_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -226,7 +227,7 @@ func local_request_Freight_DenyRegionCreate_0(ctx context.Context, marshaler run func request_Freight_DenyRegionDelete_0(ctx context.Context, marshaler runtime.Marshaler, client FreightClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -241,7 +242,7 @@ func request_Freight_DenyRegionDelete_0(ctx context.Context, marshaler runtime.M func local_request_Freight_DenyRegionDelete_0(ctx context.Context, marshaler runtime.Marshaler, server FreightServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/ec/mall/pb/freight_grpc.pb.go b/module/ec/mall/pb/freight_grpc.pb.go index efe9ced..e3f2dcc 100644 --- a/module/ec/mall/pb/freight_grpc.pb.go +++ b/module/ec/mall/pb/freight_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: freight.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/mall/proto/freight.proto package mall import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -37,23 +38,23 @@ const ( // 运费设置相关 type FreightClient interface { // 运费模板列表 - Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FreightReply, error) + Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*FreightReply, error) // 运费模板修改 - Modify(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*StatusReply, error) + Modify(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 运费模板删除 - Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 运费模板创建 - Create(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 运费模板详情 - Detail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*FreightItem, error) + Detail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*FreightItem, error) // 限制区域列表 - DenyRegionFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*DenyRegionReply, error) + DenyRegionFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*DenyRegionReply, error) // 新建限制区域 - DenyRegionCreate(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*StatusReply, error) + DenyRegionCreate(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 移除限制区域 - DenyRegionDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + DenyRegionDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 编辑限制区域 - DenyRegionModify(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*StatusReply, error) + DenyRegionModify(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) } type freightClient struct { @@ -64,7 +65,7 @@ func NewFreightClient(cc grpc.ClientConnInterface) FreightClient { return &freightClient{cc} } -func (c *freightClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FreightReply, error) { +func (c *freightClient) Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*FreightReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(FreightReply) err := c.cc.Invoke(ctx, Freight_Fetch_FullMethodName, in, out, cOpts...) @@ -74,9 +75,9 @@ func (c *freightClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grp return out, nil } -func (c *freightClient) Modify(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *freightClient) Modify(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Freight_Modify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -84,9 +85,9 @@ func (c *freightClient) Modify(ctx context.Context, in *FreightItem, opts ...grp return out, nil } -func (c *freightClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *freightClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Freight_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -94,9 +95,9 @@ func (c *freightClient) Delete(ctx context.Context, in *IdentRequest, opts ...gr return out, nil } -func (c *freightClient) Create(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *freightClient) Create(ctx context.Context, in *FreightItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Freight_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -104,7 +105,7 @@ func (c *freightClient) Create(ctx context.Context, in *FreightItem, opts ...grp return out, nil } -func (c *freightClient) Detail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*FreightItem, error) { +func (c *freightClient) Detail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*FreightItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(FreightItem) err := c.cc.Invoke(ctx, Freight_Detail_FullMethodName, in, out, cOpts...) @@ -114,7 +115,7 @@ func (c *freightClient) Detail(ctx context.Context, in *IdentRequest, opts ...gr return out, nil } -func (c *freightClient) DenyRegionFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*DenyRegionReply, error) { +func (c *freightClient) DenyRegionFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*DenyRegionReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DenyRegionReply) err := c.cc.Invoke(ctx, Freight_DenyRegionFetch_FullMethodName, in, out, cOpts...) @@ -124,9 +125,9 @@ func (c *freightClient) DenyRegionFetch(ctx context.Context, in *FetchRequest, o return out, nil } -func (c *freightClient) DenyRegionCreate(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *freightClient) DenyRegionCreate(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Freight_DenyRegionCreate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -134,9 +135,9 @@ func (c *freightClient) DenyRegionCreate(ctx context.Context, in *DenyRegionItem return out, nil } -func (c *freightClient) DenyRegionDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *freightClient) DenyRegionDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Freight_DenyRegionDelete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -144,9 +145,9 @@ func (c *freightClient) DenyRegionDelete(ctx context.Context, in *IdentRequest, return out, nil } -func (c *freightClient) DenyRegionModify(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *freightClient) DenyRegionModify(ctx context.Context, in *DenyRegionItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Freight_DenyRegionModify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -155,68 +156,66 @@ func (c *freightClient) DenyRegionModify(ctx context.Context, in *DenyRegionItem } // FreightServer is the server API for Freight service. -// All implementations must embed UnimplementedFreightServer +// All implementations should embed UnimplementedFreightServer // for forward compatibility. // // 运费设置相关 type FreightServer interface { // 运费模板列表 - Fetch(context.Context, *FetchRequest) (*FreightReply, error) + Fetch(context.Context, *protobuf.MallFetchRequest) (*FreightReply, error) // 运费模板修改 - Modify(context.Context, *FreightItem) (*StatusReply, error) + Modify(context.Context, *FreightItem) (*protobuf.IdentityStatusReply, error) // 运费模板删除 - Delete(context.Context, *IdentRequest) (*StatusReply, error) + Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) // 运费模板创建 - Create(context.Context, *FreightItem) (*StatusReply, error) + Create(context.Context, *FreightItem) (*protobuf.IdentityStatusReply, error) // 运费模板详情 - Detail(context.Context, *IdentRequest) (*FreightItem, error) + Detail(context.Context, *protobuf.IdentRequest) (*FreightItem, error) // 限制区域列表 - DenyRegionFetch(context.Context, *FetchRequest) (*DenyRegionReply, error) + DenyRegionFetch(context.Context, *protobuf.MallFetchRequest) (*DenyRegionReply, error) // 新建限制区域 - DenyRegionCreate(context.Context, *DenyRegionItem) (*StatusReply, error) + DenyRegionCreate(context.Context, *DenyRegionItem) (*protobuf.IdentityStatusReply, error) // 移除限制区域 - DenyRegionDelete(context.Context, *IdentRequest) (*StatusReply, error) + DenyRegionDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) // 编辑限制区域 - DenyRegionModify(context.Context, *DenyRegionItem) (*StatusReply, error) - mustEmbedUnimplementedFreightServer() + DenyRegionModify(context.Context, *DenyRegionItem) (*protobuf.IdentityStatusReply, error) } -// UnimplementedFreightServer must be embedded to have +// UnimplementedFreightServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedFreightServer struct{} -func (UnimplementedFreightServer) Fetch(context.Context, *FetchRequest) (*FreightReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") +func (UnimplementedFreightServer) Fetch(context.Context, *protobuf.MallFetchRequest) (*FreightReply, error) { + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedFreightServer) Modify(context.Context, *FreightItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented") +func (UnimplementedFreightServer) Modify(context.Context, *FreightItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } -func (UnimplementedFreightServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +func (UnimplementedFreightServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedFreightServer) Create(context.Context, *FreightItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +func (UnimplementedFreightServer) Create(context.Context, *FreightItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedFreightServer) Detail(context.Context, *IdentRequest) (*FreightItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method Detail not implemented") +func (UnimplementedFreightServer) Detail(context.Context, *protobuf.IdentRequest) (*FreightItem, error) { + return nil, status.Error(codes.Unimplemented, "method Detail not implemented") } -func (UnimplementedFreightServer) DenyRegionFetch(context.Context, *FetchRequest) (*DenyRegionReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DenyRegionFetch not implemented") +func (UnimplementedFreightServer) DenyRegionFetch(context.Context, *protobuf.MallFetchRequest) (*DenyRegionReply, error) { + return nil, status.Error(codes.Unimplemented, "method DenyRegionFetch not implemented") } -func (UnimplementedFreightServer) DenyRegionCreate(context.Context, *DenyRegionItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DenyRegionCreate not implemented") +func (UnimplementedFreightServer) DenyRegionCreate(context.Context, *DenyRegionItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DenyRegionCreate not implemented") } -func (UnimplementedFreightServer) DenyRegionDelete(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DenyRegionDelete not implemented") +func (UnimplementedFreightServer) DenyRegionDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DenyRegionDelete not implemented") } -func (UnimplementedFreightServer) DenyRegionModify(context.Context, *DenyRegionItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DenyRegionModify not implemented") +func (UnimplementedFreightServer) DenyRegionModify(context.Context, *DenyRegionItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DenyRegionModify not implemented") } -func (UnimplementedFreightServer) mustEmbedUnimplementedFreightServer() {} -func (UnimplementedFreightServer) testEmbeddedByValue() {} +func (UnimplementedFreightServer) testEmbeddedByValue() {} // UnsafeFreightServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to FreightServer will @@ -226,7 +225,7 @@ type UnsafeFreightServer interface { } func RegisterFreightServer(s grpc.ServiceRegistrar, srv FreightServer) { - // If the following call pancis, it indicates UnimplementedFreightServer was + // If the following call panics, it indicates UnimplementedFreightServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -237,7 +236,7 @@ func RegisterFreightServer(s grpc.ServiceRegistrar, srv FreightServer) { } func _Freight_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.MallFetchRequest) if err := dec(in); err != nil { return nil, err } @@ -249,7 +248,7 @@ func _Freight_Fetch_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Freight_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FreightServer).Fetch(ctx, req.(*FetchRequest)) + return srv.(FreightServer).Fetch(ctx, req.(*protobuf.MallFetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -273,7 +272,7 @@ func _Freight_Modify_Handler(srv interface{}, ctx context.Context, dec func(inte } func _Freight_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -285,7 +284,7 @@ func _Freight_Delete_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Freight_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FreightServer).Delete(ctx, req.(*IdentRequest)) + return srv.(FreightServer).Delete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -309,7 +308,7 @@ func _Freight_Create_Handler(srv interface{}, ctx context.Context, dec func(inte } func _Freight_Detail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -321,13 +320,13 @@ func _Freight_Detail_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Freight_Detail_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FreightServer).Detail(ctx, req.(*IdentRequest)) + return srv.(FreightServer).Detail(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Freight_DenyRegionFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.MallFetchRequest) if err := dec(in); err != nil { return nil, err } @@ -339,7 +338,7 @@ func _Freight_DenyRegionFetch_Handler(srv interface{}, ctx context.Context, dec FullMethod: Freight_DenyRegionFetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FreightServer).DenyRegionFetch(ctx, req.(*FetchRequest)) + return srv.(FreightServer).DenyRegionFetch(ctx, req.(*protobuf.MallFetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -363,7 +362,7 @@ func _Freight_DenyRegionCreate_Handler(srv interface{}, ctx context.Context, dec } func _Freight_DenyRegionDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -375,7 +374,7 @@ func _Freight_DenyRegionDelete_Handler(srv interface{}, ctx context.Context, dec FullMethod: Freight_DenyRegionDelete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FreightServer).DenyRegionDelete(ctx, req.(*IdentRequest)) + return srv.(FreightServer).DenyRegionDelete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -443,5 +442,5 @@ var Freight_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "freight.proto", + Metadata: "module/ec/mall/proto/freight.proto", } diff --git a/module/ec/mall/pb/notice.pb.go b/module/ec/mall/pb/notice.pb.go index 7204a12..6099c16 100644 --- a/module/ec/mall/pb/notice.pb.go +++ b/module/ec/mall/pb/notice.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: notice.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/mall/proto/notice.proto package mall import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -32,7 +33,7 @@ type NoticeListReply struct { func (x *NoticeListReply) Reset() { *x = NoticeListReply{} - mi := &file_notice_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_notice_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +45,7 @@ func (x *NoticeListReply) String() string { func (*NoticeListReply) ProtoMessage() {} func (x *NoticeListReply) ProtoReflect() protoreflect.Message { - mi := &file_notice_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_notice_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +58,7 @@ func (x *NoticeListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use NoticeListReply.ProtoReflect.Descriptor instead. func (*NoticeListReply) Descriptor() ([]byte, []int) { - return file_notice_proto_rawDescGZIP(), []int{0} + return file_module_ec_mall_proto_notice_proto_rawDescGZIP(), []int{0} } func (x *NoticeListReply) GetData() []*NoticeItem { @@ -91,7 +92,7 @@ type NoticeItem struct { func (x *NoticeItem) Reset() { *x = NoticeItem{} - mi := &file_notice_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_notice_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -103,7 +104,7 @@ func (x *NoticeItem) String() string { func (*NoticeItem) ProtoMessage() {} func (x *NoticeItem) ProtoReflect() protoreflect.Message { - mi := &file_notice_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_notice_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -116,7 +117,7 @@ func (x *NoticeItem) ProtoReflect() protoreflect.Message { // Deprecated: Use NoticeItem.ProtoReflect.Descriptor instead. func (*NoticeItem) Descriptor() ([]byte, []int) { - return file_notice_proto_rawDescGZIP(), []int{1} + return file_module_ec_mall_proto_notice_proto_rawDescGZIP(), []int{1} } func (x *NoticeItem) GetIdentity() string { @@ -175,11 +176,11 @@ func (x *NoticeItem) GetStatus() int64 { return 0 } -var File_notice_proto protoreflect.FileDescriptor +var File_module_ec_mall_proto_notice_proto protoreflect.FileDescriptor -const file_notice_proto_rawDesc = "" + +const file_module_ec_mall_proto_notice_proto_rawDesc = "" + "\n" + - "\x14ec/mall/notice.proto\x12\x04mall\x1a\x11mall/blocks.proto\"M\n" + + "!module/ec/mall/proto/notice.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"M\n" + "\x0fNoticeListReply\x12$\n" + "\x04data\x18\x01 \x03(\v2\x10.mall.NoticeItemR\x04data\x12\x14\n" + "\x05count\x18\x02 \x01(\x03R\x05count\"\xec\x01\n" + @@ -194,43 +195,43 @@ const file_notice_proto_rawDesc = "" + "\n" + "created_at\x18\a \x01(\tR\n" + "created_at\x12\x16\n" + - "\x06status\x18\b \x01(\x03R\x06status2\xd3\x01\n" + - "\x06Notice\x124\n" + - "\x05Fetch\x12\x12.mall.FetchRequest\x1a\x15.mall.NoticeListReply\"\x00\x12/\n" + - "\x06Create\x12\x10.mall.NoticeItem\x1a\x11.mall.StatusReply\"\x00\x12/\n" + - "\x06Modify\x12\x10.mall.NoticeItem\x1a\x11.mall.StatusReply\"\x00\x121\n" + - "\x06Delete\x12\x12.mall.IdentRequest\x1a\x11.mall.StatusReply\"\x00B\bZ\x06.;mallb\x06proto3" + "\x06status\x18\b \x01(\x03R\x06status2\xf9\x01\n" + + "\x06Notice\x12:\n" + + "\x05Fetch\x12\x18.blocks.MallFetchRequest\x1a\x15.mall.NoticeListReply\"\x00\x129\n" + + "\x06Create\x12\x10.mall.NoticeItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x129\n" + + "\x06Modify\x12\x10.mall.NoticeItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12=\n" + + "\x06Delete\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00B!Z\x1fbsm/full/module/ec/mall/pb;mallb\x06proto3" var ( - file_notice_proto_rawDescOnce sync.Once - file_notice_proto_rawDescData []byte + file_module_ec_mall_proto_notice_proto_rawDescOnce sync.Once + file_module_ec_mall_proto_notice_proto_rawDescData []byte ) -func file_notice_proto_rawDescGZIP() []byte { - file_notice_proto_rawDescOnce.Do(func() { - file_notice_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_notice_proto_rawDesc), len(file_notice_proto_rawDesc))) +func file_module_ec_mall_proto_notice_proto_rawDescGZIP() []byte { + file_module_ec_mall_proto_notice_proto_rawDescOnce.Do(func() { + file_module_ec_mall_proto_notice_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_notice_proto_rawDesc), len(file_module_ec_mall_proto_notice_proto_rawDesc))) }) - return file_notice_proto_rawDescData + return file_module_ec_mall_proto_notice_proto_rawDescData } -var file_notice_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_notice_proto_goTypes = []any{ - (*NoticeListReply)(nil), // 0: mall.NoticeListReply - (*NoticeItem)(nil), // 1: mall.NoticeItem - (*FetchRequest)(nil), // 2: mall.FetchRequest - (*IdentRequest)(nil), // 3: mall.IdentRequest - (*StatusReply)(nil), // 4: mall.StatusReply +var file_module_ec_mall_proto_notice_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_module_ec_mall_proto_notice_proto_goTypes = []any{ + (*NoticeListReply)(nil), // 0: mall.NoticeListReply + (*NoticeItem)(nil), // 1: mall.NoticeItem + (*protobuf.MallFetchRequest)(nil), // 2: blocks.MallFetchRequest + (*protobuf.IdentRequest)(nil), // 3: blocks.IdentRequest + (*protobuf.IdentityStatusReply)(nil), // 4: blocks.IdentityStatusReply } -var file_notice_proto_depIdxs = []int32{ +var file_module_ec_mall_proto_notice_proto_depIdxs = []int32{ 1, // 0: mall.NoticeListReply.data:type_name -> mall.NoticeItem - 2, // 1: mall.Notice.Fetch:input_type -> mall.FetchRequest + 2, // 1: mall.Notice.Fetch:input_type -> blocks.MallFetchRequest 1, // 2: mall.Notice.Create:input_type -> mall.NoticeItem 1, // 3: mall.Notice.Modify:input_type -> mall.NoticeItem - 3, // 4: mall.Notice.Delete:input_type -> mall.IdentRequest + 3, // 4: mall.Notice.Delete:input_type -> blocks.IdentRequest 0, // 5: mall.Notice.Fetch:output_type -> mall.NoticeListReply - 4, // 6: mall.Notice.Create:output_type -> mall.StatusReply - 4, // 7: mall.Notice.Modify:output_type -> mall.StatusReply - 4, // 8: mall.Notice.Delete:output_type -> mall.StatusReply + 4, // 6: mall.Notice.Create:output_type -> blocks.IdentityStatusReply + 4, // 7: mall.Notice.Modify:output_type -> blocks.IdentityStatusReply + 4, // 8: mall.Notice.Delete:output_type -> blocks.IdentityStatusReply 5, // [5:9] is the sub-list for method output_type 1, // [1:5] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -238,27 +239,26 @@ var file_notice_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_notice_proto_init() } -func file_notice_proto_init() { - if File_notice_proto != nil { +func init() { file_module_ec_mall_proto_notice_proto_init() } +func file_module_ec_mall_proto_notice_proto_init() { + if File_module_ec_mall_proto_notice_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_notice_proto_rawDesc), len(file_notice_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_notice_proto_rawDesc), len(file_module_ec_mall_proto_notice_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_notice_proto_goTypes, - DependencyIndexes: file_notice_proto_depIdxs, - MessageInfos: file_notice_proto_msgTypes, + GoTypes: file_module_ec_mall_proto_notice_proto_goTypes, + DependencyIndexes: file_module_ec_mall_proto_notice_proto_depIdxs, + MessageInfos: file_module_ec_mall_proto_notice_proto_msgTypes, }.Build() - File_notice_proto = out.File - file_notice_proto_goTypes = nil - file_notice_proto_depIdxs = nil + File_module_ec_mall_proto_notice_proto = out.File + file_module_ec_mall_proto_notice_proto_goTypes = nil + file_module_ec_mall_proto_notice_proto_depIdxs = nil } diff --git a/module/ec/mall/pb/notice.pb.gw.go b/module/ec/mall/pb/notice.pb.gw.go index 762bc7d..2f49b1e 100644 --- a/module/ec/mall/pb/notice.pb.gw.go +++ b/module/ec/mall/pb/notice.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: notice.proto +// source: module/ec/mall/proto/notice.proto /* Package mall is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package mall import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Notice_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client NoticeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Notice_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Notice_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server NoticeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -118,7 +119,7 @@ func local_request_Notice_Modify_0(ctx context.Context, marshaler runtime.Marsha func request_Notice_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client NoticeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Notice_Delete_0(ctx context.Context, marshaler runtime.Marshaler, c func local_request_Notice_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server NoticeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/ec/mall/pb/notice_grpc.pb.go b/module/ec/mall/pb/notice_grpc.pb.go index 441453a..b96d030 100644 --- a/module/ec/mall/pb/notice_grpc.pb.go +++ b/module/ec/mall/pb/notice_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: notice.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/mall/proto/notice.proto package mall import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -32,13 +33,13 @@ const ( // Store(店铺)微服务-公告 type NoticeClient interface { // 公告列表 - Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*NoticeListReply, error) + Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*NoticeListReply, error) // 新建公告 - Create(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 修改公告 - Modify(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*StatusReply, error) + Modify(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 删除公告 - Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) } type noticeClient struct { @@ -49,7 +50,7 @@ func NewNoticeClient(cc grpc.ClientConnInterface) NoticeClient { return ¬iceClient{cc} } -func (c *noticeClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*NoticeListReply, error) { +func (c *noticeClient) Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*NoticeListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(NoticeListReply) err := c.cc.Invoke(ctx, Notice_Fetch_FullMethodName, in, out, cOpts...) @@ -59,9 +60,9 @@ func (c *noticeClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc return out, nil } -func (c *noticeClient) Create(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *noticeClient) Create(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Notice_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -69,9 +70,9 @@ func (c *noticeClient) Create(ctx context.Context, in *NoticeItem, opts ...grpc. return out, nil } -func (c *noticeClient) Modify(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *noticeClient) Modify(ctx context.Context, in *NoticeItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Notice_Modify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -79,9 +80,9 @@ func (c *noticeClient) Modify(ctx context.Context, in *NoticeItem, opts ...grpc. return out, nil } -func (c *noticeClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *noticeClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Notice_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -90,43 +91,41 @@ func (c *noticeClient) Delete(ctx context.Context, in *IdentRequest, opts ...grp } // NoticeServer is the server API for Notice service. -// All implementations must embed UnimplementedNoticeServer +// All implementations should embed UnimplementedNoticeServer // for forward compatibility. // // Store(店铺)微服务-公告 type NoticeServer interface { // 公告列表 - Fetch(context.Context, *FetchRequest) (*NoticeListReply, error) + Fetch(context.Context, *protobuf.MallFetchRequest) (*NoticeListReply, error) // 新建公告 - Create(context.Context, *NoticeItem) (*StatusReply, error) + Create(context.Context, *NoticeItem) (*protobuf.IdentityStatusReply, error) // 修改公告 - Modify(context.Context, *NoticeItem) (*StatusReply, error) + Modify(context.Context, *NoticeItem) (*protobuf.IdentityStatusReply, error) // 删除公告 - Delete(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedNoticeServer() + Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) } -// UnimplementedNoticeServer must be embedded to have +// UnimplementedNoticeServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedNoticeServer struct{} -func (UnimplementedNoticeServer) Fetch(context.Context, *FetchRequest) (*NoticeListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") +func (UnimplementedNoticeServer) Fetch(context.Context, *protobuf.MallFetchRequest) (*NoticeListReply, error) { + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedNoticeServer) Create(context.Context, *NoticeItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +func (UnimplementedNoticeServer) Create(context.Context, *NoticeItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedNoticeServer) Modify(context.Context, *NoticeItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented") +func (UnimplementedNoticeServer) Modify(context.Context, *NoticeItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } -func (UnimplementedNoticeServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +func (UnimplementedNoticeServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedNoticeServer) mustEmbedUnimplementedNoticeServer() {} -func (UnimplementedNoticeServer) testEmbeddedByValue() {} +func (UnimplementedNoticeServer) testEmbeddedByValue() {} // UnsafeNoticeServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to NoticeServer will @@ -136,7 +135,7 @@ type UnsafeNoticeServer interface { } func RegisterNoticeServer(s grpc.ServiceRegistrar, srv NoticeServer) { - // If the following call pancis, it indicates UnimplementedNoticeServer was + // If the following call panics, it indicates UnimplementedNoticeServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -147,7 +146,7 @@ func RegisterNoticeServer(s grpc.ServiceRegistrar, srv NoticeServer) { } func _Notice_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.MallFetchRequest) if err := dec(in); err != nil { return nil, err } @@ -159,7 +158,7 @@ func _Notice_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Notice_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NoticeServer).Fetch(ctx, req.(*FetchRequest)) + return srv.(NoticeServer).Fetch(ctx, req.(*protobuf.MallFetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -201,7 +200,7 @@ func _Notice_Modify_Handler(srv interface{}, ctx context.Context, dec func(inter } func _Notice_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -213,7 +212,7 @@ func _Notice_Delete_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Notice_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NoticeServer).Delete(ctx, req.(*IdentRequest)) + return srv.(NoticeServer).Delete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -243,5 +242,5 @@ var Notice_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "notice.proto", + Metadata: "module/ec/mall/proto/notice.proto", } diff --git a/module/ec/mall/pb/product.pb.go b/module/ec/mall/pb/product.pb.go index 643b75c..c46658b 100644 --- a/module/ec/mall/pb/product.pb.go +++ b/module/ec/mall/pb/product.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: product.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/mall/proto/product.proto package mall import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -34,7 +35,7 @@ type AttrItem struct { func (x *AttrItem) Reset() { *x = AttrItem{} - mi := &file_product_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +47,7 @@ func (x *AttrItem) String() string { func (*AttrItem) ProtoMessage() {} func (x *AttrItem) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +60,7 @@ func (x *AttrItem) ProtoReflect() protoreflect.Message { // Deprecated: Use AttrItem.ProtoReflect.Descriptor instead. func (*AttrItem) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{0} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{0} } func (x *AttrItem) GetId() int64 { @@ -113,7 +114,7 @@ type CommentItem struct { func (x *CommentItem) Reset() { *x = CommentItem{} - mi := &file_product_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -125,7 +126,7 @@ func (x *CommentItem) String() string { func (*CommentItem) ProtoMessage() {} func (x *CommentItem) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -138,7 +139,7 @@ func (x *CommentItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CommentItem.ProtoReflect.Descriptor instead. func (*CommentItem) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{1} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{1} } func (x *CommentItem) GetId() int64 { @@ -261,7 +262,7 @@ type CommentItemRep struct { func (x *CommentItemRep) Reset() { *x = CommentItemRep{} - mi := &file_product_proto_msgTypes[2] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -273,7 +274,7 @@ func (x *CommentItemRep) String() string { func (*CommentItemRep) ProtoMessage() {} func (x *CommentItemRep) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[2] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -286,7 +287,7 @@ func (x *CommentItemRep) ProtoReflect() protoreflect.Message { // Deprecated: Use CommentItemRep.ProtoReflect.Descriptor instead. func (*CommentItemRep) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{2} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{2} } func (x *CommentItemRep) GetId() int64 { @@ -396,7 +397,7 @@ type DetailBySpecRequest struct { func (x *DetailBySpecRequest) Reset() { *x = DetailBySpecRequest{} - mi := &file_product_proto_msgTypes[3] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -408,7 +409,7 @@ func (x *DetailBySpecRequest) String() string { func (*DetailBySpecRequest) ProtoMessage() {} func (x *DetailBySpecRequest) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[3] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -421,7 +422,7 @@ func (x *DetailBySpecRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DetailBySpecRequest.ProtoReflect.Descriptor instead. func (*DetailBySpecRequest) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{3} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{3} } func (x *DetailBySpecRequest) GetSpecNo() string { @@ -441,7 +442,7 @@ type OpRequest struct { func (x *OpRequest) Reset() { *x = OpRequest{} - mi := &file_product_proto_msgTypes[4] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -453,7 +454,7 @@ func (x *OpRequest) String() string { func (*OpRequest) ProtoMessage() {} func (x *OpRequest) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[4] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -466,7 +467,7 @@ func (x *OpRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OpRequest.ProtoReflect.Descriptor instead. func (*OpRequest) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{4} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{4} } func (x *OpRequest) GetIdentity() []string { @@ -493,7 +494,7 @@ type ModifyRequest struct { func (x *ModifyRequest) Reset() { *x = ModifyRequest{} - mi := &file_product_proto_msgTypes[5] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -505,7 +506,7 @@ func (x *ModifyRequest) String() string { func (*ModifyRequest) ProtoMessage() {} func (x *ModifyRequest) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[5] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -518,7 +519,7 @@ func (x *ModifyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ModifyRequest.ProtoReflect.Descriptor instead. func (*ModifyRequest) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{5} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{5} } func (x *ModifyRequest) GetIdentity() string { @@ -553,7 +554,7 @@ type ListItem struct { func (x *ListItem) Reset() { *x = ListItem{} - mi := &file_product_proto_msgTypes[6] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -565,7 +566,7 @@ func (x *ListItem) String() string { func (*ListItem) ProtoMessage() {} func (x *ListItem) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[6] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -578,7 +579,7 @@ func (x *ListItem) ProtoReflect() protoreflect.Message { // Deprecated: Use ListItem.ProtoReflect.Descriptor instead. func (*ListItem) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{6} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{6} } func (x *ListItem) GetProductId() int64 { @@ -660,7 +661,7 @@ type ListWithIdRequest struct { func (x *ListWithIdRequest) Reset() { *x = ListWithIdRequest{} - mi := &file_product_proto_msgTypes[7] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -672,7 +673,7 @@ func (x *ListWithIdRequest) String() string { func (*ListWithIdRequest) ProtoMessage() {} func (x *ListWithIdRequest) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[7] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -685,7 +686,7 @@ func (x *ListWithIdRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListWithIdRequest.ProtoReflect.Descriptor instead. func (*ListWithIdRequest) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{7} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{7} } func (x *ListWithIdRequest) GetId() []int64 { @@ -704,7 +705,7 @@ type ListWithIdReply struct { func (x *ListWithIdReply) Reset() { *x = ListWithIdReply{} - mi := &file_product_proto_msgTypes[8] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -716,7 +717,7 @@ func (x *ListWithIdReply) String() string { func (*ListWithIdReply) ProtoMessage() {} func (x *ListWithIdReply) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[8] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -729,7 +730,7 @@ func (x *ListWithIdReply) ProtoReflect() protoreflect.Message { // Deprecated: Use ListWithIdReply.ProtoReflect.Descriptor instead. func (*ListWithIdReply) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{8} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{8} } func (x *ListWithIdReply) GetData() []*ListItem { @@ -750,7 +751,7 @@ type PhotoReply struct { func (x *PhotoReply) Reset() { *x = PhotoReply{} - mi := &file_product_proto_msgTypes[9] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -762,7 +763,7 @@ func (x *PhotoReply) String() string { func (*PhotoReply) ProtoMessage() {} func (x *PhotoReply) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[9] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -775,7 +776,7 @@ func (x *PhotoReply) ProtoReflect() protoreflect.Message { // Deprecated: Use PhotoReply.ProtoReflect.Descriptor instead. func (*PhotoReply) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{9} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{9} } func (x *PhotoReply) GetCount() int64 { @@ -802,7 +803,7 @@ type SpecReply struct { func (x *SpecReply) Reset() { *x = SpecReply{} - mi := &file_product_proto_msgTypes[10] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -814,7 +815,7 @@ func (x *SpecReply) String() string { func (*SpecReply) ProtoMessage() {} func (x *SpecReply) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[10] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -827,7 +828,7 @@ func (x *SpecReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SpecReply.ProtoReflect.Descriptor instead. func (*SpecReply) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{10} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{10} } func (x *SpecReply) GetCount() int64 { @@ -854,7 +855,7 @@ type CommentListReply struct { func (x *CommentListReply) Reset() { *x = CommentListReply{} - mi := &file_product_proto_msgTypes[11] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -866,7 +867,7 @@ func (x *CommentListReply) String() string { func (*CommentListReply) ProtoMessage() {} func (x *CommentListReply) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[11] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -879,7 +880,7 @@ func (x *CommentListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use CommentListReply.ProtoReflect.Descriptor instead. func (*CommentListReply) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{11} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{11} } func (x *CommentListReply) GetCount() int64 { @@ -908,7 +909,7 @@ type StatisticReply struct { func (x *StatisticReply) Reset() { *x = StatisticReply{} - mi := &file_product_proto_msgTypes[12] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -920,7 +921,7 @@ func (x *StatisticReply) String() string { func (*StatisticReply) ProtoMessage() {} func (x *StatisticReply) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[12] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -933,7 +934,7 @@ func (x *StatisticReply) ProtoReflect() protoreflect.Message { // Deprecated: Use StatisticReply.ProtoReflect.Descriptor instead. func (*StatisticReply) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{12} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{12} } func (x *StatisticReply) GetTotal() int64 { @@ -975,7 +976,7 @@ type OrgBySpecIdReply struct { func (x *OrgBySpecIdReply) Reset() { *x = OrgBySpecIdReply{} - mi := &file_product_proto_msgTypes[13] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -987,7 +988,7 @@ func (x *OrgBySpecIdReply) String() string { func (*OrgBySpecIdReply) ProtoMessage() {} func (x *OrgBySpecIdReply) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[13] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1000,7 +1001,7 @@ func (x *OrgBySpecIdReply) ProtoReflect() protoreflect.Message { // Deprecated: Use OrgBySpecIdReply.ProtoReflect.Descriptor instead. func (*OrgBySpecIdReply) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{13} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{13} } func (x *OrgBySpecIdReply) GetId() int64 { @@ -1047,7 +1048,7 @@ type Subjoin struct { func (x *Subjoin) Reset() { *x = Subjoin{} - mi := &file_product_proto_msgTypes[14] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1059,7 +1060,7 @@ func (x *Subjoin) String() string { func (*Subjoin) ProtoMessage() {} func (x *Subjoin) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[14] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1072,7 +1073,7 @@ func (x *Subjoin) ProtoReflect() protoreflect.Message { // Deprecated: Use Subjoin.ProtoReflect.Descriptor instead. func (*Subjoin) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{14} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{14} } func (x *Subjoin) GetCategoryPaths() string { @@ -1183,7 +1184,7 @@ type ListReply struct { func (x *ListReply) Reset() { *x = ListReply{} - mi := &file_product_proto_msgTypes[15] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1195,7 +1196,7 @@ func (x *ListReply) String() string { func (*ListReply) ProtoMessage() {} func (x *ListReply) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[15] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1208,7 +1209,7 @@ func (x *ListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use ListReply.ProtoReflect.Descriptor instead. func (*ListReply) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{15} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{15} } func (x *ListReply) GetCount() int64 { @@ -1251,7 +1252,7 @@ type ProductBase struct { func (x *ProductBase) Reset() { *x = ProductBase{} - mi := &file_product_proto_msgTypes[16] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1263,7 +1264,7 @@ func (x *ProductBase) String() string { func (*ProductBase) ProtoMessage() {} func (x *ProductBase) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[16] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1276,7 +1277,7 @@ func (x *ProductBase) ProtoReflect() protoreflect.Message { // Deprecated: Use ProductBase.ProtoReflect.Descriptor instead. func (*ProductBase) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{16} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{16} } func (x *ProductBase) GetId() int64 { @@ -1430,7 +1431,7 @@ type SpecItem struct { func (x *SpecItem) Reset() { *x = SpecItem{} - mi := &file_product_proto_msgTypes[17] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1442,7 +1443,7 @@ func (x *SpecItem) String() string { func (*SpecItem) ProtoMessage() {} func (x *SpecItem) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[17] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1455,7 +1456,7 @@ func (x *SpecItem) ProtoReflect() protoreflect.Message { // Deprecated: Use SpecItem.ProtoReflect.Descriptor instead. func (*SpecItem) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{17} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{17} } func (x *SpecItem) GetId() int64 { @@ -1592,7 +1593,7 @@ type PhotoItem struct { func (x *PhotoItem) Reset() { *x = PhotoItem{} - mi := &file_product_proto_msgTypes[18] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1604,7 +1605,7 @@ func (x *PhotoItem) String() string { func (*PhotoItem) ProtoMessage() {} func (x *PhotoItem) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[18] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1617,7 +1618,7 @@ func (x *PhotoItem) ProtoReflect() protoreflect.Message { // Deprecated: Use PhotoItem.ProtoReflect.Descriptor instead. func (*PhotoItem) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{18} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{18} } func (x *PhotoItem) GetName() string { @@ -1690,7 +1691,7 @@ type CategoriesItem struct { func (x *CategoriesItem) Reset() { *x = CategoriesItem{} - mi := &file_product_proto_msgTypes[19] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1702,7 +1703,7 @@ func (x *CategoriesItem) String() string { func (*CategoriesItem) ProtoMessage() {} func (x *CategoriesItem) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[19] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1715,7 +1716,7 @@ func (x *CategoriesItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CategoriesItem.ProtoReflect.Descriptor instead. func (*CategoriesItem) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{19} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{19} } func (x *CategoriesItem) GetId() int64 { @@ -1852,7 +1853,7 @@ type ProductItem struct { func (x *ProductItem) Reset() { *x = ProductItem{} - mi := &file_product_proto_msgTypes[20] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1864,7 +1865,7 @@ func (x *ProductItem) String() string { func (*ProductItem) ProtoMessage() {} func (x *ProductItem) ProtoReflect() protoreflect.Message { - mi := &file_product_proto_msgTypes[20] + mi := &file_module_ec_mall_proto_product_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1877,7 +1878,7 @@ func (x *ProductItem) ProtoReflect() protoreflect.Message { // Deprecated: Use ProductItem.ProtoReflect.Descriptor instead. func (*ProductItem) Descriptor() ([]byte, []int) { - return file_product_proto_rawDescGZIP(), []int{20} + return file_module_ec_mall_proto_product_proto_rawDescGZIP(), []int{20} } func (x *ProductItem) GetId() int64 { @@ -2125,11 +2126,11 @@ func (x *ProductItem) GetSupplyName() string { return "" } -var File_product_proto protoreflect.FileDescriptor +var File_module_ec_mall_proto_product_proto protoreflect.FileDescriptor -const file_product_proto_rawDesc = "" + +const file_module_ec_mall_proto_product_proto_rawDesc = "" + "\n" + - "\x15ec/mall/product.proto\x12\x04mall\x1a\x11mall/blocks.proto\"b\n" + + "\"module/ec/mall/proto/product.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"b\n" + "\bAttrItem\x12\x0e\n" + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" + "\x04name\x18\x02 \x01(\tR\x04name\x12\x1c\n" + @@ -2358,79 +2359,80 @@ const file_product_proto_rawDesc = "" + "\n" + "categories\x18\" \x03(\v2\x14.mall.CategoriesItemR\n" + "categories\x12 \n" + - "\vsupply_name\x18# \x01(\tR\vsupply_name2\x95\t\n" + - "\aProduct\x122\n" + - "\tItemFetch\x12\x12.mall.FetchRequest\x1a\x0f.mall.ListReply\"\x00\x125\n" + + "\vsupply_name\x18# \x01(\tR\vsupply_name2\xb7\n" + "\n" + - "ItemDetail\x12\x12.mall.IdentRequest\x1a\x11.mall.ProductItem\"\x00\x12A\n" + - "\x12ItemDetailBySerial\x12\x18.mall.StoreSerialRequest\x1a\x0f.mall.ListReply\"\x00\x12?\n" + - "\x10ItemDetailBySpec\x12\x19.mall.DetailBySpecRequest\x1a\x0e.mall.ListItem\"\x00\x124\n" + + "\aProduct\x128\n" + + "\tItemFetch\x12\x18.blocks.MallFetchRequest\x1a\x0f.mall.ListReply\"\x00\x127\n" + "\n" + - "ItemCreate\x12\x11.mall.ProductItem\x1a\x11.mall.StatusReply\"\x00\x125\n" + + "ItemDetail\x12\x14.blocks.IdentRequest\x1a\x11.mall.ProductItem\"\x00\x12C\n" + + "\x12ItemDetailBySerial\x12\x1a.blocks.StoreSerialRequest\x1a\x0f.mall.ListReply\"\x00\x12?\n" + + "\x10ItemDetailBySpec\x12\x19.mall.DetailBySpecRequest\x1a\x0e.mall.ListItem\"\x00\x12>\n" + "\n" + - "ItemDelete\x12\x12.mall.IdentRequest\x1a\x11.mall.StatusReply\"\x00\x126\n" + + "ItemCreate\x12\x11.mall.ProductItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12A\n" + "\n" + - "ItemModify\x12\x13.mall.ModifyRequest\x1a\x11.mall.StatusReply\"\x00\x123\n" + - "\vItemBatchOp\x12\x0f.mall.OpRequest\x1a\x11.mall.StatusReply\"\x00\x122\n" + - "\tSpecFetch\x12\x12.mall.FetchRequest\x1a\x0f.mall.SpecReply\"\x00\x121\n" + + "ItemDelete\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12@\n" + "\n" + - "SpecCreate\x12\x0e.mall.SpecItem\x1a\x11.mall.StatusReply\"\x00\x121\n" + + "ItemModify\x12\x13.mall.ModifyRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12=\n" + + "\vItemBatchOp\x12\x0f.mall.OpRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x128\n" + + "\tSpecFetch\x12\x18.blocks.MallFetchRequest\x1a\x0f.mall.SpecReply\"\x00\x12;\n" + "\n" + - "SpecModify\x12\x0e.mall.SpecItem\x1a\x11.mall.StatusReply\"\x00\x125\n" + + "SpecCreate\x12\x0e.mall.SpecItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12;\n" + "\n" + - "SpecDelete\x12\x12.mall.IdentRequest\x1a\x11.mall.StatusReply\"\x00\x122\n" + + "SpecModify\x12\x0e.mall.SpecItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12A\n" + "\n" + - "SpecDetail\x12\x12.mall.IdentRequest\x1a\x0e.mall.SpecItem\"\x00\x123\n" + - "\vPhotoCreate\x12\x0f.mall.PhotoItem\x1a\x11.mall.StatusReply\"\x00\x126\n" + - "\vPhotoDelete\x12\x12.mall.IdentRequest\x1a\x11.mall.StatusReply\"\x00\x120\n" + - "\tPhotoList\x12\x0f.mall.PhotoItem\x1a\x10.mall.PhotoReply\"\x00\x12<\n" + - "\fCommentFetch\x12\x12.mall.FetchRequest\x1a\x16.mall.CommentListReply\"\x00\x127\n" + - "\rCommentCreate\x12\x11.mall.CommentItem\x1a\x11.mall.StatusReply\"\x00\x123\n" + - "\tCommentRe\x12\x11.mall.CommentItem\x1a\x11.mall.StatusReply\"\x00\x128\n" + - "\rCommentDelete\x12\x12.mall.IdentRequest\x1a\x11.mall.StatusReply\"\x00\x127\n" + - "\rCommentModify\x12\x11.mall.CommentItem\x1a\x11.mall.StatusReply\"\x00B\bZ\x06.;mallb\x06proto3" + "SpecDelete\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x124\n" + + "\n" + + "SpecDetail\x12\x14.blocks.IdentRequest\x1a\x0e.mall.SpecItem\"\x00\x12=\n" + + "\vPhotoCreate\x12\x0f.mall.PhotoItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12B\n" + + "\vPhotoDelete\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x120\n" + + "\tPhotoList\x12\x0f.mall.PhotoItem\x1a\x10.mall.PhotoReply\"\x00\x12B\n" + + "\fCommentFetch\x12\x18.blocks.MallFetchRequest\x1a\x16.mall.CommentListReply\"\x00\x12A\n" + + "\rCommentCreate\x12\x11.mall.CommentItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12=\n" + + "\tCommentRe\x12\x11.mall.CommentItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12D\n" + + "\rCommentDelete\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12A\n" + + "\rCommentModify\x12\x11.mall.CommentItem\x1a\x1b.blocks.IdentityStatusReply\"\x00B!Z\x1fbsm/full/module/ec/mall/pb;mallb\x06proto3" var ( - file_product_proto_rawDescOnce sync.Once - file_product_proto_rawDescData []byte + file_module_ec_mall_proto_product_proto_rawDescOnce sync.Once + file_module_ec_mall_proto_product_proto_rawDescData []byte ) -func file_product_proto_rawDescGZIP() []byte { - file_product_proto_rawDescOnce.Do(func() { - file_product_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_product_proto_rawDesc), len(file_product_proto_rawDesc))) +func file_module_ec_mall_proto_product_proto_rawDescGZIP() []byte { + file_module_ec_mall_proto_product_proto_rawDescOnce.Do(func() { + file_module_ec_mall_proto_product_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_product_proto_rawDesc), len(file_module_ec_mall_proto_product_proto_rawDesc))) }) - return file_product_proto_rawDescData + return file_module_ec_mall_proto_product_proto_rawDescData } -var file_product_proto_msgTypes = make([]protoimpl.MessageInfo, 21) -var file_product_proto_goTypes = []any{ - (*AttrItem)(nil), // 0: mall.AttrItem - (*CommentItem)(nil), // 1: mall.CommentItem - (*CommentItemRep)(nil), // 2: mall.CommentItemRep - (*DetailBySpecRequest)(nil), // 3: mall.DetailBySpecRequest - (*OpRequest)(nil), // 4: mall.OpRequest - (*ModifyRequest)(nil), // 5: mall.ModifyRequest - (*ListItem)(nil), // 6: mall.ListItem - (*ListWithIdRequest)(nil), // 7: mall.ListWithIdRequest - (*ListWithIdReply)(nil), // 8: mall.ListWithIdReply - (*PhotoReply)(nil), // 9: mall.PhotoReply - (*SpecReply)(nil), // 10: mall.SpecReply - (*CommentListReply)(nil), // 11: mall.CommentListReply - (*StatisticReply)(nil), // 12: mall.StatisticReply - (*OrgBySpecIdReply)(nil), // 13: mall.OrgBySpecIdReply - (*Subjoin)(nil), // 14: mall.Subjoin - (*ListReply)(nil), // 15: mall.ListReply - (*ProductBase)(nil), // 16: mall.ProductBase - (*SpecItem)(nil), // 17: mall.SpecItem - (*PhotoItem)(nil), // 18: mall.PhotoItem - (*CategoriesItem)(nil), // 19: mall.CategoriesItem - (*ProductItem)(nil), // 20: mall.ProductItem - (*FetchRequest)(nil), // 21: mall.FetchRequest - (*IdentRequest)(nil), // 22: mall.IdentRequest - (*StoreSerialRequest)(nil), // 23: mall.StoreSerialRequest - (*StatusReply)(nil), // 24: mall.StatusReply +var file_module_ec_mall_proto_product_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_module_ec_mall_proto_product_proto_goTypes = []any{ + (*AttrItem)(nil), // 0: mall.AttrItem + (*CommentItem)(nil), // 1: mall.CommentItem + (*CommentItemRep)(nil), // 2: mall.CommentItemRep + (*DetailBySpecRequest)(nil), // 3: mall.DetailBySpecRequest + (*OpRequest)(nil), // 4: mall.OpRequest + (*ModifyRequest)(nil), // 5: mall.ModifyRequest + (*ListItem)(nil), // 6: mall.ListItem + (*ListWithIdRequest)(nil), // 7: mall.ListWithIdRequest + (*ListWithIdReply)(nil), // 8: mall.ListWithIdReply + (*PhotoReply)(nil), // 9: mall.PhotoReply + (*SpecReply)(nil), // 10: mall.SpecReply + (*CommentListReply)(nil), // 11: mall.CommentListReply + (*StatisticReply)(nil), // 12: mall.StatisticReply + (*OrgBySpecIdReply)(nil), // 13: mall.OrgBySpecIdReply + (*Subjoin)(nil), // 14: mall.Subjoin + (*ListReply)(nil), // 15: mall.ListReply + (*ProductBase)(nil), // 16: mall.ProductBase + (*SpecItem)(nil), // 17: mall.SpecItem + (*PhotoItem)(nil), // 18: mall.PhotoItem + (*CategoriesItem)(nil), // 19: mall.CategoriesItem + (*ProductItem)(nil), // 20: mall.ProductItem + (*protobuf.MallFetchRequest)(nil), // 21: blocks.MallFetchRequest + (*protobuf.IdentRequest)(nil), // 22: blocks.IdentRequest + (*protobuf.StoreSerialRequest)(nil), // 23: blocks.StoreSerialRequest + (*protobuf.IdentityStatusReply)(nil), // 24: blocks.IdentityStatusReply } -var file_product_proto_depIdxs = []int32{ +var file_module_ec_mall_proto_product_proto_depIdxs = []int32{ 1, // 0: mall.CommentItemRep.list:type_name -> mall.CommentItem 6, // 1: mall.ListWithIdReply.data:type_name -> mall.ListItem 18, // 2: mall.PhotoReply.data:type_name -> mall.PhotoItem @@ -2441,48 +2443,48 @@ var file_product_proto_depIdxs = []int32{ 18, // 7: mall.ProductItem.images:type_name -> mall.PhotoItem 17, // 8: mall.ProductItem.specification:type_name -> mall.SpecItem 19, // 9: mall.ProductItem.categories:type_name -> mall.CategoriesItem - 21, // 10: mall.Product.ItemFetch:input_type -> mall.FetchRequest - 22, // 11: mall.Product.ItemDetail:input_type -> mall.IdentRequest - 23, // 12: mall.Product.ItemDetailBySerial:input_type -> mall.StoreSerialRequest + 21, // 10: mall.Product.ItemFetch:input_type -> blocks.MallFetchRequest + 22, // 11: mall.Product.ItemDetail:input_type -> blocks.IdentRequest + 23, // 12: mall.Product.ItemDetailBySerial:input_type -> blocks.StoreSerialRequest 3, // 13: mall.Product.ItemDetailBySpec:input_type -> mall.DetailBySpecRequest 20, // 14: mall.Product.ItemCreate:input_type -> mall.ProductItem - 22, // 15: mall.Product.ItemDelete:input_type -> mall.IdentRequest + 22, // 15: mall.Product.ItemDelete:input_type -> blocks.IdentRequest 5, // 16: mall.Product.ItemModify:input_type -> mall.ModifyRequest 4, // 17: mall.Product.ItemBatchOp:input_type -> mall.OpRequest - 21, // 18: mall.Product.SpecFetch:input_type -> mall.FetchRequest + 21, // 18: mall.Product.SpecFetch:input_type -> blocks.MallFetchRequest 17, // 19: mall.Product.SpecCreate:input_type -> mall.SpecItem 17, // 20: mall.Product.SpecModify:input_type -> mall.SpecItem - 22, // 21: mall.Product.SpecDelete:input_type -> mall.IdentRequest - 22, // 22: mall.Product.SpecDetail:input_type -> mall.IdentRequest + 22, // 21: mall.Product.SpecDelete:input_type -> blocks.IdentRequest + 22, // 22: mall.Product.SpecDetail:input_type -> blocks.IdentRequest 18, // 23: mall.Product.PhotoCreate:input_type -> mall.PhotoItem - 22, // 24: mall.Product.PhotoDelete:input_type -> mall.IdentRequest + 22, // 24: mall.Product.PhotoDelete:input_type -> blocks.IdentRequest 18, // 25: mall.Product.PhotoList:input_type -> mall.PhotoItem - 21, // 26: mall.Product.CommentFetch:input_type -> mall.FetchRequest + 21, // 26: mall.Product.CommentFetch:input_type -> blocks.MallFetchRequest 1, // 27: mall.Product.CommentCreate:input_type -> mall.CommentItem 1, // 28: mall.Product.CommentRe:input_type -> mall.CommentItem - 22, // 29: mall.Product.CommentDelete:input_type -> mall.IdentRequest + 22, // 29: mall.Product.CommentDelete:input_type -> blocks.IdentRequest 1, // 30: mall.Product.CommentModify:input_type -> mall.CommentItem 15, // 31: mall.Product.ItemFetch:output_type -> mall.ListReply 20, // 32: mall.Product.ItemDetail:output_type -> mall.ProductItem 15, // 33: mall.Product.ItemDetailBySerial:output_type -> mall.ListReply 6, // 34: mall.Product.ItemDetailBySpec:output_type -> mall.ListItem - 24, // 35: mall.Product.ItemCreate:output_type -> mall.StatusReply - 24, // 36: mall.Product.ItemDelete:output_type -> mall.StatusReply - 24, // 37: mall.Product.ItemModify:output_type -> mall.StatusReply - 24, // 38: mall.Product.ItemBatchOp:output_type -> mall.StatusReply + 24, // 35: mall.Product.ItemCreate:output_type -> blocks.IdentityStatusReply + 24, // 36: mall.Product.ItemDelete:output_type -> blocks.IdentityStatusReply + 24, // 37: mall.Product.ItemModify:output_type -> blocks.IdentityStatusReply + 24, // 38: mall.Product.ItemBatchOp:output_type -> blocks.IdentityStatusReply 10, // 39: mall.Product.SpecFetch:output_type -> mall.SpecReply - 24, // 40: mall.Product.SpecCreate:output_type -> mall.StatusReply - 24, // 41: mall.Product.SpecModify:output_type -> mall.StatusReply - 24, // 42: mall.Product.SpecDelete:output_type -> mall.StatusReply + 24, // 40: mall.Product.SpecCreate:output_type -> blocks.IdentityStatusReply + 24, // 41: mall.Product.SpecModify:output_type -> blocks.IdentityStatusReply + 24, // 42: mall.Product.SpecDelete:output_type -> blocks.IdentityStatusReply 17, // 43: mall.Product.SpecDetail:output_type -> mall.SpecItem - 24, // 44: mall.Product.PhotoCreate:output_type -> mall.StatusReply - 24, // 45: mall.Product.PhotoDelete:output_type -> mall.StatusReply + 24, // 44: mall.Product.PhotoCreate:output_type -> blocks.IdentityStatusReply + 24, // 45: mall.Product.PhotoDelete:output_type -> blocks.IdentityStatusReply 9, // 46: mall.Product.PhotoList:output_type -> mall.PhotoReply 11, // 47: mall.Product.CommentFetch:output_type -> mall.CommentListReply - 24, // 48: mall.Product.CommentCreate:output_type -> mall.StatusReply - 24, // 49: mall.Product.CommentRe:output_type -> mall.StatusReply - 24, // 50: mall.Product.CommentDelete:output_type -> mall.StatusReply - 24, // 51: mall.Product.CommentModify:output_type -> mall.StatusReply + 24, // 48: mall.Product.CommentCreate:output_type -> blocks.IdentityStatusReply + 24, // 49: mall.Product.CommentRe:output_type -> blocks.IdentityStatusReply + 24, // 50: mall.Product.CommentDelete:output_type -> blocks.IdentityStatusReply + 24, // 51: mall.Product.CommentModify:output_type -> blocks.IdentityStatusReply 31, // [31:52] is the sub-list for method output_type 10, // [10:31] is the sub-list for method input_type 10, // [10:10] is the sub-list for extension type_name @@ -2490,27 +2492,26 @@ var file_product_proto_depIdxs = []int32{ 0, // [0:10] is the sub-list for field type_name } -func init() { file_product_proto_init() } -func file_product_proto_init() { - if File_product_proto != nil { +func init() { file_module_ec_mall_proto_product_proto_init() } +func file_module_ec_mall_proto_product_proto_init() { + if File_module_ec_mall_proto_product_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_product_proto_rawDesc), len(file_product_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_product_proto_rawDesc), len(file_module_ec_mall_proto_product_proto_rawDesc)), NumEnums: 0, NumMessages: 21, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_product_proto_goTypes, - DependencyIndexes: file_product_proto_depIdxs, - MessageInfos: file_product_proto_msgTypes, + GoTypes: file_module_ec_mall_proto_product_proto_goTypes, + DependencyIndexes: file_module_ec_mall_proto_product_proto_depIdxs, + MessageInfos: file_module_ec_mall_proto_product_proto_msgTypes, }.Build() - File_product_proto = out.File - file_product_proto_goTypes = nil - file_product_proto_depIdxs = nil + File_module_ec_mall_proto_product_proto = out.File + file_module_ec_mall_proto_product_proto_goTypes = nil + file_module_ec_mall_proto_product_proto_depIdxs = nil } diff --git a/module/ec/mall/pb/product.pb.gw.go b/module/ec/mall/pb/product.pb.gw.go index 78fd2bb..75a3ae7 100644 --- a/module/ec/mall/pb/product.pb.gw.go +++ b/module/ec/mall/pb/product.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: product.proto +// source: module/ec/mall/proto/product.proto /* Package mall is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package mall import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Product_ItemFetch_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Product_ItemFetch_0(ctx context.Context, marshaler runtime.Marshale func local_request_Product_ItemFetch_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -64,7 +65,7 @@ func local_request_Product_ItemFetch_0(ctx context.Context, marshaler runtime.Ma func request_Product_ItemDetail_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Product_ItemDetail_0(ctx context.Context, marshaler runtime.Marshal func local_request_Product_ItemDetail_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -91,7 +92,7 @@ func local_request_Product_ItemDetail_0(ctx context.Context, marshaler runtime.M func request_Product_ItemDetailBySerial_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq StoreSerialRequest + protoReq blocks.StoreSerialRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Product_ItemDetailBySerial_0(ctx context.Context, marshaler runtime func local_request_Product_ItemDetailBySerial_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq StoreSerialRequest + protoReq blocks.StoreSerialRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -172,7 +173,7 @@ func local_request_Product_ItemCreate_0(ctx context.Context, marshaler runtime.M func request_Product_ItemDelete_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -187,7 +188,7 @@ func request_Product_ItemDelete_0(ctx context.Context, marshaler runtime.Marshal func local_request_Product_ItemDelete_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -253,7 +254,7 @@ func local_request_Product_ItemBatchOp_0(ctx context.Context, marshaler runtime. func request_Product_SpecFetch_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -268,7 +269,7 @@ func request_Product_SpecFetch_0(ctx context.Context, marshaler runtime.Marshale func local_request_Product_SpecFetch_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -334,7 +335,7 @@ func local_request_Product_SpecModify_0(ctx context.Context, marshaler runtime.M func request_Product_SpecDelete_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -349,7 +350,7 @@ func request_Product_SpecDelete_0(ctx context.Context, marshaler runtime.Marshal func local_request_Product_SpecDelete_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -361,7 +362,7 @@ func local_request_Product_SpecDelete_0(ctx context.Context, marshaler runtime.M func request_Product_SpecDetail_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -376,7 +377,7 @@ func request_Product_SpecDetail_0(ctx context.Context, marshaler runtime.Marshal func local_request_Product_SpecDetail_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -415,7 +416,7 @@ func local_request_Product_PhotoCreate_0(ctx context.Context, marshaler runtime. func request_Product_PhotoDelete_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -430,7 +431,7 @@ func request_Product_PhotoDelete_0(ctx context.Context, marshaler runtime.Marsha func local_request_Product_PhotoDelete_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -469,7 +470,7 @@ func local_request_Product_PhotoList_0(ctx context.Context, marshaler runtime.Ma func request_Product_CommentFetch_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -484,7 +485,7 @@ func request_Product_CommentFetch_0(ctx context.Context, marshaler runtime.Marsh func local_request_Product_CommentFetch_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -550,7 +551,7 @@ func local_request_Product_CommentRe_0(ctx context.Context, marshaler runtime.Ma func request_Product_CommentDelete_0(ctx context.Context, marshaler runtime.Marshaler, client ProductClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -565,7 +566,7 @@ func request_Product_CommentDelete_0(ctx context.Context, marshaler runtime.Mars func local_request_Product_CommentDelete_0(ctx context.Context, marshaler runtime.Marshaler, server ProductServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/ec/mall/pb/product_grpc.pb.go b/module/ec/mall/pb/product_grpc.pb.go index 2f8dd83..e48d726 100644 --- a/module/ec/mall/pb/product_grpc.pb.go +++ b/module/ec/mall/pb/product_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: product.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/mall/proto/product.proto package mall import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -49,47 +50,47 @@ const ( // 产品相关 type ProductClient interface { // 获取产品列表 - ItemFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListReply, error) + ItemFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*ListReply, error) // 获取产品详情 - ItemDetail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ProductItem, error) + ItemDetail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ProductItem, error) // 通过产品序列获取产品详情 - ItemDetailBySerial(ctx context.Context, in *StoreSerialRequest, opts ...grpc.CallOption) (*ListReply, error) + ItemDetailBySerial(ctx context.Context, in *protobuf.StoreSerialRequest, opts ...grpc.CallOption) (*ListReply, error) // 通过规格编号获取产品详情 ItemDetailBySpec(ctx context.Context, in *DetailBySpecRequest, opts ...grpc.CallOption) (*ListItem, error) // 添加产品 - ItemCreate(ctx context.Context, in *ProductItem, opts ...grpc.CallOption) (*StatusReply, error) + ItemCreate(ctx context.Context, in *ProductItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 删除产品 - ItemDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + ItemDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 发布/取消发布 产品 - ItemModify(ctx context.Context, in *ModifyRequest, opts ...grpc.CallOption) (*StatusReply, error) + ItemModify(ctx context.Context, in *ModifyRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 批量操作 - ItemBatchOp(ctx context.Context, in *OpRequest, opts ...grpc.CallOption) (*StatusReply, error) + ItemBatchOp(ctx context.Context, in *OpRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 产品规格列表 - SpecFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*SpecReply, error) + SpecFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*SpecReply, error) // 添加产品规格 - SpecCreate(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*StatusReply, error) + SpecCreate(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 修改产品规格 - SpecModify(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*StatusReply, error) + SpecModify(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 删除产品规格 - SpecDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + SpecDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 产品详情 - SpecDetail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*SpecItem, error) + SpecDetail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*SpecItem, error) // 添加产品图片 - PhotoCreate(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*StatusReply, error) + PhotoCreate(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 删除产品图片 - PhotoDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + PhotoDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 产品图片列表 PhotoList(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*PhotoReply, error) // 产品的评论列表 - CommentFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*CommentListReply, error) + CommentFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*CommentListReply, error) // 评论 - CommentCreate(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) + CommentCreate(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 回复评论 - CommentRe(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) + CommentRe(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 删除评论 - CommentDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + CommentDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 修改评论 - CommentModify(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) + CommentModify(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) } type productClient struct { @@ -100,7 +101,7 @@ func NewProductClient(cc grpc.ClientConnInterface) ProductClient { return &productClient{cc} } -func (c *productClient) ItemFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*ListReply, error) { +func (c *productClient) ItemFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*ListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListReply) err := c.cc.Invoke(ctx, Product_ItemFetch_FullMethodName, in, out, cOpts...) @@ -110,7 +111,7 @@ func (c *productClient) ItemFetch(ctx context.Context, in *FetchRequest, opts .. return out, nil } -func (c *productClient) ItemDetail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ProductItem, error) { +func (c *productClient) ItemDetail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ProductItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ProductItem) err := c.cc.Invoke(ctx, Product_ItemDetail_FullMethodName, in, out, cOpts...) @@ -120,7 +121,7 @@ func (c *productClient) ItemDetail(ctx context.Context, in *IdentRequest, opts . return out, nil } -func (c *productClient) ItemDetailBySerial(ctx context.Context, in *StoreSerialRequest, opts ...grpc.CallOption) (*ListReply, error) { +func (c *productClient) ItemDetailBySerial(ctx context.Context, in *protobuf.StoreSerialRequest, opts ...grpc.CallOption) (*ListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListReply) err := c.cc.Invoke(ctx, Product_ItemDetailBySerial_FullMethodName, in, out, cOpts...) @@ -140,9 +141,9 @@ func (c *productClient) ItemDetailBySpec(ctx context.Context, in *DetailBySpecRe return out, nil } -func (c *productClient) ItemCreate(ctx context.Context, in *ProductItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *productClient) ItemCreate(ctx context.Context, in *ProductItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Product_ItemCreate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -150,9 +151,9 @@ func (c *productClient) ItemCreate(ctx context.Context, in *ProductItem, opts .. return out, nil } -func (c *productClient) ItemDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *productClient) ItemDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Product_ItemDelete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -160,9 +161,9 @@ func (c *productClient) ItemDelete(ctx context.Context, in *IdentRequest, opts . return out, nil } -func (c *productClient) ItemModify(ctx context.Context, in *ModifyRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *productClient) ItemModify(ctx context.Context, in *ModifyRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Product_ItemModify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -170,9 +171,9 @@ func (c *productClient) ItemModify(ctx context.Context, in *ModifyRequest, opts return out, nil } -func (c *productClient) ItemBatchOp(ctx context.Context, in *OpRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *productClient) ItemBatchOp(ctx context.Context, in *OpRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Product_ItemBatchOp_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -180,7 +181,7 @@ func (c *productClient) ItemBatchOp(ctx context.Context, in *OpRequest, opts ... return out, nil } -func (c *productClient) SpecFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*SpecReply, error) { +func (c *productClient) SpecFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*SpecReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SpecReply) err := c.cc.Invoke(ctx, Product_SpecFetch_FullMethodName, in, out, cOpts...) @@ -190,9 +191,9 @@ func (c *productClient) SpecFetch(ctx context.Context, in *FetchRequest, opts .. return out, nil } -func (c *productClient) SpecCreate(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *productClient) SpecCreate(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Product_SpecCreate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -200,9 +201,9 @@ func (c *productClient) SpecCreate(ctx context.Context, in *SpecItem, opts ...gr return out, nil } -func (c *productClient) SpecModify(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *productClient) SpecModify(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Product_SpecModify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -210,9 +211,9 @@ func (c *productClient) SpecModify(ctx context.Context, in *SpecItem, opts ...gr return out, nil } -func (c *productClient) SpecDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *productClient) SpecDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Product_SpecDelete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -220,7 +221,7 @@ func (c *productClient) SpecDelete(ctx context.Context, in *IdentRequest, opts . return out, nil } -func (c *productClient) SpecDetail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*SpecItem, error) { +func (c *productClient) SpecDetail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*SpecItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SpecItem) err := c.cc.Invoke(ctx, Product_SpecDetail_FullMethodName, in, out, cOpts...) @@ -230,9 +231,9 @@ func (c *productClient) SpecDetail(ctx context.Context, in *IdentRequest, opts . return out, nil } -func (c *productClient) PhotoCreate(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *productClient) PhotoCreate(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Product_PhotoCreate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -240,9 +241,9 @@ func (c *productClient) PhotoCreate(ctx context.Context, in *PhotoItem, opts ... return out, nil } -func (c *productClient) PhotoDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *productClient) PhotoDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Product_PhotoDelete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -260,7 +261,7 @@ func (c *productClient) PhotoList(ctx context.Context, in *PhotoItem, opts ...gr return out, nil } -func (c *productClient) CommentFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*CommentListReply, error) { +func (c *productClient) CommentFetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*CommentListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CommentListReply) err := c.cc.Invoke(ctx, Product_CommentFetch_FullMethodName, in, out, cOpts...) @@ -270,9 +271,9 @@ func (c *productClient) CommentFetch(ctx context.Context, in *FetchRequest, opts return out, nil } -func (c *productClient) CommentCreate(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *productClient) CommentCreate(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Product_CommentCreate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -280,9 +281,9 @@ func (c *productClient) CommentCreate(ctx context.Context, in *CommentItem, opts return out, nil } -func (c *productClient) CommentRe(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *productClient) CommentRe(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Product_CommentRe_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -290,9 +291,9 @@ func (c *productClient) CommentRe(ctx context.Context, in *CommentItem, opts ... return out, nil } -func (c *productClient) CommentDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *productClient) CommentDelete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Product_CommentDelete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -300,9 +301,9 @@ func (c *productClient) CommentDelete(ctx context.Context, in *IdentRequest, opt return out, nil } -func (c *productClient) CommentModify(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *productClient) CommentModify(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Product_CommentModify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -311,128 +312,126 @@ func (c *productClient) CommentModify(ctx context.Context, in *CommentItem, opts } // ProductServer is the server API for Product service. -// All implementations must embed UnimplementedProductServer +// All implementations should embed UnimplementedProductServer // for forward compatibility. // // 产品相关 type ProductServer interface { // 获取产品列表 - ItemFetch(context.Context, *FetchRequest) (*ListReply, error) + ItemFetch(context.Context, *protobuf.MallFetchRequest) (*ListReply, error) // 获取产品详情 - ItemDetail(context.Context, *IdentRequest) (*ProductItem, error) + ItemDetail(context.Context, *protobuf.IdentRequest) (*ProductItem, error) // 通过产品序列获取产品详情 - ItemDetailBySerial(context.Context, *StoreSerialRequest) (*ListReply, error) + ItemDetailBySerial(context.Context, *protobuf.StoreSerialRequest) (*ListReply, error) // 通过规格编号获取产品详情 ItemDetailBySpec(context.Context, *DetailBySpecRequest) (*ListItem, error) // 添加产品 - ItemCreate(context.Context, *ProductItem) (*StatusReply, error) + ItemCreate(context.Context, *ProductItem) (*protobuf.IdentityStatusReply, error) // 删除产品 - ItemDelete(context.Context, *IdentRequest) (*StatusReply, error) + ItemDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) // 发布/取消发布 产品 - ItemModify(context.Context, *ModifyRequest) (*StatusReply, error) + ItemModify(context.Context, *ModifyRequest) (*protobuf.IdentityStatusReply, error) // 批量操作 - ItemBatchOp(context.Context, *OpRequest) (*StatusReply, error) + ItemBatchOp(context.Context, *OpRequest) (*protobuf.IdentityStatusReply, error) // 产品规格列表 - SpecFetch(context.Context, *FetchRequest) (*SpecReply, error) + SpecFetch(context.Context, *protobuf.MallFetchRequest) (*SpecReply, error) // 添加产品规格 - SpecCreate(context.Context, *SpecItem) (*StatusReply, error) + SpecCreate(context.Context, *SpecItem) (*protobuf.IdentityStatusReply, error) // 修改产品规格 - SpecModify(context.Context, *SpecItem) (*StatusReply, error) + SpecModify(context.Context, *SpecItem) (*protobuf.IdentityStatusReply, error) // 删除产品规格 - SpecDelete(context.Context, *IdentRequest) (*StatusReply, error) + SpecDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) // 产品详情 - SpecDetail(context.Context, *IdentRequest) (*SpecItem, error) + SpecDetail(context.Context, *protobuf.IdentRequest) (*SpecItem, error) // 添加产品图片 - PhotoCreate(context.Context, *PhotoItem) (*StatusReply, error) + PhotoCreate(context.Context, *PhotoItem) (*protobuf.IdentityStatusReply, error) // 删除产品图片 - PhotoDelete(context.Context, *IdentRequest) (*StatusReply, error) + PhotoDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) // 产品图片列表 PhotoList(context.Context, *PhotoItem) (*PhotoReply, error) // 产品的评论列表 - CommentFetch(context.Context, *FetchRequest) (*CommentListReply, error) + CommentFetch(context.Context, *protobuf.MallFetchRequest) (*CommentListReply, error) // 评论 - CommentCreate(context.Context, *CommentItem) (*StatusReply, error) + CommentCreate(context.Context, *CommentItem) (*protobuf.IdentityStatusReply, error) // 回复评论 - CommentRe(context.Context, *CommentItem) (*StatusReply, error) + CommentRe(context.Context, *CommentItem) (*protobuf.IdentityStatusReply, error) // 删除评论 - CommentDelete(context.Context, *IdentRequest) (*StatusReply, error) + CommentDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) // 修改评论 - CommentModify(context.Context, *CommentItem) (*StatusReply, error) - mustEmbedUnimplementedProductServer() + CommentModify(context.Context, *CommentItem) (*protobuf.IdentityStatusReply, error) } -// UnimplementedProductServer must be embedded to have +// UnimplementedProductServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedProductServer struct{} -func (UnimplementedProductServer) ItemFetch(context.Context, *FetchRequest) (*ListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ItemFetch not implemented") +func (UnimplementedProductServer) ItemFetch(context.Context, *protobuf.MallFetchRequest) (*ListReply, error) { + return nil, status.Error(codes.Unimplemented, "method ItemFetch not implemented") } -func (UnimplementedProductServer) ItemDetail(context.Context, *IdentRequest) (*ProductItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method ItemDetail not implemented") +func (UnimplementedProductServer) ItemDetail(context.Context, *protobuf.IdentRequest) (*ProductItem, error) { + return nil, status.Error(codes.Unimplemented, "method ItemDetail not implemented") } -func (UnimplementedProductServer) ItemDetailBySerial(context.Context, *StoreSerialRequest) (*ListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ItemDetailBySerial not implemented") +func (UnimplementedProductServer) ItemDetailBySerial(context.Context, *protobuf.StoreSerialRequest) (*ListReply, error) { + return nil, status.Error(codes.Unimplemented, "method ItemDetailBySerial not implemented") } func (UnimplementedProductServer) ItemDetailBySpec(context.Context, *DetailBySpecRequest) (*ListItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method ItemDetailBySpec not implemented") + return nil, status.Error(codes.Unimplemented, "method ItemDetailBySpec not implemented") } -func (UnimplementedProductServer) ItemCreate(context.Context, *ProductItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ItemCreate not implemented") +func (UnimplementedProductServer) ItemCreate(context.Context, *ProductItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method ItemCreate not implemented") } -func (UnimplementedProductServer) ItemDelete(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ItemDelete not implemented") +func (UnimplementedProductServer) ItemDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method ItemDelete not implemented") } -func (UnimplementedProductServer) ItemModify(context.Context, *ModifyRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ItemModify not implemented") +func (UnimplementedProductServer) ItemModify(context.Context, *ModifyRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method ItemModify not implemented") } -func (UnimplementedProductServer) ItemBatchOp(context.Context, *OpRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ItemBatchOp not implemented") +func (UnimplementedProductServer) ItemBatchOp(context.Context, *OpRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method ItemBatchOp not implemented") } -func (UnimplementedProductServer) SpecFetch(context.Context, *FetchRequest) (*SpecReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SpecFetch not implemented") +func (UnimplementedProductServer) SpecFetch(context.Context, *protobuf.MallFetchRequest) (*SpecReply, error) { + return nil, status.Error(codes.Unimplemented, "method SpecFetch not implemented") } -func (UnimplementedProductServer) SpecCreate(context.Context, *SpecItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SpecCreate not implemented") +func (UnimplementedProductServer) SpecCreate(context.Context, *SpecItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SpecCreate not implemented") } -func (UnimplementedProductServer) SpecModify(context.Context, *SpecItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SpecModify not implemented") +func (UnimplementedProductServer) SpecModify(context.Context, *SpecItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SpecModify not implemented") } -func (UnimplementedProductServer) SpecDelete(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SpecDelete not implemented") +func (UnimplementedProductServer) SpecDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SpecDelete not implemented") } -func (UnimplementedProductServer) SpecDetail(context.Context, *IdentRequest) (*SpecItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method SpecDetail not implemented") +func (UnimplementedProductServer) SpecDetail(context.Context, *protobuf.IdentRequest) (*SpecItem, error) { + return nil, status.Error(codes.Unimplemented, "method SpecDetail not implemented") } -func (UnimplementedProductServer) PhotoCreate(context.Context, *PhotoItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method PhotoCreate not implemented") +func (UnimplementedProductServer) PhotoCreate(context.Context, *PhotoItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method PhotoCreate not implemented") } -func (UnimplementedProductServer) PhotoDelete(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method PhotoDelete not implemented") +func (UnimplementedProductServer) PhotoDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method PhotoDelete not implemented") } func (UnimplementedProductServer) PhotoList(context.Context, *PhotoItem) (*PhotoReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method PhotoList not implemented") + return nil, status.Error(codes.Unimplemented, "method PhotoList not implemented") } -func (UnimplementedProductServer) CommentFetch(context.Context, *FetchRequest) (*CommentListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CommentFetch not implemented") +func (UnimplementedProductServer) CommentFetch(context.Context, *protobuf.MallFetchRequest) (*CommentListReply, error) { + return nil, status.Error(codes.Unimplemented, "method CommentFetch not implemented") } -func (UnimplementedProductServer) CommentCreate(context.Context, *CommentItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CommentCreate not implemented") +func (UnimplementedProductServer) CommentCreate(context.Context, *CommentItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CommentCreate not implemented") } -func (UnimplementedProductServer) CommentRe(context.Context, *CommentItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CommentRe not implemented") +func (UnimplementedProductServer) CommentRe(context.Context, *CommentItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CommentRe not implemented") } -func (UnimplementedProductServer) CommentDelete(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CommentDelete not implemented") +func (UnimplementedProductServer) CommentDelete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CommentDelete not implemented") } -func (UnimplementedProductServer) CommentModify(context.Context, *CommentItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CommentModify not implemented") +func (UnimplementedProductServer) CommentModify(context.Context, *CommentItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method CommentModify not implemented") } -func (UnimplementedProductServer) mustEmbedUnimplementedProductServer() {} -func (UnimplementedProductServer) testEmbeddedByValue() {} +func (UnimplementedProductServer) testEmbeddedByValue() {} // UnsafeProductServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ProductServer will @@ -442,7 +441,7 @@ type UnsafeProductServer interface { } func RegisterProductServer(s grpc.ServiceRegistrar, srv ProductServer) { - // If the following call pancis, it indicates UnimplementedProductServer was + // If the following call panics, it indicates UnimplementedProductServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -453,7 +452,7 @@ func RegisterProductServer(s grpc.ServiceRegistrar, srv ProductServer) { } func _Product_ItemFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.MallFetchRequest) if err := dec(in); err != nil { return nil, err } @@ -465,13 +464,13 @@ func _Product_ItemFetch_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: Product_ItemFetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProductServer).ItemFetch(ctx, req.(*FetchRequest)) + return srv.(ProductServer).ItemFetch(ctx, req.(*protobuf.MallFetchRequest)) } return interceptor(ctx, in, info, handler) } func _Product_ItemDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -483,13 +482,13 @@ func _Product_ItemDetail_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: Product_ItemDetail_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProductServer).ItemDetail(ctx, req.(*IdentRequest)) + return srv.(ProductServer).ItemDetail(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Product_ItemDetailBySerial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StoreSerialRequest) + in := new(protobuf.StoreSerialRequest) if err := dec(in); err != nil { return nil, err } @@ -501,7 +500,7 @@ func _Product_ItemDetailBySerial_Handler(srv interface{}, ctx context.Context, d FullMethod: Product_ItemDetailBySerial_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProductServer).ItemDetailBySerial(ctx, req.(*StoreSerialRequest)) + return srv.(ProductServer).ItemDetailBySerial(ctx, req.(*protobuf.StoreSerialRequest)) } return interceptor(ctx, in, info, handler) } @@ -543,7 +542,7 @@ func _Product_ItemCreate_Handler(srv interface{}, ctx context.Context, dec func( } func _Product_ItemDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -555,7 +554,7 @@ func _Product_ItemDelete_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: Product_ItemDelete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProductServer).ItemDelete(ctx, req.(*IdentRequest)) + return srv.(ProductServer).ItemDelete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -597,7 +596,7 @@ func _Product_ItemBatchOp_Handler(srv interface{}, ctx context.Context, dec func } func _Product_SpecFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.MallFetchRequest) if err := dec(in); err != nil { return nil, err } @@ -609,7 +608,7 @@ func _Product_SpecFetch_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: Product_SpecFetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProductServer).SpecFetch(ctx, req.(*FetchRequest)) + return srv.(ProductServer).SpecFetch(ctx, req.(*protobuf.MallFetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -651,7 +650,7 @@ func _Product_SpecModify_Handler(srv interface{}, ctx context.Context, dec func( } func _Product_SpecDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -663,13 +662,13 @@ func _Product_SpecDelete_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: Product_SpecDelete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProductServer).SpecDelete(ctx, req.(*IdentRequest)) + return srv.(ProductServer).SpecDelete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Product_SpecDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -681,7 +680,7 @@ func _Product_SpecDetail_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: Product_SpecDetail_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProductServer).SpecDetail(ctx, req.(*IdentRequest)) + return srv.(ProductServer).SpecDetail(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -705,7 +704,7 @@ func _Product_PhotoCreate_Handler(srv interface{}, ctx context.Context, dec func } func _Product_PhotoDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -717,7 +716,7 @@ func _Product_PhotoDelete_Handler(srv interface{}, ctx context.Context, dec func FullMethod: Product_PhotoDelete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProductServer).PhotoDelete(ctx, req.(*IdentRequest)) + return srv.(ProductServer).PhotoDelete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -741,7 +740,7 @@ func _Product_PhotoList_Handler(srv interface{}, ctx context.Context, dec func(i } func _Product_CommentFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.MallFetchRequest) if err := dec(in); err != nil { return nil, err } @@ -753,7 +752,7 @@ func _Product_CommentFetch_Handler(srv interface{}, ctx context.Context, dec fun FullMethod: Product_CommentFetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProductServer).CommentFetch(ctx, req.(*FetchRequest)) + return srv.(ProductServer).CommentFetch(ctx, req.(*protobuf.MallFetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -795,7 +794,7 @@ func _Product_CommentRe_Handler(srv interface{}, ctx context.Context, dec func(i } func _Product_CommentDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -807,7 +806,7 @@ func _Product_CommentDelete_Handler(srv interface{}, ctx context.Context, dec fu FullMethod: Product_CommentDelete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProductServer).CommentDelete(ctx, req.(*IdentRequest)) + return srv.(ProductServer).CommentDelete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -923,5 +922,5 @@ var Product_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "product.proto", + Metadata: "module/ec/mall/proto/product.proto", } diff --git a/module/ec/mall/pb/staff.pb.go b/module/ec/mall/pb/staff.pb.go index 69238f5..e44937e 100644 --- a/module/ec/mall/pb/staff.pb.go +++ b/module/ec/mall/pb/staff.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: staff.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/mall/proto/staff.proto package mall import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -34,7 +35,7 @@ type LoginRequest struct { func (x *LoginRequest) Reset() { *x = LoginRequest{} - mi := &file_staff_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_staff_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +47,7 @@ func (x *LoginRequest) String() string { func (*LoginRequest) ProtoMessage() {} func (x *LoginRequest) ProtoReflect() protoreflect.Message { - mi := &file_staff_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_staff_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +60,7 @@ func (x *LoginRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead. func (*LoginRequest) Descriptor() ([]byte, []int) { - return file_staff_proto_rawDescGZIP(), []int{0} + return file_module_ec_mall_proto_staff_proto_rawDescGZIP(), []int{0} } func (x *LoginRequest) GetAccount() string { @@ -114,7 +115,7 @@ type LoginReply struct { func (x *LoginReply) Reset() { *x = LoginReply{} - mi := &file_staff_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_staff_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -126,7 +127,7 @@ func (x *LoginReply) String() string { func (*LoginReply) ProtoMessage() {} func (x *LoginReply) ProtoReflect() protoreflect.Message { - mi := &file_staff_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_staff_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -139,7 +140,7 @@ func (x *LoginReply) ProtoReflect() protoreflect.Message { // Deprecated: Use LoginReply.ProtoReflect.Descriptor instead. func (*LoginReply) Descriptor() ([]byte, []int) { - return file_staff_proto_rawDescGZIP(), []int{1} + return file_module_ec_mall_proto_staff_proto_rawDescGZIP(), []int{1} } func (x *LoginReply) GetToken() string { @@ -216,7 +217,7 @@ type SetAccountRequest struct { func (x *SetAccountRequest) Reset() { *x = SetAccountRequest{} - mi := &file_staff_proto_msgTypes[2] + mi := &file_module_ec_mall_proto_staff_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -228,7 +229,7 @@ func (x *SetAccountRequest) String() string { func (*SetAccountRequest) ProtoMessage() {} func (x *SetAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_staff_proto_msgTypes[2] + mi := &file_module_ec_mall_proto_staff_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -241,7 +242,7 @@ func (x *SetAccountRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetAccountRequest.ProtoReflect.Descriptor instead. func (*SetAccountRequest) Descriptor() ([]byte, []int) { - return file_staff_proto_rawDescGZIP(), []int{2} + return file_module_ec_mall_proto_staff_proto_rawDescGZIP(), []int{2} } func (x *SetAccountRequest) GetAccount() string { @@ -285,7 +286,7 @@ type StaffItem struct { func (x *StaffItem) Reset() { *x = StaffItem{} - mi := &file_staff_proto_msgTypes[3] + mi := &file_module_ec_mall_proto_staff_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -297,7 +298,7 @@ func (x *StaffItem) String() string { func (*StaffItem) ProtoMessage() {} func (x *StaffItem) ProtoReflect() protoreflect.Message { - mi := &file_staff_proto_msgTypes[3] + mi := &file_module_ec_mall_proto_staff_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -310,7 +311,7 @@ func (x *StaffItem) ProtoReflect() protoreflect.Message { // Deprecated: Use StaffItem.ProtoReflect.Descriptor instead. func (*StaffItem) Descriptor() ([]byte, []int) { - return file_staff_proto_rawDescGZIP(), []int{3} + return file_module_ec_mall_proto_staff_proto_rawDescGZIP(), []int{3} } func (x *StaffItem) GetId() int64 { @@ -407,7 +408,7 @@ type StaffListReply struct { func (x *StaffListReply) Reset() { *x = StaffListReply{} - mi := &file_staff_proto_msgTypes[4] + mi := &file_module_ec_mall_proto_staff_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -419,7 +420,7 @@ func (x *StaffListReply) String() string { func (*StaffListReply) ProtoMessage() {} func (x *StaffListReply) ProtoReflect() protoreflect.Message { - mi := &file_staff_proto_msgTypes[4] + mi := &file_module_ec_mall_proto_staff_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -432,7 +433,7 @@ func (x *StaffListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use StaffListReply.ProtoReflect.Descriptor instead. func (*StaffListReply) Descriptor() ([]byte, []int) { - return file_staff_proto_rawDescGZIP(), []int{4} + return file_module_ec_mall_proto_staff_proto_rawDescGZIP(), []int{4} } func (x *StaffListReply) GetData() []*StaffItem { @@ -449,11 +450,11 @@ func (x *StaffListReply) GetCount() int64 { return 0 } -var File_staff_proto protoreflect.FileDescriptor +var File_module_ec_mall_proto_staff_proto protoreflect.FileDescriptor -const file_staff_proto_rawDesc = "" + +const file_module_ec_mall_proto_staff_proto_rawDesc = "" + "\n" + - "\x13ec/mall/staff.proto\x12\x04mall\x1a\x11mall/blocks.proto\"\x9e\x01\n" + + " module/ec/mall/proto/staff.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"\x9e\x01\n" + "\fLoginRequest\x12\x18\n" + "\aaccount\x18\x01 \x01(\tR\aaccount\x12\x1a\n" + "\bpassword\x18\x02 \x01(\tR\bpassword\x12\x14\n" + @@ -497,57 +498,57 @@ const file_staff_proto_rawDesc = "" + "created_at\"K\n" + "\x0eStaffListReply\x12#\n" + "\x04data\x18\x01 \x03(\v2\x0f.mall.StaffItemR\x04data\x12\x14\n" + - "\x05count\x18\x02 \x01(\x03R\x05count2\xf6\x02\n" + + "\x05count\x18\x02 \x01(\x03R\x05count2\xa8\x03\n" + "\x05Staff\x12/\n" + - "\x05Login\x12\x12.mall.LoginRequest\x1a\x10.mall.LoginReply\"\x00\x123\n" + - "\x05Fetch\x12\x12.mall.FetchRequest\x1a\x14.mall.StaffListReply\"\x00\x12.\n" + - "\x06Create\x12\x0f.mall.StaffItem\x1a\x11.mall.StatusReply\"\x00\x121\n" + - "\x06Delete\x12\x12.mall.IdentRequest\x1a\x11.mall.StatusReply\"\x00\x123\n" + + "\x05Login\x12\x12.mall.LoginRequest\x1a\x10.mall.LoginReply\"\x00\x129\n" + + "\x05Fetch\x12\x18.blocks.MallFetchRequest\x1a\x14.mall.StaffListReply\"\x00\x128\n" + + "\x06Create\x12\x0f.mall.StaffItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12=\n" + + "\x06Delete\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x125\n" + "\n" + - "GetProfile\x12\x12.mall.IdentRequest\x1a\x0f.mall.StaffItem\"\x00\x122\n" + + "GetProfile\x12\x14.blocks.IdentRequest\x1a\x0f.mall.StaffItem\"\x00\x12<\n" + "\n" + - "SetProfile\x12\x0f.mall.StaffItem\x1a\x11.mall.StatusReply\"\x00\x12;\n" + - "\vSetPassword\x12\x17.mall.SetAccountRequest\x1a\x11.mall.StatusReply\"\x00B\bZ\x06.;mallb\x06proto3" + "SetProfile\x12\x0f.mall.StaffItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12E\n" + + "\vSetPassword\x12\x17.mall.SetAccountRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00B!Z\x1fbsm/full/module/ec/mall/pb;mallb\x06proto3" var ( - file_staff_proto_rawDescOnce sync.Once - file_staff_proto_rawDescData []byte + file_module_ec_mall_proto_staff_proto_rawDescOnce sync.Once + file_module_ec_mall_proto_staff_proto_rawDescData []byte ) -func file_staff_proto_rawDescGZIP() []byte { - file_staff_proto_rawDescOnce.Do(func() { - file_staff_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_staff_proto_rawDesc), len(file_staff_proto_rawDesc))) +func file_module_ec_mall_proto_staff_proto_rawDescGZIP() []byte { + file_module_ec_mall_proto_staff_proto_rawDescOnce.Do(func() { + file_module_ec_mall_proto_staff_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_staff_proto_rawDesc), len(file_module_ec_mall_proto_staff_proto_rawDesc))) }) - return file_staff_proto_rawDescData + return file_module_ec_mall_proto_staff_proto_rawDescData } -var file_staff_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_staff_proto_goTypes = []any{ - (*LoginRequest)(nil), // 0: mall.LoginRequest - (*LoginReply)(nil), // 1: mall.LoginReply - (*SetAccountRequest)(nil), // 2: mall.SetAccountRequest - (*StaffItem)(nil), // 3: mall.StaffItem - (*StaffListReply)(nil), // 4: mall.StaffListReply - (*FetchRequest)(nil), // 5: mall.FetchRequest - (*IdentRequest)(nil), // 6: mall.IdentRequest - (*StatusReply)(nil), // 7: mall.StatusReply +var file_module_ec_mall_proto_staff_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_module_ec_mall_proto_staff_proto_goTypes = []any{ + (*LoginRequest)(nil), // 0: mall.LoginRequest + (*LoginReply)(nil), // 1: mall.LoginReply + (*SetAccountRequest)(nil), // 2: mall.SetAccountRequest + (*StaffItem)(nil), // 3: mall.StaffItem + (*StaffListReply)(nil), // 4: mall.StaffListReply + (*protobuf.MallFetchRequest)(nil), // 5: blocks.MallFetchRequest + (*protobuf.IdentRequest)(nil), // 6: blocks.IdentRequest + (*protobuf.IdentityStatusReply)(nil), // 7: blocks.IdentityStatusReply } -var file_staff_proto_depIdxs = []int32{ +var file_module_ec_mall_proto_staff_proto_depIdxs = []int32{ 3, // 0: mall.StaffListReply.data:type_name -> mall.StaffItem 0, // 1: mall.Staff.Login:input_type -> mall.LoginRequest - 5, // 2: mall.Staff.Fetch:input_type -> mall.FetchRequest + 5, // 2: mall.Staff.Fetch:input_type -> blocks.MallFetchRequest 3, // 3: mall.Staff.Create:input_type -> mall.StaffItem - 6, // 4: mall.Staff.Delete:input_type -> mall.IdentRequest - 6, // 5: mall.Staff.GetProfile:input_type -> mall.IdentRequest + 6, // 4: mall.Staff.Delete:input_type -> blocks.IdentRequest + 6, // 5: mall.Staff.GetProfile:input_type -> blocks.IdentRequest 3, // 6: mall.Staff.SetProfile:input_type -> mall.StaffItem 2, // 7: mall.Staff.SetPassword:input_type -> mall.SetAccountRequest 1, // 8: mall.Staff.Login:output_type -> mall.LoginReply 4, // 9: mall.Staff.Fetch:output_type -> mall.StaffListReply - 7, // 10: mall.Staff.Create:output_type -> mall.StatusReply - 7, // 11: mall.Staff.Delete:output_type -> mall.StatusReply + 7, // 10: mall.Staff.Create:output_type -> blocks.IdentityStatusReply + 7, // 11: mall.Staff.Delete:output_type -> blocks.IdentityStatusReply 3, // 12: mall.Staff.GetProfile:output_type -> mall.StaffItem - 7, // 13: mall.Staff.SetProfile:output_type -> mall.StatusReply - 7, // 14: mall.Staff.SetPassword:output_type -> mall.StatusReply + 7, // 13: mall.Staff.SetProfile:output_type -> blocks.IdentityStatusReply + 7, // 14: mall.Staff.SetPassword:output_type -> blocks.IdentityStatusReply 8, // [8:15] is the sub-list for method output_type 1, // [1:8] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -555,27 +556,26 @@ var file_staff_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_staff_proto_init() } -func file_staff_proto_init() { - if File_staff_proto != nil { +func init() { file_module_ec_mall_proto_staff_proto_init() } +func file_module_ec_mall_proto_staff_proto_init() { + if File_module_ec_mall_proto_staff_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_staff_proto_rawDesc), len(file_staff_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_staff_proto_rawDesc), len(file_module_ec_mall_proto_staff_proto_rawDesc)), NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_staff_proto_goTypes, - DependencyIndexes: file_staff_proto_depIdxs, - MessageInfos: file_staff_proto_msgTypes, + GoTypes: file_module_ec_mall_proto_staff_proto_goTypes, + DependencyIndexes: file_module_ec_mall_proto_staff_proto_depIdxs, + MessageInfos: file_module_ec_mall_proto_staff_proto_msgTypes, }.Build() - File_staff_proto = out.File - file_staff_proto_goTypes = nil - file_staff_proto_depIdxs = nil + File_module_ec_mall_proto_staff_proto = out.File + file_module_ec_mall_proto_staff_proto_goTypes = nil + file_module_ec_mall_proto_staff_proto_depIdxs = nil } diff --git a/module/ec/mall/pb/staff.pb.gw.go b/module/ec/mall/pb/staff.pb.gw.go index c6874f0..beae0ff 100644 --- a/module/ec/mall/pb/staff.pb.gw.go +++ b/module/ec/mall/pb/staff.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: staff.proto +// source: module/ec/mall/proto/staff.proto /* Package mall is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package mall import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -64,7 +65,7 @@ func local_request_Staff_Login_0(ctx context.Context, marshaler runtime.Marshale func request_Staff_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client StaffClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Staff_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Staff_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server StaffServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MallFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -118,7 +119,7 @@ func local_request_Staff_Create_0(ctx context.Context, marshaler runtime.Marshal func request_Staff_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client StaffClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Staff_Delete_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Staff_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server StaffServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -145,7 +146,7 @@ func local_request_Staff_Delete_0(ctx context.Context, marshaler runtime.Marshal func request_Staff_GetProfile_0(ctx context.Context, marshaler runtime.Marshaler, client StaffClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -160,7 +161,7 @@ func request_Staff_GetProfile_0(ctx context.Context, marshaler runtime.Marshaler func local_request_Staff_GetProfile_0(ctx context.Context, marshaler runtime.Marshaler, server StaffServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/ec/mall/pb/staff_grpc.pb.go b/module/ec/mall/pb/staff_grpc.pb.go index d2622c6..3583004 100644 --- a/module/ec/mall/pb/staff_grpc.pb.go +++ b/module/ec/mall/pb/staff_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: staff.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/mall/proto/staff.proto package mall import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -37,17 +38,17 @@ type StaffClient interface { // 登录 Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) // 获取工作人员列表 - Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*StaffListReply, error) + Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*StaffListReply, error) // 创建工作人员 - Create(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 删除工作人员 - Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 获取个人信息 - GetProfile(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StaffItem, error) + GetProfile(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*StaffItem, error) // 设置个人信息 - SetProfile(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*StatusReply, error) + SetProfile(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 设置账号密码 - SetPassword(ctx context.Context, in *SetAccountRequest, opts ...grpc.CallOption) (*StatusReply, error) + SetPassword(ctx context.Context, in *SetAccountRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) } type staffClient struct { @@ -68,7 +69,7 @@ func (c *staffClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc. return out, nil } -func (c *staffClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*StaffListReply, error) { +func (c *staffClient) Fetch(ctx context.Context, in *protobuf.MallFetchRequest, opts ...grpc.CallOption) (*StaffListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StaffListReply) err := c.cc.Invoke(ctx, Staff_Fetch_FullMethodName, in, out, cOpts...) @@ -78,9 +79,9 @@ func (c *staffClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc. return out, nil } -func (c *staffClient) Create(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *staffClient) Create(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Staff_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -88,9 +89,9 @@ func (c *staffClient) Create(ctx context.Context, in *StaffItem, opts ...grpc.Ca return out, nil } -func (c *staffClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *staffClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Staff_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -98,7 +99,7 @@ func (c *staffClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc return out, nil } -func (c *staffClient) GetProfile(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StaffItem, error) { +func (c *staffClient) GetProfile(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*StaffItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StaffItem) err := c.cc.Invoke(ctx, Staff_GetProfile_FullMethodName, in, out, cOpts...) @@ -108,9 +109,9 @@ func (c *staffClient) GetProfile(ctx context.Context, in *IdentRequest, opts ... return out, nil } -func (c *staffClient) SetProfile(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *staffClient) SetProfile(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Staff_SetProfile_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -118,9 +119,9 @@ func (c *staffClient) SetProfile(ctx context.Context, in *StaffItem, opts ...grp return out, nil } -func (c *staffClient) SetPassword(ctx context.Context, in *SetAccountRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *staffClient) SetPassword(ctx context.Context, in *SetAccountRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Staff_SetPassword_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -129,7 +130,7 @@ func (c *staffClient) SetPassword(ctx context.Context, in *SetAccountRequest, op } // StaffServer is the server API for Staff service. -// All implementations must embed UnimplementedStaffServer +// All implementations should embed UnimplementedStaffServer // for forward compatibility. // // Store(店铺)微服务-工作人员 @@ -137,21 +138,20 @@ type StaffServer interface { // 登录 Login(context.Context, *LoginRequest) (*LoginReply, error) // 获取工作人员列表 - Fetch(context.Context, *FetchRequest) (*StaffListReply, error) + Fetch(context.Context, *protobuf.MallFetchRequest) (*StaffListReply, error) // 创建工作人员 - Create(context.Context, *StaffItem) (*StatusReply, error) + Create(context.Context, *StaffItem) (*protobuf.IdentityStatusReply, error) // 删除工作人员 - Delete(context.Context, *IdentRequest) (*StatusReply, error) + Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) // 获取个人信息 - GetProfile(context.Context, *IdentRequest) (*StaffItem, error) + GetProfile(context.Context, *protobuf.IdentRequest) (*StaffItem, error) // 设置个人信息 - SetProfile(context.Context, *StaffItem) (*StatusReply, error) + SetProfile(context.Context, *StaffItem) (*protobuf.IdentityStatusReply, error) // 设置账号密码 - SetPassword(context.Context, *SetAccountRequest) (*StatusReply, error) - mustEmbedUnimplementedStaffServer() + SetPassword(context.Context, *SetAccountRequest) (*protobuf.IdentityStatusReply, error) } -// UnimplementedStaffServer must be embedded to have +// UnimplementedStaffServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -159,28 +159,27 @@ type StaffServer interface { type UnimplementedStaffServer struct{} func (UnimplementedStaffServer) Login(context.Context, *LoginRequest) (*LoginReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Login not implemented") + return nil, status.Error(codes.Unimplemented, "method Login not implemented") } -func (UnimplementedStaffServer) Fetch(context.Context, *FetchRequest) (*StaffListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") +func (UnimplementedStaffServer) Fetch(context.Context, *protobuf.MallFetchRequest) (*StaffListReply, error) { + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedStaffServer) Create(context.Context, *StaffItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +func (UnimplementedStaffServer) Create(context.Context, *StaffItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedStaffServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +func (UnimplementedStaffServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedStaffServer) GetProfile(context.Context, *IdentRequest) (*StaffItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetProfile not implemented") +func (UnimplementedStaffServer) GetProfile(context.Context, *protobuf.IdentRequest) (*StaffItem, error) { + return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented") } -func (UnimplementedStaffServer) SetProfile(context.Context, *StaffItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetProfile not implemented") +func (UnimplementedStaffServer) SetProfile(context.Context, *StaffItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SetProfile not implemented") } -func (UnimplementedStaffServer) SetPassword(context.Context, *SetAccountRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetPassword not implemented") +func (UnimplementedStaffServer) SetPassword(context.Context, *SetAccountRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SetPassword not implemented") } -func (UnimplementedStaffServer) mustEmbedUnimplementedStaffServer() {} -func (UnimplementedStaffServer) testEmbeddedByValue() {} +func (UnimplementedStaffServer) testEmbeddedByValue() {} // UnsafeStaffServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to StaffServer will @@ -190,7 +189,7 @@ type UnsafeStaffServer interface { } func RegisterStaffServer(s grpc.ServiceRegistrar, srv StaffServer) { - // If the following call pancis, it indicates UnimplementedStaffServer was + // If the following call panics, it indicates UnimplementedStaffServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -219,7 +218,7 @@ func _Staff_Login_Handler(srv interface{}, ctx context.Context, dec func(interfa } func _Staff_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.MallFetchRequest) if err := dec(in); err != nil { return nil, err } @@ -231,7 +230,7 @@ func _Staff_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Staff_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StaffServer).Fetch(ctx, req.(*FetchRequest)) + return srv.(StaffServer).Fetch(ctx, req.(*protobuf.MallFetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -255,7 +254,7 @@ func _Staff_Create_Handler(srv interface{}, ctx context.Context, dec func(interf } func _Staff_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -267,13 +266,13 @@ func _Staff_Delete_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Staff_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StaffServer).Delete(ctx, req.(*IdentRequest)) + return srv.(StaffServer).Delete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Staff_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -285,7 +284,7 @@ func _Staff_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: Staff_GetProfile_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StaffServer).GetProfile(ctx, req.(*IdentRequest)) + return srv.(StaffServer).GetProfile(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -363,5 +362,5 @@ var Staff_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "staff.proto", + Metadata: "module/ec/mall/proto/staff.proto", } diff --git a/module/ec/mall/pb/store.pb.go b/module/ec/mall/pb/store.pb.go index 3e4a384..0d8f9eb 100644 --- a/module/ec/mall/pb/store.pb.go +++ b/module/ec/mall/pb/store.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: store.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/mall/proto/store.proto package mall import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -31,7 +32,7 @@ type SettingRequest struct { func (x *SettingRequest) Reset() { *x = SettingRequest{} - mi := &file_store_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -43,7 +44,7 @@ func (x *SettingRequest) String() string { func (*SettingRequest) ProtoMessage() {} func (x *SettingRequest) ProtoReflect() protoreflect.Message { - mi := &file_store_proto_msgTypes[0] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -56,7 +57,7 @@ func (x *SettingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SettingRequest.ProtoReflect.Descriptor instead. func (*SettingRequest) Descriptor() ([]byte, []int) { - return file_store_proto_rawDescGZIP(), []int{0} + return file_module_ec_mall_proto_store_proto_rawDescGZIP(), []int{0} } func (x *SettingRequest) GetIdentity() string { @@ -82,7 +83,7 @@ type ConfigsReply struct { func (x *ConfigsReply) Reset() { *x = ConfigsReply{} - mi := &file_store_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -94,7 +95,7 @@ func (x *ConfigsReply) String() string { func (*ConfigsReply) ProtoMessage() {} func (x *ConfigsReply) ProtoReflect() protoreflect.Message { - mi := &file_store_proto_msgTypes[1] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107,7 +108,7 @@ func (x *ConfigsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigsReply.ProtoReflect.Descriptor instead. func (*ConfigsReply) Descriptor() ([]byte, []int) { - return file_store_proto_rawDescGZIP(), []int{1} + return file_module_ec_mall_proto_store_proto_rawDescGZIP(), []int{1} } func (x *ConfigsReply) GetConfigs() string { @@ -130,7 +131,7 @@ type LicensingRequest struct { func (x *LicensingRequest) Reset() { *x = LicensingRequest{} - mi := &file_store_proto_msgTypes[2] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -142,7 +143,7 @@ func (x *LicensingRequest) String() string { func (*LicensingRequest) ProtoMessage() {} func (x *LicensingRequest) ProtoReflect() protoreflect.Message { - mi := &file_store_proto_msgTypes[2] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -155,7 +156,7 @@ func (x *LicensingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LicensingRequest.ProtoReflect.Descriptor instead. func (*LicensingRequest) Descriptor() ([]byte, []int) { - return file_store_proto_rawDescGZIP(), []int{2} + return file_module_ec_mall_proto_store_proto_rawDescGZIP(), []int{2} } func (x *LicensingRequest) GetLicenseType() string { @@ -213,7 +214,7 @@ type ApplyJoinRequest struct { func (x *ApplyJoinRequest) Reset() { *x = ApplyJoinRequest{} - mi := &file_store_proto_msgTypes[3] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -225,7 +226,7 @@ func (x *ApplyJoinRequest) String() string { func (*ApplyJoinRequest) ProtoMessage() {} func (x *ApplyJoinRequest) ProtoReflect() protoreflect.Message { - mi := &file_store_proto_msgTypes[3] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -238,7 +239,7 @@ func (x *ApplyJoinRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyJoinRequest.ProtoReflect.Descriptor instead. func (*ApplyJoinRequest) Descriptor() ([]byte, []int) { - return file_store_proto_rawDescGZIP(), []int{3} + return file_module_ec_mall_proto_store_proto_rawDescGZIP(), []int{3} } func (x *ApplyJoinRequest) GetLogo() string { @@ -345,7 +346,7 @@ type StoreBasic struct { func (x *StoreBasic) Reset() { *x = StoreBasic{} - mi := &file_store_proto_msgTypes[4] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -357,7 +358,7 @@ func (x *StoreBasic) String() string { func (*StoreBasic) ProtoMessage() {} func (x *StoreBasic) ProtoReflect() protoreflect.Message { - mi := &file_store_proto_msgTypes[4] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -370,7 +371,7 @@ func (x *StoreBasic) ProtoReflect() protoreflect.Message { // Deprecated: Use StoreBasic.ProtoReflect.Descriptor instead. func (*StoreBasic) Descriptor() ([]byte, []int) { - return file_store_proto_rawDescGZIP(), []int{4} + return file_module_ec_mall_proto_store_proto_rawDescGZIP(), []int{4} } func (x *StoreBasic) GetId() int64 { @@ -466,7 +467,7 @@ type MiniCodeRequest struct { func (x *MiniCodeRequest) Reset() { *x = MiniCodeRequest{} - mi := &file_store_proto_msgTypes[5] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -478,7 +479,7 @@ func (x *MiniCodeRequest) String() string { func (*MiniCodeRequest) ProtoMessage() {} func (x *MiniCodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_store_proto_msgTypes[5] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -491,7 +492,7 @@ func (x *MiniCodeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MiniCodeRequest.ProtoReflect.Descriptor instead. func (*MiniCodeRequest) Descriptor() ([]byte, []int) { - return file_store_proto_rawDescGZIP(), []int{5} + return file_module_ec_mall_proto_store_proto_rawDescGZIP(), []int{5} } func (x *MiniCodeRequest) GetTypes() string { @@ -510,7 +511,7 @@ type MiniCodeReply struct { func (x *MiniCodeReply) Reset() { *x = MiniCodeReply{} - mi := &file_store_proto_msgTypes[6] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -522,7 +523,7 @@ func (x *MiniCodeReply) String() string { func (*MiniCodeReply) ProtoMessage() {} func (x *MiniCodeReply) ProtoReflect() protoreflect.Message { - mi := &file_store_proto_msgTypes[6] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -535,7 +536,7 @@ func (x *MiniCodeReply) ProtoReflect() protoreflect.Message { // Deprecated: Use MiniCodeReply.ProtoReflect.Descriptor instead. func (*MiniCodeReply) Descriptor() ([]byte, []int) { - return file_store_proto_rawDescGZIP(), []int{6} + return file_module_ec_mall_proto_store_proto_rawDescGZIP(), []int{6} } func (x *MiniCodeReply) GetImg() string { @@ -556,7 +557,7 @@ type MallSearchRequest struct { func (x *MallSearchRequest) Reset() { *x = MallSearchRequest{} - mi := &file_store_proto_msgTypes[7] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -568,7 +569,7 @@ func (x *MallSearchRequest) String() string { func (*MallSearchRequest) ProtoMessage() {} func (x *MallSearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_store_proto_msgTypes[7] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -581,7 +582,7 @@ func (x *MallSearchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MallSearchRequest.ProtoReflect.Descriptor instead. func (*MallSearchRequest) Descriptor() ([]byte, []int) { - return file_store_proto_rawDescGZIP(), []int{7} + return file_module_ec_mall_proto_store_proto_rawDescGZIP(), []int{7} } func (x *MallSearchRequest) GetPageNo() int64 { @@ -615,7 +616,7 @@ type MallSearchReply struct { func (x *MallSearchReply) Reset() { *x = MallSearchReply{} - mi := &file_store_proto_msgTypes[8] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -627,7 +628,7 @@ func (x *MallSearchReply) String() string { func (*MallSearchReply) ProtoMessage() {} func (x *MallSearchReply) ProtoReflect() protoreflect.Message { - mi := &file_store_proto_msgTypes[8] + mi := &file_module_ec_mall_proto_store_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -640,7 +641,7 @@ func (x *MallSearchReply) ProtoReflect() protoreflect.Message { // Deprecated: Use MallSearchReply.ProtoReflect.Descriptor instead. func (*MallSearchReply) Descriptor() ([]byte, []int) { - return file_store_proto_rawDescGZIP(), []int{8} + return file_module_ec_mall_proto_store_proto_rawDescGZIP(), []int{8} } func (x *MallSearchReply) GetList() []*StoreBasic { @@ -657,11 +658,11 @@ func (x *MallSearchReply) GetCount() int64 { return 0 } -var File_store_proto protoreflect.FileDescriptor +var File_module_ec_mall_proto_store_proto protoreflect.FileDescriptor -const file_store_proto_rawDesc = "" + +const file_module_ec_mall_proto_store_proto_rawDesc = "" + "\n" + - "\x13ec/mall/store.proto\x12\x04mall\x1a\x11mall/blocks.proto\"F\n" + + " module/ec/mall/proto/store.proto\x12\x04mall\x1a\x15protobuf/blocks.proto\"F\n" + "\x0eSettingRequest\x12\x1a\n" + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" + "\aconfigs\x18\x02 \x01(\tR\aconfigs\"(\n" + @@ -714,67 +715,67 @@ const file_store_proto_rawDesc = "" + "\akeyword\x18\x03 \x01(\tR\akeyword\"M\n" + "\x0fMallSearchReply\x12$\n" + "\x04list\x18\x01 \x03(\v2\x10.mall.StoreBasicR\x04list\x12\x14\n" + - "\x05count\x18\x02 \x01(\x03R\x05count2\xba\x04\n" + - "\x05Store\x128\n" + - "\tApplyJoin\x12\x16.mall.ApplyJoinRequest\x1a\x11.mall.StatusReply\"\x00\x128\n" + - "\tLicensing\x12\x16.mall.LicensingRequest\x1a\x11.mall.StatusReply\"\x00\x124\n" + + "\x05count\x18\x02 \x01(\x03R\x05count2\xf2\x04\n" + + "\x05Store\x12B\n" + + "\tApplyJoin\x12\x16.mall.ApplyJoinRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12B\n" + + "\tLicensing\x12\x16.mall.LicensingRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x126\n" + "\n" + - "GetSetting\x12\x12.mall.IdentRequest\x1a\x10.mall.StoreBasic\"\x00\x123\n" + + "GetSetting\x12\x14.blocks.IdentRequest\x1a\x10.mall.StoreBasic\"\x00\x12=\n" + "\n" + - "SetSetting\x12\x10.mall.StoreBasic\x1a\x11.mall.StatusReply\"\x00\x127\n" + + "SetSetting\x12\x10.mall.StoreBasic\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12A\n" + "\n" + - "SetPayment\x12\x14.mall.SettingRequest\x1a\x11.mall.StatusReply\"\x00\x125\n" + - "\bSetEmail\x12\x14.mall.SettingRequest\x1a\x11.mall.StatusReply\"\x00\x126\n" + + "SetPayment\x12\x14.mall.SettingRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12?\n" + + "\bSetEmail\x12\x14.mall.SettingRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x128\n" + "\n" + - "GetPayment\x12\x12.mall.IdentRequest\x1a\x12.mall.ConfigsReply\"\x00\x124\n" + - "\bGetEmail\x12\x12.mall.IdentRequest\x1a\x12.mall.ConfigsReply\"\x00\x128\n" + + "GetPayment\x12\x14.blocks.IdentRequest\x1a\x12.mall.ConfigsReply\"\x00\x126\n" + + "\bGetEmail\x12\x14.blocks.IdentRequest\x1a\x12.mall.ConfigsReply\"\x00\x128\n" + "\bMiniCode\x12\x15.mall.MiniCodeRequest\x1a\x13.mall.MiniCodeReply\"\x00\x12:\n" + - "\x06Search\x12\x17.mall.MallSearchRequest\x1a\x15.mall.MallSearchReply\"\x00B\bZ\x06.;mallb\x06proto3" + "\x06Search\x12\x17.mall.MallSearchRequest\x1a\x15.mall.MallSearchReply\"\x00B!Z\x1fbsm/full/module/ec/mall/pb;mallb\x06proto3" var ( - file_store_proto_rawDescOnce sync.Once - file_store_proto_rawDescData []byte + file_module_ec_mall_proto_store_proto_rawDescOnce sync.Once + file_module_ec_mall_proto_store_proto_rawDescData []byte ) -func file_store_proto_rawDescGZIP() []byte { - file_store_proto_rawDescOnce.Do(func() { - file_store_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_store_proto_rawDesc), len(file_store_proto_rawDesc))) +func file_module_ec_mall_proto_store_proto_rawDescGZIP() []byte { + file_module_ec_mall_proto_store_proto_rawDescOnce.Do(func() { + file_module_ec_mall_proto_store_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_store_proto_rawDesc), len(file_module_ec_mall_proto_store_proto_rawDesc))) }) - return file_store_proto_rawDescData + return file_module_ec_mall_proto_store_proto_rawDescData } -var file_store_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_store_proto_goTypes = []any{ - (*SettingRequest)(nil), // 0: mall.SettingRequest - (*ConfigsReply)(nil), // 1: mall.ConfigsReply - (*LicensingRequest)(nil), // 2: mall.LicensingRequest - (*ApplyJoinRequest)(nil), // 3: mall.ApplyJoinRequest - (*StoreBasic)(nil), // 4: mall.StoreBasic - (*MiniCodeRequest)(nil), // 5: mall.MiniCodeRequest - (*MiniCodeReply)(nil), // 6: mall.MiniCodeReply - (*MallSearchRequest)(nil), // 7: mall.MallSearchRequest - (*MallSearchReply)(nil), // 8: mall.MallSearchReply - (*IdentRequest)(nil), // 9: mall.IdentRequest - (*StatusReply)(nil), // 10: mall.StatusReply +var file_module_ec_mall_proto_store_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_module_ec_mall_proto_store_proto_goTypes = []any{ + (*SettingRequest)(nil), // 0: mall.SettingRequest + (*ConfigsReply)(nil), // 1: mall.ConfigsReply + (*LicensingRequest)(nil), // 2: mall.LicensingRequest + (*ApplyJoinRequest)(nil), // 3: mall.ApplyJoinRequest + (*StoreBasic)(nil), // 4: mall.StoreBasic + (*MiniCodeRequest)(nil), // 5: mall.MiniCodeRequest + (*MiniCodeReply)(nil), // 6: mall.MiniCodeReply + (*MallSearchRequest)(nil), // 7: mall.MallSearchRequest + (*MallSearchReply)(nil), // 8: mall.MallSearchReply + (*protobuf.IdentRequest)(nil), // 9: blocks.IdentRequest + (*protobuf.IdentityStatusReply)(nil), // 10: blocks.IdentityStatusReply } -var file_store_proto_depIdxs = []int32{ +var file_module_ec_mall_proto_store_proto_depIdxs = []int32{ 4, // 0: mall.MallSearchReply.list:type_name -> mall.StoreBasic 3, // 1: mall.Store.ApplyJoin:input_type -> mall.ApplyJoinRequest 2, // 2: mall.Store.Licensing:input_type -> mall.LicensingRequest - 9, // 3: mall.Store.GetSetting:input_type -> mall.IdentRequest + 9, // 3: mall.Store.GetSetting:input_type -> blocks.IdentRequest 4, // 4: mall.Store.SetSetting:input_type -> mall.StoreBasic 0, // 5: mall.Store.SetPayment:input_type -> mall.SettingRequest 0, // 6: mall.Store.SetEmail:input_type -> mall.SettingRequest - 9, // 7: mall.Store.GetPayment:input_type -> mall.IdentRequest - 9, // 8: mall.Store.GetEmail:input_type -> mall.IdentRequest + 9, // 7: mall.Store.GetPayment:input_type -> blocks.IdentRequest + 9, // 8: mall.Store.GetEmail:input_type -> blocks.IdentRequest 5, // 9: mall.Store.MiniCode:input_type -> mall.MiniCodeRequest 7, // 10: mall.Store.Search:input_type -> mall.MallSearchRequest - 10, // 11: mall.Store.ApplyJoin:output_type -> mall.StatusReply - 10, // 12: mall.Store.Licensing:output_type -> mall.StatusReply + 10, // 11: mall.Store.ApplyJoin:output_type -> blocks.IdentityStatusReply + 10, // 12: mall.Store.Licensing:output_type -> blocks.IdentityStatusReply 4, // 13: mall.Store.GetSetting:output_type -> mall.StoreBasic - 10, // 14: mall.Store.SetSetting:output_type -> mall.StatusReply - 10, // 15: mall.Store.SetPayment:output_type -> mall.StatusReply - 10, // 16: mall.Store.SetEmail:output_type -> mall.StatusReply + 10, // 14: mall.Store.SetSetting:output_type -> blocks.IdentityStatusReply + 10, // 15: mall.Store.SetPayment:output_type -> blocks.IdentityStatusReply + 10, // 16: mall.Store.SetEmail:output_type -> blocks.IdentityStatusReply 1, // 17: mall.Store.GetPayment:output_type -> mall.ConfigsReply 1, // 18: mall.Store.GetEmail:output_type -> mall.ConfigsReply 6, // 19: mall.Store.MiniCode:output_type -> mall.MiniCodeReply @@ -786,27 +787,26 @@ var file_store_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_store_proto_init() } -func file_store_proto_init() { - if File_store_proto != nil { +func init() { file_module_ec_mall_proto_store_proto_init() } +func file_module_ec_mall_proto_store_proto_init() { + if File_module_ec_mall_proto_store_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_proto_rawDesc), len(file_store_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_mall_proto_store_proto_rawDesc), len(file_module_ec_mall_proto_store_proto_rawDesc)), NumEnums: 0, NumMessages: 9, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_store_proto_goTypes, - DependencyIndexes: file_store_proto_depIdxs, - MessageInfos: file_store_proto_msgTypes, + GoTypes: file_module_ec_mall_proto_store_proto_goTypes, + DependencyIndexes: file_module_ec_mall_proto_store_proto_depIdxs, + MessageInfos: file_module_ec_mall_proto_store_proto_msgTypes, }.Build() - File_store_proto = out.File - file_store_proto_goTypes = nil - file_store_proto_depIdxs = nil + File_module_ec_mall_proto_store_proto = out.File + file_module_ec_mall_proto_store_proto_goTypes = nil + file_module_ec_mall_proto_store_proto_depIdxs = nil } diff --git a/module/ec/mall/pb/store.pb.gw.go b/module/ec/mall/pb/store.pb.gw.go index dbdee45..da44c2a 100644 --- a/module/ec/mall/pb/store.pb.gw.go +++ b/module/ec/mall/pb/store.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: store.proto +// source: module/ec/mall/proto/store.proto /* Package mall is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package mall import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -91,7 +92,7 @@ func local_request_Store_Licensing_0(ctx context.Context, marshaler runtime.Mars func request_Store_GetSetting_0(ctx context.Context, marshaler runtime.Marshaler, client StoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Store_GetSetting_0(ctx context.Context, marshaler runtime.Marshaler func local_request_Store_GetSetting_0(ctx context.Context, marshaler runtime.Marshaler, server StoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -199,7 +200,7 @@ func local_request_Store_SetEmail_0(ctx context.Context, marshaler runtime.Marsh func request_Store_GetPayment_0(ctx context.Context, marshaler runtime.Marshaler, client StoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -214,7 +215,7 @@ func request_Store_GetPayment_0(ctx context.Context, marshaler runtime.Marshaler func local_request_Store_GetPayment_0(ctx context.Context, marshaler runtime.Marshaler, server StoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -226,7 +227,7 @@ func local_request_Store_GetPayment_0(ctx context.Context, marshaler runtime.Mar func request_Store_GetEmail_0(ctx context.Context, marshaler runtime.Marshaler, client StoreClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -241,7 +242,7 @@ func request_Store_GetEmail_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Store_GetEmail_0(ctx context.Context, marshaler runtime.Marshaler, server StoreServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/ec/mall/pb/store_grpc.pb.go b/module/ec/mall/pb/store_grpc.pb.go index c8576a4..5c79def 100644 --- a/module/ec/mall/pb/store_grpc.pb.go +++ b/module/ec/mall/pb/store_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: store.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/mall/proto/store.proto package mall import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -38,21 +39,21 @@ const ( // Store(店铺)微服务-店铺基础服务 type StoreClient interface { // 申请加入店铺 - ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts ...grpc.CallOption) (*StatusReply, error) + ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 店铺许可授权 - Licensing(ctx context.Context, in *LicensingRequest, opts ...grpc.CallOption) (*StatusReply, error) + Licensing(ctx context.Context, in *LicensingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 获取店铺基础配置 - GetSetting(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StoreBasic, error) + GetSetting(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*StoreBasic, error) // 设置店铺基础配置 - SetSetting(ctx context.Context, in *StoreBasic, opts ...grpc.CallOption) (*StatusReply, error) + SetSetting(ctx context.Context, in *StoreBasic, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 设置支付方式配置 - SetPayment(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*StatusReply, error) + SetPayment(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 设置邮件服务器配置 - SetEmail(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*StatusReply, error) + SetEmail(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 获取支付方式配置 - GetPayment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) + GetPayment(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) // 获取邮件服务器配置 - GetEmail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) + GetEmail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) // 获取小程序推荐码 MiniCode(ctx context.Context, in *MiniCodeRequest, opts ...grpc.CallOption) (*MiniCodeReply, error) // 店铺搜索 @@ -67,9 +68,9 @@ func NewStoreClient(cc grpc.ClientConnInterface) StoreClient { return &storeClient{cc} } -func (c *storeClient) ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *storeClient) ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Store_ApplyJoin_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -77,9 +78,9 @@ func (c *storeClient) ApplyJoin(ctx context.Context, in *ApplyJoinRequest, opts return out, nil } -func (c *storeClient) Licensing(ctx context.Context, in *LicensingRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *storeClient) Licensing(ctx context.Context, in *LicensingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Store_Licensing_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -87,7 +88,7 @@ func (c *storeClient) Licensing(ctx context.Context, in *LicensingRequest, opts return out, nil } -func (c *storeClient) GetSetting(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StoreBasic, error) { +func (c *storeClient) GetSetting(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*StoreBasic, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StoreBasic) err := c.cc.Invoke(ctx, Store_GetSetting_FullMethodName, in, out, cOpts...) @@ -97,9 +98,9 @@ func (c *storeClient) GetSetting(ctx context.Context, in *IdentRequest, opts ... return out, nil } -func (c *storeClient) SetSetting(ctx context.Context, in *StoreBasic, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *storeClient) SetSetting(ctx context.Context, in *StoreBasic, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Store_SetSetting_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -107,9 +108,9 @@ func (c *storeClient) SetSetting(ctx context.Context, in *StoreBasic, opts ...gr return out, nil } -func (c *storeClient) SetPayment(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *storeClient) SetPayment(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Store_SetPayment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -117,9 +118,9 @@ func (c *storeClient) SetPayment(ctx context.Context, in *SettingRequest, opts . return out, nil } -func (c *storeClient) SetEmail(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *storeClient) SetEmail(ctx context.Context, in *SettingRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Store_SetEmail_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -127,7 +128,7 @@ func (c *storeClient) SetEmail(ctx context.Context, in *SettingRequest, opts ... return out, nil } -func (c *storeClient) GetPayment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) { +func (c *storeClient) GetPayment(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ConfigsReply) err := c.cc.Invoke(ctx, Store_GetPayment_FullMethodName, in, out, cOpts...) @@ -137,7 +138,7 @@ func (c *storeClient) GetPayment(ctx context.Context, in *IdentRequest, opts ... return out, nil } -func (c *storeClient) GetEmail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) { +func (c *storeClient) GetEmail(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*ConfigsReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ConfigsReply) err := c.cc.Invoke(ctx, Store_GetEmail_FullMethodName, in, out, cOpts...) @@ -168,73 +169,71 @@ func (c *storeClient) Search(ctx context.Context, in *MallSearchRequest, opts .. } // StoreServer is the server API for Store service. -// All implementations must embed UnimplementedStoreServer +// All implementations should embed UnimplementedStoreServer // for forward compatibility. // // Store(店铺)微服务-店铺基础服务 type StoreServer interface { // 申请加入店铺 - ApplyJoin(context.Context, *ApplyJoinRequest) (*StatusReply, error) + ApplyJoin(context.Context, *ApplyJoinRequest) (*protobuf.IdentityStatusReply, error) // 店铺许可授权 - Licensing(context.Context, *LicensingRequest) (*StatusReply, error) + Licensing(context.Context, *LicensingRequest) (*protobuf.IdentityStatusReply, error) // 获取店铺基础配置 - GetSetting(context.Context, *IdentRequest) (*StoreBasic, error) + GetSetting(context.Context, *protobuf.IdentRequest) (*StoreBasic, error) // 设置店铺基础配置 - SetSetting(context.Context, *StoreBasic) (*StatusReply, error) + SetSetting(context.Context, *StoreBasic) (*protobuf.IdentityStatusReply, error) // 设置支付方式配置 - SetPayment(context.Context, *SettingRequest) (*StatusReply, error) + SetPayment(context.Context, *SettingRequest) (*protobuf.IdentityStatusReply, error) // 设置邮件服务器配置 - SetEmail(context.Context, *SettingRequest) (*StatusReply, error) + SetEmail(context.Context, *SettingRequest) (*protobuf.IdentityStatusReply, error) // 获取支付方式配置 - GetPayment(context.Context, *IdentRequest) (*ConfigsReply, error) + GetPayment(context.Context, *protobuf.IdentRequest) (*ConfigsReply, error) // 获取邮件服务器配置 - GetEmail(context.Context, *IdentRequest) (*ConfigsReply, error) + GetEmail(context.Context, *protobuf.IdentRequest) (*ConfigsReply, error) // 获取小程序推荐码 MiniCode(context.Context, *MiniCodeRequest) (*MiniCodeReply, error) // 店铺搜索 Search(context.Context, *MallSearchRequest) (*MallSearchReply, error) - mustEmbedUnimplementedStoreServer() } -// UnimplementedStoreServer must be embedded to have +// UnimplementedStoreServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedStoreServer struct{} -func (UnimplementedStoreServer) ApplyJoin(context.Context, *ApplyJoinRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplyJoin not implemented") +func (UnimplementedStoreServer) ApplyJoin(context.Context, *ApplyJoinRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method ApplyJoin not implemented") } -func (UnimplementedStoreServer) Licensing(context.Context, *LicensingRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Licensing not implemented") +func (UnimplementedStoreServer) Licensing(context.Context, *LicensingRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Licensing not implemented") } -func (UnimplementedStoreServer) GetSetting(context.Context, *IdentRequest) (*StoreBasic, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSetting not implemented") +func (UnimplementedStoreServer) GetSetting(context.Context, *protobuf.IdentRequest) (*StoreBasic, error) { + return nil, status.Error(codes.Unimplemented, "method GetSetting not implemented") } -func (UnimplementedStoreServer) SetSetting(context.Context, *StoreBasic) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetSetting not implemented") +func (UnimplementedStoreServer) SetSetting(context.Context, *StoreBasic) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SetSetting not implemented") } -func (UnimplementedStoreServer) SetPayment(context.Context, *SettingRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetPayment not implemented") +func (UnimplementedStoreServer) SetPayment(context.Context, *SettingRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SetPayment not implemented") } -func (UnimplementedStoreServer) SetEmail(context.Context, *SettingRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetEmail not implemented") +func (UnimplementedStoreServer) SetEmail(context.Context, *SettingRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SetEmail not implemented") } -func (UnimplementedStoreServer) GetPayment(context.Context, *IdentRequest) (*ConfigsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPayment not implemented") +func (UnimplementedStoreServer) GetPayment(context.Context, *protobuf.IdentRequest) (*ConfigsReply, error) { + return nil, status.Error(codes.Unimplemented, "method GetPayment not implemented") } -func (UnimplementedStoreServer) GetEmail(context.Context, *IdentRequest) (*ConfigsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetEmail not implemented") +func (UnimplementedStoreServer) GetEmail(context.Context, *protobuf.IdentRequest) (*ConfigsReply, error) { + return nil, status.Error(codes.Unimplemented, "method GetEmail not implemented") } func (UnimplementedStoreServer) MiniCode(context.Context, *MiniCodeRequest) (*MiniCodeReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MiniCode not implemented") + return nil, status.Error(codes.Unimplemented, "method MiniCode not implemented") } func (UnimplementedStoreServer) Search(context.Context, *MallSearchRequest) (*MallSearchReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Search not implemented") + return nil, status.Error(codes.Unimplemented, "method Search not implemented") } -func (UnimplementedStoreServer) mustEmbedUnimplementedStoreServer() {} -func (UnimplementedStoreServer) testEmbeddedByValue() {} +func (UnimplementedStoreServer) testEmbeddedByValue() {} // UnsafeStoreServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to StoreServer will @@ -244,7 +243,7 @@ type UnsafeStoreServer interface { } func RegisterStoreServer(s grpc.ServiceRegistrar, srv StoreServer) { - // If the following call pancis, it indicates UnimplementedStoreServer was + // If the following call panics, it indicates UnimplementedStoreServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -291,7 +290,7 @@ func _Store_Licensing_Handler(srv interface{}, ctx context.Context, dec func(int } func _Store_GetSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -303,7 +302,7 @@ func _Store_GetSetting_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: Store_GetSetting_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StoreServer).GetSetting(ctx, req.(*IdentRequest)) + return srv.(StoreServer).GetSetting(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -363,7 +362,7 @@ func _Store_SetEmail_Handler(srv interface{}, ctx context.Context, dec func(inte } func _Store_GetPayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -375,13 +374,13 @@ func _Store_GetPayment_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: Store_GetPayment_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StoreServer).GetPayment(ctx, req.(*IdentRequest)) + return srv.(StoreServer).GetPayment(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Store_GetEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -393,7 +392,7 @@ func _Store_GetEmail_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Store_GetEmail_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StoreServer).GetEmail(ctx, req.(*IdentRequest)) + return srv.(StoreServer).GetEmail(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -483,5 +482,5 @@ var Store_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "store.proto", + Metadata: "module/ec/mall/proto/store.proto", } diff --git a/module/ec/mall/proto/ads.proto b/module/ec/mall/proto/ads.proto index 90d196e..2280be2 100644 --- a/module/ec/mall/proto/ads.proto +++ b/module/ec/mall/proto/ads.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package mall; -option go_package = ".;mall"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/mall/pb;mall"; +import "protobuf/blocks.proto"; //Store(店铺)微服务 - 广告 service Ads{ @@ -9,16 +9,16 @@ service Ads{ rpc ByPos(ByPosRequest) returns (AdsListReply) {} // 广告列表 - rpc Fetch(FetchRequest) returns (AdsListReply){}; + rpc Fetch(blocks.MallFetchRequest) returns (AdsListReply){}; // 新建广告 - rpc Create (AdsItem) returns (StatusReply){}; + rpc Create (AdsItem) returns (blocks.IdentityStatusReply){}; // 修改广告 - rpc Modify (AdsItem) returns (StatusReply){}; + rpc Modify (AdsItem) returns (blocks.IdentityStatusReply){}; // 删除广告 - rpc Delete (IdentRequest) returns (StatusReply){}; + rpc Delete (blocks.IdentRequest) returns (blocks.IdentityStatusReply){}; } message ByPosRequest{ repeated string pos_key = 1 [json_name="pos_key"]; diff --git a/module/ec/mall/proto/blocks.proto b/module/ec/mall/proto/blocks.proto deleted file mode 100644 index 3a4653c..0000000 --- a/module/ec/mall/proto/blocks.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; -package mall; -option go_package = ".;mall"; - -message Empty{ -} - -message FetchRequest { - int64 page_no=1 [json_name = "page_no"]; // 页数 - int64 page_size=2 [json_name = "page_size"]; // 每页记录数 - map params=3; // 条件参数,key=val,eg key:categoryId=?,vlaue=11 - string store_identity = 4 [json_name="store_identity"]; // 店铺唯一标识 - string keyword = 5; // 关键词 - repeated int64 category_id = 6;// 分类ID - string sort = 7;// 排序字段 - int64 min_price = 8 [json_name="min_price"];// 最小价格 - int64 max_price = 9 [json_name="max_price"];// 最大价格 -} - -message IdentRequest{ - int64 id = 1; // 唯一ID - string identity = 2; // 唯一码 -} - -message StoreSerialRequest{ - string store_identity = 1 [json_name="store_identity"]; // 店铺Identity - repeated string serial_id = 2 [json_name="serial_id"]; // 序列Identity -} - -message StatusReply{ - int32 code = 1; // 状态码 - string identity=2; // 标识码 - string message=3; //状态说明 - int64 timeseq=4; // 响应时间序列 -} - - -message VersionRequest { - int64 version = 1; // 时序版本号 - } - - - message SearchRequest { - string keyword = 1; //关键词 - } - \ No newline at end of file diff --git a/module/ec/mall/proto/category.proto b/module/ec/mall/proto/category.proto index 698426a..9bbc6c0 100644 --- a/module/ec/mall/proto/category.proto +++ b/module/ec/mall/proto/category.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package mall; -option go_package = ".;mall"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/mall/pb;mall"; +import "protobuf/blocks.proto"; // Store(店铺)微服务-分类 service Category{ @@ -9,13 +9,13 @@ service Category{ rpc Fetch(CategoryFetchRequest) returns(CategoryReply) {}; // 添加分类 - rpc Create(CategoryItem) returns(StatusReply) {}; + rpc Create(CategoryItem) returns(blocks.IdentityStatusReply) {}; // 删除分类 - rpc Delete(IdentRequest) returns(StatusReply) {}; + rpc Delete(blocks.IdentRequest) returns(blocks.IdentityStatusReply) {}; // 修改分类 - rpc Modify(CategoryItem) returns(StatusReply) {}; + rpc Modify(CategoryItem) returns(blocks.IdentityStatusReply) {}; } diff --git a/module/ec/mall/proto/freight.proto b/module/ec/mall/proto/freight.proto index 3958d48..dcfe7d2 100644 --- a/module/ec/mall/proto/freight.proto +++ b/module/ec/mall/proto/freight.proto @@ -1,36 +1,36 @@ syntax = "proto3"; package mall; -option go_package = ".;mall"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/mall/pb;mall"; +import "protobuf/blocks.proto"; // 运费设置相关 service Freight{ // 运费模板列表 - rpc Fetch(FetchRequest) returns(FreightReply) {}; + rpc Fetch(blocks.MallFetchRequest) returns(FreightReply) {}; // 运费模板修改 - rpc Modify(FreightItem) returns(StatusReply) {}; + rpc Modify(FreightItem) returns(blocks.IdentityStatusReply) {}; // 运费模板删除 - rpc Delete(IdentRequest) returns(StatusReply) {}; + rpc Delete(blocks.IdentRequest) returns(blocks.IdentityStatusReply) {}; // 运费模板创建 - rpc Create(FreightItem) returns(StatusReply) {}; + rpc Create(FreightItem) returns(blocks.IdentityStatusReply) {}; // 运费模板详情 - rpc Detail(IdentRequest) returns(FreightItem) {}; + rpc Detail(blocks.IdentRequest) returns(FreightItem) {}; // 限制区域列表 - rpc DenyRegionFetch (FetchRequest) returns(DenyRegionReply) {}; + rpc DenyRegionFetch (blocks.MallFetchRequest) returns(DenyRegionReply) {}; // 新建限制区域 - rpc DenyRegionCreate (DenyRegionItem) returns(StatusReply) {}; + rpc DenyRegionCreate (DenyRegionItem) returns(blocks.IdentityStatusReply) {}; // 移除限制区域 - rpc DenyRegionDelete (IdentRequest) returns(StatusReply) {}; + rpc DenyRegionDelete (blocks.IdentRequest) returns(blocks.IdentityStatusReply) {}; // 编辑限制区域 - rpc DenyRegionModify (DenyRegionItem) returns(StatusReply) {}; + rpc DenyRegionModify (DenyRegionItem) returns(blocks.IdentityStatusReply) {}; } diff --git a/module/ec/mall/proto/notice.proto b/module/ec/mall/proto/notice.proto index fec9170..83faee7 100644 --- a/module/ec/mall/proto/notice.proto +++ b/module/ec/mall/proto/notice.proto @@ -1,21 +1,21 @@ syntax = "proto3"; package mall; -option go_package =".;mall"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/mall/pb;mall"; +import "protobuf/blocks.proto"; // Store(店铺)微服务-公告 service Notice{ // 公告列表 - rpc Fetch(FetchRequest) returns (NoticeListReply){}; + rpc Fetch(blocks.MallFetchRequest) returns (NoticeListReply){}; // 新建公告 - rpc Create (NoticeItem) returns (StatusReply){}; + rpc Create (NoticeItem) returns (blocks.IdentityStatusReply){}; // 修改公告 - rpc Modify (NoticeItem) returns (StatusReply){}; - + rpc Modify (NoticeItem) returns (blocks.IdentityStatusReply){}; + // 删除公告 - rpc Delete (IdentRequest) returns (StatusReply){}; + rpc Delete (blocks.IdentRequest) returns (blocks.IdentityStatusReply){}; } // 公告列表 diff --git a/module/ec/mall/proto/product.proto b/module/ec/mall/proto/product.proto index 24cbfbf..a8fe271 100644 --- a/module/ec/mall/proto/product.proto +++ b/module/ec/mall/proto/product.proto @@ -1,72 +1,72 @@ syntax = "proto3"; package mall; -option go_package = ".;mall"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/mall/pb;mall"; +import "protobuf/blocks.proto"; // 产品相关 service Product{ // 获取产品列表 - rpc ItemFetch(FetchRequest) returns(ListReply) {}; + rpc ItemFetch(blocks.MallFetchRequest) returns(ListReply) {}; // 获取产品详情 - rpc ItemDetail(IdentRequest) returns(ProductItem) {}; + rpc ItemDetail(blocks.IdentRequest) returns(ProductItem) {}; // 通过产品序列获取产品详情 - rpc ItemDetailBySerial(StoreSerialRequest) returns(ListReply) {}; + rpc ItemDetailBySerial(blocks.StoreSerialRequest) returns(ListReply) {}; // 通过规格编号获取产品详情 rpc ItemDetailBySpec(DetailBySpecRequest) returns(ListItem) {}; // 添加产品 - rpc ItemCreate(ProductItem) returns(StatusReply) {}; + rpc ItemCreate(ProductItem) returns(blocks.IdentityStatusReply) {}; // 删除产品 - rpc ItemDelete(IdentRequest) returns(StatusReply) {}; + rpc ItemDelete(blocks.IdentRequest) returns(blocks.IdentityStatusReply) {}; // 发布/取消发布 产品 - rpc ItemModify(ModifyRequest) returns(StatusReply) {}; + rpc ItemModify(ModifyRequest) returns(blocks.IdentityStatusReply) {}; // 批量操作 - rpc ItemBatchOp(OpRequest) returns(StatusReply) {}; + rpc ItemBatchOp(OpRequest) returns(blocks.IdentityStatusReply) {}; // 产品规格列表 - rpc SpecFetch(FetchRequest) returns(SpecReply) {}; + rpc SpecFetch(blocks.MallFetchRequest) returns(SpecReply) {}; // 添加产品规格 - rpc SpecCreate(SpecItem) returns(StatusReply) {}; + rpc SpecCreate(SpecItem) returns(blocks.IdentityStatusReply) {}; // 修改产品规格 - rpc SpecModify(SpecItem) returns(StatusReply) {}; + rpc SpecModify(SpecItem) returns(blocks.IdentityStatusReply) {}; // 删除产品规格 - rpc SpecDelete(IdentRequest) returns(StatusReply) {}; + rpc SpecDelete(blocks.IdentRequest) returns(blocks.IdentityStatusReply) {}; // 产品详情 - rpc SpecDetail(IdentRequest) returns(SpecItem) {}; + rpc SpecDetail(blocks.IdentRequest) returns(SpecItem) {}; // 添加产品图片 - rpc PhotoCreate(PhotoItem) returns(StatusReply){}; + rpc PhotoCreate(PhotoItem) returns(blocks.IdentityStatusReply){}; // 删除产品图片 - rpc PhotoDelete(IdentRequest) returns(StatusReply){}; + rpc PhotoDelete(blocks.IdentRequest) returns(blocks.IdentityStatusReply){}; // 产品图片列表 rpc PhotoList(PhotoItem) returns(PhotoReply){}; // 产品的评论列表 - rpc CommentFetch(FetchRequest) returns (CommentListReply) {}; + rpc CommentFetch(blocks.MallFetchRequest) returns (CommentListReply) {}; // 评论 - rpc CommentCreate(CommentItem) returns(StatusReply) {}; + rpc CommentCreate(CommentItem) returns(blocks.IdentityStatusReply) {}; // 回复评论 - rpc CommentRe(CommentItem) returns(StatusReply) {}; + rpc CommentRe(CommentItem) returns(blocks.IdentityStatusReply) {}; // 删除评论 - rpc CommentDelete(IdentRequest) returns(StatusReply) {}; + rpc CommentDelete(blocks.IdentRequest) returns(blocks.IdentityStatusReply) {}; // 修改评论 - rpc CommentModify(CommentItem) returns(StatusReply) {}; + rpc CommentModify(CommentItem) returns(blocks.IdentityStatusReply) {}; } diff --git a/module/ec/mall/proto/staff.proto b/module/ec/mall/proto/staff.proto index 66fdbed..29f2595 100644 --- a/module/ec/mall/proto/staff.proto +++ b/module/ec/mall/proto/staff.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package mall; -option go_package = ".;mall"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/mall/pb;mall"; +import "protobuf/blocks.proto"; // Store(店铺)微服务-工作人员 service Staff { @@ -9,22 +9,22 @@ service Staff { rpc Login(LoginRequest) returns (LoginReply) {} // 获取工作人员列表 - rpc Fetch(FetchRequest) returns (StaffListReply) {} - + rpc Fetch(blocks.MallFetchRequest) returns (StaffListReply) {} + // 创建工作人员 - rpc Create(StaffItem) returns (StatusReply) {} + rpc Create(StaffItem) returns (blocks.IdentityStatusReply) {} // 删除工作人员 - rpc Delete(IdentRequest) returns (StatusReply) {} + rpc Delete(blocks.IdentRequest) returns (blocks.IdentityStatusReply) {} // 获取个人信息 - rpc GetProfile(IdentRequest) returns (StaffItem) {} + rpc GetProfile(blocks.IdentRequest) returns (StaffItem) {} // 设置个人信息 - rpc SetProfile(StaffItem) returns (StatusReply) {} + rpc SetProfile(StaffItem) returns (blocks.IdentityStatusReply) {} // 设置账号密码 - rpc SetPassword(SetAccountRequest) returns (StatusReply) {} + rpc SetPassword(SetAccountRequest) returns (blocks.IdentityStatusReply) {} } message LoginRequest { @@ -64,7 +64,7 @@ message StaffItem { string phone = 8; // 手机号 string email = 9; // 邮箱 int32 status = 10; // 状态:默认为0,-1禁止,1为正常 - string avatar = 11; // 头像 + string avatar = 11; // 头像 string created_at = 12 [json_name="created_at"]; } diff --git a/module/ec/mall/proto/store.proto b/module/ec/mall/proto/store.proto index 6bcd11c..b91cdd1 100644 --- a/module/ec/mall/proto/store.proto +++ b/module/ec/mall/proto/store.proto @@ -1,34 +1,34 @@ syntax = "proto3"; package mall; -option go_package = ".;mall"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/mall/pb;mall"; +import "protobuf/blocks.proto"; // Store(店铺)微服务-店铺基础服务 service Store { // 申请加入店铺 - rpc ApplyJoin(ApplyJoinRequest) returns (StatusReply) {}; + rpc ApplyJoin(ApplyJoinRequest) returns (blocks.IdentityStatusReply) {}; // 店铺许可授权 - rpc Licensing(LicensingRequest) returns (StatusReply) {} + rpc Licensing(LicensingRequest) returns (blocks.IdentityStatusReply) {} // 获取店铺基础配置 - rpc GetSetting(IdentRequest) returns(StoreBasic){}; + rpc GetSetting(blocks.IdentRequest) returns(StoreBasic){}; // 设置店铺基础配置 - rpc SetSetting(StoreBasic) returns(StatusReply){}; + rpc SetSetting(StoreBasic) returns(blocks.IdentityStatusReply){}; // 设置支付方式配置 - rpc SetPayment(SettingRequest) returns(StatusReply){} + rpc SetPayment(SettingRequest) returns(blocks.IdentityStatusReply){} // 设置邮件服务器配置 - rpc SetEmail(SettingRequest) returns(StatusReply){} + rpc SetEmail(SettingRequest) returns(blocks.IdentityStatusReply){} // 获取支付方式配置 - rpc GetPayment(IdentRequest) returns(ConfigsReply){} + rpc GetPayment(blocks.IdentRequest) returns(ConfigsReply){} // 获取邮件服务器配置 - rpc GetEmail(IdentRequest) returns(ConfigsReply){} + rpc GetEmail(blocks.IdentRequest) returns(ConfigsReply){} // 获取小程序推荐码 rpc MiniCode(MiniCodeRequest) returns(MiniCodeReply) {}; @@ -49,7 +49,7 @@ message ConfigsReply{ message LicensingRequest { - string license_type = 1 [json_name="license_type"]; // 授权类型 + string license_type = 1 [json_name="license_type"]; // 授权类型 string license = 2; // 许可码 string domain = 3; string host = 4; diff --git a/module/ec/market/pb/agency.pb.go b/module/ec/market/pb/agency.pb.go index 2f381f6..8d87338 100644 --- a/module/ec/market/pb/agency.pb.go +++ b/module/ec/market/pb/agency.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc (unknown) -// source: agency.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/market/proto/agency.proto package market import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -32,7 +33,7 @@ type LoginRequest struct { func (x *LoginRequest) Reset() { *x = LoginRequest{} - mi := &file_agency_proto_msgTypes[0] + mi := &file_module_ec_market_proto_agency_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +45,7 @@ func (x *LoginRequest) String() string { func (*LoginRequest) ProtoMessage() {} func (x *LoginRequest) ProtoReflect() protoreflect.Message { - mi := &file_agency_proto_msgTypes[0] + mi := &file_module_ec_market_proto_agency_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +58,7 @@ func (x *LoginRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead. func (*LoginRequest) Descriptor() ([]byte, []int) { - return file_agency_proto_rawDescGZIP(), []int{0} + return file_module_ec_market_proto_agency_proto_rawDescGZIP(), []int{0} } func (x *LoginRequest) GetAccount() string { @@ -109,7 +110,7 @@ type MarketAgenctyItem struct { func (x *MarketAgenctyItem) Reset() { *x = MarketAgenctyItem{} - mi := &file_agency_proto_msgTypes[1] + mi := &file_module_ec_market_proto_agency_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -121,7 +122,7 @@ func (x *MarketAgenctyItem) String() string { func (*MarketAgenctyItem) ProtoMessage() {} func (x *MarketAgenctyItem) ProtoReflect() protoreflect.Message { - mi := &file_agency_proto_msgTypes[1] + mi := &file_module_ec_market_proto_agency_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -134,7 +135,7 @@ func (x *MarketAgenctyItem) ProtoReflect() protoreflect.Message { // Deprecated: Use MarketAgenctyItem.ProtoReflect.Descriptor instead. func (*MarketAgenctyItem) Descriptor() ([]byte, []int) { - return file_agency_proto_rawDescGZIP(), []int{1} + return file_module_ec_market_proto_agency_proto_rawDescGZIP(), []int{1} } func (x *MarketAgenctyItem) GetIdentity() string { @@ -288,7 +289,7 @@ type SetPasswordRequest struct { func (x *SetPasswordRequest) Reset() { *x = SetPasswordRequest{} - mi := &file_agency_proto_msgTypes[2] + mi := &file_module_ec_market_proto_agency_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -300,7 +301,7 @@ func (x *SetPasswordRequest) String() string { func (*SetPasswordRequest) ProtoMessage() {} func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message { - mi := &file_agency_proto_msgTypes[2] + mi := &file_module_ec_market_proto_agency_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -313,7 +314,7 @@ func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetPasswordRequest.ProtoReflect.Descriptor instead. func (*SetPasswordRequest) Descriptor() ([]byte, []int) { - return file_agency_proto_rawDescGZIP(), []int{2} + return file_module_ec_market_proto_agency_proto_rawDescGZIP(), []int{2} } func (x *SetPasswordRequest) GetIdentity() string { @@ -347,7 +348,7 @@ type AgencyReply struct { func (x *AgencyReply) Reset() { *x = AgencyReply{} - mi := &file_agency_proto_msgTypes[3] + mi := &file_module_ec_market_proto_agency_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -359,7 +360,7 @@ func (x *AgencyReply) String() string { func (*AgencyReply) ProtoMessage() {} func (x *AgencyReply) ProtoReflect() protoreflect.Message { - mi := &file_agency_proto_msgTypes[3] + mi := &file_module_ec_market_proto_agency_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -372,7 +373,7 @@ func (x *AgencyReply) ProtoReflect() protoreflect.Message { // Deprecated: Use AgencyReply.ProtoReflect.Descriptor instead. func (*AgencyReply) Descriptor() ([]byte, []int) { - return file_agency_proto_rawDescGZIP(), []int{3} + return file_module_ec_market_proto_agency_proto_rawDescGZIP(), []int{3} } func (x *AgencyReply) GetCount() int64 { @@ -399,7 +400,7 @@ type ApproveRequest struct { func (x *ApproveRequest) Reset() { *x = ApproveRequest{} - mi := &file_agency_proto_msgTypes[4] + mi := &file_module_ec_market_proto_agency_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -411,7 +412,7 @@ func (x *ApproveRequest) String() string { func (*ApproveRequest) ProtoMessage() {} func (x *ApproveRequest) ProtoReflect() protoreflect.Message { - mi := &file_agency_proto_msgTypes[4] + mi := &file_module_ec_market_proto_agency_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -424,7 +425,7 @@ func (x *ApproveRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ApproveRequest.ProtoReflect.Descriptor instead. func (*ApproveRequest) Descriptor() ([]byte, []int) { - return file_agency_proto_rawDescGZIP(), []int{4} + return file_module_ec_market_proto_agency_proto_rawDescGZIP(), []int{4} } func (x *ApproveRequest) GetApprove() int32 { @@ -441,11 +442,11 @@ func (x *ApproveRequest) GetIdentity() string { return "" } -var File_agency_proto protoreflect.FileDescriptor +var File_module_ec_market_proto_agency_proto protoreflect.FileDescriptor -const file_agency_proto_rawDesc = "" + +const file_module_ec_market_proto_agency_proto_rawDesc = "" + "\n" + - "\x16ec/market/agency.proto\x12\x06market\x1a\x13market/blocks.proto\"\\\n" + + "#module/ec/market/proto/agency.proto\x12\x06market\x1a\x15protobuf/blocks.proto\"\\\n" + "\fLoginRequest\x12\x18\n" + "\aaccount\x18\x01 \x01(\tR\aaccount\x12\x1a\n" + "\bpassword\x18\x02 \x01(\tR\bpassword\x12\x16\n" + @@ -483,63 +484,62 @@ const file_agency_proto_rawDesc = "" + "\x04data\x18\x02 \x03(\v2\x19.market.MarketAgenctyItemR\x04data\"F\n" + "\x0eApproveRequest\x12\x18\n" + "\aapprove\x18\x01 \x01(\x05R\aapprove\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity2\x90\x04\n" + - "\x06Agency\x123\n" + - "\x05Login\x12\x14.market.LoginRequest\x1a\x12.market.LoginReply\"\x00\x12:\n" + - "\x06Create\x12\x19.market.MarketAgenctyItem\x1a\x13.market.StatusReply\"\x00\x128\n" + - "\x03Get\x12\x14.market.IdentRequest\x1a\x19.market.MarketAgenctyItem\"\x00\x124\n" + - "\x05Fetch\x12\x14.market.FetchRequest\x1a\x13.market.AgencyReply\"\x00\x12:\n" + - "\x06Modify\x12\x19.market.MarketAgenctyItem\x1a\x13.market.StatusReply\"\x00\x125\n" + - "\x06Delete\x12\x14.market.IdentRequest\x1a\x13.market.StatusReply\"\x00\x12@\n" + - "\vSetPassword\x12\x1a.market.SetPasswordRequest\x1a\x13.market.StatusReply\"\x00\x126\n" + - "\aPending\x12\x14.market.FetchRequest\x1a\x13.market.AgencyReply\"\x00\x128\n" + - "\aApprove\x12\x16.market.ApproveRequest\x1a\x13.market.StatusReply\"\x00B\n" + - "Z\b.;marketb\x06proto3" + "\bidentity\x18\x02 \x01(\tR\bidentity2\xca\x04\n" + + "\x06Agency\x129\n" + + "\x05Login\x12\x14.market.LoginRequest\x1a\x18.blocks.MarketLoginReply\"\x00\x12B\n" + + "\x06Create\x12\x19.market.MarketAgenctyItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x128\n" + + "\x03Get\x12\x14.blocks.IdentRequest\x1a\x19.market.MarketAgenctyItem\"\x00\x12:\n" + + "\x05Fetch\x12\x1a.blocks.MarketFetchRequest\x1a\x13.market.AgencyReply\"\x00\x12B\n" + + "\x06Modify\x12\x19.market.MarketAgenctyItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12=\n" + + "\x06Delete\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12H\n" + + "\vSetPassword\x12\x1a.market.SetPasswordRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12<\n" + + "\aPending\x12\x1a.blocks.MarketFetchRequest\x1a\x13.market.AgencyReply\"\x00\x12@\n" + + "\aApprove\x12\x16.market.ApproveRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00B%Z#bsm/full/module/ec/market/pb;marketb\x06proto3" var ( - file_agency_proto_rawDescOnce sync.Once - file_agency_proto_rawDescData []byte + file_module_ec_market_proto_agency_proto_rawDescOnce sync.Once + file_module_ec_market_proto_agency_proto_rawDescData []byte ) -func file_agency_proto_rawDescGZIP() []byte { - file_agency_proto_rawDescOnce.Do(func() { - file_agency_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_agency_proto_rawDesc), len(file_agency_proto_rawDesc))) +func file_module_ec_market_proto_agency_proto_rawDescGZIP() []byte { + file_module_ec_market_proto_agency_proto_rawDescOnce.Do(func() { + file_module_ec_market_proto_agency_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_market_proto_agency_proto_rawDesc), len(file_module_ec_market_proto_agency_proto_rawDesc))) }) - return file_agency_proto_rawDescData + return file_module_ec_market_proto_agency_proto_rawDescData } -var file_agency_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_agency_proto_goTypes = []any{ - (*LoginRequest)(nil), // 0: market.LoginRequest - (*MarketAgenctyItem)(nil), // 1: market.MarketAgenctyItem - (*SetPasswordRequest)(nil), // 2: market.SetPasswordRequest - (*AgencyReply)(nil), // 3: market.AgencyReply - (*ApproveRequest)(nil), // 4: market.ApproveRequest - (*IdentRequest)(nil), // 5: market.IdentRequest - (*FetchRequest)(nil), // 6: market.FetchRequest - (*LoginReply)(nil), // 7: market.LoginReply - (*StatusReply)(nil), // 8: market.StatusReply +var file_module_ec_market_proto_agency_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_module_ec_market_proto_agency_proto_goTypes = []any{ + (*LoginRequest)(nil), // 0: market.LoginRequest + (*MarketAgenctyItem)(nil), // 1: market.MarketAgenctyItem + (*SetPasswordRequest)(nil), // 2: market.SetPasswordRequest + (*AgencyReply)(nil), // 3: market.AgencyReply + (*ApproveRequest)(nil), // 4: market.ApproveRequest + (*protobuf.IdentRequest)(nil), // 5: blocks.IdentRequest + (*protobuf.MarketFetchRequest)(nil), // 6: blocks.MarketFetchRequest + (*protobuf.MarketLoginReply)(nil), // 7: blocks.MarketLoginReply + (*protobuf.IdentityStatusReply)(nil), // 8: blocks.IdentityStatusReply } -var file_agency_proto_depIdxs = []int32{ +var file_module_ec_market_proto_agency_proto_depIdxs = []int32{ 1, // 0: market.AgencyReply.data:type_name -> market.MarketAgenctyItem 0, // 1: market.Agency.Login:input_type -> market.LoginRequest 1, // 2: market.Agency.Create:input_type -> market.MarketAgenctyItem - 5, // 3: market.Agency.Get:input_type -> market.IdentRequest - 6, // 4: market.Agency.Fetch:input_type -> market.FetchRequest + 5, // 3: market.Agency.Get:input_type -> blocks.IdentRequest + 6, // 4: market.Agency.Fetch:input_type -> blocks.MarketFetchRequest 1, // 5: market.Agency.Modify:input_type -> market.MarketAgenctyItem - 5, // 6: market.Agency.Delete:input_type -> market.IdentRequest + 5, // 6: market.Agency.Delete:input_type -> blocks.IdentRequest 2, // 7: market.Agency.SetPassword:input_type -> market.SetPasswordRequest - 6, // 8: market.Agency.Pending:input_type -> market.FetchRequest + 6, // 8: market.Agency.Pending:input_type -> blocks.MarketFetchRequest 4, // 9: market.Agency.Approve:input_type -> market.ApproveRequest - 7, // 10: market.Agency.Login:output_type -> market.LoginReply - 8, // 11: market.Agency.Create:output_type -> market.StatusReply + 7, // 10: market.Agency.Login:output_type -> blocks.MarketLoginReply + 8, // 11: market.Agency.Create:output_type -> blocks.IdentityStatusReply 1, // 12: market.Agency.Get:output_type -> market.MarketAgenctyItem 3, // 13: market.Agency.Fetch:output_type -> market.AgencyReply - 8, // 14: market.Agency.Modify:output_type -> market.StatusReply - 8, // 15: market.Agency.Delete:output_type -> market.StatusReply - 8, // 16: market.Agency.SetPassword:output_type -> market.StatusReply + 8, // 14: market.Agency.Modify:output_type -> blocks.IdentityStatusReply + 8, // 15: market.Agency.Delete:output_type -> blocks.IdentityStatusReply + 8, // 16: market.Agency.SetPassword:output_type -> blocks.IdentityStatusReply 3, // 17: market.Agency.Pending:output_type -> market.AgencyReply - 8, // 18: market.Agency.Approve:output_type -> market.StatusReply + 8, // 18: market.Agency.Approve:output_type -> blocks.IdentityStatusReply 10, // [10:19] is the sub-list for method output_type 1, // [1:10] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -547,27 +547,26 @@ var file_agency_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_agency_proto_init() } -func file_agency_proto_init() { - if File_agency_proto != nil { +func init() { file_module_ec_market_proto_agency_proto_init() } +func file_module_ec_market_proto_agency_proto_init() { + if File_module_ec_market_proto_agency_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_agency_proto_rawDesc), len(file_agency_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_market_proto_agency_proto_rawDesc), len(file_module_ec_market_proto_agency_proto_rawDesc)), NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_agency_proto_goTypes, - DependencyIndexes: file_agency_proto_depIdxs, - MessageInfos: file_agency_proto_msgTypes, + GoTypes: file_module_ec_market_proto_agency_proto_goTypes, + DependencyIndexes: file_module_ec_market_proto_agency_proto_depIdxs, + MessageInfos: file_module_ec_market_proto_agency_proto_msgTypes, }.Build() - File_agency_proto = out.File - file_agency_proto_goTypes = nil - file_agency_proto_depIdxs = nil + File_module_ec_market_proto_agency_proto = out.File + file_module_ec_market_proto_agency_proto_goTypes = nil + file_module_ec_market_proto_agency_proto_depIdxs = nil } diff --git a/module/ec/market/pb/agency.pb.gw.go b/module/ec/market/pb/agency.pb.gw.go index de870f2..400550a 100644 --- a/module/ec/market/pb/agency.pb.gw.go +++ b/module/ec/market/pb/agency.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: agency.proto +// source: module/ec/market/proto/agency.proto /* Package market is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package market import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -43,6 +44,9 @@ func request_Agency_Login_0(ctx context.Context, marshaler runtime.Marshaler, cl if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Login(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -67,6 +71,9 @@ func request_Agency_Create_0(ctx context.Context, marshaler runtime.Marshaler, c if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Create(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -85,19 +92,22 @@ func local_request_Agency_Create_0(ctx context.Context, marshaler runtime.Marsha func request_Agency_Get_0(ctx context.Context, marshaler runtime.Marshaler, client AgencyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Agency_Get_0(ctx context.Context, marshaler runtime.Marshaler, server AgencyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -109,19 +119,22 @@ func local_request_Agency_Get_0(ctx context.Context, marshaler runtime.Marshaler func request_Agency_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client AgencyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MarketFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Fetch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Agency_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server AgencyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MarketFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -139,6 +152,9 @@ func request_Agency_Modify_0(ctx context.Context, marshaler runtime.Marshaler, c if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Modify(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -157,19 +173,22 @@ func local_request_Agency_Modify_0(ctx context.Context, marshaler runtime.Marsha func request_Agency_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client AgencyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Agency_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server AgencyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -187,6 +206,9 @@ func request_Agency_SetPassword_0(ctx context.Context, marshaler runtime.Marshal if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.SetPassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -205,19 +227,22 @@ func local_request_Agency_SetPassword_0(ctx context.Context, marshaler runtime.M func request_Agency_Pending_0(ctx context.Context, marshaler runtime.Marshaler, client AgencyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MarketFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Pending(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Agency_Pending_0(ctx context.Context, marshaler runtime.Marshaler, server AgencyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MarketFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -235,6 +260,9 @@ func request_Agency_Approve_0(ctx context.Context, marshaler runtime.Marshaler, if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Approve(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } diff --git a/module/ec/market/pb/agency_grpc.pb.go b/module/ec/market/pb/agency_grpc.pb.go index bc19822..87a92f3 100644 --- a/module/ec/market/pb/agency_grpc.pb.go +++ b/module/ec/market/pb/agency_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: agency.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/market/proto/agency.proto package market import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -37,23 +38,23 @@ const ( // 营销服务 - 代理商 type AgencyClient interface { // 登录 - Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) + Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*protobuf.MarketLoginReply, error) // 新增代理商 - Create(ctx context.Context, in *MarketAgenctyItem, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *MarketAgenctyItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 获取一个代理商 - Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*MarketAgenctyItem, error) + Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*MarketAgenctyItem, error) // 代理商列表 - Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*AgencyReply, error) + Fetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*AgencyReply, error) // 更新代理商数据 - Modify(ctx context.Context, in *MarketAgenctyItem, opts ...grpc.CallOption) (*StatusReply, error) + Modify(ctx context.Context, in *MarketAgenctyItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 删除一个代理商 - Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 更新密码 - SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error) - //待审核 - Pending(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*AgencyReply, error) + SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) + // 待审核 + Pending(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*AgencyReply, error) // 审核 - Approve(ctx context.Context, in *ApproveRequest, opts ...grpc.CallOption) (*StatusReply, error) + Approve(ctx context.Context, in *ApproveRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) } type agencyClient struct { @@ -64,9 +65,9 @@ func NewAgencyClient(cc grpc.ClientConnInterface) AgencyClient { return &agencyClient{cc} } -func (c *agencyClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) { +func (c *agencyClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*protobuf.MarketLoginReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(LoginReply) + out := new(protobuf.MarketLoginReply) err := c.cc.Invoke(ctx, Agency_Login_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -74,9 +75,9 @@ func (c *agencyClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc return out, nil } -func (c *agencyClient) Create(ctx context.Context, in *MarketAgenctyItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *agencyClient) Create(ctx context.Context, in *MarketAgenctyItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Agency_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -84,7 +85,7 @@ func (c *agencyClient) Create(ctx context.Context, in *MarketAgenctyItem, opts . return out, nil } -func (c *agencyClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*MarketAgenctyItem, error) { +func (c *agencyClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*MarketAgenctyItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MarketAgenctyItem) err := c.cc.Invoke(ctx, Agency_Get_FullMethodName, in, out, cOpts...) @@ -94,7 +95,7 @@ func (c *agencyClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.C return out, nil } -func (c *agencyClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*AgencyReply, error) { +func (c *agencyClient) Fetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*AgencyReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AgencyReply) err := c.cc.Invoke(ctx, Agency_Fetch_FullMethodName, in, out, cOpts...) @@ -104,9 +105,9 @@ func (c *agencyClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc return out, nil } -func (c *agencyClient) Modify(ctx context.Context, in *MarketAgenctyItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *agencyClient) Modify(ctx context.Context, in *MarketAgenctyItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Agency_Modify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -114,9 +115,9 @@ func (c *agencyClient) Modify(ctx context.Context, in *MarketAgenctyItem, opts . return out, nil } -func (c *agencyClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *agencyClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Agency_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -124,9 +125,9 @@ func (c *agencyClient) Delete(ctx context.Context, in *IdentRequest, opts ...grp return out, nil } -func (c *agencyClient) SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *agencyClient) SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Agency_SetPassword_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -134,7 +135,7 @@ func (c *agencyClient) SetPassword(ctx context.Context, in *SetPasswordRequest, return out, nil } -func (c *agencyClient) Pending(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*AgencyReply, error) { +func (c *agencyClient) Pending(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*AgencyReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AgencyReply) err := c.cc.Invoke(ctx, Agency_Pending_FullMethodName, in, out, cOpts...) @@ -144,9 +145,9 @@ func (c *agencyClient) Pending(ctx context.Context, in *FetchRequest, opts ...gr return out, nil } -func (c *agencyClient) Approve(ctx context.Context, in *ApproveRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *agencyClient) Approve(ctx context.Context, in *ApproveRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Agency_Approve_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -155,68 +156,66 @@ func (c *agencyClient) Approve(ctx context.Context, in *ApproveRequest, opts ... } // AgencyServer is the server API for Agency service. -// All implementations must embed UnimplementedAgencyServer +// All implementations should embed UnimplementedAgencyServer // for forward compatibility. // // 营销服务 - 代理商 type AgencyServer interface { // 登录 - Login(context.Context, *LoginRequest) (*LoginReply, error) + Login(context.Context, *LoginRequest) (*protobuf.MarketLoginReply, error) // 新增代理商 - Create(context.Context, *MarketAgenctyItem) (*StatusReply, error) + Create(context.Context, *MarketAgenctyItem) (*protobuf.IdentityStatusReply, error) // 获取一个代理商 - Get(context.Context, *IdentRequest) (*MarketAgenctyItem, error) + Get(context.Context, *protobuf.IdentRequest) (*MarketAgenctyItem, error) // 代理商列表 - Fetch(context.Context, *FetchRequest) (*AgencyReply, error) + Fetch(context.Context, *protobuf.MarketFetchRequest) (*AgencyReply, error) // 更新代理商数据 - Modify(context.Context, *MarketAgenctyItem) (*StatusReply, error) + Modify(context.Context, *MarketAgenctyItem) (*protobuf.IdentityStatusReply, error) // 删除一个代理商 - Delete(context.Context, *IdentRequest) (*StatusReply, error) + Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) // 更新密码 - SetPassword(context.Context, *SetPasswordRequest) (*StatusReply, error) - //待审核 - Pending(context.Context, *FetchRequest) (*AgencyReply, error) + SetPassword(context.Context, *SetPasswordRequest) (*protobuf.IdentityStatusReply, error) + // 待审核 + Pending(context.Context, *protobuf.MarketFetchRequest) (*AgencyReply, error) // 审核 - Approve(context.Context, *ApproveRequest) (*StatusReply, error) - mustEmbedUnimplementedAgencyServer() + Approve(context.Context, *ApproveRequest) (*protobuf.IdentityStatusReply, error) } -// UnimplementedAgencyServer must be embedded to have +// UnimplementedAgencyServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedAgencyServer struct{} -func (UnimplementedAgencyServer) Login(context.Context, *LoginRequest) (*LoginReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Login not implemented") +func (UnimplementedAgencyServer) Login(context.Context, *LoginRequest) (*protobuf.MarketLoginReply, error) { + return nil, status.Error(codes.Unimplemented, "method Login not implemented") } -func (UnimplementedAgencyServer) Create(context.Context, *MarketAgenctyItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +func (UnimplementedAgencyServer) Create(context.Context, *MarketAgenctyItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedAgencyServer) Get(context.Context, *IdentRequest) (*MarketAgenctyItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +func (UnimplementedAgencyServer) Get(context.Context, *protobuf.IdentRequest) (*MarketAgenctyItem, error) { + return nil, status.Error(codes.Unimplemented, "method Get not implemented") } -func (UnimplementedAgencyServer) Fetch(context.Context, *FetchRequest) (*AgencyReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") +func (UnimplementedAgencyServer) Fetch(context.Context, *protobuf.MarketFetchRequest) (*AgencyReply, error) { + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedAgencyServer) Modify(context.Context, *MarketAgenctyItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented") +func (UnimplementedAgencyServer) Modify(context.Context, *MarketAgenctyItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } -func (UnimplementedAgencyServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +func (UnimplementedAgencyServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedAgencyServer) SetPassword(context.Context, *SetPasswordRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetPassword not implemented") +func (UnimplementedAgencyServer) SetPassword(context.Context, *SetPasswordRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SetPassword not implemented") } -func (UnimplementedAgencyServer) Pending(context.Context, *FetchRequest) (*AgencyReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Pending not implemented") +func (UnimplementedAgencyServer) Pending(context.Context, *protobuf.MarketFetchRequest) (*AgencyReply, error) { + return nil, status.Error(codes.Unimplemented, "method Pending not implemented") } -func (UnimplementedAgencyServer) Approve(context.Context, *ApproveRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Approve not implemented") +func (UnimplementedAgencyServer) Approve(context.Context, *ApproveRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Approve not implemented") } -func (UnimplementedAgencyServer) mustEmbedUnimplementedAgencyServer() {} -func (UnimplementedAgencyServer) testEmbeddedByValue() {} +func (UnimplementedAgencyServer) testEmbeddedByValue() {} // UnsafeAgencyServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AgencyServer will @@ -226,7 +225,7 @@ type UnsafeAgencyServer interface { } func RegisterAgencyServer(s grpc.ServiceRegistrar, srv AgencyServer) { - // If the following call pancis, it indicates UnimplementedAgencyServer was + // If the following call panics, it indicates UnimplementedAgencyServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -273,7 +272,7 @@ func _Agency_Create_Handler(srv interface{}, ctx context.Context, dec func(inter } func _Agency_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -285,13 +284,13 @@ func _Agency_Get_Handler(srv interface{}, ctx context.Context, dec func(interfac FullMethod: Agency_Get_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AgencyServer).Get(ctx, req.(*IdentRequest)) + return srv.(AgencyServer).Get(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Agency_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.MarketFetchRequest) if err := dec(in); err != nil { return nil, err } @@ -303,7 +302,7 @@ func _Agency_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Agency_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AgencyServer).Fetch(ctx, req.(*FetchRequest)) + return srv.(AgencyServer).Fetch(ctx, req.(*protobuf.MarketFetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -327,7 +326,7 @@ func _Agency_Modify_Handler(srv interface{}, ctx context.Context, dec func(inter } func _Agency_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -339,7 +338,7 @@ func _Agency_Delete_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Agency_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AgencyServer).Delete(ctx, req.(*IdentRequest)) + return srv.(AgencyServer).Delete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -363,7 +362,7 @@ func _Agency_SetPassword_Handler(srv interface{}, ctx context.Context, dec func( } func _Agency_Pending_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.MarketFetchRequest) if err := dec(in); err != nil { return nil, err } @@ -375,7 +374,7 @@ func _Agency_Pending_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Agency_Pending_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AgencyServer).Pending(ctx, req.(*FetchRequest)) + return srv.(AgencyServer).Pending(ctx, req.(*protobuf.MarketFetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -443,5 +442,5 @@ var Agency_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "agency.proto", + Metadata: "module/ec/market/proto/agency.proto", } diff --git a/module/ec/market/pb/blocks.pb.go b/module/ec/market/pb/blocks.pb.go deleted file mode 100644 index 7d6f815..0000000 --- a/module/ec/market/pb/blocks.pb.go +++ /dev/null @@ -1,622 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.6 -// protoc (unknown) -// source: blocks.proto - -package market - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Empty struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Empty) Reset() { - *x = Empty{} - mi := &file_blocks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Empty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Empty) ProtoMessage() {} - -func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{0} -} - -type FetchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PageNo int64 `protobuf:"varint,1,opt,name=page_no,proto3" json:"page_no,omitempty"` // 页数 - PageSize int64 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // 每页记录数 - Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:categoryId=?,vlaue=11 - Identity string `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - Keyword string `protobuf:"bytes,5,opt,name=keyword,proto3" json:"keyword,omitempty"` //关键词 - Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` // 状态:默认为0,-1禁止,1为正常 - Approve int32 `protobuf:"varint,7,opt,name=approve,proto3" json:"approve,omitempty"` // 审核状态:0:待审核 2:审核通过 -2:审核未通过 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchRequest) Reset() { - *x = FetchRequest{} - mi := &file_blocks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRequest) ProtoMessage() {} - -func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. -func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{1} -} - -func (x *FetchRequest) GetPageNo() int64 { - if x != nil { - return x.PageNo - } - return 0 -} - -func (x *FetchRequest) GetPageSize() int64 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *FetchRequest) GetParams() map[string]string { - if x != nil { - return x.Params - } - return nil -} - -func (x *FetchRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *FetchRequest) GetKeyword() string { - if x != nil { - return x.Keyword - } - return "" -} - -func (x *FetchRequest) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *FetchRequest) GetApprove() int32 { - if x != nil { - return x.Approve - } - return 0 -} - -type IdentRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IdentRequest) Reset() { - *x = IdentRequest{} - mi := &file_blocks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IdentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IdentRequest) ProtoMessage() {} - -func (x *IdentRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. -func (*IdentRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{2} -} - -func (x *IdentRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *IdentRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -type StoreSerialRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - StoreIdentity string `protobuf:"bytes,1,opt,name=store_identity,proto3" json:"store_identity,omitempty"` // 店铺Identity - SerialId []string `protobuf:"bytes,2,rep,name=serial_id,proto3" json:"serial_id,omitempty"` // 序列Identity - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StoreSerialRequest) Reset() { - *x = StoreSerialRequest{} - mi := &file_blocks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StoreSerialRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StoreSerialRequest) ProtoMessage() {} - -func (x *StoreSerialRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StoreSerialRequest.ProtoReflect.Descriptor instead. -func (*StoreSerialRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{3} -} - -func (x *StoreSerialRequest) GetStoreIdentity() string { - if x != nil { - return x.StoreIdentity - } - return "" -} - -func (x *StoreSerialRequest) GetSerialId() []string { - if x != nil { - return x.SerialId - } - return nil -} - -type StatusReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // 状态码 - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 标识码 - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` //状态说明 - Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusReply) Reset() { - *x = StatusReply{} - mi := &file_blocks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusReply) ProtoMessage() {} - -func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. -func (*StatusReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{4} -} - -func (x *StatusReply) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *StatusReply) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *StatusReply) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *StatusReply) GetTimeseq() int64 { - if x != nil { - return x.Timeseq - } - return 0 -} - -type LoginReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // token 授权码 - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - MarketIdentity string `protobuf:"bytes,3,opt,name=market_identity,proto3" json:"market_identity,omitempty"` // 店铺唯一标识 - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // 姓名 - Account string `protobuf:"bytes,5,opt,name=account,proto3" json:"account,omitempty"` // 账号 - Role string `protobuf:"bytes,6,opt,name=role,proto3" json:"role,omitempty"` // 角色 - Status int32 `protobuf:"varint,7,opt,name=status,proto3" json:"status,omitempty"` // 状态 - CreatedAt string `protobuf:"bytes,8,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间 - MarketName string `protobuf:"bytes,9,opt,name=market_name,proto3" json:"market_name,omitempty"` // 店铺名称 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LoginReply) Reset() { - *x = LoginReply{} - mi := &file_blocks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LoginReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoginReply) ProtoMessage() {} - -func (x *LoginReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoginReply.ProtoReflect.Descriptor instead. -func (*LoginReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{5} -} - -func (x *LoginReply) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *LoginReply) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *LoginReply) GetMarketIdentity() string { - if x != nil { - return x.MarketIdentity - } - return "" -} - -func (x *LoginReply) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *LoginReply) GetAccount() string { - if x != nil { - return x.Account - } - return "" -} - -func (x *LoginReply) GetRole() string { - if x != nil { - return x.Role - } - return "" -} - -func (x *LoginReply) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *LoginReply) GetCreatedAt() string { - if x != nil { - return x.CreatedAt - } - return "" -} - -func (x *LoginReply) GetMarketName() string { - if x != nil { - return x.MarketName - } - return "" -} - -type VersionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 时序版本号 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *VersionRequest) Reset() { - *x = VersionRequest{} - mi := &file_blocks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *VersionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersionRequest) ProtoMessage() {} - -func (x *VersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. -func (*VersionRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{6} -} - -func (x *VersionRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type SearchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` //关键词 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchRequest) Reset() { - *x = SearchRequest{} - mi := &file_blocks_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchRequest) ProtoMessage() {} - -func (x *SearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. -func (*SearchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{7} -} - -func (x *SearchRequest) GetKeyword() string { - if x != nil { - return x.Keyword - } - return "" -} - -var File_blocks_proto protoreflect.FileDescriptor - -const file_blocks_proto_rawDesc = "" + - "\n" + - "\x13market/blocks.proto\x12\x06market\"\a\n" + - "\x05Empty\"\xa3\x02\n" + - "\fFetchRequest\x12\x18\n" + - "\apage_no\x18\x01 \x01(\x03R\apage_no\x12\x1c\n" + - "\tpage_size\x18\x02 \x01(\x03R\tpage_size\x128\n" + - "\x06params\x18\x03 \x03(\v2 .market.FetchRequest.ParamsEntryR\x06params\x12\x1a\n" + - "\bidentity\x18\x04 \x01(\tR\bidentity\x12\x18\n" + - "\akeyword\x18\x05 \x01(\tR\akeyword\x12\x16\n" + - "\x06status\x18\x06 \x01(\x05R\x06status\x12\x18\n" + - "\aapprove\x18\a \x01(\x05R\aapprove\x1a9\n" + - "\vParamsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" + - "\fIdentRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\"Z\n" + - "\x12StoreSerialRequest\x12&\n" + - "\x0estore_identity\x18\x01 \x01(\tR\x0estore_identity\x12\x1c\n" + - "\tserial_id\x18\x02 \x03(\tR\tserial_id\"q\n" + - "\vStatusReply\x12\x12\n" + - "\x04code\x18\x01 \x01(\x05R\x04code\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x18\n" + - "\amessage\x18\x03 \x01(\tR\amessage\x12\x18\n" + - "\atimeseq\x18\x04 \x01(\x03R\atimeseq\"\x84\x02\n" + - "\n" + - "LoginReply\x12\x14\n" + - "\x05token\x18\x01 \x01(\tR\x05token\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\x12(\n" + - "\x0fmarket_identity\x18\x03 \x01(\tR\x0fmarket_identity\x12\x12\n" + - "\x04name\x18\x04 \x01(\tR\x04name\x12\x18\n" + - "\aaccount\x18\x05 \x01(\tR\aaccount\x12\x12\n" + - "\x04role\x18\x06 \x01(\tR\x04role\x12\x16\n" + - "\x06status\x18\a \x01(\x05R\x06status\x12\x1e\n" + - "\n" + - "created_at\x18\b \x01(\tR\n" + - "created_at\x12 \n" + - "\vmarket_name\x18\t \x01(\tR\vmarket_name\"*\n" + - "\x0eVersionRequest\x12\x18\n" + - "\aversion\x18\x01 \x01(\x03R\aversion\")\n" + - "\rSearchRequest\x12\x18\n" + - "\akeyword\x18\x01 \x01(\tR\akeywordB\n" + - "Z\b.;marketb\x06proto3" - -var ( - file_blocks_proto_rawDescOnce sync.Once - file_blocks_proto_rawDescData []byte -) - -func file_blocks_proto_rawDescGZIP() []byte { - file_blocks_proto_rawDescOnce.Do(func() { - file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc))) - }) - return file_blocks_proto_rawDescData -} - -var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_blocks_proto_goTypes = []any{ - (*Empty)(nil), // 0: market.Empty - (*FetchRequest)(nil), // 1: market.FetchRequest - (*IdentRequest)(nil), // 2: market.IdentRequest - (*StoreSerialRequest)(nil), // 3: market.StoreSerialRequest - (*StatusReply)(nil), // 4: market.StatusReply - (*LoginReply)(nil), // 5: market.LoginReply - (*VersionRequest)(nil), // 6: market.VersionRequest - (*SearchRequest)(nil), // 7: market.SearchRequest - nil, // 8: market.FetchRequest.ParamsEntry -} -var file_blocks_proto_depIdxs = []int32{ - 8, // 0: market.FetchRequest.params:type_name -> market.FetchRequest.ParamsEntry - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_blocks_proto_init() } -func file_blocks_proto_init() { - if File_blocks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 9, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_blocks_proto_goTypes, - DependencyIndexes: file_blocks_proto_depIdxs, - MessageInfos: file_blocks_proto_msgTypes, - }.Build() - File_blocks_proto = out.File - file_blocks_proto_goTypes = nil - file_blocks_proto_depIdxs = nil -} diff --git a/module/ec/market/pb/blocks_compat.go b/module/ec/market/pb/blocks_compat.go new file mode 100644 index 0000000..03daacb --- /dev/null +++ b/module/ec/market/pb/blocks_compat.go @@ -0,0 +1,12 @@ +package market + +import blocks "bsm/full/protobuf" + +type Empty = blocks.Empty +type FetchRequest = blocks.MarketFetchRequest +type IdentRequest = blocks.IdentRequest +type StoreSerialRequest = blocks.StoreSerialRequest +type StatusReply = blocks.IdentityStatusReply +type LoginReply = blocks.MarketLoginReply +type VersionRequest = blocks.VersionRequest +type SearchRequest = blocks.SearchRequest diff --git a/module/ec/market/pb/data.pb.go b/module/ec/market/pb/data.pb.go index 45b5257..15e9d30 100644 --- a/module/ec/market/pb/data.pb.go +++ b/module/ec/market/pb/data.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc (unknown) -// source: data.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/market/proto/data.proto package market import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -41,7 +42,7 @@ type OverviewReply struct { func (x *OverviewReply) Reset() { *x = OverviewReply{} - mi := &file_data_proto_msgTypes[0] + mi := &file_module_ec_market_proto_data_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -53,7 +54,7 @@ func (x *OverviewReply) String() string { func (*OverviewReply) ProtoMessage() {} func (x *OverviewReply) ProtoReflect() protoreflect.Message { - mi := &file_data_proto_msgTypes[0] + mi := &file_module_ec_market_proto_data_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66,7 +67,7 @@ func (x *OverviewReply) ProtoReflect() protoreflect.Message { // Deprecated: Use OverviewReply.ProtoReflect.Descriptor instead. func (*OverviewReply) Descriptor() ([]byte, []int) { - return file_data_proto_rawDescGZIP(), []int{0} + return file_module_ec_market_proto_data_proto_rawDescGZIP(), []int{0} } func (x *OverviewReply) GetTotalApprove() int64 { @@ -121,7 +122,7 @@ type DataReply struct { func (x *DataReply) Reset() { *x = DataReply{} - mi := &file_data_proto_msgTypes[1] + mi := &file_module_ec_market_proto_data_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -133,7 +134,7 @@ func (x *DataReply) String() string { func (*DataReply) ProtoMessage() {} func (x *DataReply) ProtoReflect() protoreflect.Message { - mi := &file_data_proto_msgTypes[1] + mi := &file_module_ec_market_proto_data_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -146,7 +147,7 @@ func (x *DataReply) ProtoReflect() protoreflect.Message { // Deprecated: Use DataReply.ProtoReflect.Descriptor instead. func (*DataReply) Descriptor() ([]byte, []int) { - return file_data_proto_rawDescGZIP(), []int{1} + return file_module_ec_market_proto_data_proto_rawDescGZIP(), []int{1} } func (x *DataReply) GetCount() int64 { @@ -173,7 +174,7 @@ type KeyVal struct { func (x *KeyVal) Reset() { *x = KeyVal{} - mi := &file_data_proto_msgTypes[2] + mi := &file_module_ec_market_proto_data_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -185,7 +186,7 @@ func (x *KeyVal) String() string { func (*KeyVal) ProtoMessage() {} func (x *KeyVal) ProtoReflect() protoreflect.Message { - mi := &file_data_proto_msgTypes[2] + mi := &file_module_ec_market_proto_data_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -198,7 +199,7 @@ func (x *KeyVal) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyVal.ProtoReflect.Descriptor instead. func (*KeyVal) Descriptor() ([]byte, []int) { - return file_data_proto_rawDescGZIP(), []int{2} + return file_module_ec_market_proto_data_proto_rawDescGZIP(), []int{2} } func (x *KeyVal) GetKey() string { @@ -215,12 +216,11 @@ func (x *KeyVal) GetVal() string { return "" } -var File_data_proto protoreflect.FileDescriptor +var File_module_ec_market_proto_data_proto protoreflect.FileDescriptor -const file_data_proto_rawDesc = "" + +const file_module_ec_market_proto_data_proto_rawDesc = "" + "\n" + - "\x14" + - "ec/market/data.proto\x12\x06market\x1a\x13market/blocks.proto\"\xad\x03\n" + + "!module/ec/market/proto/data.proto\x12\x06market\x1a\x15protobuf/blocks.proto\"\xad\x03\n" + "\rOverviewReply\x12$\n" + "\rtotal_approve\x18\x01 \x01(\x03R\rtotal_approve\x12 \n" + "\vtotal_month\x18\x02 \x01(\x03R\vtotal_month\x12\x1c\n" + @@ -239,48 +239,47 @@ const file_data_proto_rawDesc = "" + "\x04data\x18\x02 \x03(\v2\x0e.market.KeyValR\x04data\",\n" + "\x06KeyVal\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x10\n" + - "\x03val\x18\x02 \x01(\tR\x03val2\x9e\x02\n" + + "\x03val\x18\x02 \x01(\tR\x03val2\xaa\x02\n" + "\x04Data\x122\n" + - "\bOverview\x12\r.market.Empty\x1a\x15.market.OverviewReply\"\x00\x128\n" + - "\vMemberFetch\x12\x14.market.FetchRequest\x1a\x11.market.DataReply\"\x00\x127\n" + - "\rMemberDetails\x12\x14.market.IdentRequest\x1a\x0e.market.KeyVal\"\x00\x127\n" + + "\bOverview\x12\r.blocks.Empty\x1a\x15.market.OverviewReply\"\x00\x12>\n" + + "\vMemberFetch\x12\x1a.blocks.MarketFetchRequest\x1a\x11.market.DataReply\"\x00\x127\n" + + "\rMemberDetails\x12\x14.blocks.IdentRequest\x1a\x0e.market.KeyVal\"\x00\x12=\n" + "\n" + - "OrderFetch\x12\x14.market.FetchRequest\x1a\x11.market.DataReply\"\x00\x126\n" + - "\fOrderDetails\x12\x14.market.IdentRequest\x1a\x0e.market.KeyVal\"\x00B\n" + - "Z\b.;marketb\x06proto3" + "OrderFetch\x12\x1a.blocks.MarketFetchRequest\x1a\x11.market.DataReply\"\x00\x126\n" + + "\fOrderDetails\x12\x14.blocks.IdentRequest\x1a\x0e.market.KeyVal\"\x00B%Z#bsm/full/module/ec/market/pb;marketb\x06proto3" var ( - file_data_proto_rawDescOnce sync.Once - file_data_proto_rawDescData []byte + file_module_ec_market_proto_data_proto_rawDescOnce sync.Once + file_module_ec_market_proto_data_proto_rawDescData []byte ) -func file_data_proto_rawDescGZIP() []byte { - file_data_proto_rawDescOnce.Do(func() { - file_data_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_data_proto_rawDesc), len(file_data_proto_rawDesc))) +func file_module_ec_market_proto_data_proto_rawDescGZIP() []byte { + file_module_ec_market_proto_data_proto_rawDescOnce.Do(func() { + file_module_ec_market_proto_data_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_market_proto_data_proto_rawDesc), len(file_module_ec_market_proto_data_proto_rawDesc))) }) - return file_data_proto_rawDescData + return file_module_ec_market_proto_data_proto_rawDescData } -var file_data_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_data_proto_goTypes = []any{ - (*OverviewReply)(nil), // 0: market.OverviewReply - (*DataReply)(nil), // 1: market.DataReply - (*KeyVal)(nil), // 2: market.KeyVal - nil, // 3: market.OverviewReply.ReportMonthEntry - nil, // 4: market.OverviewReply.ReportStaffEntry - (*Empty)(nil), // 5: market.Empty - (*FetchRequest)(nil), // 6: market.FetchRequest - (*IdentRequest)(nil), // 7: market.IdentRequest +var file_module_ec_market_proto_data_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_module_ec_market_proto_data_proto_goTypes = []any{ + (*OverviewReply)(nil), // 0: market.OverviewReply + (*DataReply)(nil), // 1: market.DataReply + (*KeyVal)(nil), // 2: market.KeyVal + nil, // 3: market.OverviewReply.ReportMonthEntry + nil, // 4: market.OverviewReply.ReportStaffEntry + (*protobuf.Empty)(nil), // 5: blocks.Empty + (*protobuf.MarketFetchRequest)(nil), // 6: blocks.MarketFetchRequest + (*protobuf.IdentRequest)(nil), // 7: blocks.IdentRequest } -var file_data_proto_depIdxs = []int32{ +var file_module_ec_market_proto_data_proto_depIdxs = []int32{ 3, // 0: market.OverviewReply.report_month:type_name -> market.OverviewReply.ReportMonthEntry 4, // 1: market.OverviewReply.report_staff:type_name -> market.OverviewReply.ReportStaffEntry 2, // 2: market.DataReply.data:type_name -> market.KeyVal - 5, // 3: market.Data.Overview:input_type -> market.Empty - 6, // 4: market.Data.MemberFetch:input_type -> market.FetchRequest - 7, // 5: market.Data.MemberDetails:input_type -> market.IdentRequest - 6, // 6: market.Data.OrderFetch:input_type -> market.FetchRequest - 7, // 7: market.Data.OrderDetails:input_type -> market.IdentRequest + 5, // 3: market.Data.Overview:input_type -> blocks.Empty + 6, // 4: market.Data.MemberFetch:input_type -> blocks.MarketFetchRequest + 7, // 5: market.Data.MemberDetails:input_type -> blocks.IdentRequest + 6, // 6: market.Data.OrderFetch:input_type -> blocks.MarketFetchRequest + 7, // 7: market.Data.OrderDetails:input_type -> blocks.IdentRequest 0, // 8: market.Data.Overview:output_type -> market.OverviewReply 1, // 9: market.Data.MemberFetch:output_type -> market.DataReply 2, // 10: market.Data.MemberDetails:output_type -> market.KeyVal @@ -293,27 +292,26 @@ var file_data_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_data_proto_init() } -func file_data_proto_init() { - if File_data_proto != nil { +func init() { file_module_ec_market_proto_data_proto_init() } +func file_module_ec_market_proto_data_proto_init() { + if File_module_ec_market_proto_data_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_data_proto_rawDesc), len(file_data_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_market_proto_data_proto_rawDesc), len(file_module_ec_market_proto_data_proto_rawDesc)), NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_data_proto_goTypes, - DependencyIndexes: file_data_proto_depIdxs, - MessageInfos: file_data_proto_msgTypes, + GoTypes: file_module_ec_market_proto_data_proto_goTypes, + DependencyIndexes: file_module_ec_market_proto_data_proto_depIdxs, + MessageInfos: file_module_ec_market_proto_data_proto_msgTypes, }.Build() - File_data_proto = out.File - file_data_proto_goTypes = nil - file_data_proto_depIdxs = nil + File_module_ec_market_proto_data_proto = out.File + file_module_ec_market_proto_data_proto_goTypes = nil + file_module_ec_market_proto_data_proto_depIdxs = nil } diff --git a/module/ec/market/pb/data.pb.gw.go b/module/ec/market/pb/data.pb.gw.go index acb59b8..9abe60c 100644 --- a/module/ec/market/pb/data.pb.gw.go +++ b/module/ec/market/pb/data.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: data.proto +// source: module/ec/market/proto/data.proto /* Package market is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package market import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,19 +38,22 @@ var ( func request_Data_Overview_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Overview(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Data_Overview_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -61,19 +65,22 @@ func local_request_Data_Overview_0(ctx context.Context, marshaler runtime.Marsha func request_Data_MemberFetch_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MarketFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.MemberFetch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Data_MemberFetch_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MarketFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -85,19 +92,22 @@ func local_request_Data_MemberFetch_0(ctx context.Context, marshaler runtime.Mar func request_Data_MemberDetails_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.MemberDetails(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Data_MemberDetails_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -109,19 +119,22 @@ func local_request_Data_MemberDetails_0(ctx context.Context, marshaler runtime.M func request_Data_OrderFetch_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MarketFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.OrderFetch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Data_OrderFetch_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MarketFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,19 +146,22 @@ func local_request_Data_OrderFetch_0(ctx context.Context, marshaler runtime.Mars func request_Data_OrderDetails_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.OrderDetails(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Data_OrderDetails_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/ec/market/pb/data_grpc.pb.go b/module/ec/market/pb/data_grpc.pb.go index ad046a8..7e30cd3 100644 --- a/module/ec/market/pb/data_grpc.pb.go +++ b/module/ec/market/pb/data_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: data.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/market/proto/data.proto package market import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -33,15 +34,15 @@ const ( // 数据服务 type DataClient interface { // 概况 - Overview(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*OverviewReply, error) + Overview(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*OverviewReply, error) // 会员列表 - MemberFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*DataReply, error) + MemberFetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*DataReply, error) // 会员详情 - MemberDetails(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*KeyVal, error) + MemberDetails(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*KeyVal, error) // 订单列表 - OrderFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*DataReply, error) + OrderFetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*DataReply, error) // 订单详情 - OrderDetails(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*KeyVal, error) + OrderDetails(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*KeyVal, error) } type dataClient struct { @@ -52,7 +53,7 @@ func NewDataClient(cc grpc.ClientConnInterface) DataClient { return &dataClient{cc} } -func (c *dataClient) Overview(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*OverviewReply, error) { +func (c *dataClient) Overview(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*OverviewReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(OverviewReply) err := c.cc.Invoke(ctx, Data_Overview_FullMethodName, in, out, cOpts...) @@ -62,7 +63,7 @@ func (c *dataClient) Overview(ctx context.Context, in *Empty, opts ...grpc.CallO return out, nil } -func (c *dataClient) MemberFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*DataReply, error) { +func (c *dataClient) MemberFetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*DataReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DataReply) err := c.cc.Invoke(ctx, Data_MemberFetch_FullMethodName, in, out, cOpts...) @@ -72,7 +73,7 @@ func (c *dataClient) MemberFetch(ctx context.Context, in *FetchRequest, opts ... return out, nil } -func (c *dataClient) MemberDetails(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*KeyVal, error) { +func (c *dataClient) MemberDetails(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*KeyVal, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(KeyVal) err := c.cc.Invoke(ctx, Data_MemberDetails_FullMethodName, in, out, cOpts...) @@ -82,7 +83,7 @@ func (c *dataClient) MemberDetails(ctx context.Context, in *IdentRequest, opts . return out, nil } -func (c *dataClient) OrderFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*DataReply, error) { +func (c *dataClient) OrderFetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*DataReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DataReply) err := c.cc.Invoke(ctx, Data_OrderFetch_FullMethodName, in, out, cOpts...) @@ -92,7 +93,7 @@ func (c *dataClient) OrderFetch(ctx context.Context, in *FetchRequest, opts ...g return out, nil } -func (c *dataClient) OrderDetails(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*KeyVal, error) { +func (c *dataClient) OrderDetails(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*KeyVal, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(KeyVal) err := c.cc.Invoke(ctx, Data_OrderDetails_FullMethodName, in, out, cOpts...) @@ -103,48 +104,46 @@ func (c *dataClient) OrderDetails(ctx context.Context, in *IdentRequest, opts .. } // DataServer is the server API for Data service. -// All implementations must embed UnimplementedDataServer +// All implementations should embed UnimplementedDataServer // for forward compatibility. // // 数据服务 type DataServer interface { // 概况 - Overview(context.Context, *Empty) (*OverviewReply, error) + Overview(context.Context, *protobuf.Empty) (*OverviewReply, error) // 会员列表 - MemberFetch(context.Context, *FetchRequest) (*DataReply, error) + MemberFetch(context.Context, *protobuf.MarketFetchRequest) (*DataReply, error) // 会员详情 - MemberDetails(context.Context, *IdentRequest) (*KeyVal, error) + MemberDetails(context.Context, *protobuf.IdentRequest) (*KeyVal, error) // 订单列表 - OrderFetch(context.Context, *FetchRequest) (*DataReply, error) + OrderFetch(context.Context, *protobuf.MarketFetchRequest) (*DataReply, error) // 订单详情 - OrderDetails(context.Context, *IdentRequest) (*KeyVal, error) - mustEmbedUnimplementedDataServer() + OrderDetails(context.Context, *protobuf.IdentRequest) (*KeyVal, error) } -// UnimplementedDataServer must be embedded to have +// UnimplementedDataServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedDataServer struct{} -func (UnimplementedDataServer) Overview(context.Context, *Empty) (*OverviewReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Overview not implemented") +func (UnimplementedDataServer) Overview(context.Context, *protobuf.Empty) (*OverviewReply, error) { + return nil, status.Error(codes.Unimplemented, "method Overview not implemented") } -func (UnimplementedDataServer) MemberFetch(context.Context, *FetchRequest) (*DataReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MemberFetch not implemented") +func (UnimplementedDataServer) MemberFetch(context.Context, *protobuf.MarketFetchRequest) (*DataReply, error) { + return nil, status.Error(codes.Unimplemented, "method MemberFetch not implemented") } -func (UnimplementedDataServer) MemberDetails(context.Context, *IdentRequest) (*KeyVal, error) { - return nil, status.Errorf(codes.Unimplemented, "method MemberDetails not implemented") +func (UnimplementedDataServer) MemberDetails(context.Context, *protobuf.IdentRequest) (*KeyVal, error) { + return nil, status.Error(codes.Unimplemented, "method MemberDetails not implemented") } -func (UnimplementedDataServer) OrderFetch(context.Context, *FetchRequest) (*DataReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method OrderFetch not implemented") +func (UnimplementedDataServer) OrderFetch(context.Context, *protobuf.MarketFetchRequest) (*DataReply, error) { + return nil, status.Error(codes.Unimplemented, "method OrderFetch not implemented") } -func (UnimplementedDataServer) OrderDetails(context.Context, *IdentRequest) (*KeyVal, error) { - return nil, status.Errorf(codes.Unimplemented, "method OrderDetails not implemented") +func (UnimplementedDataServer) OrderDetails(context.Context, *protobuf.IdentRequest) (*KeyVal, error) { + return nil, status.Error(codes.Unimplemented, "method OrderDetails not implemented") } -func (UnimplementedDataServer) mustEmbedUnimplementedDataServer() {} -func (UnimplementedDataServer) testEmbeddedByValue() {} +func (UnimplementedDataServer) testEmbeddedByValue() {} // UnsafeDataServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DataServer will @@ -154,7 +153,7 @@ type UnsafeDataServer interface { } func RegisterDataServer(s grpc.ServiceRegistrar, srv DataServer) { - // If the following call pancis, it indicates UnimplementedDataServer was + // If the following call panics, it indicates UnimplementedDataServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -165,7 +164,7 @@ func RegisterDataServer(s grpc.ServiceRegistrar, srv DataServer) { } func _Data_Overview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -177,13 +176,13 @@ func _Data_Overview_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Data_Overview_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DataServer).Overview(ctx, req.(*Empty)) + return srv.(DataServer).Overview(ctx, req.(*protobuf.Empty)) } return interceptor(ctx, in, info, handler) } func _Data_MemberFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.MarketFetchRequest) if err := dec(in); err != nil { return nil, err } @@ -195,13 +194,13 @@ func _Data_MemberFetch_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: Data_MemberFetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DataServer).MemberFetch(ctx, req.(*FetchRequest)) + return srv.(DataServer).MemberFetch(ctx, req.(*protobuf.MarketFetchRequest)) } return interceptor(ctx, in, info, handler) } func _Data_MemberDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -213,13 +212,13 @@ func _Data_MemberDetails_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: Data_MemberDetails_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DataServer).MemberDetails(ctx, req.(*IdentRequest)) + return srv.(DataServer).MemberDetails(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Data_OrderFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.MarketFetchRequest) if err := dec(in); err != nil { return nil, err } @@ -231,13 +230,13 @@ func _Data_OrderFetch_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: Data_OrderFetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DataServer).OrderFetch(ctx, req.(*FetchRequest)) + return srv.(DataServer).OrderFetch(ctx, req.(*protobuf.MarketFetchRequest)) } return interceptor(ctx, in, info, handler) } func _Data_OrderDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -249,7 +248,7 @@ func _Data_OrderDetails_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: Data_OrderDetails_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DataServer).OrderDetails(ctx, req.(*IdentRequest)) + return srv.(DataServer).OrderDetails(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -283,5 +282,5 @@ var Data_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "data.proto", + Metadata: "module/ec/market/proto/data.proto", } diff --git a/module/ec/market/pb/supply.pb.go b/module/ec/market/pb/supply.pb.go index efecbec..5def748 100644 --- a/module/ec/market/pb/supply.pb.go +++ b/module/ec/market/pb/supply.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc (unknown) -// source: supply.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/market/proto/supply.proto package market import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -44,7 +45,7 @@ type MarketSupplyItem struct { func (x *MarketSupplyItem) Reset() { *x = MarketSupplyItem{} - mi := &file_supply_proto_msgTypes[0] + mi := &file_module_ec_market_proto_supply_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -56,7 +57,7 @@ func (x *MarketSupplyItem) String() string { func (*MarketSupplyItem) ProtoMessage() {} func (x *MarketSupplyItem) ProtoReflect() protoreflect.Message { - mi := &file_supply_proto_msgTypes[0] + mi := &file_module_ec_market_proto_supply_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69,7 +70,7 @@ func (x *MarketSupplyItem) ProtoReflect() protoreflect.Message { // Deprecated: Use MarketSupplyItem.ProtoReflect.Descriptor instead. func (*MarketSupplyItem) Descriptor() ([]byte, []int) { - return file_supply_proto_rawDescGZIP(), []int{0} + return file_module_ec_market_proto_supply_proto_rawDescGZIP(), []int{0} } func (x *MarketSupplyItem) GetName() string { @@ -187,7 +188,7 @@ type SupplyReply struct { func (x *SupplyReply) Reset() { *x = SupplyReply{} - mi := &file_supply_proto_msgTypes[1] + mi := &file_module_ec_market_proto_supply_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -199,7 +200,7 @@ func (x *SupplyReply) String() string { func (*SupplyReply) ProtoMessage() {} func (x *SupplyReply) ProtoReflect() protoreflect.Message { - mi := &file_supply_proto_msgTypes[1] + mi := &file_module_ec_market_proto_supply_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -212,7 +213,7 @@ func (x *SupplyReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SupplyReply.ProtoReflect.Descriptor instead. func (*SupplyReply) Descriptor() ([]byte, []int) { - return file_supply_proto_rawDescGZIP(), []int{1} + return file_module_ec_market_proto_supply_proto_rawDescGZIP(), []int{1} } func (x *SupplyReply) GetCount() int64 { @@ -229,11 +230,11 @@ func (x *SupplyReply) GetData() []*MarketSupplyItem { return nil } -var File_supply_proto protoreflect.FileDescriptor +var File_module_ec_market_proto_supply_proto protoreflect.FileDescriptor -const file_supply_proto_rawDesc = "" + +const file_module_ec_market_proto_supply_proto_rawDesc = "" + "\n" + - "\x16ec/market/supply.proto\x12\x06market\x1a\x13market/blocks.proto\"\x9e\x03\n" + + "#module/ec/market/proto/supply.proto\x12\x06market\x1a\x15protobuf/blocks.proto\"\x9e\x03\n" + "\x10MarketSupplyItem\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + "\x06avatar\x18\x02 \x01(\tR\x06avatar\x12(\n" + @@ -253,47 +254,46 @@ const file_supply_proto_rawDesc = "" + "\x02id\x18\x0f \x01(\x05R\x02id\"Q\n" + "\vSupplyReply\x12\x14\n" + "\x05count\x18\x01 \x01(\x03R\x05count\x12,\n" + - "\x04data\x18\x02 \x03(\v2\x18.market.MarketSupplyItemR\x04data2\xa4\x02\n" + - "\x06Supply\x129\n" + - "\x06Create\x12\x18.market.MarketSupplyItem\x1a\x13.market.StatusReply\"\x00\x127\n" + - "\x03Get\x12\x14.market.IdentRequest\x1a\x18.market.MarketSupplyItem\"\x00\x124\n" + - "\x05Fetch\x12\x14.market.FetchRequest\x1a\x13.market.SupplyReply\"\x00\x129\n" + - "\x06Modify\x12\x18.market.MarketSupplyItem\x1a\x13.market.StatusReply\"\x00\x125\n" + - "\x06Delete\x12\x14.market.IdentRequest\x1a\x13.market.StatusReply\"\x00B\n" + - "Z\b.;marketb\x06proto3" + "\x04data\x18\x02 \x03(\v2\x18.market.MarketSupplyItemR\x04data2\xc2\x02\n" + + "\x06Supply\x12A\n" + + "\x06Create\x12\x18.market.MarketSupplyItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x127\n" + + "\x03Get\x12\x14.blocks.IdentRequest\x1a\x18.market.MarketSupplyItem\"\x00\x12:\n" + + "\x05Fetch\x12\x1a.blocks.MarketFetchRequest\x1a\x13.market.SupplyReply\"\x00\x12A\n" + + "\x06Modify\x12\x18.market.MarketSupplyItem\x1a\x1b.blocks.IdentityStatusReply\"\x00\x12=\n" + + "\x06Delete\x12\x14.blocks.IdentRequest\x1a\x1b.blocks.IdentityStatusReply\"\x00B%Z#bsm/full/module/ec/market/pb;marketb\x06proto3" var ( - file_supply_proto_rawDescOnce sync.Once - file_supply_proto_rawDescData []byte + file_module_ec_market_proto_supply_proto_rawDescOnce sync.Once + file_module_ec_market_proto_supply_proto_rawDescData []byte ) -func file_supply_proto_rawDescGZIP() []byte { - file_supply_proto_rawDescOnce.Do(func() { - file_supply_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_supply_proto_rawDesc), len(file_supply_proto_rawDesc))) +func file_module_ec_market_proto_supply_proto_rawDescGZIP() []byte { + file_module_ec_market_proto_supply_proto_rawDescOnce.Do(func() { + file_module_ec_market_proto_supply_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_market_proto_supply_proto_rawDesc), len(file_module_ec_market_proto_supply_proto_rawDesc))) }) - return file_supply_proto_rawDescData + return file_module_ec_market_proto_supply_proto_rawDescData } -var file_supply_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_supply_proto_goTypes = []any{ - (*MarketSupplyItem)(nil), // 0: market.MarketSupplyItem - (*SupplyReply)(nil), // 1: market.SupplyReply - (*IdentRequest)(nil), // 2: market.IdentRequest - (*FetchRequest)(nil), // 3: market.FetchRequest - (*StatusReply)(nil), // 4: market.StatusReply +var file_module_ec_market_proto_supply_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_module_ec_market_proto_supply_proto_goTypes = []any{ + (*MarketSupplyItem)(nil), // 0: market.MarketSupplyItem + (*SupplyReply)(nil), // 1: market.SupplyReply + (*protobuf.IdentRequest)(nil), // 2: blocks.IdentRequest + (*protobuf.MarketFetchRequest)(nil), // 3: blocks.MarketFetchRequest + (*protobuf.IdentityStatusReply)(nil), // 4: blocks.IdentityStatusReply } -var file_supply_proto_depIdxs = []int32{ +var file_module_ec_market_proto_supply_proto_depIdxs = []int32{ 0, // 0: market.SupplyReply.data:type_name -> market.MarketSupplyItem 0, // 1: market.Supply.Create:input_type -> market.MarketSupplyItem - 2, // 2: market.Supply.Get:input_type -> market.IdentRequest - 3, // 3: market.Supply.Fetch:input_type -> market.FetchRequest + 2, // 2: market.Supply.Get:input_type -> blocks.IdentRequest + 3, // 3: market.Supply.Fetch:input_type -> blocks.MarketFetchRequest 0, // 4: market.Supply.Modify:input_type -> market.MarketSupplyItem - 2, // 5: market.Supply.Delete:input_type -> market.IdentRequest - 4, // 6: market.Supply.Create:output_type -> market.StatusReply + 2, // 5: market.Supply.Delete:input_type -> blocks.IdentRequest + 4, // 6: market.Supply.Create:output_type -> blocks.IdentityStatusReply 0, // 7: market.Supply.Get:output_type -> market.MarketSupplyItem 1, // 8: market.Supply.Fetch:output_type -> market.SupplyReply - 4, // 9: market.Supply.Modify:output_type -> market.StatusReply - 4, // 10: market.Supply.Delete:output_type -> market.StatusReply + 4, // 9: market.Supply.Modify:output_type -> blocks.IdentityStatusReply + 4, // 10: market.Supply.Delete:output_type -> blocks.IdentityStatusReply 6, // [6:11] is the sub-list for method output_type 1, // [1:6] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -301,27 +301,26 @@ var file_supply_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_supply_proto_init() } -func file_supply_proto_init() { - if File_supply_proto != nil { +func init() { file_module_ec_market_proto_supply_proto_init() } +func file_module_ec_market_proto_supply_proto_init() { + if File_module_ec_market_proto_supply_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_supply_proto_rawDesc), len(file_supply_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_market_proto_supply_proto_rawDesc), len(file_module_ec_market_proto_supply_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_supply_proto_goTypes, - DependencyIndexes: file_supply_proto_depIdxs, - MessageInfos: file_supply_proto_msgTypes, + GoTypes: file_module_ec_market_proto_supply_proto_goTypes, + DependencyIndexes: file_module_ec_market_proto_supply_proto_depIdxs, + MessageInfos: file_module_ec_market_proto_supply_proto_msgTypes, }.Build() - File_supply_proto = out.File - file_supply_proto_goTypes = nil - file_supply_proto_depIdxs = nil + File_module_ec_market_proto_supply_proto = out.File + file_module_ec_market_proto_supply_proto_goTypes = nil + file_module_ec_market_proto_supply_proto_depIdxs = nil } diff --git a/module/ec/market/pb/supply.pb.gw.go b/module/ec/market/pb/supply.pb.gw.go index a9d5aa1..2b69d58 100644 --- a/module/ec/market/pb/supply.pb.gw.go +++ b/module/ec/market/pb/supply.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: supply.proto +// source: module/ec/market/proto/supply.proto /* Package market is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package market import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -43,6 +44,9 @@ func request_Supply_Create_0(ctx context.Context, marshaler runtime.Marshaler, c if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Create(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -61,19 +65,22 @@ func local_request_Supply_Create_0(ctx context.Context, marshaler runtime.Marsha func request_Supply_Get_0(ctx context.Context, marshaler runtime.Marshaler, client SupplyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Supply_Get_0(ctx context.Context, marshaler runtime.Marshaler, server SupplyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -85,19 +92,22 @@ func local_request_Supply_Get_0(ctx context.Context, marshaler runtime.Marshaler func request_Supply_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client SupplyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MarketFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Fetch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Supply_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server SupplyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.MarketFetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -115,6 +125,9 @@ func request_Supply_Modify_0(ctx context.Context, marshaler runtime.Marshaler, c if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Modify(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -133,19 +146,22 @@ func local_request_Supply_Modify_0(ctx context.Context, marshaler runtime.Marsha func request_Supply_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client SupplyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Supply_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server SupplyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/ec/market/pb/supply_grpc.pb.go b/module/ec/market/pb/supply_grpc.pb.go index ec47932..eabdd61 100644 --- a/module/ec/market/pb/supply_grpc.pb.go +++ b/module/ec/market/pb/supply_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: supply.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/market/proto/supply.proto package market import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -33,15 +34,15 @@ const ( // 营销服务 - 供应商 type SupplyClient interface { // 新增供应商 - Create(ctx context.Context, in *MarketSupplyItem, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *MarketSupplyItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 获取一个供应商 - Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*MarketSupplyItem, error) + Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*MarketSupplyItem, error) // 供应商列表 - Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*SupplyReply, error) + Fetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*SupplyReply, error) // 更新供应商数据 - Modify(ctx context.Context, in *MarketSupplyItem, opts ...grpc.CallOption) (*StatusReply, error) + Modify(ctx context.Context, in *MarketSupplyItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) // 删除一个供应商 - Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) } type supplyClient struct { @@ -52,9 +53,9 @@ func NewSupplyClient(cc grpc.ClientConnInterface) SupplyClient { return &supplyClient{cc} } -func (c *supplyClient) Create(ctx context.Context, in *MarketSupplyItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *supplyClient) Create(ctx context.Context, in *MarketSupplyItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Supply_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -62,7 +63,7 @@ func (c *supplyClient) Create(ctx context.Context, in *MarketSupplyItem, opts .. return out, nil } -func (c *supplyClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*MarketSupplyItem, error) { +func (c *supplyClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*MarketSupplyItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MarketSupplyItem) err := c.cc.Invoke(ctx, Supply_Get_FullMethodName, in, out, cOpts...) @@ -72,7 +73,7 @@ func (c *supplyClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.C return out, nil } -func (c *supplyClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*SupplyReply, error) { +func (c *supplyClient) Fetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*SupplyReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SupplyReply) err := c.cc.Invoke(ctx, Supply_Fetch_FullMethodName, in, out, cOpts...) @@ -82,9 +83,9 @@ func (c *supplyClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc return out, nil } -func (c *supplyClient) Modify(ctx context.Context, in *MarketSupplyItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *supplyClient) Modify(ctx context.Context, in *MarketSupplyItem, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Supply_Modify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -92,9 +93,9 @@ func (c *supplyClient) Modify(ctx context.Context, in *MarketSupplyItem, opts .. return out, nil } -func (c *supplyClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *supplyClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.IdentityStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.IdentityStatusReply) err := c.cc.Invoke(ctx, Supply_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -103,48 +104,46 @@ func (c *supplyClient) Delete(ctx context.Context, in *IdentRequest, opts ...grp } // SupplyServer is the server API for Supply service. -// All implementations must embed UnimplementedSupplyServer +// All implementations should embed UnimplementedSupplyServer // for forward compatibility. // // 营销服务 - 供应商 type SupplyServer interface { // 新增供应商 - Create(context.Context, *MarketSupplyItem) (*StatusReply, error) + Create(context.Context, *MarketSupplyItem) (*protobuf.IdentityStatusReply, error) // 获取一个供应商 - Get(context.Context, *IdentRequest) (*MarketSupplyItem, error) + Get(context.Context, *protobuf.IdentRequest) (*MarketSupplyItem, error) // 供应商列表 - Fetch(context.Context, *FetchRequest) (*SupplyReply, error) + Fetch(context.Context, *protobuf.MarketFetchRequest) (*SupplyReply, error) // 更新供应商数据 - Modify(context.Context, *MarketSupplyItem) (*StatusReply, error) + Modify(context.Context, *MarketSupplyItem) (*protobuf.IdentityStatusReply, error) // 删除一个供应商 - Delete(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedSupplyServer() + Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) } -// UnimplementedSupplyServer must be embedded to have +// UnimplementedSupplyServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedSupplyServer struct{} -func (UnimplementedSupplyServer) Create(context.Context, *MarketSupplyItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +func (UnimplementedSupplyServer) Create(context.Context, *MarketSupplyItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedSupplyServer) Get(context.Context, *IdentRequest) (*MarketSupplyItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +func (UnimplementedSupplyServer) Get(context.Context, *protobuf.IdentRequest) (*MarketSupplyItem, error) { + return nil, status.Error(codes.Unimplemented, "method Get not implemented") } -func (UnimplementedSupplyServer) Fetch(context.Context, *FetchRequest) (*SupplyReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") +func (UnimplementedSupplyServer) Fetch(context.Context, *protobuf.MarketFetchRequest) (*SupplyReply, error) { + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedSupplyServer) Modify(context.Context, *MarketSupplyItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented") +func (UnimplementedSupplyServer) Modify(context.Context, *MarketSupplyItem) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } -func (UnimplementedSupplyServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +func (UnimplementedSupplyServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.IdentityStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedSupplyServer) mustEmbedUnimplementedSupplyServer() {} -func (UnimplementedSupplyServer) testEmbeddedByValue() {} +func (UnimplementedSupplyServer) testEmbeddedByValue() {} // UnsafeSupplyServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SupplyServer will @@ -154,7 +153,7 @@ type UnsafeSupplyServer interface { } func RegisterSupplyServer(s grpc.ServiceRegistrar, srv SupplyServer) { - // If the following call pancis, it indicates UnimplementedSupplyServer was + // If the following call panics, it indicates UnimplementedSupplyServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -183,7 +182,7 @@ func _Supply_Create_Handler(srv interface{}, ctx context.Context, dec func(inter } func _Supply_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -195,13 +194,13 @@ func _Supply_Get_Handler(srv interface{}, ctx context.Context, dec func(interfac FullMethod: Supply_Get_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SupplyServer).Get(ctx, req.(*IdentRequest)) + return srv.(SupplyServer).Get(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Supply_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.MarketFetchRequest) if err := dec(in); err != nil { return nil, err } @@ -213,7 +212,7 @@ func _Supply_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Supply_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SupplyServer).Fetch(ctx, req.(*FetchRequest)) + return srv.(SupplyServer).Fetch(ctx, req.(*protobuf.MarketFetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -237,7 +236,7 @@ func _Supply_Modify_Handler(srv interface{}, ctx context.Context, dec func(inter } func _Supply_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -249,7 +248,7 @@ func _Supply_Delete_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Supply_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SupplyServer).Delete(ctx, req.(*IdentRequest)) + return srv.(SupplyServer).Delete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -283,5 +282,5 @@ var Supply_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "supply.proto", + Metadata: "module/ec/market/proto/supply.proto", } diff --git a/module/ec/market/proto/agency.proto b/module/ec/market/proto/agency.proto index 46ff752..2b5373b 100644 --- a/module/ec/market/proto/agency.proto +++ b/module/ec/market/proto/agency.proto @@ -1,36 +1,36 @@ syntax = "proto3"; package market; -option go_package = ".;market"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/market/pb;market"; +import "protobuf/blocks.proto"; // 营销服务 - 代理商 service Agency{ // 登录 - rpc Login(LoginRequest) returns (LoginReply) {} + rpc Login(LoginRequest) returns (blocks.MarketLoginReply) {} // 新增代理商 - rpc Create(MarketAgenctyItem) returns (StatusReply) {} + rpc Create(MarketAgenctyItem) returns (blocks.IdentityStatusReply) {} // 获取一个代理商 - rpc Get(IdentRequest) returns (MarketAgenctyItem) {} + rpc Get(blocks.IdentRequest) returns (MarketAgenctyItem) {} // 代理商列表 - rpc Fetch(FetchRequest) returns (AgencyReply) {} + rpc Fetch(blocks.MarketFetchRequest) returns (AgencyReply) {} // 更新代理商数据 - rpc Modify(MarketAgenctyItem) returns (StatusReply) {} - + rpc Modify(MarketAgenctyItem) returns (blocks.IdentityStatusReply) {} + // 删除一个代理商 - rpc Delete(IdentRequest) returns (StatusReply) {} + rpc Delete(blocks.IdentRequest) returns (blocks.IdentityStatusReply) {} // 更新密码 - rpc SetPassword(SetPasswordRequest) returns (StatusReply) {} + rpc SetPassword(SetPasswordRequest) returns (blocks.IdentityStatusReply) {} //待审核 - rpc Pending(FetchRequest) returns (AgencyReply) {} + rpc Pending(blocks.MarketFetchRequest) returns (AgencyReply) {} // 审核 - rpc Approve(ApproveRequest) returns (StatusReply) {}; + rpc Approve(ApproveRequest) returns (blocks.IdentityStatusReply) {}; } @@ -45,9 +45,9 @@ message MarketAgenctyItem { string identity = 1; // 唯一标识 string created_at = 2 [json_name="created_at"]; // 创建时间 - string name = 3 ; // 联系人名称 必填 + string name = 3 ; // 联系人名称 必填 string avatar = 4; // 头像 - string account = 5; // 帐号 + string account = 5; // 帐号 string phone = 6; // 手机号 string password = 7; // 密码 string org_name = 8 [json_name="org_name"]; // 机构名称 diff --git a/module/ec/market/proto/blocks.proto b/module/ec/market/proto/blocks.proto deleted file mode 100644 index 25e2512..0000000 --- a/module/ec/market/proto/blocks.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; -package market; -option go_package = ".;market"; - -message Empty{ -} - -message FetchRequest { - int64 page_no=1 [json_name = "page_no"]; // 页数 - int64 page_size=2 [json_name = "page_size"]; // 每页记录数 - map params=3; // 条件参数,key=val,eg key:categoryId=?,vlaue=11 - string identity = 4 ; // 唯一标识 - string keyword = 5; //关键词 - int32 status = 6; // 状态:默认为0,-1禁止,1为正常 - int32 approve = 7;// 审核状态:0:待审核 2:审核通过 -2:审核未通过 -} - -message IdentRequest{ - int64 id = 1; // 唯一ID - string identity = 2; // 唯一码 -} - -message StoreSerialRequest{ - string store_identity = 1 [json_name="store_identity"]; // 店铺Identity - repeated string serial_id = 2 [json_name="serial_id"]; // 序列Identity -} - -message StatusReply{ - int32 code = 1; // 状态码 - string identity=2; // 标识码 - string message=3; //状态说明 - int64 timeseq=4; // 响应时间序列 -} -message LoginReply { - string token = 1; // token 授权码 - string identity = 2; // 唯一标识 - string market_identity = 3 [json_name="market_identity"]; // 店铺唯一标识 - string name = 4; // 姓名 - string account = 5; // 账号 - string role = 6; // 角色 - int32 status = 7; // 状态 - string created_at = 8 [json_name="created_at"]; // 创建时间 - string market_name = 9 [json_name="market_name"]; // 店铺名称 -} - -message VersionRequest { - int64 version = 1; // 时序版本号 - } - - - message SearchRequest { - string keyword = 1; //关键词 - } \ No newline at end of file diff --git a/module/ec/market/proto/data.proto b/module/ec/market/proto/data.proto index f39e9f0..b1d3ba2 100644 --- a/module/ec/market/proto/data.proto +++ b/module/ec/market/proto/data.proto @@ -1,24 +1,24 @@ syntax = "proto3"; package market; -option go_package = ".;market"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/market/pb;market"; +import "protobuf/blocks.proto"; // 数据服务 service Data{ // 概况 - rpc Overview(Empty) returns (OverviewReply) {} + rpc Overview(blocks.Empty) returns (OverviewReply) {} // 会员列表 - rpc MemberFetch(FetchRequest) returns (DataReply) {} + rpc MemberFetch(blocks.MarketFetchRequest) returns (DataReply) {} // 会员详情 - rpc MemberDetails(IdentRequest) returns (KeyVal) {} + rpc MemberDetails(blocks.IdentRequest) returns (KeyVal) {} // 订单列表 - rpc OrderFetch(FetchRequest) returns (DataReply) {} + rpc OrderFetch(blocks.MarketFetchRequest) returns (DataReply) {} // 订单详情 - rpc OrderDetails(IdentRequest) returns (KeyVal) {} + rpc OrderDetails(blocks.IdentRequest) returns (KeyVal) {} } message OverviewReply { diff --git a/module/ec/market/proto/supply.proto b/module/ec/market/proto/supply.proto index fdc7b97..a66dd81 100644 --- a/module/ec/market/proto/supply.proto +++ b/module/ec/market/proto/supply.proto @@ -1,25 +1,25 @@ syntax = "proto3"; package market; -option go_package = ".;market"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/market/pb;market"; +import "protobuf/blocks.proto"; // 营销服务 - 供应商 service Supply{ // 新增供应商 - rpc Create(MarketSupplyItem) returns (StatusReply) {} + rpc Create(MarketSupplyItem) returns (blocks.IdentityStatusReply) {} // 获取一个供应商 - rpc Get(IdentRequest) returns (MarketSupplyItem) {} + rpc Get(blocks.IdentRequest) returns (MarketSupplyItem) {} // 供应商列表 - rpc Fetch(FetchRequest) returns (SupplyReply) {} + rpc Fetch(blocks.MarketFetchRequest) returns (SupplyReply) {} // 更新供应商数据 - rpc Modify(MarketSupplyItem) returns (StatusReply) {} - + rpc Modify(MarketSupplyItem) returns (blocks.IdentityStatusReply) {} + // 删除一个供应商 - rpc Delete(IdentRequest) returns (StatusReply) {} + rpc Delete(blocks.IdentRequest) returns (blocks.IdentityStatusReply) {} } @@ -27,10 +27,10 @@ service Supply{ message MarketSupplyItem { - string name = 1 ; // 联系人名称 必填 + string name = 1 ; // 联系人名称 必填 string avatar = 2; // 头像 int32 commission_rate = 3 [json_name="commission_rate"]; // 佣金比例 - string account = 4; // 帐号 + string account = 4; // 帐号 string phone = 5; // 手机号 string password = 6; // 密码 string org_name = 7 [json_name="org_name"]; // 机构名称 diff --git a/module/ec/order/pb/blocks.pb.go b/module/ec/order/pb/blocks.pb.go deleted file mode 100644 index 1346851..0000000 --- a/module/ec/order/pb/blocks.pb.go +++ /dev/null @@ -1,932 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.6 -// protoc (unknown) -// source: blocks.proto - -package order - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Empty struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Empty) Reset() { - *x = Empty{} - mi := &file_blocks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Empty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Empty) ProtoMessage() {} - -func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{0} -} - -type FetchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PageNo int64 `protobuf:"varint,1,opt,name=page_no,proto3" json:"page_no,omitempty"` // 页数 - PageSize int64 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // 每页记录数 - Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:category_id=?,vlaue=11 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchRequest) Reset() { - *x = FetchRequest{} - mi := &file_blocks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRequest) ProtoMessage() {} - -func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. -func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{1} -} - -func (x *FetchRequest) GetPageNo() int64 { - if x != nil { - return x.PageNo - } - return 0 -} - -func (x *FetchRequest) GetPageSize() int64 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *FetchRequest) GetParams() map[string]string { - if x != nil { - return x.Params - } - return nil -} - -type IdentRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码 - Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` // 退款原因 - Approve int32 `protobuf:"varint,4,opt,name=approve,proto3" json:"approve,omitempty"` // 状态:-2:未通过,0:默认 1:申请退款 2:申请退货 3:申请退款退货 4:申请通过 - Agency string `protobuf:"bytes,5,opt,name=agency,proto3" json:"agency,omitempty"` // 代理 - StoreIdentity string `protobuf:"bytes,6,opt,name=store_identity,json=storeIdentity,proto3" json:"store_identity,omitempty"` // 店铺标识 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IdentRequest) Reset() { - *x = IdentRequest{} - mi := &file_blocks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IdentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IdentRequest) ProtoMessage() {} - -func (x *IdentRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. -func (*IdentRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{2} -} - -func (x *IdentRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *IdentRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *IdentRequest) GetReason() string { - if x != nil { - return x.Reason - } - return "" -} - -func (x *IdentRequest) GetApprove() int32 { - if x != nil { - return x.Approve - } - return 0 -} - -func (x *IdentRequest) GetAgency() string { - if x != nil { - return x.Agency - } - return "" -} - -func (x *IdentRequest) GetStoreIdentity() string { - if x != nil { - return x.StoreIdentity - } - return "" -} - -type StatusReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // 状态码 - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 标识码 - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` //状态说明 - Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列 - Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` // 退款原因 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusReply) Reset() { - *x = StatusReply{} - mi := &file_blocks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusReply) ProtoMessage() {} - -func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. -func (*StatusReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{3} -} - -func (x *StatusReply) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *StatusReply) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *StatusReply) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *StatusReply) GetTimeseq() int64 { - if x != nil { - return x.Timeseq - } - return 0 -} - -func (x *StatusReply) GetReason() string { - if x != nil { - return x.Reason - } - return "" -} - -type OrderSummaryItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // ID - OrderNo string `protobuf:"bytes,2,opt,name=order_no,proto3" json:"order_no,omitempty"` // 订单编号 - PartnerId int64 `protobuf:"varint,3,opt,name=partner_id,proto3" json:"partner_id,omitempty"` // 合伙人ID - Identity string `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"` // 定单唯一标识 - TotalPrice int64 `protobuf:"varint,7,opt,name=total_price,proto3" json:"total_price,omitempty"` // 总价 - TransPrice int64 `protobuf:"varint,8,opt,name=trans_price,proto3" json:"trans_price,omitempty"` // 交易金额 - RefundPrice int64 `protobuf:"varint,9,opt,name=refund_price,proto3" json:"refund_price,omitempty"` // 退款金额 - LogisticsFee int64 `protobuf:"varint,11,opt,name=logistics_fee,proto3" json:"logistics_fee,omitempty"` // 物流费用 - CouponAmount int64 `protobuf:"varint,12,opt,name=coupon_amount,proto3" json:"coupon_amount,omitempty"` // 优惠券金额 - Remark string `protobuf:"bytes,13,opt,name=remark,proto3" json:"remark,omitempty"` // 备注 - Status int32 `protobuf:"varint,14,opt,name=status,proto3" json:"status,omitempty"` // 订单状态:all全部订单,notarize确认中,sign签约中,signed签约完成,fulfil履约中,accomplish完成 - LogisticsNumber string `protobuf:"bytes,15,opt,name=logistics_number,proto3" json:"logistics_number,omitempty"` // 物流号 - AddressIdentity string `protobuf:"bytes,16,opt,name=address_identity,proto3" json:"address_identity,omitempty"` // 地址库唯一标识 - County string `protobuf:"bytes,17,opt,name=county,proto3" json:"county,omitempty"` // 国家 - Province string `protobuf:"bytes,18,opt,name=province,proto3" json:"province,omitempty"` // 省 - City string `protobuf:"bytes,19,opt,name=city,proto3" json:"city,omitempty"` // 市 - Area string `protobuf:"bytes,20,opt,name=area,proto3" json:"area,omitempty"` // 县 - Address string `protobuf:"bytes,21,opt,name=address,proto3" json:"address,omitempty"` // 详细地址 - Contact string `protobuf:"bytes,22,opt,name=contact,proto3" json:"contact,omitempty"` // 联系人 - Phone string `protobuf:"bytes,23,opt,name=phone,proto3" json:"phone,omitempty"` // 联系电话 - DeliveryTime string `protobuf:"bytes,24,opt,name=delivery_time,proto3" json:"delivery_time,omitempty"` // 配送时间 - DeliveryIdentity string `protobuf:"bytes,25,opt,name=delivery_identity,proto3" json:"delivery_identity,omitempty"` // 配送工作人员唯一标识 - PayType int32 `protobuf:"varint,26,opt,name=pay_type,proto3" json:"pay_type,omitempty"` // 支付类型:0:待支付,1:线下支付,2:微信 3:支付宝,4:余额 - PayAmount int64 `protobuf:"varint,27,opt,name=pay_amount,proto3" json:"pay_amount,omitempty"` // 支付金额 - PayTradeNo string `protobuf:"bytes,28,opt,name=pay_trade_no,proto3" json:"pay_trade_no,omitempty"` // 支付交易号 - PayTime string `protobuf:"bytes,29,opt,name=pay_time,proto3" json:"pay_time,omitempty"` // 支付时间 - PayRemark string `protobuf:"bytes,30,opt,name=pay_remark,proto3" json:"pay_remark,omitempty"` // 支付备注 - Created string `protobuf:"bytes,31,opt,name=created,proto3" json:"created,omitempty"` // 创建时间 - Updated string `protobuf:"bytes,32,opt,name=updated,proto3" json:"updated,omitempty"` // 最后创建时间 - Details []*OrderDetails `protobuf:"bytes,33,rep,name=details,proto3" json:"details,omitempty"` //订单商品 - Addr string `protobuf:"bytes,34,opt,name=addr,proto3" json:"addr,omitempty"` // 简单地址信息 - CarIdentity string `protobuf:"bytes,35,opt,name=car_identity,proto3" json:"car_identity,omitempty"` // 配送车辆唯一标识 - DeliveryAddress string `protobuf:"bytes,36,opt,name=delivery_address,proto3" json:"delivery_address,omitempty"` // 配送地址 - Brand string `protobuf:"bytes,37,opt,name=brand,proto3" json:"brand,omitempty"` // 配送车辆品牌 - Version string `protobuf:"bytes,38,opt,name=version,proto3" json:"version,omitempty"` // 配送车辆型号 - LicenseNumber string `protobuf:"bytes,39,opt,name=license_number,proto3" json:"license_number,omitempty"` // 配送车辆车牌号 - MemberName string `protobuf:"bytes,40,opt,name=member_name,proto3" json:"member_name,omitempty"` // 配送员姓名 - MemberPhone string `protobuf:"bytes,41,opt,name=member_phone,proto3" json:"member_phone,omitempty"` // 配送员电话 - Approve int32 `protobuf:"varint,42,opt,name=approve,proto3" json:"approve,omitempty"` // 审批 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OrderSummaryItem) Reset() { - *x = OrderSummaryItem{} - mi := &file_blocks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OrderSummaryItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OrderSummaryItem) ProtoMessage() {} - -func (x *OrderSummaryItem) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OrderSummaryItem.ProtoReflect.Descriptor instead. -func (*OrderSummaryItem) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{4} -} - -func (x *OrderSummaryItem) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *OrderSummaryItem) GetOrderNo() string { - if x != nil { - return x.OrderNo - } - return "" -} - -func (x *OrderSummaryItem) GetPartnerId() int64 { - if x != nil { - return x.PartnerId - } - return 0 -} - -func (x *OrderSummaryItem) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *OrderSummaryItem) GetTotalPrice() int64 { - if x != nil { - return x.TotalPrice - } - return 0 -} - -func (x *OrderSummaryItem) GetTransPrice() int64 { - if x != nil { - return x.TransPrice - } - return 0 -} - -func (x *OrderSummaryItem) GetRefundPrice() int64 { - if x != nil { - return x.RefundPrice - } - return 0 -} - -func (x *OrderSummaryItem) GetLogisticsFee() int64 { - if x != nil { - return x.LogisticsFee - } - return 0 -} - -func (x *OrderSummaryItem) GetCouponAmount() int64 { - if x != nil { - return x.CouponAmount - } - return 0 -} - -func (x *OrderSummaryItem) GetRemark() string { - if x != nil { - return x.Remark - } - return "" -} - -func (x *OrderSummaryItem) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *OrderSummaryItem) GetLogisticsNumber() string { - if x != nil { - return x.LogisticsNumber - } - return "" -} - -func (x *OrderSummaryItem) GetAddressIdentity() string { - if x != nil { - return x.AddressIdentity - } - return "" -} - -func (x *OrderSummaryItem) GetCounty() string { - if x != nil { - return x.County - } - return "" -} - -func (x *OrderSummaryItem) GetProvince() string { - if x != nil { - return x.Province - } - return "" -} - -func (x *OrderSummaryItem) GetCity() string { - if x != nil { - return x.City - } - return "" -} - -func (x *OrderSummaryItem) GetArea() string { - if x != nil { - return x.Area - } - return "" -} - -func (x *OrderSummaryItem) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *OrderSummaryItem) GetContact() string { - if x != nil { - return x.Contact - } - return "" -} - -func (x *OrderSummaryItem) GetPhone() string { - if x != nil { - return x.Phone - } - return "" -} - -func (x *OrderSummaryItem) GetDeliveryTime() string { - if x != nil { - return x.DeliveryTime - } - return "" -} - -func (x *OrderSummaryItem) GetDeliveryIdentity() string { - if x != nil { - return x.DeliveryIdentity - } - return "" -} - -func (x *OrderSummaryItem) GetPayType() int32 { - if x != nil { - return x.PayType - } - return 0 -} - -func (x *OrderSummaryItem) GetPayAmount() int64 { - if x != nil { - return x.PayAmount - } - return 0 -} - -func (x *OrderSummaryItem) GetPayTradeNo() string { - if x != nil { - return x.PayTradeNo - } - return "" -} - -func (x *OrderSummaryItem) GetPayTime() string { - if x != nil { - return x.PayTime - } - return "" -} - -func (x *OrderSummaryItem) GetPayRemark() string { - if x != nil { - return x.PayRemark - } - return "" -} - -func (x *OrderSummaryItem) GetCreated() string { - if x != nil { - return x.Created - } - return "" -} - -func (x *OrderSummaryItem) GetUpdated() string { - if x != nil { - return x.Updated - } - return "" -} - -func (x *OrderSummaryItem) GetDetails() []*OrderDetails { - if x != nil { - return x.Details - } - return nil -} - -func (x *OrderSummaryItem) GetAddr() string { - if x != nil { - return x.Addr - } - return "" -} - -func (x *OrderSummaryItem) GetCarIdentity() string { - if x != nil { - return x.CarIdentity - } - return "" -} - -func (x *OrderSummaryItem) GetDeliveryAddress() string { - if x != nil { - return x.DeliveryAddress - } - return "" -} - -func (x *OrderSummaryItem) GetBrand() string { - if x != nil { - return x.Brand - } - return "" -} - -func (x *OrderSummaryItem) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *OrderSummaryItem) GetLicenseNumber() string { - if x != nil { - return x.LicenseNumber - } - return "" -} - -func (x *OrderSummaryItem) GetMemberName() string { - if x != nil { - return x.MemberName - } - return "" -} - -func (x *OrderSummaryItem) GetMemberPhone() string { - if x != nil { - return x.MemberPhone - } - return "" -} - -func (x *OrderSummaryItem) GetApprove() int32 { - if x != nil { - return x.Approve - } - return 0 -} - -type OrderDetails struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // ID - ProductId int64 `protobuf:"varint,2,opt,name=product_id,proto3" json:"product_id,omitempty"` // 商品规格ID - SpecNo string `protobuf:"bytes,3,opt,name=spec_no,proto3" json:"spec_no,omitempty"` // 商品规格编号 - Spec string `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` // 商品规格名称 - Type int64 `protobuf:"varint,5,opt,name=type,proto3" json:"type,omitempty"` // 商品类型 - Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"` //商品名称 - CoverImage string `protobuf:"bytes,7,opt,name=cover_image,proto3" json:"cover_image,omitempty"` //商品封面图片 - SalesPrice int64 `protobuf:"varint,8,opt,name=sales_price,proto3" json:"sales_price,omitempty"` //商品销售价格 - ProductArgs string `protobuf:"bytes,9,opt,name=product_args,proto3" json:"product_args,omitempty"` // 商品参数 - Number int64 `protobuf:"varint,10,opt,name=number,proto3" json:"number,omitempty"` // 数量 - UnitPrice int64 `protobuf:"varint,11,opt,name=unit_price,proto3" json:"unit_price,omitempty"` // 单价 - SpecId int64 `protobuf:"varint,12,opt,name=spec_id,proto3" json:"spec_id,omitempty"` // 商品规格id - ProductIdentity string `protobuf:"bytes,13,opt,name=product_identity,proto3" json:"product_identity,omitempty"` // 产品唯一标识 - GasTypes int64 `protobuf:"varint,14,opt,name=gas_types,proto3" json:"gas_types,omitempty"` // 商品类型:1其它商品 2按瓶计费,3 按kg计费 - TotalPrice int64 `protobuf:"varint,15,opt,name=total_price,proto3" json:"total_price,omitempty"` // 总价 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OrderDetails) Reset() { - *x = OrderDetails{} - mi := &file_blocks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OrderDetails) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OrderDetails) ProtoMessage() {} - -func (x *OrderDetails) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OrderDetails.ProtoReflect.Descriptor instead. -func (*OrderDetails) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{5} -} - -func (x *OrderDetails) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *OrderDetails) GetProductId() int64 { - if x != nil { - return x.ProductId - } - return 0 -} - -func (x *OrderDetails) GetSpecNo() string { - if x != nil { - return x.SpecNo - } - return "" -} - -func (x *OrderDetails) GetSpec() string { - if x != nil { - return x.Spec - } - return "" -} - -func (x *OrderDetails) GetType() int64 { - if x != nil { - return x.Type - } - return 0 -} - -func (x *OrderDetails) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *OrderDetails) GetCoverImage() string { - if x != nil { - return x.CoverImage - } - return "" -} - -func (x *OrderDetails) GetSalesPrice() int64 { - if x != nil { - return x.SalesPrice - } - return 0 -} - -func (x *OrderDetails) GetProductArgs() string { - if x != nil { - return x.ProductArgs - } - return "" -} - -func (x *OrderDetails) GetNumber() int64 { - if x != nil { - return x.Number - } - return 0 -} - -func (x *OrderDetails) GetUnitPrice() int64 { - if x != nil { - return x.UnitPrice - } - return 0 -} - -func (x *OrderDetails) GetSpecId() int64 { - if x != nil { - return x.SpecId - } - return 0 -} - -func (x *OrderDetails) GetProductIdentity() string { - if x != nil { - return x.ProductIdentity - } - return "" -} - -func (x *OrderDetails) GetGasTypes() int64 { - if x != nil { - return x.GasTypes - } - return 0 -} - -func (x *OrderDetails) GetTotalPrice() int64 { - if x != nil { - return x.TotalPrice - } - return 0 -} - -var File_blocks_proto protoreflect.FileDescriptor - -const file_blocks_proto_rawDesc = "" + - "\n" + - "\x12order/blocks.proto\x12\x05order\"\a\n" + - "\x05Empty\"\xba\x01\n" + - "\fFetchRequest\x12\x18\n" + - "\apage_no\x18\x01 \x01(\x03R\apage_no\x12\x1c\n" + - "\tpage_size\x18\x02 \x01(\x03R\tpage_size\x127\n" + - "\x06params\x18\x03 \x03(\v2\x1f.order.FetchRequest.ParamsEntryR\x06params\x1a9\n" + - "\vParamsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xab\x01\n" + - "\fIdentRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x16\n" + - "\x06reason\x18\x03 \x01(\tR\x06reason\x12\x18\n" + - "\aapprove\x18\x04 \x01(\x05R\aapprove\x12\x16\n" + - "\x06agency\x18\x05 \x01(\tR\x06agency\x12%\n" + - "\x0estore_identity\x18\x06 \x01(\tR\rstoreIdentity\"\x89\x01\n" + - "\vStatusReply\x12\x12\n" + - "\x04code\x18\x01 \x01(\x05R\x04code\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x18\n" + - "\amessage\x18\x03 \x01(\tR\amessage\x12\x18\n" + - "\atimeseq\x18\x04 \x01(\x03R\atimeseq\x12\x16\n" + - "\x06reason\x18\x05 \x01(\tR\x06reason\"\xcb\t\n" + - "\x10OrderSummaryItem\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + - "\border_no\x18\x02 \x01(\tR\border_no\x12\x1e\n" + - "\n" + - "partner_id\x18\x03 \x01(\x03R\n" + - "partner_id\x12\x1a\n" + - "\bidentity\x18\x04 \x01(\tR\bidentity\x12 \n" + - "\vtotal_price\x18\a \x01(\x03R\vtotal_price\x12 \n" + - "\vtrans_price\x18\b \x01(\x03R\vtrans_price\x12\"\n" + - "\frefund_price\x18\t \x01(\x03R\frefund_price\x12$\n" + - "\rlogistics_fee\x18\v \x01(\x03R\rlogistics_fee\x12$\n" + - "\rcoupon_amount\x18\f \x01(\x03R\rcoupon_amount\x12\x16\n" + - "\x06remark\x18\r \x01(\tR\x06remark\x12\x16\n" + - "\x06status\x18\x0e \x01(\x05R\x06status\x12*\n" + - "\x10logistics_number\x18\x0f \x01(\tR\x10logistics_number\x12*\n" + - "\x10address_identity\x18\x10 \x01(\tR\x10address_identity\x12\x16\n" + - "\x06county\x18\x11 \x01(\tR\x06county\x12\x1a\n" + - "\bprovince\x18\x12 \x01(\tR\bprovince\x12\x12\n" + - "\x04city\x18\x13 \x01(\tR\x04city\x12\x12\n" + - "\x04area\x18\x14 \x01(\tR\x04area\x12\x18\n" + - "\aaddress\x18\x15 \x01(\tR\aaddress\x12\x18\n" + - "\acontact\x18\x16 \x01(\tR\acontact\x12\x14\n" + - "\x05phone\x18\x17 \x01(\tR\x05phone\x12$\n" + - "\rdelivery_time\x18\x18 \x01(\tR\rdelivery_time\x12,\n" + - "\x11delivery_identity\x18\x19 \x01(\tR\x11delivery_identity\x12\x1a\n" + - "\bpay_type\x18\x1a \x01(\x05R\bpay_type\x12\x1e\n" + - "\n" + - "pay_amount\x18\x1b \x01(\x03R\n" + - "pay_amount\x12\"\n" + - "\fpay_trade_no\x18\x1c \x01(\tR\fpay_trade_no\x12\x1a\n" + - "\bpay_time\x18\x1d \x01(\tR\bpay_time\x12\x1e\n" + - "\n" + - "pay_remark\x18\x1e \x01(\tR\n" + - "pay_remark\x12\x18\n" + - "\acreated\x18\x1f \x01(\tR\acreated\x12\x18\n" + - "\aupdated\x18 \x01(\tR\aupdated\x12-\n" + - "\adetails\x18! \x03(\v2\x13.order.OrderDetailsR\adetails\x12\x12\n" + - "\x04addr\x18\" \x01(\tR\x04addr\x12\"\n" + - "\fcar_identity\x18# \x01(\tR\fcar_identity\x12*\n" + - "\x10delivery_address\x18$ \x01(\tR\x10delivery_address\x12\x14\n" + - "\x05brand\x18% \x01(\tR\x05brand\x12\x18\n" + - "\aversion\x18& \x01(\tR\aversion\x12&\n" + - "\x0elicense_number\x18' \x01(\tR\x0elicense_number\x12 \n" + - "\vmember_name\x18( \x01(\tR\vmember_name\x12\"\n" + - "\fmember_phone\x18) \x01(\tR\fmember_phone\x12\x18\n" + - "\aapprove\x18* \x01(\x05R\aapprove\"\xbc\x03\n" + - "\fOrderDetails\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1e\n" + - "\n" + - "product_id\x18\x02 \x01(\x03R\n" + - "product_id\x12\x18\n" + - "\aspec_no\x18\x03 \x01(\tR\aspec_no\x12\x12\n" + - "\x04spec\x18\x04 \x01(\tR\x04spec\x12\x12\n" + - "\x04type\x18\x05 \x01(\x03R\x04type\x12\x14\n" + - "\x05title\x18\x06 \x01(\tR\x05title\x12 \n" + - "\vcover_image\x18\a \x01(\tR\vcover_image\x12 \n" + - "\vsales_price\x18\b \x01(\x03R\vsales_price\x12\"\n" + - "\fproduct_args\x18\t \x01(\tR\fproduct_args\x12\x16\n" + - "\x06number\x18\n" + - " \x01(\x03R\x06number\x12\x1e\n" + - "\n" + - "unit_price\x18\v \x01(\x03R\n" + - "unit_price\x12\x18\n" + - "\aspec_id\x18\f \x01(\x03R\aspec_id\x12*\n" + - "\x10product_identity\x18\r \x01(\tR\x10product_identity\x12\x1c\n" + - "\tgas_types\x18\x0e \x01(\x03R\tgas_types\x12 \n" + - "\vtotal_price\x18\x0f \x01(\x03R\vtotal_priceB\tZ\a./orderb\x06proto3" - -var ( - file_blocks_proto_rawDescOnce sync.Once - file_blocks_proto_rawDescData []byte -) - -func file_blocks_proto_rawDescGZIP() []byte { - file_blocks_proto_rawDescOnce.Do(func() { - file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc))) - }) - return file_blocks_proto_rawDescData -} - -var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_blocks_proto_goTypes = []any{ - (*Empty)(nil), // 0: order.Empty - (*FetchRequest)(nil), // 1: order.FetchRequest - (*IdentRequest)(nil), // 2: order.IdentRequest - (*StatusReply)(nil), // 3: order.StatusReply - (*OrderSummaryItem)(nil), // 4: order.OrderSummaryItem - (*OrderDetails)(nil), // 5: order.OrderDetails - nil, // 6: order.FetchRequest.ParamsEntry -} -var file_blocks_proto_depIdxs = []int32{ - 6, // 0: order.FetchRequest.params:type_name -> order.FetchRequest.ParamsEntry - 5, // 1: order.OrderSummaryItem.details:type_name -> order.OrderDetails - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_blocks_proto_init() } -func file_blocks_proto_init() { - if File_blocks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_blocks_proto_goTypes, - DependencyIndexes: file_blocks_proto_depIdxs, - MessageInfos: file_blocks_proto_msgTypes, - }.Build() - File_blocks_proto = out.File - file_blocks_proto_goTypes = nil - file_blocks_proto_depIdxs = nil -} diff --git a/module/ec/order/pb/blocks_compat.go b/module/ec/order/pb/blocks_compat.go new file mode 100644 index 0000000..784398f --- /dev/null +++ b/module/ec/order/pb/blocks_compat.go @@ -0,0 +1,10 @@ +package order + +import blocks "bsm/full/protobuf" + +type Empty = blocks.Empty +type FetchRequest = blocks.FetchRequest +type IdentRequest = blocks.OrderIdentRequest +type StatusReply = blocks.OrderStatusReply +type OrderSummaryItem = blocks.OrderSummaryItem +type OrderDetails = blocks.OrderDetails diff --git a/module/ec/order/pb/cart.pb.go b/module/ec/order/pb/cart.pb.go index 4bed8db..af6acf6 100644 --- a/module/ec/order/pb/cart.pb.go +++ b/module/ec/order/pb/cart.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc (unknown) -// source: cart.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/order/proto/cart.proto package order import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -32,7 +33,7 @@ type CartGetRequest struct { func (x *CartGetRequest) Reset() { *x = CartGetRequest{} - mi := &file_cart_proto_msgTypes[0] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +45,7 @@ func (x *CartGetRequest) String() string { func (*CartGetRequest) ProtoMessage() {} func (x *CartGetRequest) ProtoReflect() protoreflect.Message { - mi := &file_cart_proto_msgTypes[0] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +58,7 @@ func (x *CartGetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CartGetRequest.ProtoReflect.Descriptor instead. func (*CartGetRequest) Descriptor() ([]byte, []int) { - return file_cart_proto_rawDescGZIP(), []int{0} + return file_module_ec_order_proto_cart_proto_rawDescGZIP(), []int{0} } func (x *CartGetRequest) GetCarIdentity() string { @@ -91,7 +92,7 @@ type CartGetReply struct { func (x *CartGetReply) Reset() { *x = CartGetReply{} - mi := &file_cart_proto_msgTypes[1] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -103,7 +104,7 @@ func (x *CartGetReply) String() string { func (*CartGetReply) ProtoMessage() {} func (x *CartGetReply) ProtoReflect() protoreflect.Message { - mi := &file_cart_proto_msgTypes[1] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -116,7 +117,7 @@ func (x *CartGetReply) ProtoReflect() protoreflect.Message { // Deprecated: Use CartGetReply.ProtoReflect.Descriptor instead. func (*CartGetReply) Descriptor() ([]byte, []int) { - return file_cart_proto_rawDescGZIP(), []int{1} + return file_module_ec_order_proto_cart_proto_rawDescGZIP(), []int{1} } func (x *CartGetReply) GetData() []*CartItem { @@ -152,7 +153,7 @@ type CartItem struct { func (x *CartItem) Reset() { *x = CartItem{} - mi := &file_cart_proto_msgTypes[2] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -164,7 +165,7 @@ func (x *CartItem) String() string { func (*CartItem) ProtoMessage() {} func (x *CartItem) ProtoReflect() protoreflect.Message { - mi := &file_cart_proto_msgTypes[2] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -177,7 +178,7 @@ func (x *CartItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CartItem.ProtoReflect.Descriptor instead. func (*CartItem) Descriptor() ([]byte, []int) { - return file_cart_proto_rawDescGZIP(), []int{2} + return file_module_ec_order_proto_cart_proto_rawDescGZIP(), []int{2} } func (x *CartItem) GetId() int64 { @@ -272,7 +273,7 @@ type CartAddRequest struct { func (x *CartAddRequest) Reset() { *x = CartAddRequest{} - mi := &file_cart_proto_msgTypes[3] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -284,7 +285,7 @@ func (x *CartAddRequest) String() string { func (*CartAddRequest) ProtoMessage() {} func (x *CartAddRequest) ProtoReflect() protoreflect.Message { - mi := &file_cart_proto_msgTypes[3] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -297,7 +298,7 @@ func (x *CartAddRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CartAddRequest.ProtoReflect.Descriptor instead. func (*CartAddRequest) Descriptor() ([]byte, []int) { - return file_cart_proto_rawDescGZIP(), []int{3} + return file_module_ec_order_proto_cart_proto_rawDescGZIP(), []int{3} } func (x *CartAddRequest) GetCartIdentity() string { @@ -362,7 +363,7 @@ type CartSetRequest struct { func (x *CartSetRequest) Reset() { *x = CartSetRequest{} - mi := &file_cart_proto_msgTypes[4] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -374,7 +375,7 @@ func (x *CartSetRequest) String() string { func (*CartSetRequest) ProtoMessage() {} func (x *CartSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_cart_proto_msgTypes[4] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -387,7 +388,7 @@ func (x *CartSetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CartSetRequest.ProtoReflect.Descriptor instead. func (*CartSetRequest) Descriptor() ([]byte, []int) { - return file_cart_proto_rawDescGZIP(), []int{4} + return file_module_ec_order_proto_cart_proto_rawDescGZIP(), []int{4} } func (x *CartSetRequest) GetIdentity() string { @@ -435,7 +436,7 @@ type Updates struct { func (x *Updates) Reset() { *x = Updates{} - mi := &file_cart_proto_msgTypes[5] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -447,7 +448,7 @@ func (x *Updates) String() string { func (*Updates) ProtoMessage() {} func (x *Updates) ProtoReflect() protoreflect.Message { - mi := &file_cart_proto_msgTypes[5] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -460,7 +461,7 @@ func (x *Updates) ProtoReflect() protoreflect.Message { // Deprecated: Use Updates.ProtoReflect.Descriptor instead. func (*Updates) Descriptor() ([]byte, []int) { - return file_cart_proto_rawDescGZIP(), []int{5} + return file_module_ec_order_proto_cart_proto_rawDescGZIP(), []int{5} } func (x *Updates) GetId() int64 { @@ -486,7 +487,7 @@ type CartDelRequest struct { func (x *CartDelRequest) Reset() { *x = CartDelRequest{} - mi := &file_cart_proto_msgTypes[6] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -498,7 +499,7 @@ func (x *CartDelRequest) String() string { func (*CartDelRequest) ProtoMessage() {} func (x *CartDelRequest) ProtoReflect() protoreflect.Message { - mi := &file_cart_proto_msgTypes[6] + mi := &file_module_ec_order_proto_cart_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -511,7 +512,7 @@ func (x *CartDelRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CartDelRequest.ProtoReflect.Descriptor instead. func (*CartDelRequest) Descriptor() ([]byte, []int) { - return file_cart_proto_rawDescGZIP(), []int{6} + return file_module_ec_order_proto_cart_proto_rawDescGZIP(), []int{6} } func (x *CartDelRequest) GetId() []int64 { @@ -521,12 +522,11 @@ func (x *CartDelRequest) GetId() []int64 { return nil } -var File_cart_proto protoreflect.FileDescriptor +var File_module_ec_order_proto_cart_proto protoreflect.FileDescriptor -const file_cart_proto_rawDesc = "" + +const file_module_ec_order_proto_cart_proto_rawDesc = "" + "\n" + - "\x13" + - "ec/order/cart.proto\x12\x05order\x1a\x12order/blocks.proto\"~\n" + + " module/ec/order/proto/cart.proto\x12\x05order\x1a\x15protobuf/blocks.proto\"~\n" + "\x0eCartGetRequest\x12\"\n" + "\fcar_identity\x18\x01 \x01(\tR\fcar_identity\x12,\n" + "\x11passport_identity\x18\x02 \x01(\tR\x11passport_identity\x12\x1a\n" + @@ -573,37 +573,37 @@ const file_cart_proto_rawDesc = "" + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x16\n" + "\x06number\x18\x02 \x01(\x03R\x06number\" \n" + "\x0eCartDelRequest\x12\x0e\n" + - "\x02id\x18\x03 \x03(\x03R\x02id2\xe2\x01\n" + + "\x02id\x18\x03 \x03(\x03R\x02id2\xf4\x01\n" + "\x04Cart\x125\n" + - "\x05Fetch\x12\x15.order.CartGetRequest\x1a\x13.order.CartGetReply\"\x00\x125\n" + - "\x06Create\x12\x15.order.CartAddRequest\x1a\x12.order.StatusReply\"\x00\x125\n" + - "\x06Modify\x12\x15.order.CartSetRequest\x1a\x12.order.StatusReply\"\x00\x125\n" + - "\x06Delete\x12\x15.order.CartDelRequest\x1a\x12.order.StatusReply\"\x00B\tZ\a./orderb\x06proto3" + "\x05Fetch\x12\x15.order.CartGetRequest\x1a\x13.order.CartGetReply\"\x00\x12;\n" + + "\x06Create\x12\x15.order.CartAddRequest\x1a\x18.blocks.OrderStatusReply\"\x00\x12;\n" + + "\x06Modify\x12\x15.order.CartSetRequest\x1a\x18.blocks.OrderStatusReply\"\x00\x12;\n" + + "\x06Delete\x12\x15.order.CartDelRequest\x1a\x18.blocks.OrderStatusReply\"\x00B#Z!bsm/full/module/ec/order/pb;orderb\x06proto3" var ( - file_cart_proto_rawDescOnce sync.Once - file_cart_proto_rawDescData []byte + file_module_ec_order_proto_cart_proto_rawDescOnce sync.Once + file_module_ec_order_proto_cart_proto_rawDescData []byte ) -func file_cart_proto_rawDescGZIP() []byte { - file_cart_proto_rawDescOnce.Do(func() { - file_cart_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_cart_proto_rawDesc), len(file_cart_proto_rawDesc))) +func file_module_ec_order_proto_cart_proto_rawDescGZIP() []byte { + file_module_ec_order_proto_cart_proto_rawDescOnce.Do(func() { + file_module_ec_order_proto_cart_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_order_proto_cart_proto_rawDesc), len(file_module_ec_order_proto_cart_proto_rawDesc))) }) - return file_cart_proto_rawDescData + return file_module_ec_order_proto_cart_proto_rawDescData } -var file_cart_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_cart_proto_goTypes = []any{ - (*CartGetRequest)(nil), // 0: order.CartGetRequest - (*CartGetReply)(nil), // 1: order.CartGetReply - (*CartItem)(nil), // 2: order.CartItem - (*CartAddRequest)(nil), // 3: order.CartAddRequest - (*CartSetRequest)(nil), // 4: order.CartSetRequest - (*Updates)(nil), // 5: order.Updates - (*CartDelRequest)(nil), // 6: order.CartDelRequest - (*StatusReply)(nil), // 7: order.StatusReply +var file_module_ec_order_proto_cart_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_module_ec_order_proto_cart_proto_goTypes = []any{ + (*CartGetRequest)(nil), // 0: order.CartGetRequest + (*CartGetReply)(nil), // 1: order.CartGetReply + (*CartItem)(nil), // 2: order.CartItem + (*CartAddRequest)(nil), // 3: order.CartAddRequest + (*CartSetRequest)(nil), // 4: order.CartSetRequest + (*Updates)(nil), // 5: order.Updates + (*CartDelRequest)(nil), // 6: order.CartDelRequest + (*protobuf.OrderStatusReply)(nil), // 7: blocks.OrderStatusReply } -var file_cart_proto_depIdxs = []int32{ +var file_module_ec_order_proto_cart_proto_depIdxs = []int32{ 2, // 0: order.CartGetReply.data:type_name -> order.CartItem 5, // 1: order.CartSetRequest.updates:type_name -> order.Updates 0, // 2: order.Cart.Fetch:input_type -> order.CartGetRequest @@ -611,9 +611,9 @@ var file_cart_proto_depIdxs = []int32{ 4, // 4: order.Cart.Modify:input_type -> order.CartSetRequest 6, // 5: order.Cart.Delete:input_type -> order.CartDelRequest 1, // 6: order.Cart.Fetch:output_type -> order.CartGetReply - 7, // 7: order.Cart.Create:output_type -> order.StatusReply - 7, // 8: order.Cart.Modify:output_type -> order.StatusReply - 7, // 9: order.Cart.Delete:output_type -> order.StatusReply + 7, // 7: order.Cart.Create:output_type -> blocks.OrderStatusReply + 7, // 8: order.Cart.Modify:output_type -> blocks.OrderStatusReply + 7, // 9: order.Cart.Delete:output_type -> blocks.OrderStatusReply 6, // [6:10] is the sub-list for method output_type 2, // [2:6] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -621,27 +621,26 @@ var file_cart_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_cart_proto_init() } -func file_cart_proto_init() { - if File_cart_proto != nil { +func init() { file_module_ec_order_proto_cart_proto_init() } +func file_module_ec_order_proto_cart_proto_init() { + if File_module_ec_order_proto_cart_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_cart_proto_rawDesc), len(file_cart_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_order_proto_cart_proto_rawDesc), len(file_module_ec_order_proto_cart_proto_rawDesc)), NumEnums: 0, NumMessages: 7, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_cart_proto_goTypes, - DependencyIndexes: file_cart_proto_depIdxs, - MessageInfos: file_cart_proto_msgTypes, + GoTypes: file_module_ec_order_proto_cart_proto_goTypes, + DependencyIndexes: file_module_ec_order_proto_cart_proto_depIdxs, + MessageInfos: file_module_ec_order_proto_cart_proto_msgTypes, }.Build() - File_cart_proto = out.File - file_cart_proto_goTypes = nil - file_cart_proto_depIdxs = nil + File_module_ec_order_proto_cart_proto = out.File + file_module_ec_order_proto_cart_proto_goTypes = nil + file_module_ec_order_proto_cart_proto_depIdxs = nil } diff --git a/module/ec/order/pb/cart.pb.gw.go b/module/ec/order/pb/cart.pb.gw.go index f0911da..31275b4 100644 --- a/module/ec/order/pb/cart.pb.gw.go +++ b/module/ec/order/pb/cart.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: cart.proto +// source: module/ec/order/proto/cart.proto /* Package order is a reverse proxy. @@ -43,6 +43,9 @@ func request_Cart_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, clie if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Fetch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -67,6 +70,9 @@ func request_Cart_Create_0(ctx context.Context, marshaler runtime.Marshaler, cli if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Create(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -91,6 +97,9 @@ func request_Cart_Modify_0(ctx context.Context, marshaler runtime.Marshaler, cli if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Modify(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -115,6 +124,9 @@ func request_Cart_Delete_0(ctx context.Context, marshaler runtime.Marshaler, cli if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } diff --git a/module/ec/order/pb/cart_grpc.pb.go b/module/ec/order/pb/cart_grpc.pb.go index 2fd1232..682b6d4 100644 --- a/module/ec/order/pb/cart_grpc.pb.go +++ b/module/ec/order/pb/cart_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: cart.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/order/proto/cart.proto package order import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -34,11 +35,11 @@ type CartClient interface { // 获取购物车的商品数据 Fetch(ctx context.Context, in *CartGetRequest, opts ...grpc.CallOption) (*CartGetReply, error) // 将商品增加至购物车 - Create(ctx context.Context, in *CartAddRequest, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *CartAddRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) // 修改购物车中的商品数量 - Modify(ctx context.Context, in *CartSetRequest, opts ...grpc.CallOption) (*StatusReply, error) + Modify(ctx context.Context, in *CartSetRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) // 删除购物车中的商品 - Delete(ctx context.Context, in *CartDelRequest, opts ...grpc.CallOption) (*StatusReply, error) + Delete(ctx context.Context, in *CartDelRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) } type cartClient struct { @@ -59,9 +60,9 @@ func (c *cartClient) Fetch(ctx context.Context, in *CartGetRequest, opts ...grpc return out, nil } -func (c *cartClient) Create(ctx context.Context, in *CartAddRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *cartClient) Create(ctx context.Context, in *CartAddRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Cart_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -69,9 +70,9 @@ func (c *cartClient) Create(ctx context.Context, in *CartAddRequest, opts ...grp return out, nil } -func (c *cartClient) Modify(ctx context.Context, in *CartSetRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *cartClient) Modify(ctx context.Context, in *CartSetRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Cart_Modify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -79,9 +80,9 @@ func (c *cartClient) Modify(ctx context.Context, in *CartSetRequest, opts ...grp return out, nil } -func (c *cartClient) Delete(ctx context.Context, in *CartDelRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *cartClient) Delete(ctx context.Context, in *CartDelRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Cart_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -90,7 +91,7 @@ func (c *cartClient) Delete(ctx context.Context, in *CartDelRequest, opts ...grp } // CartServer is the server API for Cart service. -// All implementations must embed UnimplementedCartServer +// All implementations should embed UnimplementedCartServer // for forward compatibility. // // Order(订单)微服务-购物车 @@ -98,15 +99,14 @@ type CartServer interface { // 获取购物车的商品数据 Fetch(context.Context, *CartGetRequest) (*CartGetReply, error) // 将商品增加至购物车 - Create(context.Context, *CartAddRequest) (*StatusReply, error) + Create(context.Context, *CartAddRequest) (*protobuf.OrderStatusReply, error) // 修改购物车中的商品数量 - Modify(context.Context, *CartSetRequest) (*StatusReply, error) + Modify(context.Context, *CartSetRequest) (*protobuf.OrderStatusReply, error) // 删除购物车中的商品 - Delete(context.Context, *CartDelRequest) (*StatusReply, error) - mustEmbedUnimplementedCartServer() + Delete(context.Context, *CartDelRequest) (*protobuf.OrderStatusReply, error) } -// UnimplementedCartServer must be embedded to have +// UnimplementedCartServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -114,19 +114,18 @@ type CartServer interface { type UnimplementedCartServer struct{} func (UnimplementedCartServer) Fetch(context.Context, *CartGetRequest) (*CartGetReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedCartServer) Create(context.Context, *CartAddRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +func (UnimplementedCartServer) Create(context.Context, *CartAddRequest) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedCartServer) Modify(context.Context, *CartSetRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented") +func (UnimplementedCartServer) Modify(context.Context, *CartSetRequest) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } -func (UnimplementedCartServer) Delete(context.Context, *CartDelRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +func (UnimplementedCartServer) Delete(context.Context, *CartDelRequest) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedCartServer) mustEmbedUnimplementedCartServer() {} -func (UnimplementedCartServer) testEmbeddedByValue() {} +func (UnimplementedCartServer) testEmbeddedByValue() {} // UnsafeCartServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CartServer will @@ -136,7 +135,7 @@ type UnsafeCartServer interface { } func RegisterCartServer(s grpc.ServiceRegistrar, srv CartServer) { - // If the following call pancis, it indicates UnimplementedCartServer was + // If the following call panics, it indicates UnimplementedCartServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -243,5 +242,5 @@ var Cart_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "cart.proto", + Metadata: "module/ec/order/proto/cart.proto", } diff --git a/module/ec/order/pb/coupon.pb.go b/module/ec/order/pb/coupon.pb.go index 0ef2758..de9ff0b 100644 --- a/module/ec/order/pb/coupon.pb.go +++ b/module/ec/order/pb/coupon.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc (unknown) -// source: coupon.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/order/proto/coupon.proto package order @@ -30,7 +30,7 @@ type Status struct { func (x *Status) Reset() { *x = Status{} - mi := &file_coupon_proto_msgTypes[0] + mi := &file_module_ec_order_proto_coupon_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -42,7 +42,7 @@ func (x *Status) String() string { func (*Status) ProtoMessage() {} func (x *Status) ProtoReflect() protoreflect.Message { - mi := &file_coupon_proto_msgTypes[0] + mi := &file_module_ec_order_proto_coupon_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55,7 +55,7 @@ func (x *Status) ProtoReflect() protoreflect.Message { // Deprecated: Use Status.ProtoReflect.Descriptor instead. func (*Status) Descriptor() ([]byte, []int) { - return file_coupon_proto_rawDescGZIP(), []int{0} + return file_module_ec_order_proto_coupon_proto_rawDescGZIP(), []int{0} } func (x *Status) GetStatus() int32 { @@ -74,7 +74,7 @@ type CouponListReply struct { func (x *CouponListReply) Reset() { *x = CouponListReply{} - mi := &file_coupon_proto_msgTypes[1] + mi := &file_module_ec_order_proto_coupon_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -86,7 +86,7 @@ func (x *CouponListReply) String() string { func (*CouponListReply) ProtoMessage() {} func (x *CouponListReply) ProtoReflect() protoreflect.Message { - mi := &file_coupon_proto_msgTypes[1] + mi := &file_module_ec_order_proto_coupon_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -99,7 +99,7 @@ func (x *CouponListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use CouponListReply.ProtoReflect.Descriptor instead. func (*CouponListReply) Descriptor() ([]byte, []int) { - return file_coupon_proto_rawDescGZIP(), []int{1} + return file_module_ec_order_proto_coupon_proto_rawDescGZIP(), []int{1} } func (x *CouponListReply) GetData() []*CouponItem { @@ -125,7 +125,7 @@ type CouponItem struct { func (x *CouponItem) Reset() { *x = CouponItem{} - mi := &file_coupon_proto_msgTypes[2] + mi := &file_module_ec_order_proto_coupon_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -137,7 +137,7 @@ func (x *CouponItem) String() string { func (*CouponItem) ProtoMessage() {} func (x *CouponItem) ProtoReflect() protoreflect.Message { - mi := &file_coupon_proto_msgTypes[2] + mi := &file_module_ec_order_proto_coupon_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -150,7 +150,7 @@ func (x *CouponItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CouponItem.ProtoReflect.Descriptor instead. func (*CouponItem) Descriptor() ([]byte, []int) { - return file_coupon_proto_rawDescGZIP(), []int{2} + return file_module_ec_order_proto_coupon_proto_rawDescGZIP(), []int{2} } func (x *CouponItem) GetId() int64 { @@ -209,11 +209,11 @@ func (x *CouponItem) GetStatus() string { return "" } -var File_coupon_proto protoreflect.FileDescriptor +var File_module_ec_order_proto_coupon_proto protoreflect.FileDescriptor -const file_coupon_proto_rawDesc = "" + +const file_module_ec_order_proto_coupon_proto_rawDesc = "" + "\n" + - "\x15ec/order/coupon.proto\x12\x05order\x1a\x12order/blocks.proto\" \n" + + "\"module/ec/order/proto/coupon.proto\x12\x05order\" \n" + "\x06Status\x12\x16\n" + "\x06status\x18\x01 \x01(\x05R\x06status\"8\n" + "\x0fCouponListReply\x12%\n" + @@ -229,27 +229,27 @@ const file_coupon_proto_rawDesc = "" + "\aexpired\x18\a \x01(\tR\aexpired\x12\x16\n" + "\x06status\x18\b \x01(\tR\x06status2=\n" + "\x06Coupon\x123\n" + - "\bByStatus\x12\r.order.Status\x1a\x16.order.CouponListReply\"\x00B\tZ\a./orderb\x06proto3" + "\bByStatus\x12\r.order.Status\x1a\x16.order.CouponListReply\"\x00B#Z!bsm/full/module/ec/order/pb;orderb\x06proto3" var ( - file_coupon_proto_rawDescOnce sync.Once - file_coupon_proto_rawDescData []byte + file_module_ec_order_proto_coupon_proto_rawDescOnce sync.Once + file_module_ec_order_proto_coupon_proto_rawDescData []byte ) -func file_coupon_proto_rawDescGZIP() []byte { - file_coupon_proto_rawDescOnce.Do(func() { - file_coupon_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_coupon_proto_rawDesc), len(file_coupon_proto_rawDesc))) +func file_module_ec_order_proto_coupon_proto_rawDescGZIP() []byte { + file_module_ec_order_proto_coupon_proto_rawDescOnce.Do(func() { + file_module_ec_order_proto_coupon_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_order_proto_coupon_proto_rawDesc), len(file_module_ec_order_proto_coupon_proto_rawDesc))) }) - return file_coupon_proto_rawDescData + return file_module_ec_order_proto_coupon_proto_rawDescData } -var file_coupon_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_coupon_proto_goTypes = []any{ +var file_module_ec_order_proto_coupon_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_module_ec_order_proto_coupon_proto_goTypes = []any{ (*Status)(nil), // 0: order.Status (*CouponListReply)(nil), // 1: order.CouponListReply (*CouponItem)(nil), // 2: order.CouponItem } -var file_coupon_proto_depIdxs = []int32{ +var file_module_ec_order_proto_coupon_proto_depIdxs = []int32{ 2, // 0: order.CouponListReply.data:type_name -> order.CouponItem 0, // 1: order.Coupon.ByStatus:input_type -> order.Status 1, // 2: order.Coupon.ByStatus:output_type -> order.CouponListReply @@ -260,27 +260,26 @@ var file_coupon_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_coupon_proto_init() } -func file_coupon_proto_init() { - if File_coupon_proto != nil { +func init() { file_module_ec_order_proto_coupon_proto_init() } +func file_module_ec_order_proto_coupon_proto_init() { + if File_module_ec_order_proto_coupon_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_coupon_proto_rawDesc), len(file_coupon_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_order_proto_coupon_proto_rawDesc), len(file_module_ec_order_proto_coupon_proto_rawDesc)), NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_coupon_proto_goTypes, - DependencyIndexes: file_coupon_proto_depIdxs, - MessageInfos: file_coupon_proto_msgTypes, + GoTypes: file_module_ec_order_proto_coupon_proto_goTypes, + DependencyIndexes: file_module_ec_order_proto_coupon_proto_depIdxs, + MessageInfos: file_module_ec_order_proto_coupon_proto_msgTypes, }.Build() - File_coupon_proto = out.File - file_coupon_proto_goTypes = nil - file_coupon_proto_depIdxs = nil + File_module_ec_order_proto_coupon_proto = out.File + file_module_ec_order_proto_coupon_proto_goTypes = nil + file_module_ec_order_proto_coupon_proto_depIdxs = nil } diff --git a/module/ec/order/pb/coupon.pb.gw.go b/module/ec/order/pb/coupon.pb.gw.go index 52e8d37..a28f993 100644 --- a/module/ec/order/pb/coupon.pb.gw.go +++ b/module/ec/order/pb/coupon.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: coupon.proto +// source: module/ec/order/proto/coupon.proto /* Package order is a reverse proxy. @@ -43,6 +43,9 @@ func request_Coupon_ByStatus_0(ctx context.Context, marshaler runtime.Marshaler, if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.ByStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } diff --git a/module/ec/order/pb/coupon_grpc.pb.go b/module/ec/order/pb/coupon_grpc.pb.go index e146f68..f8c4842 100644 --- a/module/ec/order/pb/coupon_grpc.pb.go +++ b/module/ec/order/pb/coupon_grpc.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: coupon.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/order/proto/coupon.proto package order @@ -51,17 +51,16 @@ func (c *couponClient) ByStatus(ctx context.Context, in *Status, opts ...grpc.Ca } // CouponServer is the server API for Coupon service. -// All implementations must embed UnimplementedCouponServer +// All implementations should embed UnimplementedCouponServer // for forward compatibility. // // Order(订单)微服务-优惠卷 type CouponServer interface { // 按状态获取优惠卷 ByStatus(context.Context, *Status) (*CouponListReply, error) - mustEmbedUnimplementedCouponServer() } -// UnimplementedCouponServer must be embedded to have +// UnimplementedCouponServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -69,10 +68,9 @@ type CouponServer interface { type UnimplementedCouponServer struct{} func (UnimplementedCouponServer) ByStatus(context.Context, *Status) (*CouponListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ByStatus not implemented") + return nil, status.Error(codes.Unimplemented, "method ByStatus not implemented") } -func (UnimplementedCouponServer) mustEmbedUnimplementedCouponServer() {} -func (UnimplementedCouponServer) testEmbeddedByValue() {} +func (UnimplementedCouponServer) testEmbeddedByValue() {} // UnsafeCouponServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CouponServer will @@ -82,7 +80,7 @@ type UnsafeCouponServer interface { } func RegisterCouponServer(s grpc.ServiceRegistrar, srv CouponServer) { - // If the following call pancis, it indicates UnimplementedCouponServer was + // If the following call panics, it indicates UnimplementedCouponServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -123,5 +121,5 @@ var Coupon_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "coupon.proto", + Metadata: "module/ec/order/proto/coupon.proto", } diff --git a/module/ec/order/pb/mgt.pb.go b/module/ec/order/pb/mgt.pb.go index b6b1ca3..49717ec 100644 --- a/module/ec/order/pb/mgt.pb.go +++ b/module/ec/order/pb/mgt.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc (unknown) -// source: mgt.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/order/proto/mgt.proto package order import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -34,7 +35,7 @@ type CreateOrderRequest struct { func (x *CreateOrderRequest) Reset() { *x = CreateOrderRequest{} - mi := &file_mgt_proto_msgTypes[0] + mi := &file_module_ec_order_proto_mgt_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +47,7 @@ func (x *CreateOrderRequest) String() string { func (*CreateOrderRequest) ProtoMessage() {} func (x *CreateOrderRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgt_proto_msgTypes[0] + mi := &file_module_ec_order_proto_mgt_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +60,7 @@ func (x *CreateOrderRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateOrderRequest.ProtoReflect.Descriptor instead. func (*CreateOrderRequest) Descriptor() ([]byte, []int) { - return file_mgt_proto_rawDescGZIP(), []int{0} + return file_module_ec_order_proto_mgt_proto_rawDescGZIP(), []int{0} } func (x *CreateOrderRequest) GetPartnerId() int32 { @@ -107,7 +108,7 @@ type SpecList struct { func (x *SpecList) Reset() { *x = SpecList{} - mi := &file_mgt_proto_msgTypes[1] + mi := &file_module_ec_order_proto_mgt_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -119,7 +120,7 @@ func (x *SpecList) String() string { func (*SpecList) ProtoMessage() {} func (x *SpecList) ProtoReflect() protoreflect.Message { - mi := &file_mgt_proto_msgTypes[1] + mi := &file_module_ec_order_proto_mgt_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -132,7 +133,7 @@ func (x *SpecList) ProtoReflect() protoreflect.Message { // Deprecated: Use SpecList.ProtoReflect.Descriptor instead. func (*SpecList) Descriptor() ([]byte, []int) { - return file_mgt_proto_rawDescGZIP(), []int{1} + return file_module_ec_order_proto_mgt_proto_rawDescGZIP(), []int{1} } func (x *SpecList) GetNumber() int32 { @@ -150,15 +151,15 @@ func (x *SpecList) GetProductIdentity() string { } type OrderGetReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Summary *OrderSummaryItem `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"` // 订单概要详情 + state protoimpl.MessageState `protogen:"open.v1"` + Summary *protobuf.OrderSummaryItem `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"` // 订单概要详情 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *OrderGetReply) Reset() { *x = OrderGetReply{} - mi := &file_mgt_proto_msgTypes[2] + mi := &file_module_ec_order_proto_mgt_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -170,7 +171,7 @@ func (x *OrderGetReply) String() string { func (*OrderGetReply) ProtoMessage() {} func (x *OrderGetReply) ProtoReflect() protoreflect.Message { - mi := &file_mgt_proto_msgTypes[2] + mi := &file_module_ec_order_proto_mgt_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -183,10 +184,10 @@ func (x *OrderGetReply) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderGetReply.ProtoReflect.Descriptor instead. func (*OrderGetReply) Descriptor() ([]byte, []int) { - return file_mgt_proto_rawDescGZIP(), []int{2} + return file_module_ec_order_proto_mgt_proto_rawDescGZIP(), []int{2} } -func (x *OrderGetReply) GetSummary() *OrderSummaryItem { +func (x *OrderGetReply) GetSummary() *protobuf.OrderSummaryItem { if x != nil { return x.Summary } @@ -210,7 +211,7 @@ type OrderListByStoreRequest struct { func (x *OrderListByStoreRequest) Reset() { *x = OrderListByStoreRequest{} - mi := &file_mgt_proto_msgTypes[3] + mi := &file_module_ec_order_proto_mgt_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -222,7 +223,7 @@ func (x *OrderListByStoreRequest) String() string { func (*OrderListByStoreRequest) ProtoMessage() {} func (x *OrderListByStoreRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgt_proto_msgTypes[3] + mi := &file_module_ec_order_proto_mgt_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -235,7 +236,7 @@ func (x *OrderListByStoreRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderListByStoreRequest.ProtoReflect.Descriptor instead. func (*OrderListByStoreRequest) Descriptor() ([]byte, []int) { - return file_mgt_proto_rawDescGZIP(), []int{3} + return file_module_ec_order_proto_mgt_proto_rawDescGZIP(), []int{3} } func (x *OrderListByStoreRequest) GetPayType() int32 { @@ -302,16 +303,16 @@ func (x *OrderListByStoreRequest) GetKeyword() string { } type OrderListByStoreReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - Data []*OrderSummaryItem `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` // 订单列表 + state protoimpl.MessageState `protogen:"open.v1"` + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + Data []*protobuf.OrderSummaryItem `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` // 订单列表 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *OrderListByStoreReply) Reset() { *x = OrderListByStoreReply{} - mi := &file_mgt_proto_msgTypes[4] + mi := &file_module_ec_order_proto_mgt_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -323,7 +324,7 @@ func (x *OrderListByStoreReply) String() string { func (*OrderListByStoreReply) ProtoMessage() {} func (x *OrderListByStoreReply) ProtoReflect() protoreflect.Message { - mi := &file_mgt_proto_msgTypes[4] + mi := &file_module_ec_order_proto_mgt_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -336,7 +337,7 @@ func (x *OrderListByStoreReply) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderListByStoreReply.ProtoReflect.Descriptor instead. func (*OrderListByStoreReply) Descriptor() ([]byte, []int) { - return file_mgt_proto_rawDescGZIP(), []int{4} + return file_module_ec_order_proto_mgt_proto_rawDescGZIP(), []int{4} } func (x *OrderListByStoreReply) GetCount() int32 { @@ -346,18 +347,18 @@ func (x *OrderListByStoreReply) GetCount() int32 { return 0 } -func (x *OrderListByStoreReply) GetData() []*OrderSummaryItem { +func (x *OrderListByStoreReply) GetData() []*protobuf.OrderSummaryItem { if x != nil { return x.Data } return nil } -var File_mgt_proto protoreflect.FileDescriptor +var File_module_ec_order_proto_mgt_proto protoreflect.FileDescriptor -const file_mgt_proto_rawDesc = "" + +const file_module_ec_order_proto_mgt_proto_rawDesc = "" + "\n" + - "\x12ec/order/mgt.proto\x12\x05order\x1a\x12order/blocks.proto\"\xbf\x01\n" + + "\x1fmodule/ec/order/proto/mgt.proto\x12\x05order\x1a\x15protobuf/blocks.proto\"\xbf\x01\n" + "\x12CreateOrderRequest\x12\x1e\n" + "\n" + "partner_id\x18\x01 \x01(\x05R\n" + @@ -368,9 +369,9 @@ const file_mgt_proto_rawDesc = "" + "\x04spec\x18\x05 \x03(\v2\x0f.order.SpecListR\x04spec\"N\n" + "\bSpecList\x12\x16\n" + "\x06number\x18\x01 \x01(\x05R\x06number\x12*\n" + - "\x10product_identity\x18\x02 \x01(\tR\x10product_identity\"B\n" + - "\rOrderGetReply\x121\n" + - "\asummary\x18\x01 \x01(\v2\x17.order.OrderSummaryItemR\asummary\"\xa2\x02\n" + + "\x10product_identity\x18\x02 \x01(\tR\x10product_identity\"C\n" + + "\rOrderGetReply\x122\n" + + "\asummary\x18\x01 \x01(\v2\x18.blocks.OrderSummaryItemR\asummary\"\xa2\x02\n" + "\x17OrderListByStoreRequest\x12\x1a\n" + "\bpay_type\x18\x01 \x01(\x05R\bpay_type\x12\"\n" + "\forder_status\x18\x02 \x03(\x05R\forder_status\x12\x18\n" + @@ -382,60 +383,60 @@ const file_mgt_proto_rawDesc = "" + "\x06agency\x18\x06 \x01(\tR\x06agency\x12%\n" + "\x0estore_identity\x18\a \x01(\tR\rstoreIdentity\x12\x16\n" + "\x06status\x18\b \x01(\x05R\x06status\x12\x18\n" + - "\akeyword\x18\t \x01(\tR\akeyword\"Z\n" + + "\akeyword\x18\t \x01(\tR\akeyword\"[\n" + "\x15OrderListByStoreReply\x12\x14\n" + - "\x05count\x18\x01 \x01(\x05R\x05count\x12+\n" + - "\x04data\x18\x02 \x03(\v2\x17.order.OrderSummaryItemR\x04data2\xc3\x03\n" + - "\x03Mgt\x12>\n" + - "\vOrderCreate\x12\x19.order.CreateOrderRequest\x1a\x12.order.StatusReply\"\x00\x12<\n" + - "\vOrderModify\x12\x17.order.OrderSummaryItem\x1a\x12.order.StatusReply\"\x00\x127\n" + - "\bOrderGet\x12\x13.order.IdentRequest\x1a\x14.order.OrderGetReply\"\x00\x12R\n" + - "\x10OrderListByStore\x12\x1e.order.OrderListByStoreRequest\x1a\x1c.order.OrderListByStoreReply\"\x00\x128\n" + - "\vOrderCancel\x12\x13.order.IdentRequest\x1a\x12.order.StatusReply\"\x00\x12<\n" + - "\x0fOrderReturnable\x12\x13.order.IdentRequest\x1a\x12.order.StatusReply\"\x00\x129\n" + - "\fOrderApprove\x12\x13.order.IdentRequest\x1a\x12.order.StatusReply\"\x00B\tZ\a./orderb\x06proto3" + "\x05count\x18\x01 \x01(\x05R\x05count\x12,\n" + + "\x04data\x18\x02 \x03(\v2\x18.blocks.OrderSummaryItemR\x04data2\xfa\x03\n" + + "\x03Mgt\x12D\n" + + "\vOrderCreate\x12\x19.order.CreateOrderRequest\x1a\x18.blocks.OrderStatusReply\"\x00\x12C\n" + + "\vOrderModify\x12\x18.blocks.OrderSummaryItem\x1a\x18.blocks.OrderStatusReply\"\x00\x12=\n" + + "\bOrderGet\x12\x19.blocks.OrderIdentRequest\x1a\x14.order.OrderGetReply\"\x00\x12R\n" + + "\x10OrderListByStore\x12\x1e.order.OrderListByStoreRequest\x1a\x1c.order.OrderListByStoreReply\"\x00\x12D\n" + + "\vOrderCancel\x12\x19.blocks.OrderIdentRequest\x1a\x18.blocks.OrderStatusReply\"\x00\x12H\n" + + "\x0fOrderReturnable\x12\x19.blocks.OrderIdentRequest\x1a\x18.blocks.OrderStatusReply\"\x00\x12E\n" + + "\fOrderApprove\x12\x19.blocks.OrderIdentRequest\x1a\x18.blocks.OrderStatusReply\"\x00B#Z!bsm/full/module/ec/order/pb;orderb\x06proto3" var ( - file_mgt_proto_rawDescOnce sync.Once - file_mgt_proto_rawDescData []byte + file_module_ec_order_proto_mgt_proto_rawDescOnce sync.Once + file_module_ec_order_proto_mgt_proto_rawDescData []byte ) -func file_mgt_proto_rawDescGZIP() []byte { - file_mgt_proto_rawDescOnce.Do(func() { - file_mgt_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_mgt_proto_rawDesc), len(file_mgt_proto_rawDesc))) +func file_module_ec_order_proto_mgt_proto_rawDescGZIP() []byte { + file_module_ec_order_proto_mgt_proto_rawDescOnce.Do(func() { + file_module_ec_order_proto_mgt_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_order_proto_mgt_proto_rawDesc), len(file_module_ec_order_proto_mgt_proto_rawDesc))) }) - return file_mgt_proto_rawDescData + return file_module_ec_order_proto_mgt_proto_rawDescData } -var file_mgt_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_mgt_proto_goTypes = []any{ - (*CreateOrderRequest)(nil), // 0: order.CreateOrderRequest - (*SpecList)(nil), // 1: order.SpecList - (*OrderGetReply)(nil), // 2: order.OrderGetReply - (*OrderListByStoreRequest)(nil), // 3: order.OrderListByStoreRequest - (*OrderListByStoreReply)(nil), // 4: order.OrderListByStoreReply - (*OrderSummaryItem)(nil), // 5: order.OrderSummaryItem - (*IdentRequest)(nil), // 6: order.IdentRequest - (*StatusReply)(nil), // 7: order.StatusReply +var file_module_ec_order_proto_mgt_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_module_ec_order_proto_mgt_proto_goTypes = []any{ + (*CreateOrderRequest)(nil), // 0: order.CreateOrderRequest + (*SpecList)(nil), // 1: order.SpecList + (*OrderGetReply)(nil), // 2: order.OrderGetReply + (*OrderListByStoreRequest)(nil), // 3: order.OrderListByStoreRequest + (*OrderListByStoreReply)(nil), // 4: order.OrderListByStoreReply + (*protobuf.OrderSummaryItem)(nil), // 5: blocks.OrderSummaryItem + (*protobuf.OrderIdentRequest)(nil), // 6: blocks.OrderIdentRequest + (*protobuf.OrderStatusReply)(nil), // 7: blocks.OrderStatusReply } -var file_mgt_proto_depIdxs = []int32{ +var file_module_ec_order_proto_mgt_proto_depIdxs = []int32{ 1, // 0: order.CreateOrderRequest.spec:type_name -> order.SpecList - 5, // 1: order.OrderGetReply.summary:type_name -> order.OrderSummaryItem - 5, // 2: order.OrderListByStoreReply.data:type_name -> order.OrderSummaryItem + 5, // 1: order.OrderGetReply.summary:type_name -> blocks.OrderSummaryItem + 5, // 2: order.OrderListByStoreReply.data:type_name -> blocks.OrderSummaryItem 0, // 3: order.Mgt.OrderCreate:input_type -> order.CreateOrderRequest - 5, // 4: order.Mgt.OrderModify:input_type -> order.OrderSummaryItem - 6, // 5: order.Mgt.OrderGet:input_type -> order.IdentRequest + 5, // 4: order.Mgt.OrderModify:input_type -> blocks.OrderSummaryItem + 6, // 5: order.Mgt.OrderGet:input_type -> blocks.OrderIdentRequest 3, // 6: order.Mgt.OrderListByStore:input_type -> order.OrderListByStoreRequest - 6, // 7: order.Mgt.OrderCancel:input_type -> order.IdentRequest - 6, // 8: order.Mgt.OrderReturnable:input_type -> order.IdentRequest - 6, // 9: order.Mgt.OrderApprove:input_type -> order.IdentRequest - 7, // 10: order.Mgt.OrderCreate:output_type -> order.StatusReply - 7, // 11: order.Mgt.OrderModify:output_type -> order.StatusReply + 6, // 7: order.Mgt.OrderCancel:input_type -> blocks.OrderIdentRequest + 6, // 8: order.Mgt.OrderReturnable:input_type -> blocks.OrderIdentRequest + 6, // 9: order.Mgt.OrderApprove:input_type -> blocks.OrderIdentRequest + 7, // 10: order.Mgt.OrderCreate:output_type -> blocks.OrderStatusReply + 7, // 11: order.Mgt.OrderModify:output_type -> blocks.OrderStatusReply 2, // 12: order.Mgt.OrderGet:output_type -> order.OrderGetReply 4, // 13: order.Mgt.OrderListByStore:output_type -> order.OrderListByStoreReply - 7, // 14: order.Mgt.OrderCancel:output_type -> order.StatusReply - 7, // 15: order.Mgt.OrderReturnable:output_type -> order.StatusReply - 7, // 16: order.Mgt.OrderApprove:output_type -> order.StatusReply + 7, // 14: order.Mgt.OrderCancel:output_type -> blocks.OrderStatusReply + 7, // 15: order.Mgt.OrderReturnable:output_type -> blocks.OrderStatusReply + 7, // 16: order.Mgt.OrderApprove:output_type -> blocks.OrderStatusReply 10, // [10:17] is the sub-list for method output_type 3, // [3:10] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name @@ -443,27 +444,26 @@ var file_mgt_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_mgt_proto_init() } -func file_mgt_proto_init() { - if File_mgt_proto != nil { +func init() { file_module_ec_order_proto_mgt_proto_init() } +func file_module_ec_order_proto_mgt_proto_init() { + if File_module_ec_order_proto_mgt_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_mgt_proto_rawDesc), len(file_mgt_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_order_proto_mgt_proto_rawDesc), len(file_module_ec_order_proto_mgt_proto_rawDesc)), NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_mgt_proto_goTypes, - DependencyIndexes: file_mgt_proto_depIdxs, - MessageInfos: file_mgt_proto_msgTypes, + GoTypes: file_module_ec_order_proto_mgt_proto_goTypes, + DependencyIndexes: file_module_ec_order_proto_mgt_proto_depIdxs, + MessageInfos: file_module_ec_order_proto_mgt_proto_msgTypes, }.Build() - File_mgt_proto = out.File - file_mgt_proto_goTypes = nil - file_mgt_proto_depIdxs = nil + File_module_ec_order_proto_mgt_proto = out.File + file_module_ec_order_proto_mgt_proto_goTypes = nil + file_module_ec_order_proto_mgt_proto_depIdxs = nil } diff --git a/module/ec/order/pb/mgt.pb.gw.go b/module/ec/order/pb/mgt.pb.gw.go index 91120ac..59e77e6 100644 --- a/module/ec/order/pb/mgt.pb.gw.go +++ b/module/ec/order/pb/mgt.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: mgt.proto +// source: module/ec/order/proto/mgt.proto /* Package order is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package order import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -43,6 +44,9 @@ func request_Mgt_OrderCreate_0(ctx context.Context, marshaler runtime.Marshaler, if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.OrderCreate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -61,19 +65,22 @@ func local_request_Mgt_OrderCreate_0(ctx context.Context, marshaler runtime.Mars func request_Mgt_OrderModify_0(ctx context.Context, marshaler runtime.Marshaler, client MgtClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq OrderSummaryItem + protoReq blocks.OrderSummaryItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.OrderModify(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Mgt_OrderModify_0(ctx context.Context, marshaler runtime.Marshaler, server MgtServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq OrderSummaryItem + protoReq blocks.OrderSummaryItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -85,19 +92,22 @@ func local_request_Mgt_OrderModify_0(ctx context.Context, marshaler runtime.Mars func request_Mgt_OrderGet_0(ctx context.Context, marshaler runtime.Marshaler, client MgtClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.OrderIdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.OrderGet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Mgt_OrderGet_0(ctx context.Context, marshaler runtime.Marshaler, server MgtServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.OrderIdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -115,6 +125,9 @@ func request_Mgt_OrderListByStore_0(ctx context.Context, marshaler runtime.Marsh if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.OrderListByStore(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -133,19 +146,22 @@ func local_request_Mgt_OrderListByStore_0(ctx context.Context, marshaler runtime func request_Mgt_OrderCancel_0(ctx context.Context, marshaler runtime.Marshaler, client MgtClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.OrderIdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.OrderCancel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Mgt_OrderCancel_0(ctx context.Context, marshaler runtime.Marshaler, server MgtServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.OrderIdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -157,19 +173,22 @@ func local_request_Mgt_OrderCancel_0(ctx context.Context, marshaler runtime.Mars func request_Mgt_OrderReturnable_0(ctx context.Context, marshaler runtime.Marshaler, client MgtClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.OrderIdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.OrderReturnable(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Mgt_OrderReturnable_0(ctx context.Context, marshaler runtime.Marshaler, server MgtServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.OrderIdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -181,19 +200,22 @@ func local_request_Mgt_OrderReturnable_0(ctx context.Context, marshaler runtime. func request_Mgt_OrderApprove_0(ctx context.Context, marshaler runtime.Marshaler, client MgtClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.OrderIdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.OrderApprove(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Mgt_OrderApprove_0(ctx context.Context, marshaler runtime.Marshaler, server MgtServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.OrderIdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/ec/order/pb/mgt_grpc.pb.go b/module/ec/order/pb/mgt_grpc.pb.go index 37479e6..a8b08a9 100644 --- a/module/ec/order/pb/mgt_grpc.pb.go +++ b/module/ec/order/pb/mgt_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: mgt.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/order/proto/mgt.proto package order import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -36,19 +37,19 @@ const ( // 订单管理类模块 type MgtClient interface { // 创建订单 - OrderCreate(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*StatusReply, error) + OrderCreate(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) // 修改订单 - OrderModify(ctx context.Context, in *OrderSummaryItem, opts ...grpc.CallOption) (*StatusReply, error) + OrderModify(ctx context.Context, in *protobuf.OrderSummaryItem, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) // 获取一个订单的详情数据 - OrderGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*OrderGetReply, error) + OrderGet(ctx context.Context, in *protobuf.OrderIdentRequest, opts ...grpc.CallOption) (*OrderGetReply, error) // 根据不同的类型获取店铺的订单列表 OrderListByStore(ctx context.Context, in *OrderListByStoreRequest, opts ...grpc.CallOption) (*OrderListByStoreReply, error) // 取消订单 - OrderCancel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + OrderCancel(ctx context.Context, in *protobuf.OrderIdentRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) // 退货 - OrderReturnable(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + OrderReturnable(ctx context.Context, in *protobuf.OrderIdentRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) // 订单审批 - OrderApprove(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + OrderApprove(ctx context.Context, in *protobuf.OrderIdentRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) } type mgtClient struct { @@ -59,9 +60,9 @@ func NewMgtClient(cc grpc.ClientConnInterface) MgtClient { return &mgtClient{cc} } -func (c *mgtClient) OrderCreate(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *mgtClient) OrderCreate(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Mgt_OrderCreate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -69,9 +70,9 @@ func (c *mgtClient) OrderCreate(ctx context.Context, in *CreateOrderRequest, opt return out, nil } -func (c *mgtClient) OrderModify(ctx context.Context, in *OrderSummaryItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *mgtClient) OrderModify(ctx context.Context, in *protobuf.OrderSummaryItem, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Mgt_OrderModify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -79,7 +80,7 @@ func (c *mgtClient) OrderModify(ctx context.Context, in *OrderSummaryItem, opts return out, nil } -func (c *mgtClient) OrderGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*OrderGetReply, error) { +func (c *mgtClient) OrderGet(ctx context.Context, in *protobuf.OrderIdentRequest, opts ...grpc.CallOption) (*OrderGetReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(OrderGetReply) err := c.cc.Invoke(ctx, Mgt_OrderGet_FullMethodName, in, out, cOpts...) @@ -99,9 +100,9 @@ func (c *mgtClient) OrderListByStore(ctx context.Context, in *OrderListByStoreRe return out, nil } -func (c *mgtClient) OrderCancel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *mgtClient) OrderCancel(ctx context.Context, in *protobuf.OrderIdentRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Mgt_OrderCancel_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -109,9 +110,9 @@ func (c *mgtClient) OrderCancel(ctx context.Context, in *IdentRequest, opts ...g return out, nil } -func (c *mgtClient) OrderReturnable(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *mgtClient) OrderReturnable(ctx context.Context, in *protobuf.OrderIdentRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Mgt_OrderReturnable_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -119,9 +120,9 @@ func (c *mgtClient) OrderReturnable(ctx context.Context, in *IdentRequest, opts return out, nil } -func (c *mgtClient) OrderApprove(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *mgtClient) OrderApprove(ctx context.Context, in *protobuf.OrderIdentRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Mgt_OrderApprove_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -130,59 +131,57 @@ func (c *mgtClient) OrderApprove(ctx context.Context, in *IdentRequest, opts ... } // MgtServer is the server API for Mgt service. -// All implementations must embed UnimplementedMgtServer +// All implementations should embed UnimplementedMgtServer // for forward compatibility. // // Order(订单)微服务-订单模块 // 订单管理类模块 type MgtServer interface { // 创建订单 - OrderCreate(context.Context, *CreateOrderRequest) (*StatusReply, error) + OrderCreate(context.Context, *CreateOrderRequest) (*protobuf.OrderStatusReply, error) // 修改订单 - OrderModify(context.Context, *OrderSummaryItem) (*StatusReply, error) + OrderModify(context.Context, *protobuf.OrderSummaryItem) (*protobuf.OrderStatusReply, error) // 获取一个订单的详情数据 - OrderGet(context.Context, *IdentRequest) (*OrderGetReply, error) + OrderGet(context.Context, *protobuf.OrderIdentRequest) (*OrderGetReply, error) // 根据不同的类型获取店铺的订单列表 OrderListByStore(context.Context, *OrderListByStoreRequest) (*OrderListByStoreReply, error) // 取消订单 - OrderCancel(context.Context, *IdentRequest) (*StatusReply, error) + OrderCancel(context.Context, *protobuf.OrderIdentRequest) (*protobuf.OrderStatusReply, error) // 退货 - OrderReturnable(context.Context, *IdentRequest) (*StatusReply, error) + OrderReturnable(context.Context, *protobuf.OrderIdentRequest) (*protobuf.OrderStatusReply, error) // 订单审批 - OrderApprove(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedMgtServer() + OrderApprove(context.Context, *protobuf.OrderIdentRequest) (*protobuf.OrderStatusReply, error) } -// UnimplementedMgtServer must be embedded to have +// UnimplementedMgtServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedMgtServer struct{} -func (UnimplementedMgtServer) OrderCreate(context.Context, *CreateOrderRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method OrderCreate not implemented") +func (UnimplementedMgtServer) OrderCreate(context.Context, *CreateOrderRequest) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method OrderCreate not implemented") } -func (UnimplementedMgtServer) OrderModify(context.Context, *OrderSummaryItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method OrderModify not implemented") +func (UnimplementedMgtServer) OrderModify(context.Context, *protobuf.OrderSummaryItem) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method OrderModify not implemented") } -func (UnimplementedMgtServer) OrderGet(context.Context, *IdentRequest) (*OrderGetReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method OrderGet not implemented") +func (UnimplementedMgtServer) OrderGet(context.Context, *protobuf.OrderIdentRequest) (*OrderGetReply, error) { + return nil, status.Error(codes.Unimplemented, "method OrderGet not implemented") } func (UnimplementedMgtServer) OrderListByStore(context.Context, *OrderListByStoreRequest) (*OrderListByStoreReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method OrderListByStore not implemented") + return nil, status.Error(codes.Unimplemented, "method OrderListByStore not implemented") } -func (UnimplementedMgtServer) OrderCancel(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method OrderCancel not implemented") +func (UnimplementedMgtServer) OrderCancel(context.Context, *protobuf.OrderIdentRequest) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method OrderCancel not implemented") } -func (UnimplementedMgtServer) OrderReturnable(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method OrderReturnable not implemented") +func (UnimplementedMgtServer) OrderReturnable(context.Context, *protobuf.OrderIdentRequest) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method OrderReturnable not implemented") } -func (UnimplementedMgtServer) OrderApprove(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method OrderApprove not implemented") +func (UnimplementedMgtServer) OrderApprove(context.Context, *protobuf.OrderIdentRequest) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method OrderApprove not implemented") } -func (UnimplementedMgtServer) mustEmbedUnimplementedMgtServer() {} -func (UnimplementedMgtServer) testEmbeddedByValue() {} +func (UnimplementedMgtServer) testEmbeddedByValue() {} // UnsafeMgtServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MgtServer will @@ -192,7 +191,7 @@ type UnsafeMgtServer interface { } func RegisterMgtServer(s grpc.ServiceRegistrar, srv MgtServer) { - // If the following call pancis, it indicates UnimplementedMgtServer was + // If the following call panics, it indicates UnimplementedMgtServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -221,7 +220,7 @@ func _Mgt_OrderCreate_Handler(srv interface{}, ctx context.Context, dec func(int } func _Mgt_OrderModify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OrderSummaryItem) + in := new(protobuf.OrderSummaryItem) if err := dec(in); err != nil { return nil, err } @@ -233,13 +232,13 @@ func _Mgt_OrderModify_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: Mgt_OrderModify_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MgtServer).OrderModify(ctx, req.(*OrderSummaryItem)) + return srv.(MgtServer).OrderModify(ctx, req.(*protobuf.OrderSummaryItem)) } return interceptor(ctx, in, info, handler) } func _Mgt_OrderGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.OrderIdentRequest) if err := dec(in); err != nil { return nil, err } @@ -251,7 +250,7 @@ func _Mgt_OrderGet_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Mgt_OrderGet_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MgtServer).OrderGet(ctx, req.(*IdentRequest)) + return srv.(MgtServer).OrderGet(ctx, req.(*protobuf.OrderIdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -275,7 +274,7 @@ func _Mgt_OrderListByStore_Handler(srv interface{}, ctx context.Context, dec fun } func _Mgt_OrderCancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.OrderIdentRequest) if err := dec(in); err != nil { return nil, err } @@ -287,13 +286,13 @@ func _Mgt_OrderCancel_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: Mgt_OrderCancel_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MgtServer).OrderCancel(ctx, req.(*IdentRequest)) + return srv.(MgtServer).OrderCancel(ctx, req.(*protobuf.OrderIdentRequest)) } return interceptor(ctx, in, info, handler) } func _Mgt_OrderReturnable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.OrderIdentRequest) if err := dec(in); err != nil { return nil, err } @@ -305,13 +304,13 @@ func _Mgt_OrderReturnable_Handler(srv interface{}, ctx context.Context, dec func FullMethod: Mgt_OrderReturnable_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MgtServer).OrderReturnable(ctx, req.(*IdentRequest)) + return srv.(MgtServer).OrderReturnable(ctx, req.(*protobuf.OrderIdentRequest)) } return interceptor(ctx, in, info, handler) } func _Mgt_OrderApprove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.OrderIdentRequest) if err := dec(in); err != nil { return nil, err } @@ -323,7 +322,7 @@ func _Mgt_OrderApprove_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: Mgt_OrderApprove_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MgtServer).OrderApprove(ctx, req.(*IdentRequest)) + return srv.(MgtServer).OrderApprove(ctx, req.(*protobuf.OrderIdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -365,5 +364,5 @@ var Mgt_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "mgt.proto", + Metadata: "module/ec/order/proto/mgt.proto", } diff --git a/module/ec/order/pb/summary.pb.go b/module/ec/order/pb/summary.pb.go index 5616169..1f0d6eb 100644 --- a/module/ec/order/pb/summary.pb.go +++ b/module/ec/order/pb/summary.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc (unknown) -// source: summary.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/ec/order/proto/summary.proto package order import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -33,7 +34,7 @@ type SimulateShipmentsRequest struct { func (x *SimulateShipmentsRequest) Reset() { *x = SimulateShipmentsRequest{} - mi := &file_summary_proto_msgTypes[0] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -45,7 +46,7 @@ func (x *SimulateShipmentsRequest) String() string { func (*SimulateShipmentsRequest) ProtoMessage() {} func (x *SimulateShipmentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_summary_proto_msgTypes[0] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -58,7 +59,7 @@ func (x *SimulateShipmentsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateShipmentsRequest.ProtoReflect.Descriptor instead. func (*SimulateShipmentsRequest) Descriptor() ([]byte, []int) { - return file_summary_proto_rawDescGZIP(), []int{0} + return file_module_ec_order_proto_summary_proto_rawDescGZIP(), []int{0} } func (x *SimulateShipmentsRequest) GetIdentity() string { @@ -101,7 +102,7 @@ type SubmitReply struct { func (x *SubmitReply) Reset() { *x = SubmitReply{} - mi := &file_summary_proto_msgTypes[1] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -113,7 +114,7 @@ func (x *SubmitReply) String() string { func (*SubmitReply) ProtoMessage() {} func (x *SubmitReply) ProtoReflect() protoreflect.Message { - mi := &file_summary_proto_msgTypes[1] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -126,7 +127,7 @@ func (x *SubmitReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitReply.ProtoReflect.Descriptor instead. func (*SubmitReply) Descriptor() ([]byte, []int) { - return file_summary_proto_rawDescGZIP(), []int{1} + return file_module_ec_order_proto_summary_proto_rawDescGZIP(), []int{1} } func (x *SubmitReply) GetStatus() int64 { @@ -166,7 +167,7 @@ type SimulatePayRequest struct { func (x *SimulatePayRequest) Reset() { *x = SimulatePayRequest{} - mi := &file_summary_proto_msgTypes[2] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -178,7 +179,7 @@ func (x *SimulatePayRequest) String() string { func (*SimulatePayRequest) ProtoMessage() {} func (x *SimulatePayRequest) ProtoReflect() protoreflect.Message { - mi := &file_summary_proto_msgTypes[2] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -191,7 +192,7 @@ func (x *SimulatePayRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulatePayRequest.ProtoReflect.Descriptor instead. func (*SimulatePayRequest) Descriptor() ([]byte, []int) { - return file_summary_proto_rawDescGZIP(), []int{2} + return file_module_ec_order_proto_summary_proto_rawDescGZIP(), []int{2} } func (x *SimulatePayRequest) GetIdentity() []string { @@ -219,7 +220,7 @@ type QuickCreateByProductRequest struct { func (x *QuickCreateByProductRequest) Reset() { *x = QuickCreateByProductRequest{} - mi := &file_summary_proto_msgTypes[3] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -231,7 +232,7 @@ func (x *QuickCreateByProductRequest) String() string { func (*QuickCreateByProductRequest) ProtoMessage() {} func (x *QuickCreateByProductRequest) ProtoReflect() protoreflect.Message { - mi := &file_summary_proto_msgTypes[3] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -244,7 +245,7 @@ func (x *QuickCreateByProductRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use QuickCreateByProductRequest.ProtoReflect.Descriptor instead. func (*QuickCreateByProductRequest) Descriptor() ([]byte, []int) { - return file_summary_proto_rawDescGZIP(), []int{3} + return file_module_ec_order_proto_summary_proto_rawDescGZIP(), []int{3} } func (x *QuickCreateByProductRequest) GetPartnerId() int32 { @@ -331,7 +332,7 @@ type SubmitRequest struct { func (x *SubmitRequest) Reset() { *x = SubmitRequest{} - mi := &file_summary_proto_msgTypes[4] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -343,7 +344,7 @@ func (x *SubmitRequest) String() string { func (*SubmitRequest) ProtoMessage() {} func (x *SubmitRequest) ProtoReflect() protoreflect.Message { - mi := &file_summary_proto_msgTypes[4] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -356,7 +357,7 @@ func (x *SubmitRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitRequest.ProtoReflect.Descriptor instead. func (*SubmitRequest) Descriptor() ([]byte, []int) { - return file_summary_proto_rawDescGZIP(), []int{4} + return file_module_ec_order_proto_summary_proto_rawDescGZIP(), []int{4} } func (x *SubmitRequest) GetId() []string { @@ -418,7 +419,7 @@ type OrderAddress struct { func (x *OrderAddress) Reset() { *x = OrderAddress{} - mi := &file_summary_proto_msgTypes[5] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -430,7 +431,7 @@ func (x *OrderAddress) String() string { func (*OrderAddress) ProtoMessage() {} func (x *OrderAddress) ProtoReflect() protoreflect.Message { - mi := &file_summary_proto_msgTypes[5] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -443,7 +444,7 @@ func (x *OrderAddress) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderAddress.ProtoReflect.Descriptor instead. func (*OrderAddress) Descriptor() ([]byte, []int) { - return file_summary_proto_rawDescGZIP(), []int{5} + return file_module_ec_order_proto_summary_proto_rawDescGZIP(), []int{5} } func (x *OrderAddress) GetCountry() string { @@ -510,15 +511,15 @@ func (x *OrderAddress) GetZipCode() string { } type SummaryGetReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Summary *OrderSummaryItem `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"` // 订单概要详情 + state protoimpl.MessageState `protogen:"open.v1"` + Summary *protobuf.OrderSummaryItem `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"` // 订单概要详情 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SummaryGetReply) Reset() { *x = SummaryGetReply{} - mi := &file_summary_proto_msgTypes[6] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -530,7 +531,7 @@ func (x *SummaryGetReply) String() string { func (*SummaryGetReply) ProtoMessage() {} func (x *SummaryGetReply) ProtoReflect() protoreflect.Message { - mi := &file_summary_proto_msgTypes[6] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -543,10 +544,10 @@ func (x *SummaryGetReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SummaryGetReply.ProtoReflect.Descriptor instead. func (*SummaryGetReply) Descriptor() ([]byte, []int) { - return file_summary_proto_rawDescGZIP(), []int{6} + return file_module_ec_order_proto_summary_proto_rawDescGZIP(), []int{6} } -func (x *SummaryGetReply) GetSummary() *OrderSummaryItem { +func (x *SummaryGetReply) GetSummary() *protobuf.OrderSummaryItem { if x != nil { return x.Summary } @@ -565,7 +566,7 @@ type SummaryListRequest struct { func (x *SummaryListRequest) Reset() { *x = SummaryListRequest{} - mi := &file_summary_proto_msgTypes[7] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -577,7 +578,7 @@ func (x *SummaryListRequest) String() string { func (*SummaryListRequest) ProtoMessage() {} func (x *SummaryListRequest) ProtoReflect() protoreflect.Message { - mi := &file_summary_proto_msgTypes[7] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -590,7 +591,7 @@ func (x *SummaryListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SummaryListRequest.ProtoReflect.Descriptor instead. func (*SummaryListRequest) Descriptor() ([]byte, []int) { - return file_summary_proto_rawDescGZIP(), []int{7} + return file_module_ec_order_proto_summary_proto_rawDescGZIP(), []int{7} } func (x *SummaryListRequest) GetPayType() int32 { @@ -622,16 +623,16 @@ func (x *SummaryListRequest) GetPageSize() int64 { } type SummaryListReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - Data []*OrderSummaryItem `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` // 订单列表 + state protoimpl.MessageState `protogen:"open.v1"` + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + Data []*protobuf.OrderSummaryItem `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` // 订单列表 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SummaryListReply) Reset() { *x = SummaryListReply{} - mi := &file_summary_proto_msgTypes[8] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -643,7 +644,7 @@ func (x *SummaryListReply) String() string { func (*SummaryListReply) ProtoMessage() {} func (x *SummaryListReply) ProtoReflect() protoreflect.Message { - mi := &file_summary_proto_msgTypes[8] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -656,7 +657,7 @@ func (x *SummaryListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SummaryListReply.ProtoReflect.Descriptor instead. func (*SummaryListReply) Descriptor() ([]byte, []int) { - return file_summary_proto_rawDescGZIP(), []int{8} + return file_module_ec_order_proto_summary_proto_rawDescGZIP(), []int{8} } func (x *SummaryListReply) GetCount() int32 { @@ -666,7 +667,7 @@ func (x *SummaryListReply) GetCount() int32 { return 0 } -func (x *SummaryListReply) GetData() []*OrderSummaryItem { +func (x *SummaryListReply) GetData() []*protobuf.OrderSummaryItem { if x != nil { return x.Data } @@ -686,7 +687,7 @@ type ConfirmRequest struct { func (x *ConfirmRequest) Reset() { *x = ConfirmRequest{} - mi := &file_summary_proto_msgTypes[9] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -698,7 +699,7 @@ func (x *ConfirmRequest) String() string { func (*ConfirmRequest) ProtoMessage() {} func (x *ConfirmRequest) ProtoReflect() protoreflect.Message { - mi := &file_summary_proto_msgTypes[9] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -711,7 +712,7 @@ func (x *ConfirmRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfirmRequest.ProtoReflect.Descriptor instead. func (*ConfirmRequest) Descriptor() ([]byte, []int) { - return file_summary_proto_rawDescGZIP(), []int{9} + return file_module_ec_order_proto_summary_proto_rawDescGZIP(), []int{9} } func (x *ConfirmRequest) GetOrderNo() string { @@ -758,7 +759,7 @@ type ConfirmReply struct { func (x *ConfirmReply) Reset() { *x = ConfirmReply{} - mi := &file_summary_proto_msgTypes[10] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -770,7 +771,7 @@ func (x *ConfirmReply) String() string { func (*ConfirmReply) ProtoMessage() {} func (x *ConfirmReply) ProtoReflect() protoreflect.Message { - mi := &file_summary_proto_msgTypes[10] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -783,7 +784,7 @@ func (x *ConfirmReply) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfirmReply.ProtoReflect.Descriptor instead. func (*ConfirmReply) Descriptor() ([]byte, []int) { - return file_summary_proto_rawDescGZIP(), []int{10} + return file_module_ec_order_proto_summary_proto_rawDescGZIP(), []int{10} } func (x *ConfirmReply) GetTotalPrice() int64 { @@ -803,7 +804,7 @@ type CancelRequest struct { func (x *CancelRequest) Reset() { *x = CancelRequest{} - mi := &file_summary_proto_msgTypes[11] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -815,7 +816,7 @@ func (x *CancelRequest) String() string { func (*CancelRequest) ProtoMessage() {} func (x *CancelRequest) ProtoReflect() protoreflect.Message { - mi := &file_summary_proto_msgTypes[11] + mi := &file_module_ec_order_proto_summary_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -828,7 +829,7 @@ func (x *CancelRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CancelRequest.ProtoReflect.Descriptor instead. func (*CancelRequest) Descriptor() ([]byte, []int) { - return file_summary_proto_rawDescGZIP(), []int{11} + return file_module_ec_order_proto_summary_proto_rawDescGZIP(), []int{11} } func (x *CancelRequest) GetOrderNo() string { @@ -845,11 +846,11 @@ func (x *CancelRequest) GetType() string { return "" } -var File_summary_proto protoreflect.FileDescriptor +var File_module_ec_order_proto_summary_proto protoreflect.FileDescriptor -const file_summary_proto_rawDesc = "" + +const file_module_ec_order_proto_summary_proto_rawDesc = "" + "\n" + - "\x16ec/order/summary.proto\x12\x05order\x1a\x12order/blocks.proto\"\xa8\x01\n" + + "#module/ec/order/proto/summary.proto\x12\x05order\x1a\x15protobuf/blocks.proto\"\xa8\x01\n" + "\x18SimulateShipmentsRequest\x12\x1a\n" + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\"\n" + "\fitem_idetity\x18\x02 \x01(\tR\fitem_idetity\x12(\n" + @@ -894,17 +895,17 @@ const file_summary_proto_rawDesc = "" + "\acontact\x18\x06 \x01(\tR\acontact\x12\x14\n" + "\x05phone\x18\a \x01(\tR\x05phone\x12\x14\n" + "\x05email\x18\b \x01(\tR\x05email\x12\x19\n" + - "\bzip_code\x18\t \x01(\tR\azipCode\"D\n" + - "\x0fSummaryGetReply\x121\n" + - "\asummary\x18\x01 \x01(\v2\x17.order.OrderSummaryItemR\asummary\"\x8c\x01\n" + + "\bzip_code\x18\t \x01(\tR\azipCode\"E\n" + + "\x0fSummaryGetReply\x122\n" + + "\asummary\x18\x01 \x01(\v2\x18.blocks.OrderSummaryItemR\asummary\"\x8c\x01\n" + "\x12SummaryListRequest\x12\x1a\n" + "\bpay_type\x18\x01 \x01(\x05R\bpay_type\x12\"\n" + "\forder_status\x18\x02 \x01(\x05R\forder_status\x12\x18\n" + "\apage_no\x18\x03 \x01(\x03R\apage_no\x12\x1c\n" + - "\tpage_size\x18\x04 \x01(\x03R\tpage_size\"U\n" + + "\tpage_size\x18\x04 \x01(\x03R\tpage_size\"V\n" + "\x10SummaryListReply\x12\x14\n" + - "\x05count\x18\x01 \x01(\x05R\x05count\x12+\n" + - "\x04data\x18\x02 \x03(\v2\x17.order.OrderSummaryItemR\x04data\"\xc0\x01\n" + + "\x05count\x18\x01 \x01(\x05R\x05count\x12,\n" + + "\x04data\x18\x02 \x03(\v2\x18.blocks.OrderSummaryItemR\x04data\"\xc0\x01\n" + "\x0eConfirmRequest\x12\x1a\n" + "\border_no\x18\x01 \x01(\tR\border_no\x12*\n" + "\x10address_identity\x18\x02 \x01(\tR\x10address_identity\x12(\n" + @@ -915,33 +916,33 @@ const file_summary_proto_rawDesc = "" + "\vtotal_price\x18\x01 \x01(\x03R\vtotal_price\"?\n" + "\rCancelRequest\x12\x1a\n" + "\border_no\x18\x01 \x01(\tR\border_no\x12\x12\n" + - "\x04type\x18\x02 \x01(\tR\x04type2\xed\x04\n" + - "\aSummary\x12P\n" + - "\x14QuickCreateByProduct\x12\".order.QuickCreateByProductRequest\x1a\x12.order.StatusReply\"\x00\x124\n" + - "\x06Submit\x12\x14.order.SubmitRequest\x1a\x12.order.StatusReply\"\x00\x12+\n" + - "\x05Check\x12\f.order.Empty\x1a\x12.order.StatusReply\"\x00\x124\n" + - "\x03Get\x12\x13.order.IdentRequest\x1a\x16.order.SummaryGetReply\"\x00\x12<\n" + + "\x04type\x18\x02 \x01(\tR\x04type2\xa4\x05\n" + + "\aSummary\x12V\n" + + "\x14QuickCreateByProduct\x12\".order.QuickCreateByProductRequest\x1a\x18.blocks.OrderStatusReply\"\x00\x12:\n" + + "\x06Submit\x12\x14.order.SubmitRequest\x1a\x18.blocks.OrderStatusReply\"\x00\x122\n" + + "\x05Check\x12\r.blocks.Empty\x1a\x18.blocks.OrderStatusReply\"\x00\x12:\n" + + "\x03Get\x12\x19.blocks.OrderIdentRequest\x1a\x16.order.SummaryGetReply\"\x00\x12<\n" + "\x04List\x12\x19.order.SummaryListRequest\x1a\x17.order.SummaryListReply\"\x00\x127\n" + - "\aConfirm\x12\x15.order.ConfirmRequest\x1a\x13.order.ConfirmReply\"\x00\x124\n" + - "\x06Cancel\x12\x14.order.CancelRequest\x1a\x12.order.StatusReply\"\x00\x12>\n" + - "\vSimulatePay\x12\x19.order.SimulatePayRequest\x1a\x12.order.StatusReply\"\x00\x12J\n" + - "\x11SimulateShipments\x12\x1f.order.SimulateShipmentsRequest\x1a\x12.order.StatusReply\"\x00\x12>\n" + - "\x11SimulateReceiving\x12\x13.order.IdentRequest\x1a\x12.order.StatusReply\"\x00B\tZ\a./orderb\x06proto3" + "\aConfirm\x12\x15.order.ConfirmRequest\x1a\x13.order.ConfirmReply\"\x00\x12:\n" + + "\x06Cancel\x12\x14.order.CancelRequest\x1a\x18.blocks.OrderStatusReply\"\x00\x12D\n" + + "\vSimulatePay\x12\x19.order.SimulatePayRequest\x1a\x18.blocks.OrderStatusReply\"\x00\x12P\n" + + "\x11SimulateShipments\x12\x1f.order.SimulateShipmentsRequest\x1a\x18.blocks.OrderStatusReply\"\x00\x12J\n" + + "\x11SimulateReceiving\x12\x19.blocks.OrderIdentRequest\x1a\x18.blocks.OrderStatusReply\"\x00B#Z!bsm/full/module/ec/order/pb;orderb\x06proto3" var ( - file_summary_proto_rawDescOnce sync.Once - file_summary_proto_rawDescData []byte + file_module_ec_order_proto_summary_proto_rawDescOnce sync.Once + file_module_ec_order_proto_summary_proto_rawDescData []byte ) -func file_summary_proto_rawDescGZIP() []byte { - file_summary_proto_rawDescOnce.Do(func() { - file_summary_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_summary_proto_rawDesc), len(file_summary_proto_rawDesc))) +func file_module_ec_order_proto_summary_proto_rawDescGZIP() []byte { + file_module_ec_order_proto_summary_proto_rawDescOnce.Do(func() { + file_module_ec_order_proto_summary_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_order_proto_summary_proto_rawDesc), len(file_module_ec_order_proto_summary_proto_rawDesc))) }) - return file_summary_proto_rawDescData + return file_module_ec_order_proto_summary_proto_rawDescData } -var file_summary_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_summary_proto_goTypes = []any{ +var file_module_ec_order_proto_summary_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_module_ec_order_proto_summary_proto_goTypes = []any{ (*SimulateShipmentsRequest)(nil), // 0: order.SimulateShipmentsRequest (*SubmitReply)(nil), // 1: order.SubmitReply (*SimulatePayRequest)(nil), // 2: order.SimulatePayRequest @@ -954,35 +955,35 @@ var file_summary_proto_goTypes = []any{ (*ConfirmRequest)(nil), // 9: order.ConfirmRequest (*ConfirmReply)(nil), // 10: order.ConfirmReply (*CancelRequest)(nil), // 11: order.CancelRequest - (*OrderSummaryItem)(nil), // 12: order.OrderSummaryItem - (*Empty)(nil), // 13: order.Empty - (*IdentRequest)(nil), // 14: order.IdentRequest - (*StatusReply)(nil), // 15: order.StatusReply + (*protobuf.OrderSummaryItem)(nil), // 12: blocks.OrderSummaryItem + (*protobuf.Empty)(nil), // 13: blocks.Empty + (*protobuf.OrderIdentRequest)(nil), // 14: blocks.OrderIdentRequest + (*protobuf.OrderStatusReply)(nil), // 15: blocks.OrderStatusReply } -var file_summary_proto_depIdxs = []int32{ +var file_module_ec_order_proto_summary_proto_depIdxs = []int32{ 5, // 0: order.SubmitRequest.address:type_name -> order.OrderAddress - 12, // 1: order.SummaryGetReply.summary:type_name -> order.OrderSummaryItem - 12, // 2: order.SummaryListReply.data:type_name -> order.OrderSummaryItem + 12, // 1: order.SummaryGetReply.summary:type_name -> blocks.OrderSummaryItem + 12, // 2: order.SummaryListReply.data:type_name -> blocks.OrderSummaryItem 3, // 3: order.Summary.QuickCreateByProduct:input_type -> order.QuickCreateByProductRequest 4, // 4: order.Summary.Submit:input_type -> order.SubmitRequest - 13, // 5: order.Summary.Check:input_type -> order.Empty - 14, // 6: order.Summary.Get:input_type -> order.IdentRequest + 13, // 5: order.Summary.Check:input_type -> blocks.Empty + 14, // 6: order.Summary.Get:input_type -> blocks.OrderIdentRequest 7, // 7: order.Summary.List:input_type -> order.SummaryListRequest 9, // 8: order.Summary.Confirm:input_type -> order.ConfirmRequest 11, // 9: order.Summary.Cancel:input_type -> order.CancelRequest 2, // 10: order.Summary.SimulatePay:input_type -> order.SimulatePayRequest 0, // 11: order.Summary.SimulateShipments:input_type -> order.SimulateShipmentsRequest - 14, // 12: order.Summary.SimulateReceiving:input_type -> order.IdentRequest - 15, // 13: order.Summary.QuickCreateByProduct:output_type -> order.StatusReply - 15, // 14: order.Summary.Submit:output_type -> order.StatusReply - 15, // 15: order.Summary.Check:output_type -> order.StatusReply + 14, // 12: order.Summary.SimulateReceiving:input_type -> blocks.OrderIdentRequest + 15, // 13: order.Summary.QuickCreateByProduct:output_type -> blocks.OrderStatusReply + 15, // 14: order.Summary.Submit:output_type -> blocks.OrderStatusReply + 15, // 15: order.Summary.Check:output_type -> blocks.OrderStatusReply 6, // 16: order.Summary.Get:output_type -> order.SummaryGetReply 8, // 17: order.Summary.List:output_type -> order.SummaryListReply 10, // 18: order.Summary.Confirm:output_type -> order.ConfirmReply - 15, // 19: order.Summary.Cancel:output_type -> order.StatusReply - 15, // 20: order.Summary.SimulatePay:output_type -> order.StatusReply - 15, // 21: order.Summary.SimulateShipments:output_type -> order.StatusReply - 15, // 22: order.Summary.SimulateReceiving:output_type -> order.StatusReply + 15, // 19: order.Summary.Cancel:output_type -> blocks.OrderStatusReply + 15, // 20: order.Summary.SimulatePay:output_type -> blocks.OrderStatusReply + 15, // 21: order.Summary.SimulateShipments:output_type -> blocks.OrderStatusReply + 15, // 22: order.Summary.SimulateReceiving:output_type -> blocks.OrderStatusReply 13, // [13:23] is the sub-list for method output_type 3, // [3:13] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name @@ -990,27 +991,26 @@ var file_summary_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_summary_proto_init() } -func file_summary_proto_init() { - if File_summary_proto != nil { +func init() { file_module_ec_order_proto_summary_proto_init() } +func file_module_ec_order_proto_summary_proto_init() { + if File_module_ec_order_proto_summary_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_summary_proto_rawDesc), len(file_summary_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_order_proto_summary_proto_rawDesc), len(file_module_ec_order_proto_summary_proto_rawDesc)), NumEnums: 0, NumMessages: 12, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_summary_proto_goTypes, - DependencyIndexes: file_summary_proto_depIdxs, - MessageInfos: file_summary_proto_msgTypes, + GoTypes: file_module_ec_order_proto_summary_proto_goTypes, + DependencyIndexes: file_module_ec_order_proto_summary_proto_depIdxs, + MessageInfos: file_module_ec_order_proto_summary_proto_msgTypes, }.Build() - File_summary_proto = out.File - file_summary_proto_goTypes = nil - file_summary_proto_depIdxs = nil + File_module_ec_order_proto_summary_proto = out.File + file_module_ec_order_proto_summary_proto_goTypes = nil + file_module_ec_order_proto_summary_proto_depIdxs = nil } diff --git a/module/ec/order/pb/summary.pb.gw.go b/module/ec/order/pb/summary.pb.gw.go index 97f6afc..3413205 100644 --- a/module/ec/order/pb/summary.pb.gw.go +++ b/module/ec/order/pb/summary.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: summary.proto +// source: module/ec/order/proto/summary.proto /* Package order is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package order import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -43,6 +44,9 @@ func request_Summary_QuickCreateByProduct_0(ctx context.Context, marshaler runti if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.QuickCreateByProduct(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -67,6 +71,9 @@ func request_Summary_Submit_0(ctx context.Context, marshaler runtime.Marshaler, if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Submit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -85,19 +92,22 @@ func local_request_Summary_Submit_0(ctx context.Context, marshaler runtime.Marsh func request_Summary_Check_0(ctx context.Context, marshaler runtime.Marshaler, client SummaryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Check(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Summary_Check_0(ctx context.Context, marshaler runtime.Marshaler, server SummaryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -109,19 +119,22 @@ func local_request_Summary_Check_0(ctx context.Context, marshaler runtime.Marsha func request_Summary_Get_0(ctx context.Context, marshaler runtime.Marshaler, client SummaryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.OrderIdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Summary_Get_0(ctx context.Context, marshaler runtime.Marshaler, server SummaryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.OrderIdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -139,6 +152,9 @@ func request_Summary_List_0(ctx context.Context, marshaler runtime.Marshaler, cl if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.List(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -163,6 +179,9 @@ func request_Summary_Confirm_0(ctx context.Context, marshaler runtime.Marshaler, if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Confirm(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -187,6 +206,9 @@ func request_Summary_Cancel_0(ctx context.Context, marshaler runtime.Marshaler, if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.Cancel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -211,6 +233,9 @@ func request_Summary_SimulatePay_0(ctx context.Context, marshaler runtime.Marsha if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.SimulatePay(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -235,6 +260,9 @@ func request_Summary_SimulateShipments_0(ctx context.Context, marshaler runtime. if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.SimulateShipments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -253,19 +281,22 @@ func local_request_Summary_SimulateShipments_0(ctx context.Context, marshaler ru func request_Summary_SimulateReceiving_0(ctx context.Context, marshaler runtime.Marshaler, client SummaryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.OrderIdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.SimulateReceiving(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Summary_SimulateReceiving_0(ctx context.Context, marshaler runtime.Marshaler, server SummaryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.OrderIdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/ec/order/pb/summary_grpc.pb.go b/module/ec/order/pb/summary_grpc.pb.go index 89dfa51..7fe6987 100644 --- a/module/ec/order/pb/summary_grpc.pb.go +++ b/module/ec/order/pb/summary_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: summary.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/ec/order/proto/summary.proto package order import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -39,25 +40,25 @@ const ( // C端模块 type SummaryClient interface { // 快速创建一个店铺订单 - QuickCreateByProduct(ctx context.Context, in *QuickCreateByProductRequest, opts ...grpc.CallOption) (*StatusReply, error) + QuickCreateByProduct(ctx context.Context, in *QuickCreateByProductRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) // 将购物车的数据提交生成订单 - Submit(ctx context.Context, in *SubmitRequest, opts ...grpc.CallOption) (*StatusReply, error) + Submit(ctx context.Context, in *SubmitRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) // 检测是否有未确认及付款的订单 - Check(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StatusReply, error) + Check(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) // 获取一个订单的详情数据 - Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*SummaryGetReply, error) + Get(ctx context.Context, in *protobuf.OrderIdentRequest, opts ...grpc.CallOption) (*SummaryGetReply, error) // 根据不同的类型获取我的订单列表 List(ctx context.Context, in *SummaryListRequest, opts ...grpc.CallOption) (*SummaryListReply, error) // 确认订单,物流,优惠卷等其它信息 Confirm(ctx context.Context, in *ConfirmRequest, opts ...grpc.CallOption) (*ConfirmReply, error) // 取消订单 - Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*StatusReply, error) + Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) // 模拟支付 - SimulatePay(ctx context.Context, in *SimulatePayRequest, opts ...grpc.CallOption) (*StatusReply, error) + SimulatePay(ctx context.Context, in *SimulatePayRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) // 模拟发货 - SimulateShipments(ctx context.Context, in *SimulateShipmentsRequest, opts ...grpc.CallOption) (*StatusReply, error) + SimulateShipments(ctx context.Context, in *SimulateShipmentsRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) // 模拟收货 - SimulateReceiving(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + SimulateReceiving(ctx context.Context, in *protobuf.OrderIdentRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) } type summaryClient struct { @@ -68,9 +69,9 @@ func NewSummaryClient(cc grpc.ClientConnInterface) SummaryClient { return &summaryClient{cc} } -func (c *summaryClient) QuickCreateByProduct(ctx context.Context, in *QuickCreateByProductRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *summaryClient) QuickCreateByProduct(ctx context.Context, in *QuickCreateByProductRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Summary_QuickCreateByProduct_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -78,9 +79,9 @@ func (c *summaryClient) QuickCreateByProduct(ctx context.Context, in *QuickCreat return out, nil } -func (c *summaryClient) Submit(ctx context.Context, in *SubmitRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *summaryClient) Submit(ctx context.Context, in *SubmitRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Summary_Submit_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -88,9 +89,9 @@ func (c *summaryClient) Submit(ctx context.Context, in *SubmitRequest, opts ...g return out, nil } -func (c *summaryClient) Check(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *summaryClient) Check(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Summary_Check_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -98,7 +99,7 @@ func (c *summaryClient) Check(ctx context.Context, in *Empty, opts ...grpc.CallO return out, nil } -func (c *summaryClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*SummaryGetReply, error) { +func (c *summaryClient) Get(ctx context.Context, in *protobuf.OrderIdentRequest, opts ...grpc.CallOption) (*SummaryGetReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SummaryGetReply) err := c.cc.Invoke(ctx, Summary_Get_FullMethodName, in, out, cOpts...) @@ -128,9 +129,9 @@ func (c *summaryClient) Confirm(ctx context.Context, in *ConfirmRequest, opts .. return out, nil } -func (c *summaryClient) Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *summaryClient) Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Summary_Cancel_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -138,9 +139,9 @@ func (c *summaryClient) Cancel(ctx context.Context, in *CancelRequest, opts ...g return out, nil } -func (c *summaryClient) SimulatePay(ctx context.Context, in *SimulatePayRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *summaryClient) SimulatePay(ctx context.Context, in *SimulatePayRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Summary_SimulatePay_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -148,9 +149,9 @@ func (c *summaryClient) SimulatePay(ctx context.Context, in *SimulatePayRequest, return out, nil } -func (c *summaryClient) SimulateShipments(ctx context.Context, in *SimulateShipmentsRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *summaryClient) SimulateShipments(ctx context.Context, in *SimulateShipmentsRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Summary_SimulateShipments_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -158,9 +159,9 @@ func (c *summaryClient) SimulateShipments(ctx context.Context, in *SimulateShipm return out, nil } -func (c *summaryClient) SimulateReceiving(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *summaryClient) SimulateReceiving(ctx context.Context, in *protobuf.OrderIdentRequest, opts ...grpc.CallOption) (*protobuf.OrderStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.OrderStatusReply) err := c.cc.Invoke(ctx, Summary_SimulateReceiving_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -169,74 +170,72 @@ func (c *summaryClient) SimulateReceiving(ctx context.Context, in *IdentRequest, } // SummaryServer is the server API for Summary service. -// All implementations must embed UnimplementedSummaryServer +// All implementations should embed UnimplementedSummaryServer // for forward compatibility. // // Order(订单)微服务-订单模块 // C端模块 type SummaryServer interface { // 快速创建一个店铺订单 - QuickCreateByProduct(context.Context, *QuickCreateByProductRequest) (*StatusReply, error) + QuickCreateByProduct(context.Context, *QuickCreateByProductRequest) (*protobuf.OrderStatusReply, error) // 将购物车的数据提交生成订单 - Submit(context.Context, *SubmitRequest) (*StatusReply, error) + Submit(context.Context, *SubmitRequest) (*protobuf.OrderStatusReply, error) // 检测是否有未确认及付款的订单 - Check(context.Context, *Empty) (*StatusReply, error) + Check(context.Context, *protobuf.Empty) (*protobuf.OrderStatusReply, error) // 获取一个订单的详情数据 - Get(context.Context, *IdentRequest) (*SummaryGetReply, error) + Get(context.Context, *protobuf.OrderIdentRequest) (*SummaryGetReply, error) // 根据不同的类型获取我的订单列表 List(context.Context, *SummaryListRequest) (*SummaryListReply, error) // 确认订单,物流,优惠卷等其它信息 Confirm(context.Context, *ConfirmRequest) (*ConfirmReply, error) // 取消订单 - Cancel(context.Context, *CancelRequest) (*StatusReply, error) + Cancel(context.Context, *CancelRequest) (*protobuf.OrderStatusReply, error) // 模拟支付 - SimulatePay(context.Context, *SimulatePayRequest) (*StatusReply, error) + SimulatePay(context.Context, *SimulatePayRequest) (*protobuf.OrderStatusReply, error) // 模拟发货 - SimulateShipments(context.Context, *SimulateShipmentsRequest) (*StatusReply, error) + SimulateShipments(context.Context, *SimulateShipmentsRequest) (*protobuf.OrderStatusReply, error) // 模拟收货 - SimulateReceiving(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedSummaryServer() + SimulateReceiving(context.Context, *protobuf.OrderIdentRequest) (*protobuf.OrderStatusReply, error) } -// UnimplementedSummaryServer must be embedded to have +// UnimplementedSummaryServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedSummaryServer struct{} -func (UnimplementedSummaryServer) QuickCreateByProduct(context.Context, *QuickCreateByProductRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method QuickCreateByProduct not implemented") +func (UnimplementedSummaryServer) QuickCreateByProduct(context.Context, *QuickCreateByProductRequest) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method QuickCreateByProduct not implemented") } -func (UnimplementedSummaryServer) Submit(context.Context, *SubmitRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Submit not implemented") +func (UnimplementedSummaryServer) Submit(context.Context, *SubmitRequest) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Submit not implemented") } -func (UnimplementedSummaryServer) Check(context.Context, *Empty) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Check not implemented") +func (UnimplementedSummaryServer) Check(context.Context, *protobuf.Empty) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Check not implemented") } -func (UnimplementedSummaryServer) Get(context.Context, *IdentRequest) (*SummaryGetReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +func (UnimplementedSummaryServer) Get(context.Context, *protobuf.OrderIdentRequest) (*SummaryGetReply, error) { + return nil, status.Error(codes.Unimplemented, "method Get not implemented") } func (UnimplementedSummaryServer) List(context.Context, *SummaryListRequest) (*SummaryListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method List not implemented") + return nil, status.Error(codes.Unimplemented, "method List not implemented") } func (UnimplementedSummaryServer) Confirm(context.Context, *ConfirmRequest) (*ConfirmReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Confirm not implemented") + return nil, status.Error(codes.Unimplemented, "method Confirm not implemented") } -func (UnimplementedSummaryServer) Cancel(context.Context, *CancelRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Cancel not implemented") +func (UnimplementedSummaryServer) Cancel(context.Context, *CancelRequest) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Cancel not implemented") } -func (UnimplementedSummaryServer) SimulatePay(context.Context, *SimulatePayRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SimulatePay not implemented") +func (UnimplementedSummaryServer) SimulatePay(context.Context, *SimulatePayRequest) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SimulatePay not implemented") } -func (UnimplementedSummaryServer) SimulateShipments(context.Context, *SimulateShipmentsRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SimulateShipments not implemented") +func (UnimplementedSummaryServer) SimulateShipments(context.Context, *SimulateShipmentsRequest) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SimulateShipments not implemented") } -func (UnimplementedSummaryServer) SimulateReceiving(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SimulateReceiving not implemented") +func (UnimplementedSummaryServer) SimulateReceiving(context.Context, *protobuf.OrderIdentRequest) (*protobuf.OrderStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SimulateReceiving not implemented") } -func (UnimplementedSummaryServer) mustEmbedUnimplementedSummaryServer() {} -func (UnimplementedSummaryServer) testEmbeddedByValue() {} +func (UnimplementedSummaryServer) testEmbeddedByValue() {} // UnsafeSummaryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SummaryServer will @@ -246,7 +245,7 @@ type UnsafeSummaryServer interface { } func RegisterSummaryServer(s grpc.ServiceRegistrar, srv SummaryServer) { - // If the following call pancis, it indicates UnimplementedSummaryServer was + // If the following call panics, it indicates UnimplementedSummaryServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -293,7 +292,7 @@ func _Summary_Submit_Handler(srv interface{}, ctx context.Context, dec func(inte } func _Summary_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -305,13 +304,13 @@ func _Summary_Check_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Summary_Check_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SummaryServer).Check(ctx, req.(*Empty)) + return srv.(SummaryServer).Check(ctx, req.(*protobuf.Empty)) } return interceptor(ctx, in, info, handler) } func _Summary_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.OrderIdentRequest) if err := dec(in); err != nil { return nil, err } @@ -323,7 +322,7 @@ func _Summary_Get_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Summary_Get_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SummaryServer).Get(ctx, req.(*IdentRequest)) + return srv.(SummaryServer).Get(ctx, req.(*protobuf.OrderIdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -419,7 +418,7 @@ func _Summary_SimulateShipments_Handler(srv interface{}, ctx context.Context, de } func _Summary_SimulateReceiving_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.OrderIdentRequest) if err := dec(in); err != nil { return nil, err } @@ -431,7 +430,7 @@ func _Summary_SimulateReceiving_Handler(srv interface{}, ctx context.Context, de FullMethod: Summary_SimulateReceiving_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SummaryServer).SimulateReceiving(ctx, req.(*IdentRequest)) + return srv.(SummaryServer).SimulateReceiving(ctx, req.(*protobuf.OrderIdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -485,5 +484,5 @@ var Summary_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "summary.proto", + Metadata: "module/ec/order/proto/summary.proto", } diff --git a/module/ec/order/proto/blocks.proto b/module/ec/order/proto/blocks.proto deleted file mode 100644 index 6971eae..0000000 --- a/module/ec/order/proto/blocks.proto +++ /dev/null @@ -1,94 +0,0 @@ -syntax = "proto3"; -package order; -option go_package = "./order"; - -message Empty{ -} - -message FetchRequest { - int64 page_no=1 [json_name="page_no"]; // 页数 - int64 page_size=2 [json_name="page_size"]; // 每页记录数 - map params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11 -} - -message IdentRequest{ - int64 id = 1; // 唯一ID - string identity = 2; // 唯一码 - string reason = 3;// 退款原因 - int32 approve = 4;// 状态:-2:未通过,0:默认 1:申请退款 2:申请退货 3:申请退款退货 4:申请通过 - string agency = 5 ;// 代理 - string store_identity = 6;// 店铺标识 -} - -message StatusReply{ - int32 code = 1; // 状态码 - string identity=2; // 标识码 - string message=3; //状态说明 - int64 timeseq=4; // 响应时间序列 - string reason=5; // 退款原因 -} - - -message OrderSummaryItem { - int64 id = 1; // ID - string order_no = 2 [json_name="order_no"]; // 订单编号 - int64 partner_id =3 [json_name="partner_id"]; // 合伙人ID - string identity = 4; // 定单唯一标识 - int64 total_price = 7 [json_name="total_price"]; // 总价 - int64 trans_price = 8 [json_name="trans_price"]; // 交易金额 - int64 refund_price = 9 [json_name="refund_price"]; // 退款金额 - int64 logistics_fee = 11 [json_name="logistics_fee"]; // 物流费用 - int64 coupon_amount = 12 [json_name="coupon_amount"]; // 优惠券金额 - string remark = 13; // 备注 - int32 status = 14; // 订单状态:all全部订单,notarize确认中,sign签约中,signed签约完成,fulfil履约中,accomplish完成 - - string logistics_number = 15 [json_name="logistics_number"]; // 物流号 - string address_identity = 16 [json_name="address_identity"]; // 地址库唯一标识 - string county = 17; // 国家 - string province = 18; // 省 - string city = 19; // 市 - string area = 20; // 县 - string address = 21; // 详细地址 - string contact = 22; // 联系人 - string phone = 23; // 联系电话 - string delivery_time = 24 [json_name="delivery_time"]; // 配送时间 - string delivery_identity = 25 [json_name="delivery_identity"]; // 配送工作人员唯一标识 - - int32 pay_type = 26 [json_name="pay_type"]; // 支付类型:0:待支付,1:线下支付,2:微信 3:支付宝,4:余额 - int64 pay_amount = 27 [json_name="pay_amount"]; // 支付金额 - string pay_trade_no = 28 [json_name="pay_trade_no"]; // 支付交易号 - string pay_time = 29 [json_name="pay_time"]; // 支付时间 - string pay_remark = 30 [json_name="pay_remark"]; // 支付备注 - - string created = 31; // 创建时间 - string updated = 32; // 最后创建时间 - repeated OrderDetails details =33; //订单商品 - string addr = 34; // 简单地址信息 - string car_identity = 35 [json_name="car_identity"]; // 配送车辆唯一标识 - string delivery_address = 36 [json_name="delivery_address"]; // 配送地址 - string brand = 37; // 配送车辆品牌 - string version = 38; // 配送车辆型号 - string license_number = 39 [json_name="license_number"]; // 配送车辆车牌号 - string member_name = 40 [json_name="member_name"]; // 配送员姓名 - string member_phone = 41 [json_name="member_phone"]; // 配送员电话 - - int32 approve = 42;// 审批 -} - -message OrderDetails{ - int64 id = 1; // ID - int64 product_id = 2 [json_name="product_id"]; // 商品规格ID - string spec_no = 3 [json_name="spec_no"]; // 商品规格编号 - string spec = 4; // 商品规格名称 - int64 type = 5; // 商品类型 - string title = 6; //商品名称 - string cover_image = 7 [json_name="cover_image"]; //商品封面图片 - int64 sales_price = 8 [json_name="sales_price"]; //商品销售价格 - string product_args = 9 [json_name="product_args"]; // 商品参数 - int64 number = 10; // 数量 - int64 unit_price = 11 [json_name="unit_price"]; // 单价 - int64 spec_id = 12 [json_name="spec_id"]; // 商品规格id - string product_identity = 13 [json_name="product_identity"]; // 产品唯一标识 - int64 gas_types = 14 [json_name="gas_types"];// 商品类型:1其它商品 2按瓶计费,3 按kg计费 - int64 total_price = 15 [json_name="total_price"];// 总价 -} diff --git a/module/ec/order/proto/cart.proto b/module/ec/order/proto/cart.proto index e26ef38..8391e32 100644 --- a/module/ec/order/proto/cart.proto +++ b/module/ec/order/proto/cart.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package order; -option go_package = "./order"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/order/pb;order"; +import "protobuf/blocks.proto"; // Order(订单)微服务-购物车 service Cart { @@ -9,13 +9,13 @@ service Cart { rpc Fetch(CartGetRequest) returns (CartGetReply) {}; // 将商品增加至购物车 - rpc Create(CartAddRequest) returns (StatusReply) {}; + rpc Create(CartAddRequest) returns (blocks.OrderStatusReply) {}; // 修改购物车中的商品数量 - rpc Modify(CartSetRequest) returns (StatusReply) {}; + rpc Modify(CartSetRequest) returns (blocks.OrderStatusReply) {}; // 删除购物车中的商品 - rpc Delete(CartDelRequest) returns (StatusReply) {}; + rpc Delete(CartDelRequest) returns (blocks.OrderStatusReply) {}; } message CartGetRequest { @@ -40,7 +40,7 @@ message CartItem{ int32 number = 8; // 数量 int64 unit_price = 9 [json_name="unit_price"]; // 实际单价 int64 total_price = 10 [json_name="total_price"]; // 总价 - string identity = 11; // 购物车商品信息唯一标识 + string identity = 11; // 购物车商品信息唯一标识 } message CartAddRequest { diff --git a/module/ec/order/proto/coupon.proto b/module/ec/order/proto/coupon.proto index 9bce206..fbbfc3a 100644 --- a/module/ec/order/proto/coupon.proto +++ b/module/ec/order/proto/coupon.proto @@ -1,7 +1,6 @@ syntax = "proto3"; package order; -option go_package = "./order"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/order/pb;order"; // Order(订单)微服务-优惠卷 service Coupon { @@ -27,4 +26,4 @@ message CouponItem{ string started =6; // 开始时间 string expired =7; // 结束时间 string status =8; // 状态 -} \ No newline at end of file +} diff --git a/module/ec/order/proto/mgt.proto b/module/ec/order/proto/mgt.proto index 7c4479d..47f8328 100644 --- a/module/ec/order/proto/mgt.proto +++ b/module/ec/order/proto/mgt.proto @@ -1,32 +1,32 @@ syntax = "proto3"; package order; -option go_package = "./order"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/order/pb;order"; +import "protobuf/blocks.proto"; // Order(订单)微服务-订单模块 // 订单管理类模块 service Mgt { - + // 创建订单 - rpc OrderCreate(CreateOrderRequest) returns (StatusReply) {}; + rpc OrderCreate(CreateOrderRequest) returns (blocks.OrderStatusReply) {}; // 修改订单 - rpc OrderModify(OrderSummaryItem) returns (StatusReply) {}; + rpc OrderModify(blocks.OrderSummaryItem) returns (blocks.OrderStatusReply) {}; // 获取一个订单的详情数据 - rpc OrderGet(IdentRequest) returns (OrderGetReply) {}; + rpc OrderGet(blocks.OrderIdentRequest) returns (OrderGetReply) {}; // 根据不同的类型获取店铺的订单列表 rpc OrderListByStore(OrderListByStoreRequest) returns (OrderListByStoreReply) {}; // 取消订单 - rpc OrderCancel(IdentRequest) returns (StatusReply) {}; + rpc OrderCancel(blocks.OrderIdentRequest) returns (blocks.OrderStatusReply) {}; // 退货 - rpc OrderReturnable(IdentRequest) returns (StatusReply) {}; + rpc OrderReturnable(blocks.OrderIdentRequest) returns (blocks.OrderStatusReply) {}; // 订单审批 - rpc OrderApprove(IdentRequest) returns (StatusReply) {}; + rpc OrderApprove(blocks.OrderIdentRequest) returns (blocks.OrderStatusReply) {}; } @@ -46,7 +46,7 @@ message SpecList { message OrderGetReply { - OrderSummaryItem summary = 1; // 订单概要详情 + blocks.OrderSummaryItem summary = 1; // 订单概要详情 } @@ -64,5 +64,5 @@ message OrderListByStoreRequest { message OrderListByStoreReply { int32 count = 1; - repeated OrderSummaryItem data = 2; // 订单列表 + repeated blocks.OrderSummaryItem data = 2; // 订单列表 } diff --git a/module/ec/order/proto/summary.proto b/module/ec/order/proto/summary.proto index 914d030..679018f 100644 --- a/module/ec/order/proto/summary.proto +++ b/module/ec/order/proto/summary.proto @@ -1,23 +1,23 @@ syntax = "proto3"; package order; -option go_package = "./order"; -import "blocks.proto"; +option go_package = "bsm/full/module/ec/order/pb;order"; +import "protobuf/blocks.proto"; // Order(订单)微服务-订单模块 // C端模块 service Summary { - + // 快速创建一个店铺订单 - rpc QuickCreateByProduct(QuickCreateByProductRequest) returns (StatusReply) {}; + rpc QuickCreateByProduct(QuickCreateByProductRequest) returns (blocks.OrderStatusReply) {}; // 将购物车的数据提交生成订单 - rpc Submit(SubmitRequest) returns (StatusReply) {}; + rpc Submit(SubmitRequest) returns (blocks.OrderStatusReply) {}; // 检测是否有未确认及付款的订单 - rpc Check(Empty) returns (StatusReply) {}; + rpc Check(blocks.Empty) returns (blocks.OrderStatusReply) {}; // 获取一个订单的详情数据 - rpc Get(IdentRequest) returns (SummaryGetReply) {}; + rpc Get(blocks.OrderIdentRequest) returns (SummaryGetReply) {}; // 根据不同的类型获取我的订单列表 rpc List(SummaryListRequest) returns (SummaryListReply) {}; @@ -27,16 +27,16 @@ service Summary { // 取消订单 - rpc Cancel(CancelRequest) returns (StatusReply) {}; - + rpc Cancel(CancelRequest) returns (blocks.OrderStatusReply) {}; + // 模拟支付 - rpc SimulatePay(SimulatePayRequest) returns (StatusReply) {}; + rpc SimulatePay(SimulatePayRequest) returns (blocks.OrderStatusReply) {}; // 模拟发货 - rpc SimulateShipments(SimulateShipmentsRequest) returns (StatusReply) {}; + rpc SimulateShipments(SimulateShipmentsRequest) returns (blocks.OrderStatusReply) {}; // 模拟收货 - rpc SimulateReceiving(IdentRequest) returns (StatusReply) {}; + rpc SimulateReceiving(blocks.OrderIdentRequest) returns (blocks.OrderStatusReply) {}; } message SimulateShipmentsRequest{ string identity = 1; // 订单唯一标识 @@ -72,7 +72,7 @@ message SubmitRequest { string store_identity =3 [json_name="store_identity"]; // 店铺唯一标识 string address_identity = 4 [json_name="address_identity"]; // 地址库唯一标识 string delivery_time=5 [json_name="delivery_time"]; // 预约配送时间 - OrderAddress address = 6;// 地址详情 + OrderAddress address = 6;// 地址详情 } message OrderAddress { @@ -88,7 +88,7 @@ message OrderAddress { } message SummaryGetReply { - OrderSummaryItem summary = 1; // 订单概要详情 + blocks.OrderSummaryItem summary = 1; // 订单概要详情 } @@ -101,7 +101,7 @@ message SummaryListRequest { message SummaryListReply { int32 count = 1; - repeated OrderSummaryItem data = 2; // 订单列表 + repeated blocks.OrderSummaryItem data = 2; // 订单列表 } message ConfirmRequest { diff --git a/module/finance/wallet/pb/alipay.pb.go b/module/finance/wallet/pb/alipay.pb.go index a191bc2..9308262 100644 --- a/module/finance/wallet/pb/alipay.pb.go +++ b/module/finance/wallet/pb/alipay.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: alipay.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/finance/wallet/proto/alipay.proto package wallet @@ -34,7 +34,7 @@ type AlipayTradeWapPayRequest struct { func (x *AlipayTradeWapPayRequest) Reset() { *x = AlipayTradeWapPayRequest{} - mi := &file_alipay_proto_msgTypes[0] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +46,7 @@ func (x *AlipayTradeWapPayRequest) String() string { func (*AlipayTradeWapPayRequest) ProtoMessage() {} func (x *AlipayTradeWapPayRequest) ProtoReflect() protoreflect.Message { - mi := &file_alipay_proto_msgTypes[0] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +59,7 @@ func (x *AlipayTradeWapPayRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AlipayTradeWapPayRequest.ProtoReflect.Descriptor instead. func (*AlipayTradeWapPayRequest) Descriptor() ([]byte, []int) { - return file_alipay_proto_rawDescGZIP(), []int{0} + return file_module_finance_wallet_proto_alipay_proto_rawDescGZIP(), []int{0} } func (x *AlipayTradeWapPayRequest) GetUserIdentification() string { @@ -106,7 +106,7 @@ type AlipayTradeWapPayReply struct { func (x *AlipayTradeWapPayReply) Reset() { *x = AlipayTradeWapPayReply{} - mi := &file_alipay_proto_msgTypes[1] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -118,7 +118,7 @@ func (x *AlipayTradeWapPayReply) String() string { func (*AlipayTradeWapPayReply) ProtoMessage() {} func (x *AlipayTradeWapPayReply) ProtoReflect() protoreflect.Message { - mi := &file_alipay_proto_msgTypes[1] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -131,7 +131,7 @@ func (x *AlipayTradeWapPayReply) ProtoReflect() protoreflect.Message { // Deprecated: Use AlipayTradeWapPayReply.ProtoReflect.Descriptor instead. func (*AlipayTradeWapPayReply) Descriptor() ([]byte, []int) { - return file_alipay_proto_rawDescGZIP(), []int{1} + return file_module_finance_wallet_proto_alipay_proto_rawDescGZIP(), []int{1} } func (x *AlipayTradeWapPayReply) GetPayUrl() string { @@ -154,7 +154,7 @@ type AlipayTradePagePayRequest struct { func (x *AlipayTradePagePayRequest) Reset() { *x = AlipayTradePagePayRequest{} - mi := &file_alipay_proto_msgTypes[2] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -166,7 +166,7 @@ func (x *AlipayTradePagePayRequest) String() string { func (*AlipayTradePagePayRequest) ProtoMessage() {} func (x *AlipayTradePagePayRequest) ProtoReflect() protoreflect.Message { - mi := &file_alipay_proto_msgTypes[2] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -179,7 +179,7 @@ func (x *AlipayTradePagePayRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AlipayTradePagePayRequest.ProtoReflect.Descriptor instead. func (*AlipayTradePagePayRequest) Descriptor() ([]byte, []int) { - return file_alipay_proto_rawDescGZIP(), []int{2} + return file_module_finance_wallet_proto_alipay_proto_rawDescGZIP(), []int{2} } func (x *AlipayTradePagePayRequest) GetUserIdentification() string { @@ -226,7 +226,7 @@ type AlipayTradePagePayReply struct { func (x *AlipayTradePagePayReply) Reset() { *x = AlipayTradePagePayReply{} - mi := &file_alipay_proto_msgTypes[3] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -238,7 +238,7 @@ func (x *AlipayTradePagePayReply) String() string { func (*AlipayTradePagePayReply) ProtoMessage() {} func (x *AlipayTradePagePayReply) ProtoReflect() protoreflect.Message { - mi := &file_alipay_proto_msgTypes[3] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -251,7 +251,7 @@ func (x *AlipayTradePagePayReply) ProtoReflect() protoreflect.Message { // Deprecated: Use AlipayTradePagePayReply.ProtoReflect.Descriptor instead. func (*AlipayTradePagePayReply) Descriptor() ([]byte, []int) { - return file_alipay_proto_rawDescGZIP(), []int{3} + return file_module_finance_wallet_proto_alipay_proto_rawDescGZIP(), []int{3} } func (x *AlipayTradePagePayReply) GetPayUrl() string { @@ -273,7 +273,7 @@ type AlipayTradeAppPayRequest struct { func (x *AlipayTradeAppPayRequest) Reset() { *x = AlipayTradeAppPayRequest{} - mi := &file_alipay_proto_msgTypes[4] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -285,7 +285,7 @@ func (x *AlipayTradeAppPayRequest) String() string { func (*AlipayTradeAppPayRequest) ProtoMessage() {} func (x *AlipayTradeAppPayRequest) ProtoReflect() protoreflect.Message { - mi := &file_alipay_proto_msgTypes[4] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -298,7 +298,7 @@ func (x *AlipayTradeAppPayRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AlipayTradeAppPayRequest.ProtoReflect.Descriptor instead. func (*AlipayTradeAppPayRequest) Descriptor() ([]byte, []int) { - return file_alipay_proto_rawDescGZIP(), []int{4} + return file_module_finance_wallet_proto_alipay_proto_rawDescGZIP(), []int{4} } func (x *AlipayTradeAppPayRequest) GetUserIdentification() string { @@ -338,7 +338,7 @@ type AlipayTradeAppPayReply struct { func (x *AlipayTradeAppPayReply) Reset() { *x = AlipayTradeAppPayReply{} - mi := &file_alipay_proto_msgTypes[5] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -350,7 +350,7 @@ func (x *AlipayTradeAppPayReply) String() string { func (*AlipayTradeAppPayReply) ProtoMessage() {} func (x *AlipayTradeAppPayReply) ProtoReflect() protoreflect.Message { - mi := &file_alipay_proto_msgTypes[5] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -363,7 +363,7 @@ func (x *AlipayTradeAppPayReply) ProtoReflect() protoreflect.Message { // Deprecated: Use AlipayTradeAppPayReply.ProtoReflect.Descriptor instead. func (*AlipayTradeAppPayReply) Descriptor() ([]byte, []int) { - return file_alipay_proto_rawDescGZIP(), []int{5} + return file_module_finance_wallet_proto_alipay_proto_rawDescGZIP(), []int{5} } func (x *AlipayTradeAppPayReply) GetPayParam() string { @@ -385,7 +385,7 @@ type AlipayUniTransferRequest struct { func (x *AlipayUniTransferRequest) Reset() { *x = AlipayUniTransferRequest{} - mi := &file_alipay_proto_msgTypes[6] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -397,7 +397,7 @@ func (x *AlipayUniTransferRequest) String() string { func (*AlipayUniTransferRequest) ProtoMessage() {} func (x *AlipayUniTransferRequest) ProtoReflect() protoreflect.Message { - mi := &file_alipay_proto_msgTypes[6] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -410,7 +410,7 @@ func (x *AlipayUniTransferRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AlipayUniTransferRequest.ProtoReflect.Descriptor instead. func (*AlipayUniTransferRequest) Descriptor() ([]byte, []int) { - return file_alipay_proto_rawDescGZIP(), []int{6} + return file_module_finance_wallet_proto_alipay_proto_rawDescGZIP(), []int{6} } func (x *AlipayUniTransferRequest) GetUserIdentification() string { @@ -449,7 +449,7 @@ type AlipayUniTransferReply struct { func (x *AlipayUniTransferReply) Reset() { *x = AlipayUniTransferReply{} - mi := &file_alipay_proto_msgTypes[7] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -461,7 +461,7 @@ func (x *AlipayUniTransferReply) String() string { func (*AlipayUniTransferReply) ProtoMessage() {} func (x *AlipayUniTransferReply) ProtoReflect() protoreflect.Message { - mi := &file_alipay_proto_msgTypes[7] + mi := &file_module_finance_wallet_proto_alipay_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -474,14 +474,14 @@ func (x *AlipayUniTransferReply) ProtoReflect() protoreflect.Message { // Deprecated: Use AlipayUniTransferReply.ProtoReflect.Descriptor instead. func (*AlipayUniTransferReply) Descriptor() ([]byte, []int) { - return file_alipay_proto_rawDescGZIP(), []int{7} + return file_module_finance_wallet_proto_alipay_proto_rawDescGZIP(), []int{7} } -var File_alipay_proto protoreflect.FileDescriptor +var File_module_finance_wallet_proto_alipay_proto protoreflect.FileDescriptor -const file_alipay_proto_rawDesc = "" + +const file_module_finance_wallet_proto_alipay_proto_rawDesc = "" + "\n" + - "\x1bfinance/wallet/alipay.proto\x12\x06wallet\"\xbf\x01\n" + + "(module/finance/wallet/proto/alipay.proto\x12\x06wallet\"\xbf\x01\n" + "\x18AlipayTradeWapPayRequest\x12/\n" + "\x13user_identification\x18\x01 \x01(\tR\x12userIdentification\x12\x16\n" + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12 \n" + @@ -519,23 +519,22 @@ const file_alipay_proto_rawDesc = "" + "\x06WapPay\x12 .wallet.AlipayTradeWapPayRequest\x1a\x1e.wallet.AlipayTradeWapPayReply\"\x00\x12O\n" + "\aPagePay\x12!.wallet.AlipayTradePagePayRequest\x1a\x1f.wallet.AlipayTradePagePayReply\"\x00\x12L\n" + "\x06AppPay\x12 .wallet.AlipayTradeAppPayRequest\x1a\x1e.wallet.AlipayTradeAppPayReply\"\x00\x12N\n" + - "\bTransfer\x12 .wallet.AlipayUniTransferRequest\x1a\x1e.wallet.AlipayUniTransferReply\"\x00B\n" + - "Z\b.;walletb\x06proto3" + "\bTransfer\x12 .wallet.AlipayUniTransferRequest\x1a\x1e.wallet.AlipayUniTransferReply\"\x00B*Z(bsm/full/module/finance/wallet/pb;walletb\x06proto3" var ( - file_alipay_proto_rawDescOnce sync.Once - file_alipay_proto_rawDescData []byte + file_module_finance_wallet_proto_alipay_proto_rawDescOnce sync.Once + file_module_finance_wallet_proto_alipay_proto_rawDescData []byte ) -func file_alipay_proto_rawDescGZIP() []byte { - file_alipay_proto_rawDescOnce.Do(func() { - file_alipay_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_alipay_proto_rawDesc), len(file_alipay_proto_rawDesc))) +func file_module_finance_wallet_proto_alipay_proto_rawDescGZIP() []byte { + file_module_finance_wallet_proto_alipay_proto_rawDescOnce.Do(func() { + file_module_finance_wallet_proto_alipay_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_finance_wallet_proto_alipay_proto_rawDesc), len(file_module_finance_wallet_proto_alipay_proto_rawDesc))) }) - return file_alipay_proto_rawDescData + return file_module_finance_wallet_proto_alipay_proto_rawDescData } -var file_alipay_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_alipay_proto_goTypes = []any{ +var file_module_finance_wallet_proto_alipay_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_module_finance_wallet_proto_alipay_proto_goTypes = []any{ (*AlipayTradeWapPayRequest)(nil), // 0: wallet.AlipayTradeWapPayRequest (*AlipayTradeWapPayReply)(nil), // 1: wallet.AlipayTradeWapPayReply (*AlipayTradePagePayRequest)(nil), // 2: wallet.AlipayTradePagePayRequest @@ -545,7 +544,7 @@ var file_alipay_proto_goTypes = []any{ (*AlipayUniTransferRequest)(nil), // 6: wallet.AlipayUniTransferRequest (*AlipayUniTransferReply)(nil), // 7: wallet.AlipayUniTransferReply } -var file_alipay_proto_depIdxs = []int32{ +var file_module_finance_wallet_proto_alipay_proto_depIdxs = []int32{ 0, // 0: wallet.Alipay.WapPay:input_type -> wallet.AlipayTradeWapPayRequest 2, // 1: wallet.Alipay.PagePay:input_type -> wallet.AlipayTradePagePayRequest 4, // 2: wallet.Alipay.AppPay:input_type -> wallet.AlipayTradeAppPayRequest @@ -561,26 +560,26 @@ var file_alipay_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_alipay_proto_init() } -func file_alipay_proto_init() { - if File_alipay_proto != nil { +func init() { file_module_finance_wallet_proto_alipay_proto_init() } +func file_module_finance_wallet_proto_alipay_proto_init() { + if File_module_finance_wallet_proto_alipay_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_alipay_proto_rawDesc), len(file_alipay_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_finance_wallet_proto_alipay_proto_rawDesc), len(file_module_finance_wallet_proto_alipay_proto_rawDesc)), NumEnums: 0, NumMessages: 8, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_alipay_proto_goTypes, - DependencyIndexes: file_alipay_proto_depIdxs, - MessageInfos: file_alipay_proto_msgTypes, + GoTypes: file_module_finance_wallet_proto_alipay_proto_goTypes, + DependencyIndexes: file_module_finance_wallet_proto_alipay_proto_depIdxs, + MessageInfos: file_module_finance_wallet_proto_alipay_proto_msgTypes, }.Build() - File_alipay_proto = out.File - file_alipay_proto_goTypes = nil - file_alipay_proto_depIdxs = nil + File_module_finance_wallet_proto_alipay_proto = out.File + file_module_finance_wallet_proto_alipay_proto_goTypes = nil + file_module_finance_wallet_proto_alipay_proto_depIdxs = nil } diff --git a/module/finance/wallet/pb/alipay.pb.gw.go b/module/finance/wallet/pb/alipay.pb.gw.go index 2c1ca8e..28039e7 100644 --- a/module/finance/wallet/pb/alipay.pb.gw.go +++ b/module/finance/wallet/pb/alipay.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: alipay.proto +// source: module/finance/wallet/proto/alipay.proto /* Package wallet is a reverse proxy. diff --git a/module/finance/wallet/pb/alipay_grpc.pb.go b/module/finance/wallet/pb/alipay_grpc.pb.go index e8c7538..3d46a49 100644 --- a/module/finance/wallet/pb/alipay_grpc.pb.go +++ b/module/finance/wallet/pb/alipay_grpc.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: alipay.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/finance/wallet/proto/alipay.proto package wallet @@ -29,13 +29,13 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type AlipayClient interface { - //支付宝wap支付 + // 支付宝wap支付 WapPay(ctx context.Context, in *AlipayTradeWapPayRequest, opts ...grpc.CallOption) (*AlipayTradeWapPayReply, error) - //支付宝电脑网站支付 + // 支付宝电脑网站支付 PagePay(ctx context.Context, in *AlipayTradePagePayRequest, opts ...grpc.CallOption) (*AlipayTradePagePayReply, error) - //支付宝APP支付 + // 支付宝APP支付 AppPay(ctx context.Context, in *AlipayTradeAppPayRequest, opts ...grpc.CallOption) (*AlipayTradeAppPayReply, error) - //支付宝转账到个人支付宝账户 + // 支付宝转账到个人支付宝账户 Transfer(ctx context.Context, in *AlipayUniTransferRequest, opts ...grpc.CallOption) (*AlipayUniTransferReply, error) } @@ -88,21 +88,20 @@ func (c *alipayClient) Transfer(ctx context.Context, in *AlipayUniTransferReques } // AlipayServer is the server API for Alipay service. -// All implementations must embed UnimplementedAlipayServer +// All implementations should embed UnimplementedAlipayServer // for forward compatibility. type AlipayServer interface { - //支付宝wap支付 + // 支付宝wap支付 WapPay(context.Context, *AlipayTradeWapPayRequest) (*AlipayTradeWapPayReply, error) - //支付宝电脑网站支付 + // 支付宝电脑网站支付 PagePay(context.Context, *AlipayTradePagePayRequest) (*AlipayTradePagePayReply, error) - //支付宝APP支付 + // 支付宝APP支付 AppPay(context.Context, *AlipayTradeAppPayRequest) (*AlipayTradeAppPayReply, error) - //支付宝转账到个人支付宝账户 + // 支付宝转账到个人支付宝账户 Transfer(context.Context, *AlipayUniTransferRequest) (*AlipayUniTransferReply, error) - mustEmbedUnimplementedAlipayServer() } -// UnimplementedAlipayServer must be embedded to have +// UnimplementedAlipayServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -110,19 +109,18 @@ type AlipayServer interface { type UnimplementedAlipayServer struct{} func (UnimplementedAlipayServer) WapPay(context.Context, *AlipayTradeWapPayRequest) (*AlipayTradeWapPayReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method WapPay not implemented") + return nil, status.Error(codes.Unimplemented, "method WapPay not implemented") } func (UnimplementedAlipayServer) PagePay(context.Context, *AlipayTradePagePayRequest) (*AlipayTradePagePayReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method PagePay not implemented") + return nil, status.Error(codes.Unimplemented, "method PagePay not implemented") } func (UnimplementedAlipayServer) AppPay(context.Context, *AlipayTradeAppPayRequest) (*AlipayTradeAppPayReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method AppPay not implemented") + return nil, status.Error(codes.Unimplemented, "method AppPay not implemented") } func (UnimplementedAlipayServer) Transfer(context.Context, *AlipayUniTransferRequest) (*AlipayUniTransferReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") + return nil, status.Error(codes.Unimplemented, "method Transfer not implemented") } -func (UnimplementedAlipayServer) mustEmbedUnimplementedAlipayServer() {} -func (UnimplementedAlipayServer) testEmbeddedByValue() {} +func (UnimplementedAlipayServer) testEmbeddedByValue() {} // UnsafeAlipayServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AlipayServer will @@ -132,7 +130,7 @@ type UnsafeAlipayServer interface { } func RegisterAlipayServer(s grpc.ServiceRegistrar, srv AlipayServer) { - // If the following call pancis, it indicates UnimplementedAlipayServer was + // If the following call panics, it indicates UnimplementedAlipayServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -239,5 +237,5 @@ var Alipay_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "alipay.proto", + Metadata: "module/finance/wallet/proto/alipay.proto", } diff --git a/module/finance/wallet/pb/blocks.pb.go b/module/finance/wallet/pb/blocks.pb.go deleted file mode 100644 index c4d7352..0000000 --- a/module/finance/wallet/pb/blocks.pb.go +++ /dev/null @@ -1,408 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: blocks.proto - -package wallet - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type FetchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PageNo int64 `protobuf:"varint,1,opt,name=page_no,json=pageNo,proto3" json:"page_no,omitempty"` // 页数 - PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页记录数 - Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:category_id=?,vlaue=11 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchRequest) Reset() { - *x = FetchRequest{} - mi := &file_blocks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRequest) ProtoMessage() {} - -func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. -func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{0} -} - -func (x *FetchRequest) GetPageNo() int64 { - if x != nil { - return x.PageNo - } - return 0 -} - -func (x *FetchRequest) GetPageSize() int64 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *FetchRequest) GetParams() map[string]string { - if x != nil { - return x.Params - } - return nil -} - -type IdentRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IdentRequest) Reset() { - *x = IdentRequest{} - mi := &file_blocks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IdentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IdentRequest) ProtoMessage() {} - -func (x *IdentRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. -func (*IdentRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{1} -} - -func (x *IdentRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *IdentRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -type VersionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 时序版本号 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *VersionRequest) Reset() { - *x = VersionRequest{} - mi := &file_blocks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *VersionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersionRequest) ProtoMessage() {} - -func (x *VersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. -func (*VersionRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{2} -} - -func (x *VersionRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type SearchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` //关键词 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchRequest) Reset() { - *x = SearchRequest{} - mi := &file_blocks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchRequest) ProtoMessage() {} - -func (x *SearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. -func (*SearchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{3} -} - -func (x *SearchRequest) GetKeyword() string { - if x != nil { - return x.Keyword - } - return "" -} - -type StatusReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // 状态码 - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 状态说明 - Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` // 数据 - Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusReply) Reset() { - *x = StatusReply{} - mi := &file_blocks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusReply) ProtoMessage() {} - -func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. -func (*StatusReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{4} -} - -func (x *StatusReply) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *StatusReply) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *StatusReply) GetDetails() string { - if x != nil { - return x.Details - } - return "" -} - -func (x *StatusReply) GetTimeseq() int64 { - if x != nil { - return x.Timeseq - } - return 0 -} - -type Empty struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Empty) Reset() { - *x = Empty{} - mi := &file_blocks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Empty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Empty) ProtoMessage() {} - -func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{5} -} - -var File_blocks_proto protoreflect.FileDescriptor - -const file_blocks_proto_rawDesc = "" + - "\n" + - "\x13wallet/blocks.proto\x12\x06wallet\"\xb9\x01\n" + - "\fFetchRequest\x12\x17\n" + - "\apage_no\x18\x01 \x01(\x03R\x06pageNo\x12\x1b\n" + - "\tpage_size\x18\x02 \x01(\x03R\bpageSize\x128\n" + - "\x06params\x18\x03 \x03(\v2 .wallet.FetchRequest.ParamsEntryR\x06params\x1a9\n" + - "\vParamsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" + - "\fIdentRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\"*\n" + - "\x0eVersionRequest\x12\x18\n" + - "\aversion\x18\x01 \x01(\x03R\aversion\")\n" + - "\rSearchRequest\x12\x18\n" + - "\akeyword\x18\x01 \x01(\tR\akeyword\"o\n" + - "\vStatusReply\x12\x12\n" + - "\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessage\x12\x18\n" + - "\adetails\x18\x03 \x01(\tR\adetails\x12\x18\n" + - "\atimeseq\x18\x04 \x01(\x03R\atimeseq\"\a\n" + - "\x05EmptyB\n" + - "Z\b.;walletb\x06proto3" - -var ( - file_blocks_proto_rawDescOnce sync.Once - file_blocks_proto_rawDescData []byte -) - -func file_blocks_proto_rawDescGZIP() []byte { - file_blocks_proto_rawDescOnce.Do(func() { - file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc))) - }) - return file_blocks_proto_rawDescData -} - -var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_blocks_proto_goTypes = []any{ - (*FetchRequest)(nil), // 0: wallet.FetchRequest - (*IdentRequest)(nil), // 1: wallet.IdentRequest - (*VersionRequest)(nil), // 2: wallet.VersionRequest - (*SearchRequest)(nil), // 3: wallet.SearchRequest - (*StatusReply)(nil), // 4: wallet.StatusReply - (*Empty)(nil), // 5: wallet.Empty - nil, // 6: wallet.FetchRequest.ParamsEntry -} -var file_blocks_proto_depIdxs = []int32{ - 6, // 0: wallet.FetchRequest.params:type_name -> wallet.FetchRequest.ParamsEntry - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_blocks_proto_init() } -func file_blocks_proto_init() { - if File_blocks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_blocks_proto_goTypes, - DependencyIndexes: file_blocks_proto_depIdxs, - MessageInfos: file_blocks_proto_msgTypes, - }.Build() - File_blocks_proto = out.File - file_blocks_proto_goTypes = nil - file_blocks_proto_depIdxs = nil -} diff --git a/module/finance/wallet/pb/blocks_compat.go b/module/finance/wallet/pb/blocks_compat.go new file mode 100644 index 0000000..8398ded --- /dev/null +++ b/module/finance/wallet/pb/blocks_compat.go @@ -0,0 +1,10 @@ +package wallet + +import blocks "bsm/full/protobuf" + +type Empty = blocks.Empty +type FetchRequest = blocks.FetchRequest +type IdentRequest = blocks.IdentRequest +type VersionRequest = blocks.VersionRequest +type SearchRequest = blocks.SearchRequest +type StatusReply = blocks.StatusReply diff --git a/module/finance/wallet/pb/payment.pb.go b/module/finance/wallet/pb/payment.pb.go index 72da666..302aa67 100644 --- a/module/finance/wallet/pb/payment.pb.go +++ b/module/finance/wallet/pb/payment.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: payment.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/finance/wallet/proto/payment.proto package wallet import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -30,7 +31,7 @@ type WayRequest struct { func (x *WayRequest) Reset() { *x = WayRequest{} - mi := &file_payment_proto_msgTypes[0] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -42,7 +43,7 @@ func (x *WayRequest) String() string { func (*WayRequest) ProtoMessage() {} func (x *WayRequest) ProtoReflect() protoreflect.Message { - mi := &file_payment_proto_msgTypes[0] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55,7 +56,7 @@ func (x *WayRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WayRequest.ProtoReflect.Descriptor instead. func (*WayRequest) Descriptor() ([]byte, []int) { - return file_payment_proto_rawDescGZIP(), []int{0} + return file_module_finance_wallet_proto_payment_proto_rawDescGZIP(), []int{0} } func (x *WayRequest) GetPlatform() string { @@ -74,7 +75,7 @@ type WayReply struct { func (x *WayReply) Reset() { *x = WayReply{} - mi := &file_payment_proto_msgTypes[1] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -86,7 +87,7 @@ func (x *WayReply) String() string { func (*WayReply) ProtoMessage() {} func (x *WayReply) ProtoReflect() protoreflect.Message { - mi := &file_payment_proto_msgTypes[1] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -99,7 +100,7 @@ func (x *WayReply) ProtoReflect() protoreflect.Message { // Deprecated: Use WayReply.ProtoReflect.Descriptor instead. func (*WayReply) Descriptor() ([]byte, []int) { - return file_payment_proto_rawDescGZIP(), []int{1} + return file_module_finance_wallet_proto_payment_proto_rawDescGZIP(), []int{1} } func (x *WayReply) GetWay() []*WayItem { @@ -121,7 +122,7 @@ type WayItem struct { func (x *WayItem) Reset() { *x = WayItem{} - mi := &file_payment_proto_msgTypes[2] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -133,7 +134,7 @@ func (x *WayItem) String() string { func (*WayItem) ProtoMessage() {} func (x *WayItem) ProtoReflect() protoreflect.Message { - mi := &file_payment_proto_msgTypes[2] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -146,7 +147,7 @@ func (x *WayItem) ProtoReflect() protoreflect.Message { // Deprecated: Use WayItem.ProtoReflect.Descriptor instead. func (*WayItem) Descriptor() ([]byte, []int) { - return file_payment_proto_rawDescGZIP(), []int{2} + return file_module_finance_wallet_proto_payment_proto_rawDescGZIP(), []int{2} } func (x *WayItem) GetIdent() string { @@ -193,7 +194,7 @@ type PaymentItem struct { func (x *PaymentItem) Reset() { *x = PaymentItem{} - mi := &file_payment_proto_msgTypes[3] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -205,7 +206,7 @@ func (x *PaymentItem) String() string { func (*PaymentItem) ProtoMessage() {} func (x *PaymentItem) ProtoReflect() protoreflect.Message { - mi := &file_payment_proto_msgTypes[3] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -218,7 +219,7 @@ func (x *PaymentItem) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentItem.ProtoReflect.Descriptor instead. func (*PaymentItem) Descriptor() ([]byte, []int) { - return file_payment_proto_rawDescGZIP(), []int{3} + return file_module_finance_wallet_proto_payment_proto_rawDescGZIP(), []int{3} } func (x *PaymentItem) GetOrderNo() string { @@ -291,7 +292,7 @@ type ChargeRequest struct { func (x *ChargeRequest) Reset() { *x = ChargeRequest{} - mi := &file_payment_proto_msgTypes[4] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -303,7 +304,7 @@ func (x *ChargeRequest) String() string { func (*ChargeRequest) ProtoMessage() {} func (x *ChargeRequest) ProtoReflect() protoreflect.Message { - mi := &file_payment_proto_msgTypes[4] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -316,7 +317,7 @@ func (x *ChargeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ChargeRequest.ProtoReflect.Descriptor instead. func (*ChargeRequest) Descriptor() ([]byte, []int) { - return file_payment_proto_rawDescGZIP(), []int{4} + return file_module_finance_wallet_proto_payment_proto_rawDescGZIP(), []int{4} } func (x *ChargeRequest) GetAmount() int64 { @@ -376,7 +377,7 @@ type OrderRequest struct { func (x *OrderRequest) Reset() { *x = OrderRequest{} - mi := &file_payment_proto_msgTypes[5] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -388,7 +389,7 @@ func (x *OrderRequest) String() string { func (*OrderRequest) ProtoMessage() {} func (x *OrderRequest) ProtoReflect() protoreflect.Message { - mi := &file_payment_proto_msgTypes[5] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -401,7 +402,7 @@ func (x *OrderRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderRequest.ProtoReflect.Descriptor instead. func (*OrderRequest) Descriptor() ([]byte, []int) { - return file_payment_proto_rawDescGZIP(), []int{5} + return file_module_finance_wallet_proto_payment_proto_rawDescGZIP(), []int{5} } func (x *OrderRequest) GetOrderNo() string { @@ -465,7 +466,7 @@ type CallbackRequest struct { func (x *CallbackRequest) Reset() { *x = CallbackRequest{} - mi := &file_payment_proto_msgTypes[6] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -477,7 +478,7 @@ func (x *CallbackRequest) String() string { func (*CallbackRequest) ProtoMessage() {} func (x *CallbackRequest) ProtoReflect() protoreflect.Message { - mi := &file_payment_proto_msgTypes[6] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -490,7 +491,7 @@ func (x *CallbackRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CallbackRequest.ProtoReflect.Descriptor instead. func (*CallbackRequest) Descriptor() ([]byte, []int) { - return file_payment_proto_rawDescGZIP(), []int{6} + return file_module_finance_wallet_proto_payment_proto_rawDescGZIP(), []int{6} } func (x *CallbackRequest) GetId() int64 { @@ -531,7 +532,7 @@ type PaymentReply struct { func (x *PaymentReply) Reset() { *x = PaymentReply{} - mi := &file_payment_proto_msgTypes[7] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -543,7 +544,7 @@ func (x *PaymentReply) String() string { func (*PaymentReply) ProtoMessage() {} func (x *PaymentReply) ProtoReflect() protoreflect.Message { - mi := &file_payment_proto_msgTypes[7] + mi := &file_module_finance_wallet_proto_payment_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -556,7 +557,7 @@ func (x *PaymentReply) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentReply.ProtoReflect.Descriptor instead. func (*PaymentReply) Descriptor() ([]byte, []int) { - return file_payment_proto_rawDescGZIP(), []int{7} + return file_module_finance_wallet_proto_payment_proto_rawDescGZIP(), []int{7} } func (x *PaymentReply) GetCode() int64 { @@ -573,11 +574,11 @@ func (x *PaymentReply) GetResult() map[string]string { return nil } -var File_payment_proto protoreflect.FileDescriptor +var File_module_finance_wallet_proto_payment_proto protoreflect.FileDescriptor -const file_payment_proto_rawDesc = "" + +const file_module_finance_wallet_proto_payment_proto_rawDesc = "" + "\n" + - "\x1cfinance/wallet/payment.proto\x12\x06wallet\x1a\x13wallet/blocks.proto\"(\n" + + ")module/finance/wallet/proto/payment.proto\x12\x06wallet\x1a\x15protobuf/blocks.proto\"(\n" + "\n" + "WayRequest\x12\x1a\n" + "\bplatform\x18\x01 \x01(\tR\bplatform\"-\n" + @@ -627,47 +628,46 @@ const file_payment_proto_rawDesc = "" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\xcc\x02\n" + "\aPayment\x12.\n" + - "\x05Hello\x12\r.wallet.Empty\x1a\x14.wallet.PaymentReply\"\x00\x12-\n" + + "\x05Hello\x12\r.blocks.Empty\x1a\x14.wallet.PaymentReply\"\x00\x12-\n" + "\x03Way\x12\x12.wallet.WayRequest\x1a\x10.wallet.WayReply\"\x00\x122\n" + - "\x03Get\x12\x14.wallet.IdentRequest\x1a\x13.wallet.PaymentItem\"\x00\x127\n" + + "\x03Get\x12\x14.blocks.IdentRequest\x1a\x13.wallet.PaymentItem\"\x00\x127\n" + "\aByOrder\x12\x14.wallet.OrderRequest\x1a\x14.wallet.PaymentReply\"\x00\x129\n" + "\bByCharge\x12\x15.wallet.ChargeRequest\x1a\x14.wallet.PaymentReply\"\x00\x12:\n" + - "\bCallback\x12\x17.wallet.CallbackRequest\x1a\x13.wallet.StatusReply\"\x00B\n" + - "Z\b.;walletb\x06proto3" + "\bCallback\x12\x17.wallet.CallbackRequest\x1a\x13.blocks.StatusReply\"\x00B*Z(bsm/full/module/finance/wallet/pb;walletb\x06proto3" var ( - file_payment_proto_rawDescOnce sync.Once - file_payment_proto_rawDescData []byte + file_module_finance_wallet_proto_payment_proto_rawDescOnce sync.Once + file_module_finance_wallet_proto_payment_proto_rawDescData []byte ) -func file_payment_proto_rawDescGZIP() []byte { - file_payment_proto_rawDescOnce.Do(func() { - file_payment_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_payment_proto_rawDesc), len(file_payment_proto_rawDesc))) +func file_module_finance_wallet_proto_payment_proto_rawDescGZIP() []byte { + file_module_finance_wallet_proto_payment_proto_rawDescOnce.Do(func() { + file_module_finance_wallet_proto_payment_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_finance_wallet_proto_payment_proto_rawDesc), len(file_module_finance_wallet_proto_payment_proto_rawDesc))) }) - return file_payment_proto_rawDescData + return file_module_finance_wallet_proto_payment_proto_rawDescData } -var file_payment_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_payment_proto_goTypes = []any{ - (*WayRequest)(nil), // 0: wallet.WayRequest - (*WayReply)(nil), // 1: wallet.WayReply - (*WayItem)(nil), // 2: wallet.WayItem - (*PaymentItem)(nil), // 3: wallet.PaymentItem - (*ChargeRequest)(nil), // 4: wallet.ChargeRequest - (*OrderRequest)(nil), // 5: wallet.OrderRequest - (*CallbackRequest)(nil), // 6: wallet.CallbackRequest - (*PaymentReply)(nil), // 7: wallet.PaymentReply - nil, // 8: wallet.PaymentReply.ResultEntry - (*Empty)(nil), // 9: wallet.Empty - (*IdentRequest)(nil), // 10: wallet.IdentRequest - (*StatusReply)(nil), // 11: wallet.StatusReply +var file_module_finance_wallet_proto_payment_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_module_finance_wallet_proto_payment_proto_goTypes = []any{ + (*WayRequest)(nil), // 0: wallet.WayRequest + (*WayReply)(nil), // 1: wallet.WayReply + (*WayItem)(nil), // 2: wallet.WayItem + (*PaymentItem)(nil), // 3: wallet.PaymentItem + (*ChargeRequest)(nil), // 4: wallet.ChargeRequest + (*OrderRequest)(nil), // 5: wallet.OrderRequest + (*CallbackRequest)(nil), // 6: wallet.CallbackRequest + (*PaymentReply)(nil), // 7: wallet.PaymentReply + nil, // 8: wallet.PaymentReply.ResultEntry + (*protobuf.Empty)(nil), // 9: blocks.Empty + (*protobuf.IdentRequest)(nil), // 10: blocks.IdentRequest + (*protobuf.StatusReply)(nil), // 11: blocks.StatusReply } -var file_payment_proto_depIdxs = []int32{ +var file_module_finance_wallet_proto_payment_proto_depIdxs = []int32{ 2, // 0: wallet.WayReply.way:type_name -> wallet.WayItem 8, // 1: wallet.PaymentReply.result:type_name -> wallet.PaymentReply.ResultEntry - 9, // 2: wallet.Payment.Hello:input_type -> wallet.Empty + 9, // 2: wallet.Payment.Hello:input_type -> blocks.Empty 0, // 3: wallet.Payment.Way:input_type -> wallet.WayRequest - 10, // 4: wallet.Payment.Get:input_type -> wallet.IdentRequest + 10, // 4: wallet.Payment.Get:input_type -> blocks.IdentRequest 5, // 5: wallet.Payment.ByOrder:input_type -> wallet.OrderRequest 4, // 6: wallet.Payment.ByCharge:input_type -> wallet.ChargeRequest 6, // 7: wallet.Payment.Callback:input_type -> wallet.CallbackRequest @@ -676,7 +676,7 @@ var file_payment_proto_depIdxs = []int32{ 3, // 10: wallet.Payment.Get:output_type -> wallet.PaymentItem 7, // 11: wallet.Payment.ByOrder:output_type -> wallet.PaymentReply 7, // 12: wallet.Payment.ByCharge:output_type -> wallet.PaymentReply - 11, // 13: wallet.Payment.Callback:output_type -> wallet.StatusReply + 11, // 13: wallet.Payment.Callback:output_type -> blocks.StatusReply 8, // [8:14] is the sub-list for method output_type 2, // [2:8] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -684,27 +684,26 @@ var file_payment_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_payment_proto_init() } -func file_payment_proto_init() { - if File_payment_proto != nil { +func init() { file_module_finance_wallet_proto_payment_proto_init() } +func file_module_finance_wallet_proto_payment_proto_init() { + if File_module_finance_wallet_proto_payment_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_payment_proto_rawDesc), len(file_payment_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_finance_wallet_proto_payment_proto_rawDesc), len(file_module_finance_wallet_proto_payment_proto_rawDesc)), NumEnums: 0, NumMessages: 9, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_payment_proto_goTypes, - DependencyIndexes: file_payment_proto_depIdxs, - MessageInfos: file_payment_proto_msgTypes, + GoTypes: file_module_finance_wallet_proto_payment_proto_goTypes, + DependencyIndexes: file_module_finance_wallet_proto_payment_proto_depIdxs, + MessageInfos: file_module_finance_wallet_proto_payment_proto_msgTypes, }.Build() - File_payment_proto = out.File - file_payment_proto_goTypes = nil - file_payment_proto_depIdxs = nil + File_module_finance_wallet_proto_payment_proto = out.File + file_module_finance_wallet_proto_payment_proto_goTypes = nil + file_module_finance_wallet_proto_payment_proto_depIdxs = nil } diff --git a/module/finance/wallet/pb/payment.pb.gw.go b/module/finance/wallet/pb/payment.pb.gw.go index c8c6139..da738ff 100644 --- a/module/finance/wallet/pb/payment.pb.gw.go +++ b/module/finance/wallet/pb/payment.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: payment.proto +// source: module/finance/wallet/proto/payment.proto /* Package wallet is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package wallet import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Payment_Hello_0(ctx context.Context, marshaler runtime.Marshaler, client PaymentClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Payment_Hello_0(ctx context.Context, marshaler runtime.Marshaler, c func local_request_Payment_Hello_0(ctx context.Context, marshaler runtime.Marshaler, server PaymentServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -91,7 +92,7 @@ func local_request_Payment_Way_0(ctx context.Context, marshaler runtime.Marshale func request_Payment_Get_0(ctx context.Context, marshaler runtime.Marshaler, client PaymentClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Payment_Get_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Payment_Get_0(ctx context.Context, marshaler runtime.Marshaler, server PaymentServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/finance/wallet/pb/payment_grpc.pb.go b/module/finance/wallet/pb/payment_grpc.pb.go index 932219b..10cd286 100644 --- a/module/finance/wallet/pb/payment_grpc.pb.go +++ b/module/finance/wallet/pb/payment_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: payment.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/finance/wallet/proto/payment.proto package wallet import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -31,17 +32,17 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type PaymentClient interface { - Hello(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PaymentReply, error) - //获取平台支持的支付网关 + Hello(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*PaymentReply, error) + // 获取平台支持的支付网关 Way(ctx context.Context, in *WayRequest, opts ...grpc.CallOption) (*WayReply, error) - //获取支付的详情 - Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error) - //支付-电商订单 + // 获取支付的详情 + Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error) + // 支付-电商订单 ByOrder(ctx context.Context, in *OrderRequest, opts ...grpc.CallOption) (*PaymentReply, error) - //支付-充值 + // 支付-充值 ByCharge(ctx context.Context, in *ChargeRequest, opts ...grpc.CallOption) (*PaymentReply, error) - //回调更新支付的结果和状态 - Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*StatusReply, error) + // 回调更新支付的结果和状态 + Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type paymentClient struct { @@ -52,7 +53,7 @@ func NewPaymentClient(cc grpc.ClientConnInterface) PaymentClient { return &paymentClient{cc} } -func (c *paymentClient) Hello(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PaymentReply, error) { +func (c *paymentClient) Hello(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*PaymentReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PaymentReply) err := c.cc.Invoke(ctx, Payment_Hello_FullMethodName, in, out, cOpts...) @@ -72,7 +73,7 @@ func (c *paymentClient) Way(ctx context.Context, in *WayRequest, opts ...grpc.Ca return out, nil } -func (c *paymentClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error) { +func (c *paymentClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PaymentItem) err := c.cc.Invoke(ctx, Payment_Get_FullMethodName, in, out, cOpts...) @@ -102,9 +103,9 @@ func (c *paymentClient) ByCharge(ctx context.Context, in *ChargeRequest, opts .. return out, nil } -func (c *paymentClient) Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *paymentClient) Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Payment_Callback_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -113,50 +114,48 @@ func (c *paymentClient) Callback(ctx context.Context, in *CallbackRequest, opts } // PaymentServer is the server API for Payment service. -// All implementations must embed UnimplementedPaymentServer +// All implementations should embed UnimplementedPaymentServer // for forward compatibility. type PaymentServer interface { - Hello(context.Context, *Empty) (*PaymentReply, error) - //获取平台支持的支付网关 + Hello(context.Context, *protobuf.Empty) (*PaymentReply, error) + // 获取平台支持的支付网关 Way(context.Context, *WayRequest) (*WayReply, error) - //获取支付的详情 - Get(context.Context, *IdentRequest) (*PaymentItem, error) - //支付-电商订单 + // 获取支付的详情 + Get(context.Context, *protobuf.IdentRequest) (*PaymentItem, error) + // 支付-电商订单 ByOrder(context.Context, *OrderRequest) (*PaymentReply, error) - //支付-充值 + // 支付-充值 ByCharge(context.Context, *ChargeRequest) (*PaymentReply, error) - //回调更新支付的结果和状态 - Callback(context.Context, *CallbackRequest) (*StatusReply, error) - mustEmbedUnimplementedPaymentServer() + // 回调更新支付的结果和状态 + Callback(context.Context, *CallbackRequest) (*protobuf.StatusReply, error) } -// UnimplementedPaymentServer must be embedded to have +// UnimplementedPaymentServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedPaymentServer struct{} -func (UnimplementedPaymentServer) Hello(context.Context, *Empty) (*PaymentReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Hello not implemented") +func (UnimplementedPaymentServer) Hello(context.Context, *protobuf.Empty) (*PaymentReply, error) { + return nil, status.Error(codes.Unimplemented, "method Hello not implemented") } func (UnimplementedPaymentServer) Way(context.Context, *WayRequest) (*WayReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Way not implemented") + return nil, status.Error(codes.Unimplemented, "method Way not implemented") } -func (UnimplementedPaymentServer) Get(context.Context, *IdentRequest) (*PaymentItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +func (UnimplementedPaymentServer) Get(context.Context, *protobuf.IdentRequest) (*PaymentItem, error) { + return nil, status.Error(codes.Unimplemented, "method Get not implemented") } func (UnimplementedPaymentServer) ByOrder(context.Context, *OrderRequest) (*PaymentReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ByOrder not implemented") + return nil, status.Error(codes.Unimplemented, "method ByOrder not implemented") } func (UnimplementedPaymentServer) ByCharge(context.Context, *ChargeRequest) (*PaymentReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ByCharge not implemented") + return nil, status.Error(codes.Unimplemented, "method ByCharge not implemented") } -func (UnimplementedPaymentServer) Callback(context.Context, *CallbackRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Callback not implemented") +func (UnimplementedPaymentServer) Callback(context.Context, *CallbackRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Callback not implemented") } -func (UnimplementedPaymentServer) mustEmbedUnimplementedPaymentServer() {} -func (UnimplementedPaymentServer) testEmbeddedByValue() {} +func (UnimplementedPaymentServer) testEmbeddedByValue() {} // UnsafePaymentServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PaymentServer will @@ -166,7 +165,7 @@ type UnsafePaymentServer interface { } func RegisterPaymentServer(s grpc.ServiceRegistrar, srv PaymentServer) { - // If the following call pancis, it indicates UnimplementedPaymentServer was + // If the following call panics, it indicates UnimplementedPaymentServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -177,7 +176,7 @@ func RegisterPaymentServer(s grpc.ServiceRegistrar, srv PaymentServer) { } func _Payment_Hello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -189,7 +188,7 @@ func _Payment_Hello_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Payment_Hello_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PaymentServer).Hello(ctx, req.(*Empty)) + return srv.(PaymentServer).Hello(ctx, req.(*protobuf.Empty)) } return interceptor(ctx, in, info, handler) } @@ -213,7 +212,7 @@ func _Payment_Way_Handler(srv interface{}, ctx context.Context, dec func(interfa } func _Payment_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -225,7 +224,7 @@ func _Payment_Get_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Payment_Get_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PaymentServer).Get(ctx, req.(*IdentRequest)) + return srv.(PaymentServer).Get(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -317,5 +316,5 @@ var Payment_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "payment.proto", + Metadata: "module/finance/wallet/proto/payment.proto", } diff --git a/module/finance/wallet/pb/wallet.pb.go b/module/finance/wallet/pb/wallet.pb.go index 4b9203f..4be9cc3 100644 --- a/module/finance/wallet/pb/wallet.pb.go +++ b/module/finance/wallet/pb/wallet.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: wallet.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/finance/wallet/proto/wallet.proto package wallet import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -35,7 +36,7 @@ type GetWalletRequest struct { func (x *GetWalletRequest) Reset() { *x = GetWalletRequest{} - mi := &file_wallet_proto_msgTypes[0] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +48,7 @@ func (x *GetWalletRequest) String() string { func (*GetWalletRequest) ProtoMessage() {} func (x *GetWalletRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[0] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +61,7 @@ func (x *GetWalletRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWalletRequest.ProtoReflect.Descriptor instead. func (*GetWalletRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{0} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{0} } func (x *GetWalletRequest) GetIsTotalTodayIn() bool { @@ -124,7 +125,7 @@ type GetWalletReply struct { func (x *GetWalletReply) Reset() { *x = GetWalletReply{} - mi := &file_wallet_proto_msgTypes[1] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -136,7 +137,7 @@ func (x *GetWalletReply) String() string { func (*GetWalletReply) ProtoMessage() {} func (x *GetWalletReply) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[1] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -149,7 +150,7 @@ func (x *GetWalletReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWalletReply.ProtoReflect.Descriptor instead. func (*GetWalletReply) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{1} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{1} } func (x *GetWalletReply) GetPassportIdentity() string { @@ -243,7 +244,7 @@ type TransactionsRequest struct { func (x *TransactionsRequest) Reset() { *x = TransactionsRequest{} - mi := &file_wallet_proto_msgTypes[2] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -255,7 +256,7 @@ func (x *TransactionsRequest) String() string { func (*TransactionsRequest) ProtoMessage() {} func (x *TransactionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[2] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -268,7 +269,7 @@ func (x *TransactionsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionsRequest.ProtoReflect.Descriptor instead. func (*TransactionsRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{2} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{2} } func (x *TransactionsRequest) GetTransType() int64 { @@ -323,7 +324,7 @@ type TransactionsReply struct { func (x *TransactionsReply) Reset() { *x = TransactionsReply{} - mi := &file_wallet_proto_msgTypes[3] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -335,7 +336,7 @@ func (x *TransactionsReply) String() string { func (*TransactionsReply) ProtoMessage() {} func (x *TransactionsReply) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[3] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -348,7 +349,7 @@ func (x *TransactionsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionsReply.ProtoReflect.Descriptor instead. func (*TransactionsReply) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{3} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{3} } func (x *TransactionsReply) GetTotal() int64 { @@ -383,7 +384,7 @@ type Transaction struct { func (x *Transaction) Reset() { *x = Transaction{} - mi := &file_wallet_proto_msgTypes[4] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -395,7 +396,7 @@ func (x *Transaction) String() string { func (*Transaction) ProtoMessage() {} func (x *Transaction) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[4] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -408,7 +409,7 @@ func (x *Transaction) ProtoReflect() protoreflect.Message { // Deprecated: Use Transaction.ProtoReflect.Descriptor instead. func (*Transaction) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{4} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{4} } func (x *Transaction) GetTransType() int32 { @@ -491,7 +492,7 @@ type SetPayPasswordRequest struct { func (x *SetPayPasswordRequest) Reset() { *x = SetPayPasswordRequest{} - mi := &file_wallet_proto_msgTypes[5] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -503,7 +504,7 @@ func (x *SetPayPasswordRequest) String() string { func (*SetPayPasswordRequest) ProtoMessage() {} func (x *SetPayPasswordRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[5] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -516,7 +517,7 @@ func (x *SetPayPasswordRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetPayPasswordRequest.ProtoReflect.Descriptor instead. func (*SetPayPasswordRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{5} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{5} } func (x *SetPayPasswordRequest) GetPassportIdentity() string { @@ -543,7 +544,7 @@ type BindPaymentIDRequest struct { func (x *BindPaymentIDRequest) Reset() { *x = BindPaymentIDRequest{} - mi := &file_wallet_proto_msgTypes[6] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -555,7 +556,7 @@ func (x *BindPaymentIDRequest) String() string { func (*BindPaymentIDRequest) ProtoMessage() {} func (x *BindPaymentIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[6] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -568,7 +569,7 @@ func (x *BindPaymentIDRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BindPaymentIDRequest.ProtoReflect.Descriptor instead. func (*BindPaymentIDRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{6} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{6} } func (x *BindPaymentIDRequest) GetPayType() int32 { @@ -597,7 +598,7 @@ type RefundRequest struct { func (x *RefundRequest) Reset() { *x = RefundRequest{} - mi := &file_wallet_proto_msgTypes[7] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -609,7 +610,7 @@ func (x *RefundRequest) String() string { func (*RefundRequest) ProtoMessage() {} func (x *RefundRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[7] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -622,7 +623,7 @@ func (x *RefundRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RefundRequest.ProtoReflect.Descriptor instead. func (*RefundRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{7} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{7} } func (x *RefundRequest) GetUserIdentification() string { @@ -663,7 +664,7 @@ type RefundReply struct { func (x *RefundReply) Reset() { *x = RefundReply{} - mi := &file_wallet_proto_msgTypes[8] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -675,7 +676,7 @@ func (x *RefundReply) String() string { func (*RefundReply) ProtoMessage() {} func (x *RefundReply) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[8] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -688,7 +689,7 @@ func (x *RefundReply) ProtoReflect() protoreflect.Message { // Deprecated: Use RefundReply.ProtoReflect.Descriptor instead. func (*RefundReply) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{8} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{8} } func (x *RefundReply) GetBalance() int64 { @@ -718,7 +719,7 @@ type AddBankCardRequest struct { func (x *AddBankCardRequest) Reset() { *x = AddBankCardRequest{} - mi := &file_wallet_proto_msgTypes[9] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -730,7 +731,7 @@ func (x *AddBankCardRequest) String() string { func (*AddBankCardRequest) ProtoMessage() {} func (x *AddBankCardRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[9] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -743,7 +744,7 @@ func (x *AddBankCardRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddBankCardRequest.ProtoReflect.Descriptor instead. func (*AddBankCardRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{9} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{9} } func (x *AddBankCardRequest) GetWalletIdentity() string { @@ -789,7 +790,7 @@ type FinanceEmpty struct { func (x *FinanceEmpty) Reset() { *x = FinanceEmpty{} - mi := &file_wallet_proto_msgTypes[10] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -801,7 +802,7 @@ func (x *FinanceEmpty) String() string { func (*FinanceEmpty) ProtoMessage() {} func (x *FinanceEmpty) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[10] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -814,7 +815,7 @@ func (x *FinanceEmpty) ProtoReflect() protoreflect.Message { // Deprecated: Use FinanceEmpty.ProtoReflect.Descriptor instead. func (*FinanceEmpty) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{10} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{10} } type RmBankCardRequest struct { @@ -826,7 +827,7 @@ type RmBankCardRequest struct { func (x *RmBankCardRequest) Reset() { *x = RmBankCardRequest{} - mi := &file_wallet_proto_msgTypes[11] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -838,7 +839,7 @@ func (x *RmBankCardRequest) String() string { func (*RmBankCardRequest) ProtoMessage() {} func (x *RmBankCardRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[11] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -851,7 +852,7 @@ func (x *RmBankCardRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RmBankCardRequest.ProtoReflect.Descriptor instead. func (*RmBankCardRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{11} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{11} } func (x *RmBankCardRequest) GetIdentity() string { @@ -870,7 +871,7 @@ type GetBankCardReply struct { func (x *GetBankCardReply) Reset() { *x = GetBankCardReply{} - mi := &file_wallet_proto_msgTypes[12] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -882,7 +883,7 @@ func (x *GetBankCardReply) String() string { func (*GetBankCardReply) ProtoMessage() {} func (x *GetBankCardReply) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[12] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -895,7 +896,7 @@ func (x *GetBankCardReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBankCardReply.ProtoReflect.Descriptor instead. func (*GetBankCardReply) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{12} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{12} } func (x *GetBankCardReply) GetData() []*BankCardInfo { @@ -923,7 +924,7 @@ type BankCardInfo struct { func (x *BankCardInfo) Reset() { *x = BankCardInfo{} - mi := &file_wallet_proto_msgTypes[13] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -935,7 +936,7 @@ func (x *BankCardInfo) String() string { func (*BankCardInfo) ProtoMessage() {} func (x *BankCardInfo) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[13] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -948,7 +949,7 @@ func (x *BankCardInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use BankCardInfo.ProtoReflect.Descriptor instead. func (*BankCardInfo) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{13} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{13} } func (x *BankCardInfo) GetId() int64 { @@ -1032,7 +1033,7 @@ type ApplyCashRequest struct { func (x *ApplyCashRequest) Reset() { *x = ApplyCashRequest{} - mi := &file_wallet_proto_msgTypes[14] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1044,7 +1045,7 @@ func (x *ApplyCashRequest) String() string { func (*ApplyCashRequest) ProtoMessage() {} func (x *ApplyCashRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[14] + mi := &file_module_finance_wallet_proto_wallet_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1057,7 +1058,7 @@ func (x *ApplyCashRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyCashRequest.ProtoReflect.Descriptor instead. func (*ApplyCashRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{14} + return file_module_finance_wallet_proto_wallet_proto_rawDescGZIP(), []int{14} } func (x *ApplyCashRequest) GetChannel() int32 { @@ -1081,11 +1082,11 @@ func (x *ApplyCashRequest) GetRemark() string { return "" } -var File_wallet_proto protoreflect.FileDescriptor +var File_module_finance_wallet_proto_wallet_proto protoreflect.FileDescriptor -const file_wallet_proto_rawDesc = "" + +const file_module_finance_wallet_proto_wallet_proto_rawDesc = "" + "\n" + - "\x1bfinance/wallet/wallet.proto\x12\x06wallet\x1a\x13wallet/blocks.proto\"\x92\x02\n" + + "(module/finance/wallet/proto/wallet.proto\x12\x06wallet\x1a\x15protobuf/blocks.proto\"\x92\x02\n" + "\x10GetWalletRequest\x12)\n" + "\x11is_total_today_in\x18\x01 \x01(\bR\x0eisTotalTodayIn\x12+\n" + "\x12is_total_today_out\x18\x02 \x01(\bR\x0fisTotalTodayOut\x12)\n" + @@ -1186,30 +1187,29 @@ const file_wallet_proto_rawDesc = "" + "\x06remark\x18\x03 \x01(\tR\x06remark2\xa1\x04\n" + "\x05Basic\x12?\n" + "\tGetWallet\x12\x18.wallet.GetWalletRequest\x1a\x16.wallet.GetWalletReply\"\x00\x12F\n" + - "\x0eSetPayPassword\x12\x1d.wallet.SetPayPasswordRequest\x1a\x13.wallet.StatusReply\"\x00\x12D\n" + - "\rBindPaymentId\x12\x1c.wallet.BindPaymentIDRequest\x1a\x13.wallet.StatusReply\"\x00\x12H\n" + + "\x0eSetPayPassword\x12\x1d.wallet.SetPayPasswordRequest\x1a\x13.blocks.StatusReply\"\x00\x12D\n" + + "\rBindPaymentId\x12\x1c.wallet.BindPaymentIDRequest\x1a\x13.blocks.StatusReply\"\x00\x12H\n" + "\fTransactions\x12\x1b.wallet.TransactionsRequest\x1a\x19.wallet.TransactionsReply\"\x00\x12@\n" + - "\vAddBankCard\x12\x1a.wallet.AddBankCardRequest\x1a\x13.wallet.StatusReply\"\x00\x12?\n" + + "\vAddBankCard\x12\x1a.wallet.AddBankCardRequest\x1a\x13.blocks.StatusReply\"\x00\x12?\n" + "\vGetBankCard\x12\x14.wallet.FinanceEmpty\x1a\x18.wallet.GetBankCardReply\"\x00\x12>\n" + "\n" + - "RmBankCard\x12\x19.wallet.RmBankCardRequest\x1a\x13.wallet.StatusReply\"\x00\x12<\n" + - "\tApplyCash\x12\x18.wallet.ApplyCashRequest\x1a\x13.wallet.StatusReply\"\x00B\n" + - "Z\b.;walletb\x06proto3" + "RmBankCard\x12\x19.wallet.RmBankCardRequest\x1a\x13.blocks.StatusReply\"\x00\x12<\n" + + "\tApplyCash\x12\x18.wallet.ApplyCashRequest\x1a\x13.blocks.StatusReply\"\x00B*Z(bsm/full/module/finance/wallet/pb;walletb\x06proto3" var ( - file_wallet_proto_rawDescOnce sync.Once - file_wallet_proto_rawDescData []byte + file_module_finance_wallet_proto_wallet_proto_rawDescOnce sync.Once + file_module_finance_wallet_proto_wallet_proto_rawDescData []byte ) -func file_wallet_proto_rawDescGZIP() []byte { - file_wallet_proto_rawDescOnce.Do(func() { - file_wallet_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_wallet_proto_rawDesc), len(file_wallet_proto_rawDesc))) +func file_module_finance_wallet_proto_wallet_proto_rawDescGZIP() []byte { + file_module_finance_wallet_proto_wallet_proto_rawDescOnce.Do(func() { + file_module_finance_wallet_proto_wallet_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_finance_wallet_proto_wallet_proto_rawDesc), len(file_module_finance_wallet_proto_wallet_proto_rawDesc))) }) - return file_wallet_proto_rawDescData + return file_module_finance_wallet_proto_wallet_proto_rawDescData } -var file_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_wallet_proto_goTypes = []any{ +var file_module_finance_wallet_proto_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_module_finance_wallet_proto_wallet_proto_goTypes = []any{ (*GetWalletRequest)(nil), // 0: wallet.GetWalletRequest (*GetWalletReply)(nil), // 1: wallet.GetWalletReply (*TransactionsRequest)(nil), // 2: wallet.TransactionsRequest @@ -1226,9 +1226,9 @@ var file_wallet_proto_goTypes = []any{ (*BankCardInfo)(nil), // 13: wallet.BankCardInfo (*ApplyCashRequest)(nil), // 14: wallet.ApplyCashRequest nil, // 15: wallet.GetWalletReply.TotalEntry - (*StatusReply)(nil), // 16: wallet.StatusReply + (*protobuf.StatusReply)(nil), // 16: blocks.StatusReply } -var file_wallet_proto_depIdxs = []int32{ +var file_module_finance_wallet_proto_wallet_proto_depIdxs = []int32{ 15, // 0: wallet.GetWalletReply.total:type_name -> wallet.GetWalletReply.TotalEntry 4, // 1: wallet.TransactionsReply.records:type_name -> wallet.Transaction 4, // 2: wallet.RefundReply.transaction:type_name -> wallet.Transaction @@ -1242,13 +1242,13 @@ var file_wallet_proto_depIdxs = []int32{ 11, // 10: wallet.Basic.RmBankCard:input_type -> wallet.RmBankCardRequest 14, // 11: wallet.Basic.ApplyCash:input_type -> wallet.ApplyCashRequest 1, // 12: wallet.Basic.GetWallet:output_type -> wallet.GetWalletReply - 16, // 13: wallet.Basic.SetPayPassword:output_type -> wallet.StatusReply - 16, // 14: wallet.Basic.BindPaymentId:output_type -> wallet.StatusReply + 16, // 13: wallet.Basic.SetPayPassword:output_type -> blocks.StatusReply + 16, // 14: wallet.Basic.BindPaymentId:output_type -> blocks.StatusReply 3, // 15: wallet.Basic.Transactions:output_type -> wallet.TransactionsReply - 16, // 16: wallet.Basic.AddBankCard:output_type -> wallet.StatusReply + 16, // 16: wallet.Basic.AddBankCard:output_type -> blocks.StatusReply 12, // 17: wallet.Basic.GetBankCard:output_type -> wallet.GetBankCardReply - 16, // 18: wallet.Basic.RmBankCard:output_type -> wallet.StatusReply - 16, // 19: wallet.Basic.ApplyCash:output_type -> wallet.StatusReply + 16, // 18: wallet.Basic.RmBankCard:output_type -> blocks.StatusReply + 16, // 19: wallet.Basic.ApplyCash:output_type -> blocks.StatusReply 12, // [12:20] is the sub-list for method output_type 4, // [4:12] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name @@ -1256,27 +1256,26 @@ var file_wallet_proto_depIdxs = []int32{ 0, // [0:4] is the sub-list for field type_name } -func init() { file_wallet_proto_init() } -func file_wallet_proto_init() { - if File_wallet_proto != nil { +func init() { file_module_finance_wallet_proto_wallet_proto_init() } +func file_module_finance_wallet_proto_wallet_proto_init() { + if File_module_finance_wallet_proto_wallet_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_wallet_proto_rawDesc), len(file_wallet_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_finance_wallet_proto_wallet_proto_rawDesc), len(file_module_finance_wallet_proto_wallet_proto_rawDesc)), NumEnums: 0, NumMessages: 16, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_wallet_proto_goTypes, - DependencyIndexes: file_wallet_proto_depIdxs, - MessageInfos: file_wallet_proto_msgTypes, + GoTypes: file_module_finance_wallet_proto_wallet_proto_goTypes, + DependencyIndexes: file_module_finance_wallet_proto_wallet_proto_depIdxs, + MessageInfos: file_module_finance_wallet_proto_wallet_proto_msgTypes, }.Build() - File_wallet_proto = out.File - file_wallet_proto_goTypes = nil - file_wallet_proto_depIdxs = nil + File_module_finance_wallet_proto_wallet_proto = out.File + file_module_finance_wallet_proto_wallet_proto_goTypes = nil + file_module_finance_wallet_proto_wallet_proto_depIdxs = nil } diff --git a/module/finance/wallet/pb/wallet.pb.gw.go b/module/finance/wallet/pb/wallet.pb.gw.go index e3fbc47..1544cb7 100644 --- a/module/finance/wallet/pb/wallet.pb.gw.go +++ b/module/finance/wallet/pb/wallet.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: wallet.proto +// source: module/finance/wallet/proto/wallet.proto /* Package wallet is a reverse proxy. diff --git a/module/finance/wallet/pb/wallet_grpc.pb.go b/module/finance/wallet/pb/wallet_grpc.pb.go index 6af55bb..e24da9f 100644 --- a/module/finance/wallet/pb/wallet_grpc.pb.go +++ b/module/finance/wallet/pb/wallet_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: wallet.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/finance/wallet/proto/wallet.proto package wallet import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -33,22 +34,22 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type BasicClient interface { - //获取钱包信息 + // 获取钱包信息 GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*GetWalletReply, error) - //设置支付密码 - SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error) - //绑定微信或支付宝账户 - BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, opts ...grpc.CallOption) (*StatusReply, error) - //查询交易记录 + // 设置支付密码 + SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) + // 绑定微信或支付宝账户 + BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) + // 查询交易记录 Transactions(ctx context.Context, in *TransactionsRequest, opts ...grpc.CallOption) (*TransactionsReply, error) - //添加银行卡 - AddBankCard(ctx context.Context, in *AddBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error) - //获取用户银行卡列表 + // 添加银行卡 + AddBankCard(ctx context.Context, in *AddBankCardRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) + // 获取用户银行卡列表 GetBankCard(ctx context.Context, in *FinanceEmpty, opts ...grpc.CallOption) (*GetBankCardReply, error) - //删除银行卡 - RmBankCard(ctx context.Context, in *RmBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error) - //申请提现 - ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*StatusReply, error) + // 删除银行卡 + RmBankCard(ctx context.Context, in *RmBankCardRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) + // 申请提现 + ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) } type basicClient struct { @@ -69,9 +70,9 @@ func (c *basicClient) GetWallet(ctx context.Context, in *GetWalletRequest, opts return out, nil } -func (c *basicClient) SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *basicClient) SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Basic_SetPayPassword_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -79,9 +80,9 @@ func (c *basicClient) SetPayPassword(ctx context.Context, in *SetPayPasswordRequ return out, nil } -func (c *basicClient) BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *basicClient) BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Basic_BindPaymentId_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -99,9 +100,9 @@ func (c *basicClient) Transactions(ctx context.Context, in *TransactionsRequest, return out, nil } -func (c *basicClient) AddBankCard(ctx context.Context, in *AddBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *basicClient) AddBankCard(ctx context.Context, in *AddBankCardRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Basic_AddBankCard_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -119,9 +120,9 @@ func (c *basicClient) GetBankCard(ctx context.Context, in *FinanceEmpty, opts .. return out, nil } -func (c *basicClient) RmBankCard(ctx context.Context, in *RmBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *basicClient) RmBankCard(ctx context.Context, in *RmBankCardRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Basic_RmBankCard_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -129,9 +130,9 @@ func (c *basicClient) RmBankCard(ctx context.Context, in *RmBankCardRequest, opt return out, nil } -func (c *basicClient) ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *basicClient) ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.StatusReply) err := c.cc.Invoke(ctx, Basic_ApplyCash_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -140,29 +141,28 @@ func (c *basicClient) ApplyCash(ctx context.Context, in *ApplyCashRequest, opts } // BasicServer is the server API for Basic service. -// All implementations must embed UnimplementedBasicServer +// All implementations should embed UnimplementedBasicServer // for forward compatibility. type BasicServer interface { - //获取钱包信息 + // 获取钱包信息 GetWallet(context.Context, *GetWalletRequest) (*GetWalletReply, error) - //设置支付密码 - SetPayPassword(context.Context, *SetPayPasswordRequest) (*StatusReply, error) - //绑定微信或支付宝账户 - BindPaymentId(context.Context, *BindPaymentIDRequest) (*StatusReply, error) - //查询交易记录 + // 设置支付密码 + SetPayPassword(context.Context, *SetPayPasswordRequest) (*protobuf.StatusReply, error) + // 绑定微信或支付宝账户 + BindPaymentId(context.Context, *BindPaymentIDRequest) (*protobuf.StatusReply, error) + // 查询交易记录 Transactions(context.Context, *TransactionsRequest) (*TransactionsReply, error) - //添加银行卡 - AddBankCard(context.Context, *AddBankCardRequest) (*StatusReply, error) - //获取用户银行卡列表 + // 添加银行卡 + AddBankCard(context.Context, *AddBankCardRequest) (*protobuf.StatusReply, error) + // 获取用户银行卡列表 GetBankCard(context.Context, *FinanceEmpty) (*GetBankCardReply, error) - //删除银行卡 - RmBankCard(context.Context, *RmBankCardRequest) (*StatusReply, error) - //申请提现 - ApplyCash(context.Context, *ApplyCashRequest) (*StatusReply, error) - mustEmbedUnimplementedBasicServer() + // 删除银行卡 + RmBankCard(context.Context, *RmBankCardRequest) (*protobuf.StatusReply, error) + // 申请提现 + ApplyCash(context.Context, *ApplyCashRequest) (*protobuf.StatusReply, error) } -// UnimplementedBasicServer must be embedded to have +// UnimplementedBasicServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -170,31 +170,30 @@ type BasicServer interface { type UnimplementedBasicServer struct{} func (UnimplementedBasicServer) GetWallet(context.Context, *GetWalletRequest) (*GetWalletReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWallet not implemented") + return nil, status.Error(codes.Unimplemented, "method GetWallet not implemented") } -func (UnimplementedBasicServer) SetPayPassword(context.Context, *SetPayPasswordRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetPayPassword not implemented") +func (UnimplementedBasicServer) SetPayPassword(context.Context, *SetPayPasswordRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method SetPayPassword not implemented") } -func (UnimplementedBasicServer) BindPaymentId(context.Context, *BindPaymentIDRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method BindPaymentId not implemented") +func (UnimplementedBasicServer) BindPaymentId(context.Context, *BindPaymentIDRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method BindPaymentId not implemented") } func (UnimplementedBasicServer) Transactions(context.Context, *TransactionsRequest) (*TransactionsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Transactions not implemented") + return nil, status.Error(codes.Unimplemented, "method Transactions not implemented") } -func (UnimplementedBasicServer) AddBankCard(context.Context, *AddBankCardRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddBankCard not implemented") +func (UnimplementedBasicServer) AddBankCard(context.Context, *AddBankCardRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method AddBankCard not implemented") } func (UnimplementedBasicServer) GetBankCard(context.Context, *FinanceEmpty) (*GetBankCardReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBankCard not implemented") + return nil, status.Error(codes.Unimplemented, "method GetBankCard not implemented") } -func (UnimplementedBasicServer) RmBankCard(context.Context, *RmBankCardRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method RmBankCard not implemented") +func (UnimplementedBasicServer) RmBankCard(context.Context, *RmBankCardRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method RmBankCard not implemented") } -func (UnimplementedBasicServer) ApplyCash(context.Context, *ApplyCashRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplyCash not implemented") +func (UnimplementedBasicServer) ApplyCash(context.Context, *ApplyCashRequest) (*protobuf.StatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method ApplyCash not implemented") } -func (UnimplementedBasicServer) mustEmbedUnimplementedBasicServer() {} -func (UnimplementedBasicServer) testEmbeddedByValue() {} +func (UnimplementedBasicServer) testEmbeddedByValue() {} // UnsafeBasicServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BasicServer will @@ -204,7 +203,7 @@ type UnsafeBasicServer interface { } func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) { - // If the following call pancis, it indicates UnimplementedBasicServer was + // If the following call panics, it indicates UnimplementedBasicServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -399,5 +398,5 @@ var Basic_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "wallet.proto", + Metadata: "module/finance/wallet/proto/wallet.proto", } diff --git a/module/finance/wallet/pb/wechat.pb.go b/module/finance/wallet/pb/wechat.pb.go index 5f06697..3043673 100644 --- a/module/finance/wallet/pb/wechat.pb.go +++ b/module/finance/wallet/pb/wechat.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: wechat.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/finance/wallet/proto/wechat.proto package wallet @@ -35,7 +35,7 @@ type WxpayJSAPIPreOrderRequest struct { func (x *WxpayJSAPIPreOrderRequest) Reset() { *x = WxpayJSAPIPreOrderRequest{} - mi := &file_wechat_proto_msgTypes[0] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +47,7 @@ func (x *WxpayJSAPIPreOrderRequest) String() string { func (*WxpayJSAPIPreOrderRequest) ProtoMessage() {} func (x *WxpayJSAPIPreOrderRequest) ProtoReflect() protoreflect.Message { - mi := &file_wechat_proto_msgTypes[0] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +60,7 @@ func (x *WxpayJSAPIPreOrderRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WxpayJSAPIPreOrderRequest.ProtoReflect.Descriptor instead. func (*WxpayJSAPIPreOrderRequest) Descriptor() ([]byte, []int) { - return file_wechat_proto_rawDescGZIP(), []int{0} + return file_module_finance_wallet_proto_wechat_proto_rawDescGZIP(), []int{0} } func (x *WxpayJSAPIPreOrderRequest) GetUserIdentification() string { @@ -119,7 +119,7 @@ type WxpayJSAPIPreOrderReply struct { func (x *WxpayJSAPIPreOrderReply) Reset() { *x = WxpayJSAPIPreOrderReply{} - mi := &file_wechat_proto_msgTypes[1] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -131,7 +131,7 @@ func (x *WxpayJSAPIPreOrderReply) String() string { func (*WxpayJSAPIPreOrderReply) ProtoMessage() {} func (x *WxpayJSAPIPreOrderReply) ProtoReflect() protoreflect.Message { - mi := &file_wechat_proto_msgTypes[1] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -144,7 +144,7 @@ func (x *WxpayJSAPIPreOrderReply) ProtoReflect() protoreflect.Message { // Deprecated: Use WxpayJSAPIPreOrderReply.ProtoReflect.Descriptor instead. func (*WxpayJSAPIPreOrderReply) Descriptor() ([]byte, []int) { - return file_wechat_proto_rawDescGZIP(), []int{1} + return file_module_finance_wallet_proto_wechat_proto_rawDescGZIP(), []int{1} } func (x *WxpayJSAPIPreOrderReply) GetPrepayId() string { @@ -201,7 +201,7 @@ type WxpayAppPreOrderRequest struct { func (x *WxpayAppPreOrderRequest) Reset() { *x = WxpayAppPreOrderRequest{} - mi := &file_wechat_proto_msgTypes[2] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -213,7 +213,7 @@ func (x *WxpayAppPreOrderRequest) String() string { func (*WxpayAppPreOrderRequest) ProtoMessage() {} func (x *WxpayAppPreOrderRequest) ProtoReflect() protoreflect.Message { - mi := &file_wechat_proto_msgTypes[2] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -226,7 +226,7 @@ func (x *WxpayAppPreOrderRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WxpayAppPreOrderRequest.ProtoReflect.Descriptor instead. func (*WxpayAppPreOrderRequest) Descriptor() ([]byte, []int) { - return file_wechat_proto_rawDescGZIP(), []int{2} + return file_module_finance_wallet_proto_wechat_proto_rawDescGZIP(), []int{2} } func (x *WxpayAppPreOrderRequest) GetUserIdentification() string { @@ -268,7 +268,7 @@ type WxpayAppPreOrderReply struct { func (x *WxpayAppPreOrderReply) Reset() { *x = WxpayAppPreOrderReply{} - mi := &file_wechat_proto_msgTypes[3] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -280,7 +280,7 @@ func (x *WxpayAppPreOrderReply) String() string { func (*WxpayAppPreOrderReply) ProtoMessage() {} func (x *WxpayAppPreOrderReply) ProtoReflect() protoreflect.Message { - mi := &file_wechat_proto_msgTypes[3] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -293,7 +293,7 @@ func (x *WxpayAppPreOrderReply) ProtoReflect() protoreflect.Message { // Deprecated: Use WxpayAppPreOrderReply.ProtoReflect.Descriptor instead. func (*WxpayAppPreOrderReply) Descriptor() ([]byte, []int) { - return file_wechat_proto_rawDescGZIP(), []int{3} + return file_module_finance_wallet_proto_wechat_proto_rawDescGZIP(), []int{3} } func (x *WxpayAppPreOrderReply) GetPrepayId() string { @@ -329,7 +329,7 @@ type WxpayNativePreOrderRequest struct { func (x *WxpayNativePreOrderRequest) Reset() { *x = WxpayNativePreOrderRequest{} - mi := &file_wechat_proto_msgTypes[4] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -341,7 +341,7 @@ func (x *WxpayNativePreOrderRequest) String() string { func (*WxpayNativePreOrderRequest) ProtoMessage() {} func (x *WxpayNativePreOrderRequest) ProtoReflect() protoreflect.Message { - mi := &file_wechat_proto_msgTypes[4] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -354,7 +354,7 @@ func (x *WxpayNativePreOrderRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WxpayNativePreOrderRequest.ProtoReflect.Descriptor instead. func (*WxpayNativePreOrderRequest) Descriptor() ([]byte, []int) { - return file_wechat_proto_rawDescGZIP(), []int{4} + return file_module_finance_wallet_proto_wechat_proto_rawDescGZIP(), []int{4} } func (x *WxpayNativePreOrderRequest) GetUserIdentification() string { @@ -394,7 +394,7 @@ type WxpayNativePreOrderReply struct { func (x *WxpayNativePreOrderReply) Reset() { *x = WxpayNativePreOrderReply{} - mi := &file_wechat_proto_msgTypes[5] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -406,7 +406,7 @@ func (x *WxpayNativePreOrderReply) String() string { func (*WxpayNativePreOrderReply) ProtoMessage() {} func (x *WxpayNativePreOrderReply) ProtoReflect() protoreflect.Message { - mi := &file_wechat_proto_msgTypes[5] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -419,7 +419,7 @@ func (x *WxpayNativePreOrderReply) ProtoReflect() protoreflect.Message { // Deprecated: Use WxpayNativePreOrderReply.ProtoReflect.Descriptor instead. func (*WxpayNativePreOrderReply) Descriptor() ([]byte, []int) { - return file_wechat_proto_rawDescGZIP(), []int{5} + return file_module_finance_wallet_proto_wechat_proto_rawDescGZIP(), []int{5} } func (x *WxpayNativePreOrderReply) GetCodeUrl() string { @@ -442,7 +442,7 @@ type WxpayTransferRequest struct { func (x *WxpayTransferRequest) Reset() { *x = WxpayTransferRequest{} - mi := &file_wechat_proto_msgTypes[6] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -454,7 +454,7 @@ func (x *WxpayTransferRequest) String() string { func (*WxpayTransferRequest) ProtoMessage() {} func (x *WxpayTransferRequest) ProtoReflect() protoreflect.Message { - mi := &file_wechat_proto_msgTypes[6] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -467,7 +467,7 @@ func (x *WxpayTransferRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WxpayTransferRequest.ProtoReflect.Descriptor instead. func (*WxpayTransferRequest) Descriptor() ([]byte, []int) { - return file_wechat_proto_rawDescGZIP(), []int{6} + return file_module_finance_wallet_proto_wechat_proto_rawDescGZIP(), []int{6} } func (x *WxpayTransferRequest) GetUserIdentification() string { @@ -513,7 +513,7 @@ type WxpayTransferReply struct { func (x *WxpayTransferReply) Reset() { *x = WxpayTransferReply{} - mi := &file_wechat_proto_msgTypes[7] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -525,7 +525,7 @@ func (x *WxpayTransferReply) String() string { func (*WxpayTransferReply) ProtoMessage() {} func (x *WxpayTransferReply) ProtoReflect() protoreflect.Message { - mi := &file_wechat_proto_msgTypes[7] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -538,7 +538,7 @@ func (x *WxpayTransferReply) ProtoReflect() protoreflect.Message { // Deprecated: Use WxpayTransferReply.ProtoReflect.Descriptor instead. func (*WxpayTransferReply) Descriptor() ([]byte, []int) { - return file_wechat_proto_rawDescGZIP(), []int{7} + return file_module_finance_wallet_proto_wechat_proto_rawDescGZIP(), []int{7} } type WxCallBackResource struct { @@ -554,7 +554,7 @@ type WxCallBackResource struct { func (x *WxCallBackResource) Reset() { *x = WxCallBackResource{} - mi := &file_wechat_proto_msgTypes[8] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -566,7 +566,7 @@ func (x *WxCallBackResource) String() string { func (*WxCallBackResource) ProtoMessage() {} func (x *WxCallBackResource) ProtoReflect() protoreflect.Message { - mi := &file_wechat_proto_msgTypes[8] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -579,7 +579,7 @@ func (x *WxCallBackResource) ProtoReflect() protoreflect.Message { // Deprecated: Use WxCallBackResource.ProtoReflect.Descriptor instead. func (*WxCallBackResource) Descriptor() ([]byte, []int) { - return file_wechat_proto_rawDescGZIP(), []int{8} + return file_module_finance_wallet_proto_wechat_proto_rawDescGZIP(), []int{8} } func (x *WxCallBackResource) GetOriginalType() string { @@ -632,7 +632,7 @@ type WxCallBackSignInfo struct { func (x *WxCallBackSignInfo) Reset() { *x = WxCallBackSignInfo{} - mi := &file_wechat_proto_msgTypes[9] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -644,7 +644,7 @@ func (x *WxCallBackSignInfo) String() string { func (*WxCallBackSignInfo) ProtoMessage() {} func (x *WxCallBackSignInfo) ProtoReflect() protoreflect.Message { - mi := &file_wechat_proto_msgTypes[9] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -657,7 +657,7 @@ func (x *WxCallBackSignInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use WxCallBackSignInfo.ProtoReflect.Descriptor instead. func (*WxCallBackSignInfo) Descriptor() ([]byte, []int) { - return file_wechat_proto_rawDescGZIP(), []int{9} + return file_module_finance_wallet_proto_wechat_proto_rawDescGZIP(), []int{9} } func (x *WxCallBackSignInfo) GetTransactionId() string { @@ -724,7 +724,7 @@ type WxCallBackRequest struct { func (x *WxCallBackRequest) Reset() { *x = WxCallBackRequest{} - mi := &file_wechat_proto_msgTypes[10] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -736,7 +736,7 @@ func (x *WxCallBackRequest) String() string { func (*WxCallBackRequest) ProtoMessage() {} func (x *WxCallBackRequest) ProtoReflect() protoreflect.Message { - mi := &file_wechat_proto_msgTypes[10] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -749,7 +749,7 @@ func (x *WxCallBackRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WxCallBackRequest.ProtoReflect.Descriptor instead. func (*WxCallBackRequest) Descriptor() ([]byte, []int) { - return file_wechat_proto_rawDescGZIP(), []int{10} + return file_module_finance_wallet_proto_wechat_proto_rawDescGZIP(), []int{10} } func (x *WxCallBackRequest) GetId() string { @@ -811,7 +811,7 @@ type CallBackReply struct { func (x *CallBackReply) Reset() { *x = CallBackReply{} - mi := &file_wechat_proto_msgTypes[11] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -823,7 +823,7 @@ func (x *CallBackReply) String() string { func (*CallBackReply) ProtoMessage() {} func (x *CallBackReply) ProtoReflect() protoreflect.Message { - mi := &file_wechat_proto_msgTypes[11] + mi := &file_module_finance_wallet_proto_wechat_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -836,7 +836,7 @@ func (x *CallBackReply) ProtoReflect() protoreflect.Message { // Deprecated: Use CallBackReply.ProtoReflect.Descriptor instead. func (*CallBackReply) Descriptor() ([]byte, []int) { - return file_wechat_proto_rawDescGZIP(), []int{11} + return file_module_finance_wallet_proto_wechat_proto_rawDescGZIP(), []int{11} } func (x *CallBackReply) GetCode() string { @@ -853,11 +853,11 @@ func (x *CallBackReply) GetMessage() string { return "" } -var File_wechat_proto protoreflect.FileDescriptor +var File_module_finance_wallet_proto_wechat_proto protoreflect.FileDescriptor -const file_wechat_proto_rawDesc = "" + +const file_module_finance_wallet_proto_wechat_proto_rawDesc = "" + "\n" + - "\x1bfinance/wallet/wechat.proto\x12\x06wallet\"\xdc\x01\n" + + "(module/finance/wallet/proto/wechat.proto\x12\x06wallet\"\xdc\x01\n" + "\x19WxpayJSAPIPreOrderRequest\x12/\n" + "\x13user_identification\x18\x01 \x01(\tR\x12userIdentification\x12\x16\n" + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12\x1b\n" + @@ -934,23 +934,22 @@ const file_wechat_proto_rawDesc = "" + "\x0eNativePreOrder\x12\".wallet.WxpayNativePreOrderRequest\x1a .wallet.WxpayNativePreOrderReply\"\x00\x12F\n" + "\bTransfer\x12\x1c.wallet.WxpayTransferRequest\x1a\x1a.wallet.WxpayTransferReply\"\x00\x12@\n" + "\n" + - "WxCallback\x12\x19.wallet.WxCallBackRequest\x1a\x15.wallet.CallBackReply\"\x00B\n" + - "Z\b.;walletb\x06proto3" + "WxCallback\x12\x19.wallet.WxCallBackRequest\x1a\x15.wallet.CallBackReply\"\x00B*Z(bsm/full/module/finance/wallet/pb;walletb\x06proto3" var ( - file_wechat_proto_rawDescOnce sync.Once - file_wechat_proto_rawDescData []byte + file_module_finance_wallet_proto_wechat_proto_rawDescOnce sync.Once + file_module_finance_wallet_proto_wechat_proto_rawDescData []byte ) -func file_wechat_proto_rawDescGZIP() []byte { - file_wechat_proto_rawDescOnce.Do(func() { - file_wechat_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_wechat_proto_rawDesc), len(file_wechat_proto_rawDesc))) +func file_module_finance_wallet_proto_wechat_proto_rawDescGZIP() []byte { + file_module_finance_wallet_proto_wechat_proto_rawDescOnce.Do(func() { + file_module_finance_wallet_proto_wechat_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_finance_wallet_proto_wechat_proto_rawDesc), len(file_module_finance_wallet_proto_wechat_proto_rawDesc))) }) - return file_wechat_proto_rawDescData + return file_module_finance_wallet_proto_wechat_proto_rawDescData } -var file_wechat_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_wechat_proto_goTypes = []any{ +var file_module_finance_wallet_proto_wechat_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_module_finance_wallet_proto_wechat_proto_goTypes = []any{ (*WxpayJSAPIPreOrderRequest)(nil), // 0: wallet.WxpayJSAPIPreOrderRequest (*WxpayJSAPIPreOrderReply)(nil), // 1: wallet.WxpayJSAPIPreOrderReply (*WxpayAppPreOrderRequest)(nil), // 2: wallet.WxpayAppPreOrderRequest @@ -964,7 +963,7 @@ var file_wechat_proto_goTypes = []any{ (*WxCallBackRequest)(nil), // 10: wallet.WxCallBackRequest (*CallBackReply)(nil), // 11: wallet.CallBackReply } -var file_wechat_proto_depIdxs = []int32{ +var file_module_finance_wallet_proto_wechat_proto_depIdxs = []int32{ 8, // 0: wallet.WxCallBackRequest.resource:type_name -> wallet.WxCallBackResource 9, // 1: wallet.WxCallBackRequest.SignInfo:type_name -> wallet.WxCallBackSignInfo 0, // 2: wallet.Wechat.JsapiPreOrder:input_type -> wallet.WxpayJSAPIPreOrderRequest @@ -984,26 +983,26 @@ var file_wechat_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_wechat_proto_init() } -func file_wechat_proto_init() { - if File_wechat_proto != nil { +func init() { file_module_finance_wallet_proto_wechat_proto_init() } +func file_module_finance_wallet_proto_wechat_proto_init() { + if File_module_finance_wallet_proto_wechat_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_wechat_proto_rawDesc), len(file_wechat_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_finance_wallet_proto_wechat_proto_rawDesc), len(file_module_finance_wallet_proto_wechat_proto_rawDesc)), NumEnums: 0, NumMessages: 12, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_wechat_proto_goTypes, - DependencyIndexes: file_wechat_proto_depIdxs, - MessageInfos: file_wechat_proto_msgTypes, + GoTypes: file_module_finance_wallet_proto_wechat_proto_goTypes, + DependencyIndexes: file_module_finance_wallet_proto_wechat_proto_depIdxs, + MessageInfos: file_module_finance_wallet_proto_wechat_proto_msgTypes, }.Build() - File_wechat_proto = out.File - file_wechat_proto_goTypes = nil - file_wechat_proto_depIdxs = nil + File_module_finance_wallet_proto_wechat_proto = out.File + file_module_finance_wallet_proto_wechat_proto_goTypes = nil + file_module_finance_wallet_proto_wechat_proto_depIdxs = nil } diff --git a/module/finance/wallet/pb/wechat.pb.gw.go b/module/finance/wallet/pb/wechat.pb.gw.go index fe1e831..60bbba6 100644 --- a/module/finance/wallet/pb/wechat.pb.gw.go +++ b/module/finance/wallet/pb/wechat.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: wechat.proto +// source: module/finance/wallet/proto/wechat.proto /* Package wallet is a reverse proxy. diff --git a/module/finance/wallet/pb/wechat_grpc.pb.go b/module/finance/wallet/pb/wechat_grpc.pb.go index 0b17bcf..02918ba 100644 --- a/module/finance/wallet/pb/wechat_grpc.pb.go +++ b/module/finance/wallet/pb/wechat_grpc.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: wechat.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/finance/wallet/proto/wechat.proto package wallet @@ -30,15 +30,15 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type WechatClient interface { - //微信JSAPI下单 + // 微信JSAPI下单 JsapiPreOrder(ctx context.Context, in *WxpayJSAPIPreOrderRequest, opts ...grpc.CallOption) (*WxpayJSAPIPreOrderReply, error) - //微信APP支付下单 + // 微信APP支付下单 AppPreOrder(ctx context.Context, in *WxpayAppPreOrderRequest, opts ...grpc.CallOption) (*WxpayAppPreOrderReply, error) - //微信native二维码支付下单 + // 微信native二维码支付下单 NativePreOrder(ctx context.Context, in *WxpayNativePreOrderRequest, opts ...grpc.CallOption) (*WxpayNativePreOrderReply, error) - //微信转账到零钱 + // 微信转账到零钱 Transfer(ctx context.Context, in *WxpayTransferRequest, opts ...grpc.CallOption) (*WxpayTransferReply, error) - //微信支付回调 + // 微信支付回调 WxCallback(ctx context.Context, in *WxCallBackRequest, opts ...grpc.CallOption) (*CallBackReply, error) } @@ -101,23 +101,22 @@ func (c *wechatClient) WxCallback(ctx context.Context, in *WxCallBackRequest, op } // WechatServer is the server API for Wechat service. -// All implementations must embed UnimplementedWechatServer +// All implementations should embed UnimplementedWechatServer // for forward compatibility. type WechatServer interface { - //微信JSAPI下单 + // 微信JSAPI下单 JsapiPreOrder(context.Context, *WxpayJSAPIPreOrderRequest) (*WxpayJSAPIPreOrderReply, error) - //微信APP支付下单 + // 微信APP支付下单 AppPreOrder(context.Context, *WxpayAppPreOrderRequest) (*WxpayAppPreOrderReply, error) - //微信native二维码支付下单 + // 微信native二维码支付下单 NativePreOrder(context.Context, *WxpayNativePreOrderRequest) (*WxpayNativePreOrderReply, error) - //微信转账到零钱 + // 微信转账到零钱 Transfer(context.Context, *WxpayTransferRequest) (*WxpayTransferReply, error) - //微信支付回调 + // 微信支付回调 WxCallback(context.Context, *WxCallBackRequest) (*CallBackReply, error) - mustEmbedUnimplementedWechatServer() } -// UnimplementedWechatServer must be embedded to have +// UnimplementedWechatServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil @@ -125,22 +124,21 @@ type WechatServer interface { type UnimplementedWechatServer struct{} func (UnimplementedWechatServer) JsapiPreOrder(context.Context, *WxpayJSAPIPreOrderRequest) (*WxpayJSAPIPreOrderReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method JsapiPreOrder not implemented") + return nil, status.Error(codes.Unimplemented, "method JsapiPreOrder not implemented") } func (UnimplementedWechatServer) AppPreOrder(context.Context, *WxpayAppPreOrderRequest) (*WxpayAppPreOrderReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method AppPreOrder not implemented") + return nil, status.Error(codes.Unimplemented, "method AppPreOrder not implemented") } func (UnimplementedWechatServer) NativePreOrder(context.Context, *WxpayNativePreOrderRequest) (*WxpayNativePreOrderReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method NativePreOrder not implemented") + return nil, status.Error(codes.Unimplemented, "method NativePreOrder not implemented") } func (UnimplementedWechatServer) Transfer(context.Context, *WxpayTransferRequest) (*WxpayTransferReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") + return nil, status.Error(codes.Unimplemented, "method Transfer not implemented") } func (UnimplementedWechatServer) WxCallback(context.Context, *WxCallBackRequest) (*CallBackReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method WxCallback not implemented") + return nil, status.Error(codes.Unimplemented, "method WxCallback not implemented") } -func (UnimplementedWechatServer) mustEmbedUnimplementedWechatServer() {} -func (UnimplementedWechatServer) testEmbeddedByValue() {} +func (UnimplementedWechatServer) testEmbeddedByValue() {} // UnsafeWechatServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to WechatServer will @@ -150,7 +148,7 @@ type UnsafeWechatServer interface { } func RegisterWechatServer(s grpc.ServiceRegistrar, srv WechatServer) { - // If the following call pancis, it indicates UnimplementedWechatServer was + // If the following call panics, it indicates UnimplementedWechatServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -279,5 +277,5 @@ var Wechat_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "wechat.proto", + Metadata: "module/finance/wallet/proto/wechat.proto", } diff --git a/module/finance/wallet/proto/alipay.proto b/module/finance/wallet/proto/alipay.proto index 4ac706e..812f714 100644 --- a/module/finance/wallet/proto/alipay.proto +++ b/module/finance/wallet/proto/alipay.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package wallet; -option go_package = ".;wallet"; +option go_package = "bsm/full/module/finance/wallet/pb;wallet"; service Alipay { //支付宝wap支付 diff --git a/module/finance/wallet/proto/blocks.proto b/module/finance/wallet/proto/blocks.proto deleted file mode 100644 index 2190256..0000000 --- a/module/finance/wallet/proto/blocks.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; -package wallet; -option go_package = ".;wallet"; - -message FetchRequest { - int64 page_no=1; // 页数 - int64 page_size=2; // 每页记录数 - map params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11 -} - -message IdentRequest{ - int64 id = 1; // 唯一ID - string identity = 2; // 唯一码 -} - -message VersionRequest { - int64 version=1; // 时序版本号 -} - - -message SearchRequest { - string keyword=1; //关键词 -} - - -message StatusReply{ - int32 code=1; // 状态码 - string message=2; // 状态说明 - string details=3; // 数据 - int64 timeseq=4; // 响应时间序列 -} - - -message Empty{ -} \ No newline at end of file diff --git a/module/finance/wallet/proto/payment.proto b/module/finance/wallet/proto/payment.proto index d97a0c9..49db460 100644 --- a/module/finance/wallet/proto/payment.proto +++ b/module/finance/wallet/proto/payment.proto @@ -1,25 +1,25 @@ syntax = "proto3"; package wallet; -option go_package = ".;wallet"; -import "blocks.proto"; +option go_package = "bsm/full/module/finance/wallet/pb;wallet"; +import "protobuf/blocks.proto"; service Payment { - rpc Hello(Empty) returns (PaymentReply) {} + rpc Hello(blocks.Empty) returns (PaymentReply) {} //获取平台支持的支付网关 rpc Way(WayRequest) returns (WayReply) {} //获取支付的详情 - rpc Get(IdentRequest) returns (PaymentItem){} - + rpc Get(blocks.IdentRequest) returns (PaymentItem){} + //支付-电商订单 rpc ByOrder (OrderRequest) returns (PaymentReply) {}; //支付-充值 - rpc ByCharge (ChargeRequest) returns (PaymentReply) {}; + rpc ByCharge (ChargeRequest) returns (PaymentReply) {}; //回调更新支付的结果和状态 - rpc Callback (CallbackRequest) returns (StatusReply) {}; + rpc Callback (CallbackRequest) returns (blocks.StatusReply) {}; } message WayRequest { @@ -52,7 +52,7 @@ message ChargeRequest { string remark = 2; //备注 int32 pay_channel = 3; //支付模型:WECHAT,ALIPAY string pay_type = 4; //支付类型 JSAPI:微信浏览器内支付 APP:app支付 MWEB:H5支付 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付 - + string desc=5; //支付描述 string open_id=6; //微信用户的OpenID } @@ -75,6 +75,6 @@ message CallbackRequest { } message PaymentReply { - int64 code =1; + int64 code =1; map result =2; //预支付返回 } \ No newline at end of file diff --git a/module/finance/wallet/proto/wallet.proto b/module/finance/wallet/proto/wallet.proto index 60e0753..89c80df 100644 --- a/module/finance/wallet/proto/wallet.proto +++ b/module/finance/wallet/proto/wallet.proto @@ -1,33 +1,33 @@ syntax = "proto3"; package wallet; -option go_package = ".;wallet"; -import "blocks.proto"; +option go_package = "bsm/full/module/finance/wallet/pb;wallet"; +import "protobuf/blocks.proto"; service Basic { //获取钱包信息 rpc GetWallet(GetWalletRequest) returns (GetWalletReply) {} //设置支付密码 - rpc SetPayPassword(SetPayPasswordRequest) returns (StatusReply) {} + rpc SetPayPassword(SetPayPasswordRequest) returns (blocks.StatusReply) {} //绑定微信或支付宝账户 - rpc BindPaymentId(BindPaymentIDRequest) returns (StatusReply) {} + rpc BindPaymentId(BindPaymentIDRequest) returns (blocks.StatusReply) {} //查询交易记录 rpc Transactions(TransactionsRequest) returns (TransactionsReply) {} - + //添加银行卡 - rpc AddBankCard (AddBankCardRequest) returns (StatusReply) {}; + rpc AddBankCard (AddBankCardRequest) returns (blocks.StatusReply) {}; //获取用户银行卡列表 - rpc GetBankCard (FinanceEmpty) returns (GetBankCardReply) {}; + rpc GetBankCard (FinanceEmpty) returns (GetBankCardReply) {}; //删除银行卡 - rpc RmBankCard (RmBankCardRequest) returns (StatusReply) {}; - + rpc RmBankCard (RmBankCardRequest) returns (blocks.StatusReply) {}; + //申请提现 - rpc ApplyCash (ApplyCashRequest) returns (StatusReply) {}; + rpc ApplyCash (ApplyCashRequest) returns (blocks.StatusReply) {}; } message GetWalletRequest { diff --git a/module/finance/wallet/proto/wechat.proto b/module/finance/wallet/proto/wechat.proto index 59b241b..64fae5c 100644 --- a/module/finance/wallet/proto/wechat.proto +++ b/module/finance/wallet/proto/wechat.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package wallet; -option go_package = ".;wallet"; +option go_package = "bsm/full/module/finance/wallet/pb;wallet"; service Wechat { //微信JSAPI下单 rpc JsapiPreOrder(WxpayJSAPIPreOrderRequest) returns (WxpayJSAPIPreOrderReply) {} diff --git a/module/social/feed/pb/blocks.pb.go b/module/social/feed/pb/blocks.pb.go deleted file mode 100644 index 7c0e30c..0000000 --- a/module/social/feed/pb/blocks.pb.go +++ /dev/null @@ -1,706 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: blocks.proto - -package feed - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type FetchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PageNo int64 `protobuf:"varint,1,opt,name=page_no,json=pageNo,proto3" json:"page_no,omitempty"` // 页数 - PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页记录数 - Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:category_id=?,vlaue=11 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchRequest) Reset() { - *x = FetchRequest{} - mi := &file_blocks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRequest) ProtoMessage() {} - -func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. -func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{0} -} - -func (x *FetchRequest) GetPageNo() int64 { - if x != nil { - return x.PageNo - } - return 0 -} - -func (x *FetchRequest) GetPageSize() int64 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *FetchRequest) GetParams() map[string]string { - if x != nil { - return x.Params - } - return nil -} - -type IdentRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IdentRequest) Reset() { - *x = IdentRequest{} - mi := &file_blocks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IdentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IdentRequest) ProtoMessage() {} - -func (x *IdentRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. -func (*IdentRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{1} -} - -func (x *IdentRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *IdentRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -type VersionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 时序版本号 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *VersionRequest) Reset() { - *x = VersionRequest{} - mi := &file_blocks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *VersionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersionRequest) ProtoMessage() {} - -func (x *VersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. -func (*VersionRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{2} -} - -func (x *VersionRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type SearchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` //关键词 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchRequest) Reset() { - *x = SearchRequest{} - mi := &file_blocks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchRequest) ProtoMessage() {} - -func (x *SearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. -func (*SearchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{3} -} - -func (x *SearchRequest) GetKeyword() string { - if x != nil { - return x.Keyword - } - return "" -} - -type StatusReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // 数据 - Timeseq int64 `protobuf:"varint,2,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusReply) Reset() { - *x = StatusReply{} - mi := &file_blocks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusReply) ProtoMessage() {} - -func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. -func (*StatusReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{4} -} - -func (x *StatusReply) GetData() string { - if x != nil { - return x.Data - } - return "" -} - -func (x *StatusReply) GetTimeseq() int64 { - if x != nil { - return x.Timeseq - } - return 0 -} - -type Empty struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Empty) Reset() { - *x = Empty{} - mi := &file_blocks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Empty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Empty) ProtoMessage() {} - -func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{5} -} - -// 推文列表 -type PostListReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - List []*PostItem `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` - Cnt int64 `protobuf:"varint,2,opt,name=cnt,proto3" json:"cnt,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PostListReply) Reset() { - *x = PostListReply{} - mi := &file_blocks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PostListReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PostListReply) ProtoMessage() {} - -func (x *PostListReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PostListReply.ProtoReflect.Descriptor instead. -func (*PostListReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{6} -} - -func (x *PostListReply) GetList() []*PostItem { - if x != nil { - return x.List - } - return nil -} - -func (x *PostListReply) GetCnt() int64 { - if x != nil { - return x.Cnt - } - return 0 -} - -// 推文 -type PostItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // 内容 - FeedId int64 `protobuf:"varint,3,opt,name=feed_id,json=feedId,proto3" json:"feed_id,omitempty"` // 通行证ID - FeedIdentity string `protobuf:"bytes,4,opt,name=feed_identity,json=feedIdentity,proto3" json:"feed_identity,omitempty"` // 通行证Identity - IsOpen bool `protobuf:"varint,5,opt,name=is_open,json=isOpen,proto3" json:"is_open,omitempty"` // 是否公开:默认为0-公开,1-不公开 - CntUnlike int64 `protobuf:"varint,6,opt,name=cnt_unlike,json=cntUnlike,proto3" json:"cnt_unlike,omitempty"` // 点踩数量 - CntComment int64 `protobuf:"varint,7,opt,name=cnt_comment,json=cntComment,proto3" json:"cnt_comment,omitempty"` // 评论数量 - CntLike int64 `protobuf:"varint,8,opt,name=cnt_like,json=cntLike,proto3" json:"cnt_like,omitempty"` // 点赞数量 - Attachs []*AttachItem `protobuf:"bytes,9,rep,name=attachs,proto3" json:"attachs,omitempty"` // 附件信息 - Tags []*TagItem `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"` // 所属话题 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PostItem) Reset() { - *x = PostItem{} - mi := &file_blocks_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PostItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PostItem) ProtoMessage() {} - -func (x *PostItem) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PostItem.ProtoReflect.Descriptor instead. -func (*PostItem) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{7} -} - -func (x *PostItem) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *PostItem) GetContent() string { - if x != nil { - return x.Content - } - return "" -} - -func (x *PostItem) GetFeedId() int64 { - if x != nil { - return x.FeedId - } - return 0 -} - -func (x *PostItem) GetFeedIdentity() string { - if x != nil { - return x.FeedIdentity - } - return "" -} - -func (x *PostItem) GetIsOpen() bool { - if x != nil { - return x.IsOpen - } - return false -} - -func (x *PostItem) GetCntUnlike() int64 { - if x != nil { - return x.CntUnlike - } - return 0 -} - -func (x *PostItem) GetCntComment() int64 { - if x != nil { - return x.CntComment - } - return 0 -} - -func (x *PostItem) GetCntLike() int64 { - if x != nil { - return x.CntLike - } - return 0 -} - -func (x *PostItem) GetAttachs() []*AttachItem { - if x != nil { - return x.Attachs - } - return nil -} - -func (x *PostItem) GetTags() []*TagItem { - if x != nil { - return x.Tags - } - return nil -} - -// 附件 -type AttachItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - AttachType string `protobuf:"bytes,2,opt,name=attach_type,json=attachType,proto3" json:"attach_type,omitempty"` // 文件类型 - Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` // 文件路径 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AttachItem) Reset() { - *x = AttachItem{} - mi := &file_blocks_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AttachItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AttachItem) ProtoMessage() {} - -func (x *AttachItem) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AttachItem.ProtoReflect.Descriptor instead. -func (*AttachItem) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{8} -} - -func (x *AttachItem) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *AttachItem) GetAttachType() string { - if x != nil { - return x.AttachType - } - return "" -} - -func (x *AttachItem) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -// 标签 -type TagItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // 标签唯一码 - Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // 标签内容 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TagItem) Reset() { - *x = TagItem{} - mi := &file_blocks_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TagItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TagItem) ProtoMessage() {} - -func (x *TagItem) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TagItem.ProtoReflect.Descriptor instead. -func (*TagItem) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{9} -} - -func (x *TagItem) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *TagItem) GetContent() string { - if x != nil { - return x.Content - } - return "" -} - -var File_blocks_proto protoreflect.FileDescriptor - -const file_blocks_proto_rawDesc = "" + - "\n" + - "\x11feed/blocks.proto\x12\x04feed\"\xb7\x01\n" + - "\fFetchRequest\x12\x17\n" + - "\apage_no\x18\x01 \x01(\x03R\x06pageNo\x12\x1b\n" + - "\tpage_size\x18\x02 \x01(\x03R\bpageSize\x126\n" + - "\x06params\x18\x03 \x03(\v2\x1e.feed.FetchRequest.ParamsEntryR\x06params\x1a9\n" + - "\vParamsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" + - "\fIdentRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\"*\n" + - "\x0eVersionRequest\x12\x18\n" + - "\aversion\x18\x01 \x01(\x03R\aversion\")\n" + - "\rSearchRequest\x12\x18\n" + - "\akeyword\x18\x01 \x01(\tR\akeyword\";\n" + - "\vStatusReply\x12\x12\n" + - "\x04data\x18\x01 \x01(\tR\x04data\x12\x18\n" + - "\atimeseq\x18\x02 \x01(\x03R\atimeseq\"\a\n" + - "\x05Empty\"E\n" + - "\rPostListReply\x12\"\n" + - "\x04list\x18\x01 \x03(\v2\x0e.feed.PostItemR\x04list\x12\x10\n" + - "\x03cnt\x18\x02 \x01(\x03R\x03cnt\"\xc1\x02\n" + - "\bPostItem\x12\x1a\n" + - "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" + - "\acontent\x18\x02 \x01(\tR\acontent\x12\x17\n" + - "\afeed_id\x18\x03 \x01(\x03R\x06feedId\x12#\n" + - "\rfeed_identity\x18\x04 \x01(\tR\ffeedIdentity\x12\x17\n" + - "\ais_open\x18\x05 \x01(\bR\x06isOpen\x12\x1d\n" + - "\n" + - "cnt_unlike\x18\x06 \x01(\x03R\tcntUnlike\x12\x1f\n" + - "\vcnt_comment\x18\a \x01(\x03R\n" + - "cntComment\x12\x19\n" + - "\bcnt_like\x18\b \x01(\x03R\acntLike\x12*\n" + - "\aattachs\x18\t \x03(\v2\x10.feed.AttachItemR\aattachs\x12!\n" + - "\x04tags\x18\n" + - " \x03(\v2\r.feed.TagItemR\x04tags\"[\n" + - "\n" + - "AttachItem\x12\x1a\n" + - "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1f\n" + - "\vattach_type\x18\x02 \x01(\tR\n" + - "attachType\x12\x10\n" + - "\x03url\x18\x03 \x01(\tR\x03url\"5\n" + - "\aTagItem\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x18\n" + - "\acontent\x18\x02 \x01(\tR\acontentB\bZ\x06.;feedb\x06proto3" - -var ( - file_blocks_proto_rawDescOnce sync.Once - file_blocks_proto_rawDescData []byte -) - -func file_blocks_proto_rawDescGZIP() []byte { - file_blocks_proto_rawDescOnce.Do(func() { - file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc))) - }) - return file_blocks_proto_rawDescData -} - -var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_blocks_proto_goTypes = []any{ - (*FetchRequest)(nil), // 0: feed.FetchRequest - (*IdentRequest)(nil), // 1: feed.IdentRequest - (*VersionRequest)(nil), // 2: feed.VersionRequest - (*SearchRequest)(nil), // 3: feed.SearchRequest - (*StatusReply)(nil), // 4: feed.StatusReply - (*Empty)(nil), // 5: feed.Empty - (*PostListReply)(nil), // 6: feed.PostListReply - (*PostItem)(nil), // 7: feed.PostItem - (*AttachItem)(nil), // 8: feed.AttachItem - (*TagItem)(nil), // 9: feed.TagItem - nil, // 10: feed.FetchRequest.ParamsEntry -} -var file_blocks_proto_depIdxs = []int32{ - 10, // 0: feed.FetchRequest.params:type_name -> feed.FetchRequest.ParamsEntry - 7, // 1: feed.PostListReply.list:type_name -> feed.PostItem - 8, // 2: feed.PostItem.attachs:type_name -> feed.AttachItem - 9, // 3: feed.PostItem.tags:type_name -> feed.TagItem - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_blocks_proto_init() } -func file_blocks_proto_init() { - if File_blocks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 11, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_blocks_proto_goTypes, - DependencyIndexes: file_blocks_proto_depIdxs, - MessageInfos: file_blocks_proto_msgTypes, - }.Build() - File_blocks_proto = out.File - file_blocks_proto_goTypes = nil - file_blocks_proto_depIdxs = nil -} diff --git a/module/social/feed/pb/blocks_compat.go b/module/social/feed/pb/blocks_compat.go new file mode 100644 index 0000000..798000f --- /dev/null +++ b/module/social/feed/pb/blocks_compat.go @@ -0,0 +1,14 @@ +package feed + +import blocks "bsm/full/protobuf" + +type Empty = blocks.Empty +type FetchRequest = blocks.FetchRequest +type IdentRequest = blocks.IdentRequest +type VersionRequest = blocks.VersionRequest +type SearchRequest = blocks.SearchRequest +type StatusReply = blocks.DataStatusReply +type PostListReply = blocks.FeedPostListReply +type PostItem = blocks.FeedPostItem +type AttachItem = blocks.FeedAttachItem +type TagItem = blocks.FeedTagItem diff --git a/module/social/feed/pb/post.pb.go b/module/social/feed/pb/post.pb.go index 95ccb31..838d9e8 100644 --- a/module/social/feed/pb/post.pb.go +++ b/module/social/feed/pb/post.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: post.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/social/feed/proto/post.proto package feed import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -32,7 +33,7 @@ type CommentListReply struct { func (x *CommentListReply) Reset() { *x = CommentListReply{} - mi := &file_post_proto_msgTypes[0] + mi := &file_module_social_feed_proto_post_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +45,7 @@ func (x *CommentListReply) String() string { func (*CommentListReply) ProtoMessage() {} func (x *CommentListReply) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[0] + mi := &file_module_social_feed_proto_post_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +58,7 @@ func (x *CommentListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use CommentListReply.ProtoReflect.Descriptor instead. func (*CommentListReply) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{0} + return file_module_social_feed_proto_post_proto_rawDescGZIP(), []int{0} } func (x *CommentListReply) GetList() []*CommentItem { @@ -87,7 +88,7 @@ type CommentItem struct { func (x *CommentItem) Reset() { *x = CommentItem{} - mi := &file_post_proto_msgTypes[1] + mi := &file_module_social_feed_proto_post_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -99,7 +100,7 @@ func (x *CommentItem) String() string { func (*CommentItem) ProtoMessage() {} func (x *CommentItem) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[1] + mi := &file_module_social_feed_proto_post_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112,7 +113,7 @@ func (x *CommentItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CommentItem.ProtoReflect.Descriptor instead. func (*CommentItem) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{1} + return file_module_social_feed_proto_post_proto_rawDescGZIP(), []int{1} } func (x *CommentItem) GetIdentity() string { @@ -161,7 +162,7 @@ type PostActionRequest struct { func (x *PostActionRequest) Reset() { *x = PostActionRequest{} - mi := &file_post_proto_msgTypes[2] + mi := &file_module_social_feed_proto_post_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -173,7 +174,7 @@ func (x *PostActionRequest) String() string { func (*PostActionRequest) ProtoMessage() {} func (x *PostActionRequest) ProtoReflect() protoreflect.Message { - mi := &file_post_proto_msgTypes[2] + mi := &file_module_social_feed_proto_post_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -186,7 +187,7 @@ func (x *PostActionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PostActionRequest.ProtoReflect.Descriptor instead. func (*PostActionRequest) Descriptor() ([]byte, []int) { - return file_post_proto_rawDescGZIP(), []int{2} + return file_module_social_feed_proto_post_proto_rawDescGZIP(), []int{2} } func (x *PostActionRequest) GetActionOp() string { @@ -210,12 +211,11 @@ func (x *PostActionRequest) GetIdentity() string { return "" } -var File_post_proto protoreflect.FileDescriptor +var File_module_social_feed_proto_post_proto protoreflect.FileDescriptor -const file_post_proto_rawDesc = "" + +const file_module_social_feed_proto_post_proto_rawDesc = "" + "\n" + - "\x16" + - "social/feed/post.proto\x12\x04feed\x1a\x11feed/blocks.proto\"O\n" + + "#module/social/feed/proto/post.proto\x12\x04feed\x1a\x15protobuf/blocks.proto\"O\n" + "\x10CommentListReply\x12%\n" + "\x04list\x18\x01 \x03(\v2\x11.feed.CommentItemR\x04list\x12\x14\n" + "\x05total\x18\x02 \x01(\x03R\x05total\"\xc1\x01\n" + @@ -230,60 +230,60 @@ const file_post_proto_rawDesc = "" + "\taction_op\x18\x01 \x01(\tR\bactionOp\x12\x1f\n" + "\vaction_type\x18\x02 \x01(\tR\n" + "actionType\x12\x1a\n" + - "\bidentity\x18\x03 \x01(\tR\bidentity2\xb0\x03\n" + - "\x04Post\x122\n" + - "\x05Fetch\x12\x12.feed.FetchRequest\x1a\x13.feed.PostListReply\"\x00\x12-\n" + - "\x06Create\x12\x0e.feed.PostItem\x1a\x11.feed.StatusReply\"\x00\x12-\n" + - "\x06Change\x12\x0e.feed.PostItem\x1a\x11.feed.StatusReply\"\x00\x121\n" + - "\x06Remove\x12\x12.feed.IdentRequest\x1a\x11.feed.StatusReply\"\x00\x12;\n" + - "\vCommentList\x12\x12.feed.FetchRequest\x1a\x16.feed.CommentListReply\"\x00\x124\n" + + "\bidentity\x18\x03 \x01(\tR\bidentity2\xee\x03\n" + + "\x04Post\x12:\n" + + "\x05Fetch\x12\x14.blocks.FetchRequest\x1a\x19.blocks.FeedPostListReply\"\x00\x129\n" + + "\x06Create\x12\x14.blocks.FeedPostItem\x1a\x17.blocks.DataStatusReply\"\x00\x129\n" + + "\x06Change\x12\x14.blocks.FeedPostItem\x1a\x17.blocks.DataStatusReply\"\x00\x129\n" + + "\x06Remove\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00\x12=\n" + + "\vCommentList\x12\x14.blocks.FetchRequest\x1a\x16.feed.CommentListReply\"\x00\x12:\n" + "\n" + - "AddComment\x12\x11.feed.CommentItem\x1a\x11.feed.StatusReply\"\x00\x128\n" + - "\rDeleteComment\x12\x12.feed.IdentRequest\x1a\x11.feed.StatusReply\"\x00\x126\n" + - "\x06Action\x12\x17.feed.PostActionRequest\x1a\x11.feed.StatusReply\"\x00B\bZ\x06.;feedb\x06proto3" + "AddComment\x12\x11.feed.CommentItem\x1a\x17.blocks.DataStatusReply\"\x00\x12@\n" + + "\rDeleteComment\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00\x12<\n" + + "\x06Action\x12\x17.feed.PostActionRequest\x1a\x17.blocks.DataStatusReply\"\x00B%Z#bsm/full/module/social/feed/pb;feedb\x06proto3" var ( - file_post_proto_rawDescOnce sync.Once - file_post_proto_rawDescData []byte + file_module_social_feed_proto_post_proto_rawDescOnce sync.Once + file_module_social_feed_proto_post_proto_rawDescData []byte ) -func file_post_proto_rawDescGZIP() []byte { - file_post_proto_rawDescOnce.Do(func() { - file_post_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_post_proto_rawDesc), len(file_post_proto_rawDesc))) +func file_module_social_feed_proto_post_proto_rawDescGZIP() []byte { + file_module_social_feed_proto_post_proto_rawDescOnce.Do(func() { + file_module_social_feed_proto_post_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_post_proto_rawDesc), len(file_module_social_feed_proto_post_proto_rawDesc))) }) - return file_post_proto_rawDescData + return file_module_social_feed_proto_post_proto_rawDescData } -var file_post_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_post_proto_goTypes = []any{ - (*CommentListReply)(nil), // 0: feed.CommentListReply - (*CommentItem)(nil), // 1: feed.CommentItem - (*PostActionRequest)(nil), // 2: feed.PostActionRequest - (*FetchRequest)(nil), // 3: feed.FetchRequest - (*PostItem)(nil), // 4: feed.PostItem - (*IdentRequest)(nil), // 5: feed.IdentRequest - (*PostListReply)(nil), // 6: feed.PostListReply - (*StatusReply)(nil), // 7: feed.StatusReply +var file_module_social_feed_proto_post_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_module_social_feed_proto_post_proto_goTypes = []any{ + (*CommentListReply)(nil), // 0: feed.CommentListReply + (*CommentItem)(nil), // 1: feed.CommentItem + (*PostActionRequest)(nil), // 2: feed.PostActionRequest + (*protobuf.FetchRequest)(nil), // 3: blocks.FetchRequest + (*protobuf.FeedPostItem)(nil), // 4: blocks.FeedPostItem + (*protobuf.IdentRequest)(nil), // 5: blocks.IdentRequest + (*protobuf.FeedPostListReply)(nil), // 6: blocks.FeedPostListReply + (*protobuf.DataStatusReply)(nil), // 7: blocks.DataStatusReply } -var file_post_proto_depIdxs = []int32{ +var file_module_social_feed_proto_post_proto_depIdxs = []int32{ 1, // 0: feed.CommentListReply.list:type_name -> feed.CommentItem 1, // 1: feed.CommentItem.sub_comment:type_name -> feed.CommentItem - 3, // 2: feed.Post.Fetch:input_type -> feed.FetchRequest - 4, // 3: feed.Post.Create:input_type -> feed.PostItem - 4, // 4: feed.Post.Change:input_type -> feed.PostItem - 5, // 5: feed.Post.Remove:input_type -> feed.IdentRequest - 3, // 6: feed.Post.CommentList:input_type -> feed.FetchRequest + 3, // 2: feed.Post.Fetch:input_type -> blocks.FetchRequest + 4, // 3: feed.Post.Create:input_type -> blocks.FeedPostItem + 4, // 4: feed.Post.Change:input_type -> blocks.FeedPostItem + 5, // 5: feed.Post.Remove:input_type -> blocks.IdentRequest + 3, // 6: feed.Post.CommentList:input_type -> blocks.FetchRequest 1, // 7: feed.Post.AddComment:input_type -> feed.CommentItem - 5, // 8: feed.Post.DeleteComment:input_type -> feed.IdentRequest + 5, // 8: feed.Post.DeleteComment:input_type -> blocks.IdentRequest 2, // 9: feed.Post.Action:input_type -> feed.PostActionRequest - 6, // 10: feed.Post.Fetch:output_type -> feed.PostListReply - 7, // 11: feed.Post.Create:output_type -> feed.StatusReply - 7, // 12: feed.Post.Change:output_type -> feed.StatusReply - 7, // 13: feed.Post.Remove:output_type -> feed.StatusReply + 6, // 10: feed.Post.Fetch:output_type -> blocks.FeedPostListReply + 7, // 11: feed.Post.Create:output_type -> blocks.DataStatusReply + 7, // 12: feed.Post.Change:output_type -> blocks.DataStatusReply + 7, // 13: feed.Post.Remove:output_type -> blocks.DataStatusReply 0, // 14: feed.Post.CommentList:output_type -> feed.CommentListReply - 7, // 15: feed.Post.AddComment:output_type -> feed.StatusReply - 7, // 16: feed.Post.DeleteComment:output_type -> feed.StatusReply - 7, // 17: feed.Post.Action:output_type -> feed.StatusReply + 7, // 15: feed.Post.AddComment:output_type -> blocks.DataStatusReply + 7, // 16: feed.Post.DeleteComment:output_type -> blocks.DataStatusReply + 7, // 17: feed.Post.Action:output_type -> blocks.DataStatusReply 10, // [10:18] is the sub-list for method output_type 2, // [2:10] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -291,27 +291,26 @@ var file_post_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_post_proto_init() } -func file_post_proto_init() { - if File_post_proto != nil { +func init() { file_module_social_feed_proto_post_proto_init() } +func file_module_social_feed_proto_post_proto_init() { + if File_module_social_feed_proto_post_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_post_proto_rawDesc), len(file_post_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_post_proto_rawDesc), len(file_module_social_feed_proto_post_proto_rawDesc)), NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_post_proto_goTypes, - DependencyIndexes: file_post_proto_depIdxs, - MessageInfos: file_post_proto_msgTypes, + GoTypes: file_module_social_feed_proto_post_proto_goTypes, + DependencyIndexes: file_module_social_feed_proto_post_proto_depIdxs, + MessageInfos: file_module_social_feed_proto_post_proto_msgTypes, }.Build() - File_post_proto = out.File - file_post_proto_goTypes = nil - file_post_proto_depIdxs = nil + File_module_social_feed_proto_post_proto = out.File + file_module_social_feed_proto_post_proto_goTypes = nil + file_module_social_feed_proto_post_proto_depIdxs = nil } diff --git a/module/social/feed/pb/post.pb.gw.go b/module/social/feed/pb/post.pb.gw.go index 91e7e7a..aff60d7 100644 --- a/module/social/feed/pb/post.pb.gw.go +++ b/module/social/feed/pb/post.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: post.proto +// source: module/social/feed/proto/post.proto /* Package feed is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package feed import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Post_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Post_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, clie func local_request_Post_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -64,7 +65,7 @@ func local_request_Post_Fetch_0(ctx context.Context, marshaler runtime.Marshaler func request_Post_Create_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq PostItem + protoReq blocks.FeedPostItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Post_Create_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Post_Create_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq PostItem + protoReq blocks.FeedPostItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -91,7 +92,7 @@ func local_request_Post_Create_0(ctx context.Context, marshaler runtime.Marshale func request_Post_Change_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq PostItem + protoReq blocks.FeedPostItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Post_Change_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Post_Change_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq PostItem + protoReq blocks.FeedPostItem metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -118,7 +119,7 @@ func local_request_Post_Change_0(ctx context.Context, marshaler runtime.Marshale func request_Post_Remove_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Post_Remove_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Post_Remove_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -145,7 +146,7 @@ func local_request_Post_Remove_0(ctx context.Context, marshaler runtime.Marshale func request_Post_CommentList_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -160,7 +161,7 @@ func request_Post_CommentList_0(ctx context.Context, marshaler runtime.Marshaler func local_request_Post_CommentList_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -199,7 +200,7 @@ func local_request_Post_AddComment_0(ctx context.Context, marshaler runtime.Mars func request_Post_DeleteComment_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -214,7 +215,7 @@ func request_Post_DeleteComment_0(ctx context.Context, marshaler runtime.Marshal func local_request_Post_DeleteComment_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/social/feed/pb/post_grpc.pb.go b/module/social/feed/pb/post_grpc.pb.go index e6ea333..a652a96 100644 --- a/module/social/feed/pb/post_grpc.pb.go +++ b/module/social/feed/pb/post_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: post.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/social/feed/proto/post.proto package feed import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -36,21 +37,21 @@ const ( // 推文相关操作 type PostClient interface { // 推文列表 - Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) + Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) // 新建推文 - Create(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *protobuf.FeedPostItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) // 修改推文 - Change(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) + Change(ctx context.Context, in *protobuf.FeedPostItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) // 删除推文 - Remove(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + Remove(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) // 评论列表 - CommentList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*CommentListReply, error) + CommentList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*CommentListReply, error) // 新建评论 - AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) + AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) // 删除评论 - DeleteComment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + DeleteComment(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) // 计数操作 - Action(ctx context.Context, in *PostActionRequest, opts ...grpc.CallOption) (*StatusReply, error) + Action(ctx context.Context, in *PostActionRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) } type postClient struct { @@ -61,9 +62,9 @@ func NewPostClient(cc grpc.ClientConnInterface) PostClient { return &postClient{cc} } -func (c *postClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) { +func (c *postClient) Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(PostListReply) + out := new(protobuf.FeedPostListReply) err := c.cc.Invoke(ctx, Post_Fetch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -71,9 +72,9 @@ func (c *postClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.C return out, nil } -func (c *postClient) Create(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) Create(ctx context.Context, in *protobuf.FeedPostItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Post_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -81,9 +82,9 @@ func (c *postClient) Create(ctx context.Context, in *PostItem, opts ...grpc.Call return out, nil } -func (c *postClient) Change(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) Change(ctx context.Context, in *protobuf.FeedPostItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Post_Change_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -91,9 +92,9 @@ func (c *postClient) Change(ctx context.Context, in *PostItem, opts ...grpc.Call return out, nil } -func (c *postClient) Remove(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) Remove(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Post_Remove_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -101,7 +102,7 @@ func (c *postClient) Remove(ctx context.Context, in *IdentRequest, opts ...grpc. return out, nil } -func (c *postClient) CommentList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*CommentListReply, error) { +func (c *postClient) CommentList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*CommentListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CommentListReply) err := c.cc.Invoke(ctx, Post_CommentList_FullMethodName, in, out, cOpts...) @@ -111,9 +112,9 @@ func (c *postClient) CommentList(ctx context.Context, in *FetchRequest, opts ... return out, nil } -func (c *postClient) AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Post_AddComment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -121,9 +122,9 @@ func (c *postClient) AddComment(ctx context.Context, in *CommentItem, opts ...gr return out, nil } -func (c *postClient) DeleteComment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) DeleteComment(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Post_DeleteComment_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -131,9 +132,9 @@ func (c *postClient) DeleteComment(ctx context.Context, in *IdentRequest, opts . return out, nil } -func (c *postClient) Action(ctx context.Context, in *PostActionRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *postClient) Action(ctx context.Context, in *PostActionRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Post_Action_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -142,63 +143,61 @@ func (c *postClient) Action(ctx context.Context, in *PostActionRequest, opts ... } // PostServer is the server API for Post service. -// All implementations must embed UnimplementedPostServer +// All implementations should embed UnimplementedPostServer // for forward compatibility. // // 推文相关操作 type PostServer interface { // 推文列表 - Fetch(context.Context, *FetchRequest) (*PostListReply, error) + Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) // 新建推文 - Create(context.Context, *PostItem) (*StatusReply, error) + Create(context.Context, *protobuf.FeedPostItem) (*protobuf.DataStatusReply, error) // 修改推文 - Change(context.Context, *PostItem) (*StatusReply, error) + Change(context.Context, *protobuf.FeedPostItem) (*protobuf.DataStatusReply, error) // 删除推文 - Remove(context.Context, *IdentRequest) (*StatusReply, error) + Remove(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) // 评论列表 - CommentList(context.Context, *FetchRequest) (*CommentListReply, error) + CommentList(context.Context, *protobuf.FetchRequest) (*CommentListReply, error) // 新建评论 - AddComment(context.Context, *CommentItem) (*StatusReply, error) + AddComment(context.Context, *CommentItem) (*protobuf.DataStatusReply, error) // 删除评论 - DeleteComment(context.Context, *IdentRequest) (*StatusReply, error) + DeleteComment(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) // 计数操作 - Action(context.Context, *PostActionRequest) (*StatusReply, error) - mustEmbedUnimplementedPostServer() + Action(context.Context, *PostActionRequest) (*protobuf.DataStatusReply, error) } -// UnimplementedPostServer must be embedded to have +// UnimplementedPostServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedPostServer struct{} -func (UnimplementedPostServer) Fetch(context.Context, *FetchRequest) (*PostListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") +func (UnimplementedPostServer) Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) { + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedPostServer) Create(context.Context, *PostItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +func (UnimplementedPostServer) Create(context.Context, *protobuf.FeedPostItem) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedPostServer) Change(context.Context, *PostItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Change not implemented") +func (UnimplementedPostServer) Change(context.Context, *protobuf.FeedPostItem) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Change not implemented") } -func (UnimplementedPostServer) Remove(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Remove not implemented") +func (UnimplementedPostServer) Remove(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Remove not implemented") } -func (UnimplementedPostServer) CommentList(context.Context, *FetchRequest) (*CommentListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method CommentList not implemented") +func (UnimplementedPostServer) CommentList(context.Context, *protobuf.FetchRequest) (*CommentListReply, error) { + return nil, status.Error(codes.Unimplemented, "method CommentList not implemented") } -func (UnimplementedPostServer) AddComment(context.Context, *CommentItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddComment not implemented") +func (UnimplementedPostServer) AddComment(context.Context, *CommentItem) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method AddComment not implemented") } -func (UnimplementedPostServer) DeleteComment(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteComment not implemented") +func (UnimplementedPostServer) DeleteComment(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteComment not implemented") } -func (UnimplementedPostServer) Action(context.Context, *PostActionRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Action not implemented") +func (UnimplementedPostServer) Action(context.Context, *PostActionRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Action not implemented") } -func (UnimplementedPostServer) mustEmbedUnimplementedPostServer() {} -func (UnimplementedPostServer) testEmbeddedByValue() {} +func (UnimplementedPostServer) testEmbeddedByValue() {} // UnsafePostServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PostServer will @@ -208,7 +207,7 @@ type UnsafePostServer interface { } func RegisterPostServer(s grpc.ServiceRegistrar, srv PostServer) { - // If the following call pancis, it indicates UnimplementedPostServer was + // If the following call panics, it indicates UnimplementedPostServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -219,7 +218,7 @@ func RegisterPostServer(s grpc.ServiceRegistrar, srv PostServer) { } func _Post_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -231,13 +230,13 @@ func _Post_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interfac FullMethod: Post_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PostServer).Fetch(ctx, req.(*FetchRequest)) + return srv.(PostServer).Fetch(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } func _Post_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PostItem) + in := new(protobuf.FeedPostItem) if err := dec(in); err != nil { return nil, err } @@ -249,13 +248,13 @@ func _Post_Create_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Post_Create_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PostServer).Create(ctx, req.(*PostItem)) + return srv.(PostServer).Create(ctx, req.(*protobuf.FeedPostItem)) } return interceptor(ctx, in, info, handler) } func _Post_Change_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PostItem) + in := new(protobuf.FeedPostItem) if err := dec(in); err != nil { return nil, err } @@ -267,13 +266,13 @@ func _Post_Change_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Post_Change_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PostServer).Change(ctx, req.(*PostItem)) + return srv.(PostServer).Change(ctx, req.(*protobuf.FeedPostItem)) } return interceptor(ctx, in, info, handler) } func _Post_Remove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -285,13 +284,13 @@ func _Post_Remove_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Post_Remove_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PostServer).Remove(ctx, req.(*IdentRequest)) + return srv.(PostServer).Remove(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Post_CommentList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -303,7 +302,7 @@ func _Post_CommentList_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: Post_CommentList_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PostServer).CommentList(ctx, req.(*FetchRequest)) + return srv.(PostServer).CommentList(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -327,7 +326,7 @@ func _Post_AddComment_Handler(srv interface{}, ctx context.Context, dec func(int } func _Post_DeleteComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -339,7 +338,7 @@ func _Post_DeleteComment_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: Post_DeleteComment_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PostServer).DeleteComment(ctx, req.(*IdentRequest)) + return srv.(PostServer).DeleteComment(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -403,5 +402,5 @@ var Post_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "post.proto", + Metadata: "module/social/feed/proto/post.proto", } diff --git a/module/social/feed/pb/setting.pb.go b/module/social/feed/pb/setting.pb.go index b90cb44..3de8009 100644 --- a/module/social/feed/pb/setting.pb.go +++ b/module/social/feed/pb/setting.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: setting.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/social/feed/proto/setting.proto package feed import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -20,23 +21,23 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -var File_setting_proto protoreflect.FileDescriptor +var File_module_social_feed_proto_setting_proto protoreflect.FileDescriptor -const file_setting_proto_rawDesc = "" + +const file_module_social_feed_proto_setting_proto_rawDesc = "" + "\n" + - "\x19social/feed/setting.proto\x12\x04feed\x1a\x11feed/blocks.proto2S\n" + - "\aSetting\x12\"\n" + - "\x04Info\x12\v.feed.Empty\x1a\v.feed.Empty\"\x00\x12$\n" + - "\x06Rights\x12\v.feed.Empty\x1a\v.feed.Empty\"\x00B\bZ\x06.;feedb\x06proto3" + "&module/social/feed/proto/setting.proto\x12\x04feed\x1a\x15protobuf/blocks.proto2[\n" + + "\aSetting\x12&\n" + + "\x04Info\x12\r.blocks.Empty\x1a\r.blocks.Empty\"\x00\x12(\n" + + "\x06Rights\x12\r.blocks.Empty\x1a\r.blocks.Empty\"\x00B%Z#bsm/full/module/social/feed/pb;feedb\x06proto3" -var file_setting_proto_goTypes = []any{ - (*Empty)(nil), // 0: feed.Empty +var file_module_social_feed_proto_setting_proto_goTypes = []any{ + (*protobuf.Empty)(nil), // 0: blocks.Empty } -var file_setting_proto_depIdxs = []int32{ - 0, // 0: feed.Setting.Info:input_type -> feed.Empty - 0, // 1: feed.Setting.Rights:input_type -> feed.Empty - 0, // 2: feed.Setting.Info:output_type -> feed.Empty - 0, // 3: feed.Setting.Rights:output_type -> feed.Empty +var file_module_social_feed_proto_setting_proto_depIdxs = []int32{ + 0, // 0: feed.Setting.Info:input_type -> blocks.Empty + 0, // 1: feed.Setting.Rights:input_type -> blocks.Empty + 0, // 2: feed.Setting.Info:output_type -> blocks.Empty + 0, // 3: feed.Setting.Rights:output_type -> blocks.Empty 2, // [2:4] is the sub-list for method output_type 0, // [0:2] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -44,26 +45,25 @@ var file_setting_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_setting_proto_init() } -func file_setting_proto_init() { - if File_setting_proto != nil { +func init() { file_module_social_feed_proto_setting_proto_init() } +func file_module_social_feed_proto_setting_proto_init() { + if File_module_social_feed_proto_setting_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_setting_proto_rawDesc), len(file_setting_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_setting_proto_rawDesc), len(file_module_social_feed_proto_setting_proto_rawDesc)), NumEnums: 0, NumMessages: 0, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_setting_proto_goTypes, - DependencyIndexes: file_setting_proto_depIdxs, + GoTypes: file_module_social_feed_proto_setting_proto_goTypes, + DependencyIndexes: file_module_social_feed_proto_setting_proto_depIdxs, }.Build() - File_setting_proto = out.File - file_setting_proto_goTypes = nil - file_setting_proto_depIdxs = nil + File_module_social_feed_proto_setting_proto = out.File + file_module_social_feed_proto_setting_proto_goTypes = nil + file_module_social_feed_proto_setting_proto_depIdxs = nil } diff --git a/module/social/feed/pb/setting.pb.gw.go b/module/social/feed/pb/setting.pb.gw.go index 8e555d6..10ad5b4 100644 --- a/module/social/feed/pb/setting.pb.gw.go +++ b/module/social/feed/pb/setting.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: setting.proto +// source: module/social/feed/proto/setting.proto /* Package feed is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package feed import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Setting_Info_0(ctx context.Context, marshaler runtime.Marshaler, client SettingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Setting_Info_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Setting_Info_0(ctx context.Context, marshaler runtime.Marshaler, server SettingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -64,7 +65,7 @@ func local_request_Setting_Info_0(ctx context.Context, marshaler runtime.Marshal func request_Setting_Rights_0(ctx context.Context, marshaler runtime.Marshaler, client SettingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Setting_Rights_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Setting_Rights_0(ctx context.Context, marshaler runtime.Marshaler, server SettingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/social/feed/pb/setting_grpc.pb.go b/module/social/feed/pb/setting_grpc.pb.go index 0126ea1..6d7ba8b 100644 --- a/module/social/feed/pb/setting_grpc.pb.go +++ b/module/social/feed/pb/setting_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: setting.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/social/feed/proto/setting.proto package feed import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -28,9 +29,9 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type SettingClient interface { // 修改个人信息 - Info(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) + Info(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*protobuf.Empty, error) // 修改权限信息 - Rights(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) + Rights(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*protobuf.Empty, error) } type settingClient struct { @@ -41,9 +42,9 @@ func NewSettingClient(cc grpc.ClientConnInterface) SettingClient { return &settingClient{cc} } -func (c *settingClient) Info(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { +func (c *settingClient) Info(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*protobuf.Empty, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(Empty) + out := new(protobuf.Empty) err := c.cc.Invoke(ctx, Setting_Info_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -51,9 +52,9 @@ func (c *settingClient) Info(ctx context.Context, in *Empty, opts ...grpc.CallOp return out, nil } -func (c *settingClient) Rights(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { +func (c *settingClient) Rights(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*protobuf.Empty, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(Empty) + out := new(protobuf.Empty) err := c.cc.Invoke(ctx, Setting_Rights_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -62,31 +63,29 @@ func (c *settingClient) Rights(ctx context.Context, in *Empty, opts ...grpc.Call } // SettingServer is the server API for Setting service. -// All implementations must embed UnimplementedSettingServer +// All implementations should embed UnimplementedSettingServer // for forward compatibility. type SettingServer interface { // 修改个人信息 - Info(context.Context, *Empty) (*Empty, error) + Info(context.Context, *protobuf.Empty) (*protobuf.Empty, error) // 修改权限信息 - Rights(context.Context, *Empty) (*Empty, error) - mustEmbedUnimplementedSettingServer() + Rights(context.Context, *protobuf.Empty) (*protobuf.Empty, error) } -// UnimplementedSettingServer must be embedded to have +// UnimplementedSettingServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedSettingServer struct{} -func (UnimplementedSettingServer) Info(context.Context, *Empty) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") +func (UnimplementedSettingServer) Info(context.Context, *protobuf.Empty) (*protobuf.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method Info not implemented") } -func (UnimplementedSettingServer) Rights(context.Context, *Empty) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Rights not implemented") +func (UnimplementedSettingServer) Rights(context.Context, *protobuf.Empty) (*protobuf.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method Rights not implemented") } -func (UnimplementedSettingServer) mustEmbedUnimplementedSettingServer() {} -func (UnimplementedSettingServer) testEmbeddedByValue() {} +func (UnimplementedSettingServer) testEmbeddedByValue() {} // UnsafeSettingServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SettingServer will @@ -96,7 +95,7 @@ type UnsafeSettingServer interface { } func RegisterSettingServer(s grpc.ServiceRegistrar, srv SettingServer) { - // If the following call pancis, it indicates UnimplementedSettingServer was + // If the following call panics, it indicates UnimplementedSettingServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -107,7 +106,7 @@ func RegisterSettingServer(s grpc.ServiceRegistrar, srv SettingServer) { } func _Setting_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -119,13 +118,13 @@ func _Setting_Info_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Setting_Info_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SettingServer).Info(ctx, req.(*Empty)) + return srv.(SettingServer).Info(ctx, req.(*protobuf.Empty)) } return interceptor(ctx, in, info, handler) } func _Setting_Rights_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -137,7 +136,7 @@ func _Setting_Rights_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Setting_Rights_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SettingServer).Rights(ctx, req.(*Empty)) + return srv.(SettingServer).Rights(ctx, req.(*protobuf.Empty)) } return interceptor(ctx, in, info, handler) } @@ -159,5 +158,5 @@ var Setting_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "setting.proto", + Metadata: "module/social/feed/proto/setting.proto", } diff --git a/module/social/feed/pb/tag.pb.go b/module/social/feed/pb/tag.pb.go index b563673..c1a55c0 100644 --- a/module/social/feed/pb/tag.pb.go +++ b/module/social/feed/pb/tag.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: tag.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/social/feed/proto/tag.proto package feed import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -30,7 +31,7 @@ type AddTagRequest struct { func (x *AddTagRequest) Reset() { *x = AddTagRequest{} - mi := &file_tag_proto_msgTypes[0] + mi := &file_module_social_feed_proto_tag_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -42,7 +43,7 @@ func (x *AddTagRequest) String() string { func (*AddTagRequest) ProtoMessage() {} func (x *AddTagRequest) ProtoReflect() protoreflect.Message { - mi := &file_tag_proto_msgTypes[0] + mi := &file_module_social_feed_proto_tag_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55,7 +56,7 @@ func (x *AddTagRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddTagRequest.ProtoReflect.Descriptor instead. func (*AddTagRequest) Descriptor() ([]byte, []int) { - return file_tag_proto_rawDescGZIP(), []int{0} + return file_module_social_feed_proto_tag_proto_rawDescGZIP(), []int{0} } func (x *AddTagRequest) GetTags() []string { @@ -66,16 +67,16 @@ func (x *AddTagRequest) GetTags() []string { } type TagListReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Tags []*TagItem `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` - Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Tags []*protobuf.FeedTagItem `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` + Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *TagListReply) Reset() { *x = TagListReply{} - mi := &file_tag_proto_msgTypes[1] + mi := &file_module_social_feed_proto_tag_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -87,7 +88,7 @@ func (x *TagListReply) String() string { func (*TagListReply) ProtoMessage() {} func (x *TagListReply) ProtoReflect() protoreflect.Message { - mi := &file_tag_proto_msgTypes[1] + mi := &file_module_social_feed_proto_tag_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -100,10 +101,10 @@ func (x *TagListReply) ProtoReflect() protoreflect.Message { // Deprecated: Use TagListReply.ProtoReflect.Descriptor instead. func (*TagListReply) Descriptor() ([]byte, []int) { - return file_tag_proto_rawDescGZIP(), []int{1} + return file_module_social_feed_proto_tag_proto_rawDescGZIP(), []int{1} } -func (x *TagListReply) GetTags() []*TagItem { +func (x *TagListReply) GetTags() []*protobuf.FeedTagItem { if x != nil { return x.Tags } @@ -117,50 +118,50 @@ func (x *TagListReply) GetTotal() int64 { return 0 } -var File_tag_proto protoreflect.FileDescriptor +var File_module_social_feed_proto_tag_proto protoreflect.FileDescriptor -const file_tag_proto_rawDesc = "" + +const file_module_social_feed_proto_tag_proto_rawDesc = "" + "\n" + - "\x15social/feed/tag.proto\x12\x04feed\x1a\x11feed/blocks.proto\"#\n" + + "\"module/social/feed/proto/tag.proto\x12\x04feed\x1a\x15protobuf/blocks.proto\"#\n" + "\rAddTagRequest\x12\x12\n" + - "\x04tags\x18\x01 \x03(\tR\x04tags\"G\n" + - "\fTagListReply\x12!\n" + - "\x04tags\x18\x01 \x03(\v2\r.feed.TagItemR\x04tags\x12\x14\n" + - "\x05total\x18\x02 \x01(\x03R\x05total2\xa2\x01\n" + - "\x03Tag\x120\n" + - "\x04List\x12\x12.feed.FetchRequest\x1a\x12.feed.TagListReply\"\x00\x122\n" + - "\x06Create\x12\x13.feed.AddTagRequest\x1a\x11.feed.StatusReply\"\x00\x125\n" + - "\bPostList\x12\x12.feed.FetchRequest\x1a\x13.feed.PostListReply\"\x00B\bZ\x06.;feedb\x06proto3" + "\x04tags\x18\x01 \x03(\tR\x04tags\"M\n" + + "\fTagListReply\x12'\n" + + "\x04tags\x18\x01 \x03(\v2\x13.blocks.FeedTagItemR\x04tags\x12\x14\n" + + "\x05total\x18\x02 \x01(\x03R\x05total2\xb2\x01\n" + + "\x03Tag\x122\n" + + "\x04List\x12\x14.blocks.FetchRequest\x1a\x12.feed.TagListReply\"\x00\x128\n" + + "\x06Create\x12\x13.feed.AddTagRequest\x1a\x17.blocks.DataStatusReply\"\x00\x12=\n" + + "\bPostList\x12\x14.blocks.FetchRequest\x1a\x19.blocks.FeedPostListReply\"\x00B%Z#bsm/full/module/social/feed/pb;feedb\x06proto3" var ( - file_tag_proto_rawDescOnce sync.Once - file_tag_proto_rawDescData []byte + file_module_social_feed_proto_tag_proto_rawDescOnce sync.Once + file_module_social_feed_proto_tag_proto_rawDescData []byte ) -func file_tag_proto_rawDescGZIP() []byte { - file_tag_proto_rawDescOnce.Do(func() { - file_tag_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_tag_proto_rawDesc), len(file_tag_proto_rawDesc))) +func file_module_social_feed_proto_tag_proto_rawDescGZIP() []byte { + file_module_social_feed_proto_tag_proto_rawDescOnce.Do(func() { + file_module_social_feed_proto_tag_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_tag_proto_rawDesc), len(file_module_social_feed_proto_tag_proto_rawDesc))) }) - return file_tag_proto_rawDescData + return file_module_social_feed_proto_tag_proto_rawDescData } -var file_tag_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_tag_proto_goTypes = []any{ - (*AddTagRequest)(nil), // 0: feed.AddTagRequest - (*TagListReply)(nil), // 1: feed.TagListReply - (*TagItem)(nil), // 2: feed.TagItem - (*FetchRequest)(nil), // 3: feed.FetchRequest - (*StatusReply)(nil), // 4: feed.StatusReply - (*PostListReply)(nil), // 5: feed.PostListReply +var file_module_social_feed_proto_tag_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_module_social_feed_proto_tag_proto_goTypes = []any{ + (*AddTagRequest)(nil), // 0: feed.AddTagRequest + (*TagListReply)(nil), // 1: feed.TagListReply + (*protobuf.FeedTagItem)(nil), // 2: blocks.FeedTagItem + (*protobuf.FetchRequest)(nil), // 3: blocks.FetchRequest + (*protobuf.DataStatusReply)(nil), // 4: blocks.DataStatusReply + (*protobuf.FeedPostListReply)(nil), // 5: blocks.FeedPostListReply } -var file_tag_proto_depIdxs = []int32{ - 2, // 0: feed.TagListReply.tags:type_name -> feed.TagItem - 3, // 1: feed.Tag.List:input_type -> feed.FetchRequest +var file_module_social_feed_proto_tag_proto_depIdxs = []int32{ + 2, // 0: feed.TagListReply.tags:type_name -> blocks.FeedTagItem + 3, // 1: feed.Tag.List:input_type -> blocks.FetchRequest 0, // 2: feed.Tag.Create:input_type -> feed.AddTagRequest - 3, // 3: feed.Tag.PostList:input_type -> feed.FetchRequest + 3, // 3: feed.Tag.PostList:input_type -> blocks.FetchRequest 1, // 4: feed.Tag.List:output_type -> feed.TagListReply - 4, // 5: feed.Tag.Create:output_type -> feed.StatusReply - 5, // 6: feed.Tag.PostList:output_type -> feed.PostListReply + 4, // 5: feed.Tag.Create:output_type -> blocks.DataStatusReply + 5, // 6: feed.Tag.PostList:output_type -> blocks.FeedPostListReply 4, // [4:7] is the sub-list for method output_type 1, // [1:4] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -168,27 +169,26 @@ var file_tag_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_tag_proto_init() } -func file_tag_proto_init() { - if File_tag_proto != nil { +func init() { file_module_social_feed_proto_tag_proto_init() } +func file_module_social_feed_proto_tag_proto_init() { + if File_module_social_feed_proto_tag_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_tag_proto_rawDesc), len(file_tag_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_tag_proto_rawDesc), len(file_module_social_feed_proto_tag_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_tag_proto_goTypes, - DependencyIndexes: file_tag_proto_depIdxs, - MessageInfos: file_tag_proto_msgTypes, + GoTypes: file_module_social_feed_proto_tag_proto_goTypes, + DependencyIndexes: file_module_social_feed_proto_tag_proto_depIdxs, + MessageInfos: file_module_social_feed_proto_tag_proto_msgTypes, }.Build() - File_tag_proto = out.File - file_tag_proto_goTypes = nil - file_tag_proto_depIdxs = nil + File_module_social_feed_proto_tag_proto = out.File + file_module_social_feed_proto_tag_proto_goTypes = nil + file_module_social_feed_proto_tag_proto_depIdxs = nil } diff --git a/module/social/feed/pb/tag.pb.gw.go b/module/social/feed/pb/tag.pb.gw.go index 5209a6e..25b29e3 100644 --- a/module/social/feed/pb/tag.pb.gw.go +++ b/module/social/feed/pb/tag.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: tag.proto +// source: module/social/feed/proto/tag.proto /* Package feed is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package feed import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Tag_List_0(ctx context.Context, marshaler runtime.Marshaler, client TagClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Tag_List_0(ctx context.Context, marshaler runtime.Marshaler, client func local_request_Tag_List_0(ctx context.Context, marshaler runtime.Marshaler, server TagServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -91,7 +92,7 @@ func local_request_Tag_Create_0(ctx context.Context, marshaler runtime.Marshaler func request_Tag_PostList_0(ctx context.Context, marshaler runtime.Marshaler, client TagClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Tag_PostList_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Tag_PostList_0(ctx context.Context, marshaler runtime.Marshaler, server TagServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/social/feed/pb/tag_grpc.pb.go b/module/social/feed/pb/tag_grpc.pb.go index 277b7a1..8949979 100644 --- a/module/social/feed/pb/tag_grpc.pb.go +++ b/module/social/feed/pb/tag_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: tag.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/social/feed/proto/tag.proto package feed import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -29,11 +30,11 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type TagClient interface { // 标签列表 - List(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*TagListReply, error) + List(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*TagListReply, error) // 新建标签 - Create(ctx context.Context, in *AddTagRequest, opts ...grpc.CallOption) (*StatusReply, error) + Create(ctx context.Context, in *AddTagRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) // 话题相关的文章 - PostList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) + PostList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) } type tagClient struct { @@ -44,7 +45,7 @@ func NewTagClient(cc grpc.ClientConnInterface) TagClient { return &tagClient{cc} } -func (c *tagClient) List(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*TagListReply, error) { +func (c *tagClient) List(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*TagListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(TagListReply) err := c.cc.Invoke(ctx, Tag_List_FullMethodName, in, out, cOpts...) @@ -54,9 +55,9 @@ func (c *tagClient) List(ctx context.Context, in *FetchRequest, opts ...grpc.Cal return out, nil } -func (c *tagClient) Create(ctx context.Context, in *AddTagRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *tagClient) Create(ctx context.Context, in *AddTagRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Tag_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -64,9 +65,9 @@ func (c *tagClient) Create(ctx context.Context, in *AddTagRequest, opts ...grpc. return out, nil } -func (c *tagClient) PostList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) { +func (c *tagClient) PostList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(PostListReply) + out := new(protobuf.FeedPostListReply) err := c.cc.Invoke(ctx, Tag_PostList_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -75,36 +76,34 @@ func (c *tagClient) PostList(ctx context.Context, in *FetchRequest, opts ...grpc } // TagServer is the server API for Tag service. -// All implementations must embed UnimplementedTagServer +// All implementations should embed UnimplementedTagServer // for forward compatibility. type TagServer interface { // 标签列表 - List(context.Context, *FetchRequest) (*TagListReply, error) + List(context.Context, *protobuf.FetchRequest) (*TagListReply, error) // 新建标签 - Create(context.Context, *AddTagRequest) (*StatusReply, error) + Create(context.Context, *AddTagRequest) (*protobuf.DataStatusReply, error) // 话题相关的文章 - PostList(context.Context, *FetchRequest) (*PostListReply, error) - mustEmbedUnimplementedTagServer() + PostList(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) } -// UnimplementedTagServer must be embedded to have +// UnimplementedTagServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedTagServer struct{} -func (UnimplementedTagServer) List(context.Context, *FetchRequest) (*TagListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +func (UnimplementedTagServer) List(context.Context, *protobuf.FetchRequest) (*TagListReply, error) { + return nil, status.Error(codes.Unimplemented, "method List not implemented") } -func (UnimplementedTagServer) Create(context.Context, *AddTagRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +func (UnimplementedTagServer) Create(context.Context, *AddTagRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedTagServer) PostList(context.Context, *FetchRequest) (*PostListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method PostList not implemented") +func (UnimplementedTagServer) PostList(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) { + return nil, status.Error(codes.Unimplemented, "method PostList not implemented") } -func (UnimplementedTagServer) mustEmbedUnimplementedTagServer() {} -func (UnimplementedTagServer) testEmbeddedByValue() {} +func (UnimplementedTagServer) testEmbeddedByValue() {} // UnsafeTagServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TagServer will @@ -114,7 +113,7 @@ type UnsafeTagServer interface { } func RegisterTagServer(s grpc.ServiceRegistrar, srv TagServer) { - // If the following call pancis, it indicates UnimplementedTagServer was + // If the following call panics, it indicates UnimplementedTagServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -125,7 +124,7 @@ func RegisterTagServer(s grpc.ServiceRegistrar, srv TagServer) { } func _Tag_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -137,7 +136,7 @@ func _Tag_List_Handler(srv interface{}, ctx context.Context, dec func(interface{ FullMethod: Tag_List_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagServer).List(ctx, req.(*FetchRequest)) + return srv.(TagServer).List(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -161,7 +160,7 @@ func _Tag_Create_Handler(srv interface{}, ctx context.Context, dec func(interfac } func _Tag_PostList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -173,7 +172,7 @@ func _Tag_PostList_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Tag_PostList_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TagServer).PostList(ctx, req.(*FetchRequest)) + return srv.(TagServer).PostList(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -199,5 +198,5 @@ var Tag_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "tag.proto", + Metadata: "module/social/feed/proto/tag.proto", } diff --git a/module/social/feed/pb/timeline.pb.go b/module/social/feed/pb/timeline.pb.go index f524008..4817422 100644 --- a/module/social/feed/pb/timeline.pb.go +++ b/module/social/feed/pb/timeline.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: timeline.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/social/feed/proto/timeline.proto package feed import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -20,30 +21,30 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -var File_timeline_proto protoreflect.FileDescriptor +var File_module_social_feed_proto_timeline_proto protoreflect.FileDescriptor -const file_timeline_proto_rawDesc = "" + +const file_module_social_feed_proto_timeline_proto_rawDesc = "" + "\n" + - "\x1asocial/feed/timeline.proto\x12\x04feed\x1a\x11feed/blocks.proto2\xde\x01\n" + - "\bTimeline\x126\n" + - "\tRecommend\x12\x12.feed.FetchRequest\x1a\x13.feed.PostListReply\"\x00\x123\n" + - "\x06Friend\x12\x12.feed.FetchRequest\x1a\x13.feed.PostListReply\"\x00\x123\n" + - "\x06Follow\x12\x12.feed.FetchRequest\x1a\x13.feed.PostListReply\"\x00\x120\n" + - "\x03Hot\x12\x12.feed.FetchRequest\x1a\x13.feed.PostListReply\"\x00B\bZ\x06.;feedb\x06proto3" + "'module/social/feed/proto/timeline.proto\x12\x04feed\x1a\x15protobuf/blocks.proto2\xfe\x01\n" + + "\bTimeline\x12>\n" + + "\tRecommend\x12\x14.blocks.FetchRequest\x1a\x19.blocks.FeedPostListReply\"\x00\x12;\n" + + "\x06Friend\x12\x14.blocks.FetchRequest\x1a\x19.blocks.FeedPostListReply\"\x00\x12;\n" + + "\x06Follow\x12\x14.blocks.FetchRequest\x1a\x19.blocks.FeedPostListReply\"\x00\x128\n" + + "\x03Hot\x12\x14.blocks.FetchRequest\x1a\x19.blocks.FeedPostListReply\"\x00B%Z#bsm/full/module/social/feed/pb;feedb\x06proto3" -var file_timeline_proto_goTypes = []any{ - (*FetchRequest)(nil), // 0: feed.FetchRequest - (*PostListReply)(nil), // 1: feed.PostListReply +var file_module_social_feed_proto_timeline_proto_goTypes = []any{ + (*protobuf.FetchRequest)(nil), // 0: blocks.FetchRequest + (*protobuf.FeedPostListReply)(nil), // 1: blocks.FeedPostListReply } -var file_timeline_proto_depIdxs = []int32{ - 0, // 0: feed.Timeline.Recommend:input_type -> feed.FetchRequest - 0, // 1: feed.Timeline.Friend:input_type -> feed.FetchRequest - 0, // 2: feed.Timeline.Follow:input_type -> feed.FetchRequest - 0, // 3: feed.Timeline.Hot:input_type -> feed.FetchRequest - 1, // 4: feed.Timeline.Recommend:output_type -> feed.PostListReply - 1, // 5: feed.Timeline.Friend:output_type -> feed.PostListReply - 1, // 6: feed.Timeline.Follow:output_type -> feed.PostListReply - 1, // 7: feed.Timeline.Hot:output_type -> feed.PostListReply +var file_module_social_feed_proto_timeline_proto_depIdxs = []int32{ + 0, // 0: feed.Timeline.Recommend:input_type -> blocks.FetchRequest + 0, // 1: feed.Timeline.Friend:input_type -> blocks.FetchRequest + 0, // 2: feed.Timeline.Follow:input_type -> blocks.FetchRequest + 0, // 3: feed.Timeline.Hot:input_type -> blocks.FetchRequest + 1, // 4: feed.Timeline.Recommend:output_type -> blocks.FeedPostListReply + 1, // 5: feed.Timeline.Friend:output_type -> blocks.FeedPostListReply + 1, // 6: feed.Timeline.Follow:output_type -> blocks.FeedPostListReply + 1, // 7: feed.Timeline.Hot:output_type -> blocks.FeedPostListReply 4, // [4:8] is the sub-list for method output_type 0, // [0:4] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -51,26 +52,25 @@ var file_timeline_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_timeline_proto_init() } -func file_timeline_proto_init() { - if File_timeline_proto != nil { +func init() { file_module_social_feed_proto_timeline_proto_init() } +func file_module_social_feed_proto_timeline_proto_init() { + if File_module_social_feed_proto_timeline_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_timeline_proto_rawDesc), len(file_timeline_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_timeline_proto_rawDesc), len(file_module_social_feed_proto_timeline_proto_rawDesc)), NumEnums: 0, NumMessages: 0, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_timeline_proto_goTypes, - DependencyIndexes: file_timeline_proto_depIdxs, + GoTypes: file_module_social_feed_proto_timeline_proto_goTypes, + DependencyIndexes: file_module_social_feed_proto_timeline_proto_depIdxs, }.Build() - File_timeline_proto = out.File - file_timeline_proto_goTypes = nil - file_timeline_proto_depIdxs = nil + File_module_social_feed_proto_timeline_proto = out.File + file_module_social_feed_proto_timeline_proto_goTypes = nil + file_module_social_feed_proto_timeline_proto_depIdxs = nil } diff --git a/module/social/feed/pb/timeline.pb.gw.go b/module/social/feed/pb/timeline.pb.gw.go index c39f29c..ecae33d 100644 --- a/module/social/feed/pb/timeline.pb.gw.go +++ b/module/social/feed/pb/timeline.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: timeline.proto +// source: module/social/feed/proto/timeline.proto /* Package feed is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package feed import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Timeline_Recommend_0(ctx context.Context, marshaler runtime.Marshaler, client TimelineClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Timeline_Recommend_0(ctx context.Context, marshaler runtime.Marshal func local_request_Timeline_Recommend_0(ctx context.Context, marshaler runtime.Marshaler, server TimelineServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -64,7 +65,7 @@ func local_request_Timeline_Recommend_0(ctx context.Context, marshaler runtime.M func request_Timeline_Friend_0(ctx context.Context, marshaler runtime.Marshaler, client TimelineClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Timeline_Friend_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Timeline_Friend_0(ctx context.Context, marshaler runtime.Marshaler, server TimelineServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -91,7 +92,7 @@ func local_request_Timeline_Friend_0(ctx context.Context, marshaler runtime.Mars func request_Timeline_Follow_0(ctx context.Context, marshaler runtime.Marshaler, client TimelineClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Timeline_Follow_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Timeline_Follow_0(ctx context.Context, marshaler runtime.Marshaler, server TimelineServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -118,7 +119,7 @@ func local_request_Timeline_Follow_0(ctx context.Context, marshaler runtime.Mars func request_Timeline_Hot_0(ctx context.Context, marshaler runtime.Marshaler, client TimelineClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Timeline_Hot_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Timeline_Hot_0(ctx context.Context, marshaler runtime.Marshaler, server TimelineServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/social/feed/pb/timeline_grpc.pb.go b/module/social/feed/pb/timeline_grpc.pb.go index 88a19da..4696403 100644 --- a/module/social/feed/pb/timeline_grpc.pb.go +++ b/module/social/feed/pb/timeline_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: timeline.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/social/feed/proto/timeline.proto package feed import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -32,13 +33,13 @@ const ( // 实时动态 type TimelineClient interface { // 推荐 - Recommend(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) + Recommend(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) // 好友动态 - Friend(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) + Friend(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) // 关注的动态 - Follow(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) + Follow(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) // 热门 - Hot(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) + Hot(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) } type timelineClient struct { @@ -49,9 +50,9 @@ func NewTimelineClient(cc grpc.ClientConnInterface) TimelineClient { return &timelineClient{cc} } -func (c *timelineClient) Recommend(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) { +func (c *timelineClient) Recommend(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(PostListReply) + out := new(protobuf.FeedPostListReply) err := c.cc.Invoke(ctx, Timeline_Recommend_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -59,9 +60,9 @@ func (c *timelineClient) Recommend(ctx context.Context, in *FetchRequest, opts . return out, nil } -func (c *timelineClient) Friend(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) { +func (c *timelineClient) Friend(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(PostListReply) + out := new(protobuf.FeedPostListReply) err := c.cc.Invoke(ctx, Timeline_Friend_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -69,9 +70,9 @@ func (c *timelineClient) Friend(ctx context.Context, in *FetchRequest, opts ...g return out, nil } -func (c *timelineClient) Follow(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) { +func (c *timelineClient) Follow(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(PostListReply) + out := new(protobuf.FeedPostListReply) err := c.cc.Invoke(ctx, Timeline_Follow_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -79,9 +80,9 @@ func (c *timelineClient) Follow(ctx context.Context, in *FetchRequest, opts ...g return out, nil } -func (c *timelineClient) Hot(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) { +func (c *timelineClient) Hot(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(PostListReply) + out := new(protobuf.FeedPostListReply) err := c.cc.Invoke(ctx, Timeline_Hot_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -90,43 +91,41 @@ func (c *timelineClient) Hot(ctx context.Context, in *FetchRequest, opts ...grpc } // TimelineServer is the server API for Timeline service. -// All implementations must embed UnimplementedTimelineServer +// All implementations should embed UnimplementedTimelineServer // for forward compatibility. // // 实时动态 type TimelineServer interface { // 推荐 - Recommend(context.Context, *FetchRequest) (*PostListReply, error) + Recommend(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) // 好友动态 - Friend(context.Context, *FetchRequest) (*PostListReply, error) + Friend(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) // 关注的动态 - Follow(context.Context, *FetchRequest) (*PostListReply, error) + Follow(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) // 热门 - Hot(context.Context, *FetchRequest) (*PostListReply, error) - mustEmbedUnimplementedTimelineServer() + Hot(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) } -// UnimplementedTimelineServer must be embedded to have +// UnimplementedTimelineServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedTimelineServer struct{} -func (UnimplementedTimelineServer) Recommend(context.Context, *FetchRequest) (*PostListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Recommend not implemented") +func (UnimplementedTimelineServer) Recommend(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) { + return nil, status.Error(codes.Unimplemented, "method Recommend not implemented") } -func (UnimplementedTimelineServer) Friend(context.Context, *FetchRequest) (*PostListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Friend not implemented") +func (UnimplementedTimelineServer) Friend(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) { + return nil, status.Error(codes.Unimplemented, "method Friend not implemented") } -func (UnimplementedTimelineServer) Follow(context.Context, *FetchRequest) (*PostListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Follow not implemented") +func (UnimplementedTimelineServer) Follow(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) { + return nil, status.Error(codes.Unimplemented, "method Follow not implemented") } -func (UnimplementedTimelineServer) Hot(context.Context, *FetchRequest) (*PostListReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Hot not implemented") +func (UnimplementedTimelineServer) Hot(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) { + return nil, status.Error(codes.Unimplemented, "method Hot not implemented") } -func (UnimplementedTimelineServer) mustEmbedUnimplementedTimelineServer() {} -func (UnimplementedTimelineServer) testEmbeddedByValue() {} +func (UnimplementedTimelineServer) testEmbeddedByValue() {} // UnsafeTimelineServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TimelineServer will @@ -136,7 +135,7 @@ type UnsafeTimelineServer interface { } func RegisterTimelineServer(s grpc.ServiceRegistrar, srv TimelineServer) { - // If the following call pancis, it indicates UnimplementedTimelineServer was + // If the following call panics, it indicates UnimplementedTimelineServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -147,7 +146,7 @@ func RegisterTimelineServer(s grpc.ServiceRegistrar, srv TimelineServer) { } func _Timeline_Recommend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -159,13 +158,13 @@ func _Timeline_Recommend_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: Timeline_Recommend_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimelineServer).Recommend(ctx, req.(*FetchRequest)) + return srv.(TimelineServer).Recommend(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } func _Timeline_Friend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -177,13 +176,13 @@ func _Timeline_Friend_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: Timeline_Friend_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimelineServer).Friend(ctx, req.(*FetchRequest)) + return srv.(TimelineServer).Friend(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } func _Timeline_Follow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -195,13 +194,13 @@ func _Timeline_Follow_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: Timeline_Follow_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimelineServer).Follow(ctx, req.(*FetchRequest)) + return srv.(TimelineServer).Follow(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } func _Timeline_Hot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -213,7 +212,7 @@ func _Timeline_Hot_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Timeline_Hot_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimelineServer).Hot(ctx, req.(*FetchRequest)) + return srv.(TimelineServer).Hot(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -243,5 +242,5 @@ var Timeline_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "timeline.proto", + Metadata: "module/social/feed/proto/timeline.proto", } diff --git a/module/social/feed/proto/blocks.proto b/module/social/feed/proto/blocks.proto deleted file mode 100644 index 135c7a5..0000000 --- a/module/social/feed/proto/blocks.proto +++ /dev/null @@ -1,66 +0,0 @@ -syntax = "proto3"; -package feed; -option go_package = ".;feed"; - -message FetchRequest { - int64 page_no=1; // 页数 - int64 page_size=2; // 每页记录数 - map params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11 -} - -message IdentRequest{ - int64 id = 1; // 唯一ID - string identity = 2; // 唯一码 -} - -message VersionRequest { - int64 version=1; // 时序版本号 -} - - -message SearchRequest { - string keyword=1; //关键词 -} - - -message StatusReply{ - string data=1; // 数据 - int64 timeseq=2; // 响应时间序列 -} - -message Empty{ -} - - -// 推文列表 -message PostListReply{ - repeated PostItem list = 1; - int64 cnt = 2; -} - -// 推文 -message PostItem{ - string identity = 1; // 唯一标识 - string content = 2; // 内容 - int64 feed_id=3; // 通行证ID - string feed_identity = 4; // 通行证Identity - bool is_open =5; // 是否公开:默认为0-公开,1-不公开 - int64 cnt_unlike = 6; // 点踩数量 - int64 cnt_comment = 7; // 评论数量 - int64 cnt_like = 8; // 点赞数量 - repeated AttachItem attachs = 9; // 附件信息 - repeated TagItem tags = 10; // 所属话题 -} - -// 附件 -message AttachItem{ - string identity = 1; // 唯一标识 - string attach_type = 2; // 文件类型 - string url = 3; // 文件路径 -} - -// 标签 -message TagItem { - string key = 1; // 标签唯一码 - string content = 2; // 标签内容 -} \ No newline at end of file diff --git a/module/social/feed/proto/post.proto b/module/social/feed/proto/post.proto index 0cc6615..ae89366 100644 --- a/module/social/feed/proto/post.proto +++ b/module/social/feed/proto/post.proto @@ -1,35 +1,35 @@ syntax = "proto3"; package feed; -option go_package =".;feed"; -import "blocks.proto"; +option go_package = "bsm/full/module/social/feed/pb;feed"; +import "protobuf/blocks.proto"; // 推文相关操作 service Post{ // 推文列表 - rpc Fetch(FetchRequest) returns (PostListReply){}; + rpc Fetch(blocks.FetchRequest) returns (blocks.FeedPostListReply){}; // 新建推文 - rpc Create (PostItem) returns (StatusReply){}; + rpc Create (blocks.FeedPostItem) returns (blocks.DataStatusReply){}; // 修改推文 - rpc Change (PostItem) returns (StatusReply){}; + rpc Change (blocks.FeedPostItem) returns (blocks.DataStatusReply){}; // 删除推文 - rpc Remove (IdentRequest) returns (StatusReply){}; + rpc Remove (blocks.IdentRequest) returns (blocks.DataStatusReply){}; // 评论列表 - rpc CommentList (FetchRequest) returns (CommentListReply){}; + rpc CommentList (blocks.FetchRequest) returns (CommentListReply){}; // 新建评论 - rpc AddComment (CommentItem) returns (StatusReply){}; + rpc AddComment (CommentItem) returns (blocks.DataStatusReply){}; // 删除评论 - rpc DeleteComment (IdentRequest) returns (StatusReply){}; + rpc DeleteComment (blocks.IdentRequest) returns (blocks.DataStatusReply){}; // 计数操作 - rpc Action (PostActionRequest) returns (StatusReply){}; + rpc Action (PostActionRequest) returns (blocks.DataStatusReply){}; } // 推文评论列表 message CommentListReply{ repeated CommentItem list = 1; // 评论列表 - int64 total = 2; + int64 total = 2; } @@ -37,15 +37,15 @@ message CommentItem{ string identity = 1; // 评论identity string post_identity = 2; // 被评论唯一标识 string feed_identity=3; // 评论人唯一标识 - string content = 4; // 评论内容 - repeated CommentItem sub_comment =5; // 子评论 - + string content = 4; // 评论内容 + repeated CommentItem sub_comment =5; // 子评论 + } message PostActionRequest{ string action_op=1; //操作运作:ilike,unlike string action_type=2; //类别:推文,评论 - string identity = 3; // 唯一标识 + string identity = 3; // 唯一标识 } diff --git a/module/social/feed/proto/setting.proto b/module/social/feed/proto/setting.proto index aa67ed8..4e53643 100644 --- a/module/social/feed/proto/setting.proto +++ b/module/social/feed/proto/setting.proto @@ -1,12 +1,12 @@ syntax = "proto3"; package feed; -option go_package =".;feed"; -import "blocks.proto"; +option go_package = "bsm/full/module/social/feed/pb;feed"; +import "protobuf/blocks.proto"; service Setting{ // 修改个人信息 - rpc Info (Empty) returns (Empty){}; + rpc Info (blocks.Empty) returns (blocks.Empty){}; // 修改权限信息 - rpc Rights (Empty) returns (Empty){}; + rpc Rights (blocks.Empty) returns (blocks.Empty){}; } diff --git a/module/social/feed/proto/tag.proto b/module/social/feed/proto/tag.proto index 06931c5..dc37ee5 100644 --- a/module/social/feed/proto/tag.proto +++ b/module/social/feed/proto/tag.proto @@ -1,21 +1,21 @@ syntax = "proto3"; package feed; -option go_package =".;feed"; -import "blocks.proto"; +option go_package = "bsm/full/module/social/feed/pb;feed"; +import "protobuf/blocks.proto"; service Tag{ // 标签列表 - rpc List (FetchRequest) returns (TagListReply){}; + rpc List (blocks.FetchRequest) returns (TagListReply){}; // 新建标签 - rpc Create (AddTagRequest) returns (StatusReply){}; + rpc Create (AddTagRequest) returns (blocks.DataStatusReply){}; // 话题相关的文章 - rpc PostList (FetchRequest) returns (PostListReply){}; + rpc PostList (blocks.FetchRequest) returns (blocks.FeedPostListReply){}; } message AddTagRequest { repeated string tags = 1; // 标签名称 } message TagListReply{ - repeated TagItem tags = 1; + repeated blocks.FeedTagItem tags = 1; int64 total = 2; } diff --git a/module/social/feed/proto/timeline.proto b/module/social/feed/proto/timeline.proto index 11d4036..8beb439 100644 --- a/module/social/feed/proto/timeline.proto +++ b/module/social/feed/proto/timeline.proto @@ -1,21 +1,21 @@ syntax = "proto3"; package feed; -option go_package =".;feed"; -import "blocks.proto"; +option go_package = "bsm/full/module/social/feed/pb;feed"; +import "protobuf/blocks.proto"; // 实时动态 service Timeline{ // 推荐 - rpc Recommend (FetchRequest) returns (PostListReply){}; + rpc Recommend (blocks.FetchRequest) returns (blocks.FeedPostListReply){}; // 好友动态 - rpc Friend (FetchRequest) returns (PostListReply){}; - + rpc Friend (blocks.FetchRequest) returns (blocks.FeedPostListReply){}; + // 关注的动态 - rpc Follow (FetchRequest) returns (PostListReply){}; - + rpc Follow (blocks.FetchRequest) returns (blocks.FeedPostListReply){}; + // 热门 - rpc Hot (FetchRequest) returns (PostListReply){}; + rpc Hot (blocks.FetchRequest) returns (blocks.FeedPostListReply){}; } diff --git a/module/social/group/pb/blocks.pb.go b/module/social/group/pb/blocks.pb.go deleted file mode 100644 index 70f8a82..0000000 --- a/module/social/group/pb/blocks.pb.go +++ /dev/null @@ -1,707 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: blocks.proto - -package group - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type FetchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PageNo int64 `protobuf:"varint,1,opt,name=page_no,json=pageNo,proto3" json:"page_no,omitempty"` // 页数 - PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页记录数 - Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:category_id=?,vlaue=11 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchRequest) Reset() { - *x = FetchRequest{} - mi := &file_blocks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRequest) ProtoMessage() {} - -func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. -func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{0} -} - -func (x *FetchRequest) GetPageNo() int64 { - if x != nil { - return x.PageNo - } - return 0 -} - -func (x *FetchRequest) GetPageSize() int64 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *FetchRequest) GetParams() map[string]string { - if x != nil { - return x.Params - } - return nil -} - -type IdentRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IdentRequest) Reset() { - *x = IdentRequest{} - mi := &file_blocks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IdentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IdentRequest) ProtoMessage() {} - -func (x *IdentRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. -func (*IdentRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{1} -} - -func (x *IdentRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *IdentRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -type VersionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 时序版本号 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *VersionRequest) Reset() { - *x = VersionRequest{} - mi := &file_blocks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *VersionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersionRequest) ProtoMessage() {} - -func (x *VersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. -func (*VersionRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{2} -} - -func (x *VersionRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type SearchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` //关键词 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchRequest) Reset() { - *x = SearchRequest{} - mi := &file_blocks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchRequest) ProtoMessage() {} - -func (x *SearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. -func (*SearchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{3} -} - -func (x *SearchRequest) GetKeyword() string { - if x != nil { - return x.Keyword - } - return "" -} - -type StatusReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // 数据 - Timeseq int64 `protobuf:"varint,2,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusReply) Reset() { - *x = StatusReply{} - mi := &file_blocks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusReply) ProtoMessage() {} - -func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. -func (*StatusReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{4} -} - -func (x *StatusReply) GetData() string { - if x != nil { - return x.Data - } - return "" -} - -func (x *StatusReply) GetTimeseq() int64 { - if x != nil { - return x.Timeseq - } - return 0 -} - -type Empty struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Empty) Reset() { - *x = Empty{} - mi := &file_blocks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Empty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Empty) ProtoMessage() {} - -func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{5} -} - -// 推文列表 -type PostListReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - List []*PostItem `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` - Cnt int64 `protobuf:"varint,2,opt,name=cnt,proto3" json:"cnt,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PostListReply) Reset() { - *x = PostListReply{} - mi := &file_blocks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PostListReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PostListReply) ProtoMessage() {} - -func (x *PostListReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PostListReply.ProtoReflect.Descriptor instead. -func (*PostListReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{6} -} - -func (x *PostListReply) GetList() []*PostItem { - if x != nil { - return x.List - } - return nil -} - -func (x *PostListReply) GetCnt() int64 { - if x != nil { - return x.Cnt - } - return 0 -} - -// 推文 -type PostItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // 内容 - PassportId int64 `protobuf:"varint,3,opt,name=passport_id,json=passportId,proto3" json:"passport_id,omitempty"` // 通行证ID - PassportIdentity string `protobuf:"bytes,4,opt,name=passport_identity,json=passportIdentity,proto3" json:"passport_identity,omitempty"` // 通行证Identity - IsOpen bool `protobuf:"varint,5,opt,name=is_open,json=isOpen,proto3" json:"is_open,omitempty"` // 是否公开:默认为0-公开,1-不公开 - CntUnlike int64 `protobuf:"varint,6,opt,name=cnt_unlike,json=cntUnlike,proto3" json:"cnt_unlike,omitempty"` // 点踩数量 - CntComment int64 `protobuf:"varint,7,opt,name=cnt_comment,json=cntComment,proto3" json:"cnt_comment,omitempty"` // 评论数量 - CntLike int64 `protobuf:"varint,8,opt,name=cnt_like,json=cntLike,proto3" json:"cnt_like,omitempty"` // 点赞数量 - Attachs []*AttachItem `protobuf:"bytes,9,rep,name=attachs,proto3" json:"attachs,omitempty"` // 附件信息 - Tags []*TagItem `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"` // 所属话题 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PostItem) Reset() { - *x = PostItem{} - mi := &file_blocks_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PostItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PostItem) ProtoMessage() {} - -func (x *PostItem) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PostItem.ProtoReflect.Descriptor instead. -func (*PostItem) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{7} -} - -func (x *PostItem) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *PostItem) GetContent() string { - if x != nil { - return x.Content - } - return "" -} - -func (x *PostItem) GetPassportId() int64 { - if x != nil { - return x.PassportId - } - return 0 -} - -func (x *PostItem) GetPassportIdentity() string { - if x != nil { - return x.PassportIdentity - } - return "" -} - -func (x *PostItem) GetIsOpen() bool { - if x != nil { - return x.IsOpen - } - return false -} - -func (x *PostItem) GetCntUnlike() int64 { - if x != nil { - return x.CntUnlike - } - return 0 -} - -func (x *PostItem) GetCntComment() int64 { - if x != nil { - return x.CntComment - } - return 0 -} - -func (x *PostItem) GetCntLike() int64 { - if x != nil { - return x.CntLike - } - return 0 -} - -func (x *PostItem) GetAttachs() []*AttachItem { - if x != nil { - return x.Attachs - } - return nil -} - -func (x *PostItem) GetTags() []*TagItem { - if x != nil { - return x.Tags - } - return nil -} - -// 附件 -type AttachItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - AttachType string `protobuf:"bytes,2,opt,name=attach_type,json=attachType,proto3" json:"attach_type,omitempty"` // 文件类型 - Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` // 文件路径 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AttachItem) Reset() { - *x = AttachItem{} - mi := &file_blocks_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AttachItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AttachItem) ProtoMessage() {} - -func (x *AttachItem) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AttachItem.ProtoReflect.Descriptor instead. -func (*AttachItem) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{8} -} - -func (x *AttachItem) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *AttachItem) GetAttachType() string { - if x != nil { - return x.AttachType - } - return "" -} - -func (x *AttachItem) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -// 标签 -type TagItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // 标签唯一码 - Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // 标签内容 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TagItem) Reset() { - *x = TagItem{} - mi := &file_blocks_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TagItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TagItem) ProtoMessage() {} - -func (x *TagItem) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TagItem.ProtoReflect.Descriptor instead. -func (*TagItem) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{9} -} - -func (x *TagItem) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *TagItem) GetContent() string { - if x != nil { - return x.Content - } - return "" -} - -var File_blocks_proto protoreflect.FileDescriptor - -const file_blocks_proto_rawDesc = "" + - "\n" + - "\x12group/blocks.proto\x12\x05group\"\xb8\x01\n" + - "\fFetchRequest\x12\x17\n" + - "\apage_no\x18\x01 \x01(\x03R\x06pageNo\x12\x1b\n" + - "\tpage_size\x18\x02 \x01(\x03R\bpageSize\x127\n" + - "\x06params\x18\x03 \x03(\v2\x1f.group.FetchRequest.ParamsEntryR\x06params\x1a9\n" + - "\vParamsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" + - "\fIdentRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\"*\n" + - "\x0eVersionRequest\x12\x18\n" + - "\aversion\x18\x01 \x01(\x03R\aversion\")\n" + - "\rSearchRequest\x12\x18\n" + - "\akeyword\x18\x01 \x01(\tR\akeyword\";\n" + - "\vStatusReply\x12\x12\n" + - "\x04data\x18\x01 \x01(\tR\x04data\x12\x18\n" + - "\atimeseq\x18\x02 \x01(\x03R\atimeseq\"\a\n" + - "\x05Empty\"F\n" + - "\rPostListReply\x12#\n" + - "\x04list\x18\x01 \x03(\v2\x0f.group.PostItemR\x04list\x12\x10\n" + - "\x03cnt\x18\x02 \x01(\x03R\x03cnt\"\xd3\x02\n" + - "\bPostItem\x12\x1a\n" + - "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" + - "\acontent\x18\x02 \x01(\tR\acontent\x12\x1f\n" + - "\vpassport_id\x18\x03 \x01(\x03R\n" + - "passportId\x12+\n" + - "\x11passport_identity\x18\x04 \x01(\tR\x10passportIdentity\x12\x17\n" + - "\ais_open\x18\x05 \x01(\bR\x06isOpen\x12\x1d\n" + - "\n" + - "cnt_unlike\x18\x06 \x01(\x03R\tcntUnlike\x12\x1f\n" + - "\vcnt_comment\x18\a \x01(\x03R\n" + - "cntComment\x12\x19\n" + - "\bcnt_like\x18\b \x01(\x03R\acntLike\x12+\n" + - "\aattachs\x18\t \x03(\v2\x11.group.AttachItemR\aattachs\x12\"\n" + - "\x04tags\x18\n" + - " \x03(\v2\x0e.group.TagItemR\x04tags\"[\n" + - "\n" + - "AttachItem\x12\x1a\n" + - "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1f\n" + - "\vattach_type\x18\x02 \x01(\tR\n" + - "attachType\x12\x10\n" + - "\x03url\x18\x03 \x01(\tR\x03url\"5\n" + - "\aTagItem\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x18\n" + - "\acontent\x18\x02 \x01(\tR\acontentB\tZ\a.;groupb\x06proto3" - -var ( - file_blocks_proto_rawDescOnce sync.Once - file_blocks_proto_rawDescData []byte -) - -func file_blocks_proto_rawDescGZIP() []byte { - file_blocks_proto_rawDescOnce.Do(func() { - file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc))) - }) - return file_blocks_proto_rawDescData -} - -var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_blocks_proto_goTypes = []any{ - (*FetchRequest)(nil), // 0: group.FetchRequest - (*IdentRequest)(nil), // 1: group.IdentRequest - (*VersionRequest)(nil), // 2: group.VersionRequest - (*SearchRequest)(nil), // 3: group.SearchRequest - (*StatusReply)(nil), // 4: group.StatusReply - (*Empty)(nil), // 5: group.Empty - (*PostListReply)(nil), // 6: group.PostListReply - (*PostItem)(nil), // 7: group.PostItem - (*AttachItem)(nil), // 8: group.AttachItem - (*TagItem)(nil), // 9: group.TagItem - nil, // 10: group.FetchRequest.ParamsEntry -} -var file_blocks_proto_depIdxs = []int32{ - 10, // 0: group.FetchRequest.params:type_name -> group.FetchRequest.ParamsEntry - 7, // 1: group.PostListReply.list:type_name -> group.PostItem - 8, // 2: group.PostItem.attachs:type_name -> group.AttachItem - 9, // 3: group.PostItem.tags:type_name -> group.TagItem - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_blocks_proto_init() } -func file_blocks_proto_init() { - if File_blocks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 11, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_blocks_proto_goTypes, - DependencyIndexes: file_blocks_proto_depIdxs, - MessageInfos: file_blocks_proto_msgTypes, - }.Build() - File_blocks_proto = out.File - file_blocks_proto_goTypes = nil - file_blocks_proto_depIdxs = nil -} diff --git a/module/social/group/pb/blocks_compat.go b/module/social/group/pb/blocks_compat.go new file mode 100644 index 0000000..8cc5f5f --- /dev/null +++ b/module/social/group/pb/blocks_compat.go @@ -0,0 +1,14 @@ +package group + +import blocks "bsm/full/protobuf" + +type Empty = blocks.Empty +type FetchRequest = blocks.FetchRequest +type IdentRequest = blocks.IdentRequest +type VersionRequest = blocks.VersionRequest +type SearchRequest = blocks.SearchRequest +type StatusReply = blocks.DataStatusReply +type PostListReply = blocks.GroupPostListReply +type PostItem = blocks.GroupPostItem +type AttachItem = blocks.GroupAttachItem +type TagItem = blocks.GroupTagItem diff --git a/module/social/group/pb/group.pb.go b/module/social/group/pb/group.pb.go index a99c285..8d45e1b 100644 --- a/module/social/group/pb/group.pb.go +++ b/module/social/group/pb/group.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: group.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/social/group/proto/group.proto package group import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -46,7 +47,7 @@ type GroupItem struct { func (x *GroupItem) Reset() { *x = GroupItem{} - mi := &file_group_proto_msgTypes[0] + mi := &file_module_social_group_proto_group_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -58,7 +59,7 @@ func (x *GroupItem) String() string { func (*GroupItem) ProtoMessage() {} func (x *GroupItem) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[0] + mi := &file_module_social_group_proto_group_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71,7 +72,7 @@ func (x *GroupItem) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupItem.ProtoReflect.Descriptor instead. func (*GroupItem) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{0} + return file_module_social_group_proto_group_proto_rawDescGZIP(), []int{0} } func (x *GroupItem) GetId() int64 { @@ -204,7 +205,7 @@ type GroupsReply struct { func (x *GroupsReply) Reset() { *x = GroupsReply{} - mi := &file_group_proto_msgTypes[1] + mi := &file_module_social_group_proto_group_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -216,7 +217,7 @@ func (x *GroupsReply) String() string { func (*GroupsReply) ProtoMessage() {} func (x *GroupsReply) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[1] + mi := &file_module_social_group_proto_group_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -229,7 +230,7 @@ func (x *GroupsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupsReply.ProtoReflect.Descriptor instead. func (*GroupsReply) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{1} + return file_module_social_group_proto_group_proto_rawDescGZIP(), []int{1} } func (x *GroupsReply) GetTotal() int32 { @@ -253,11 +254,11 @@ func (x *GroupsReply) GetGroups() []*GroupItem { return nil } -var File_group_proto protoreflect.FileDescriptor +var File_module_social_group_proto_group_proto protoreflect.FileDescriptor -const file_group_proto_rawDesc = "" + +const file_module_social_group_proto_group_proto_rawDesc = "" + "\n" + - "\x18social/group/group.proto\x12\x05group\x1a\x12group/blocks.proto\"\x94\x04\n" + + "%module/social/group/proto/group.proto\x12\x05group\x1a\x15protobuf/blocks.proto\"\x94\x04\n" + "\tGroupItem\x12\x0e\n" + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x16\n" + @@ -284,50 +285,50 @@ const file_group_proto_rawDesc = "" + "\vGroupsReply\x12\x14\n" + "\x05total\x18\x01 \x01(\x05R\x05total\x12\x18\n" + "\aversion\x18\x02 \x01(\x03R\aversion\x12(\n" + - "\x06groups\x18\x03 \x03(\v2\x10.group.GroupItemR\x06groups2\xa8\x02\n" + - "\x05Basic\x122\n" + - "\x06Search\x12\x14.group.SearchRequest\x1a\x12.group.GroupsReply\x12)\n" + - "\x05Fetch\x12\f.group.Empty\x1a\x12.group.GroupsReply\x12,\n" + - "\x03Get\x12\x13.group.IdentRequest\x1a\x10.group.GroupItem\x12.\n" + - "\x06Create\x12\x10.group.GroupItem\x1a\x12.group.StatusReply\x12.\n" + - "\x06Modify\x12\x10.group.GroupItem\x1a\x12.group.StatusReply\x122\n" + - "\aDisband\x12\x13.group.IdentRequest\x1a\x12.group.StatusReplyB\tZ\a.;groupb\x06proto3" + "\x06groups\x18\x03 \x03(\v2\x10.group.GroupItemR\x06groups2\xbb\x02\n" + + "\x05Basic\x123\n" + + "\x06Search\x12\x15.blocks.SearchRequest\x1a\x12.group.GroupsReply\x12*\n" + + "\x05Fetch\x12\r.blocks.Empty\x1a\x12.group.GroupsReply\x12-\n" + + "\x03Get\x12\x14.blocks.IdentRequest\x1a\x10.group.GroupItem\x123\n" + + "\x06Create\x12\x10.group.GroupItem\x1a\x17.blocks.DataStatusReply\x123\n" + + "\x06Modify\x12\x10.group.GroupItem\x1a\x17.blocks.DataStatusReply\x128\n" + + "\aDisband\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReplyB'Z%bsm/full/module/social/group/pb;groupb\x06proto3" var ( - file_group_proto_rawDescOnce sync.Once - file_group_proto_rawDescData []byte + file_module_social_group_proto_group_proto_rawDescOnce sync.Once + file_module_social_group_proto_group_proto_rawDescData []byte ) -func file_group_proto_rawDescGZIP() []byte { - file_group_proto_rawDescOnce.Do(func() { - file_group_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_group_proto_rawDesc), len(file_group_proto_rawDesc))) +func file_module_social_group_proto_group_proto_rawDescGZIP() []byte { + file_module_social_group_proto_group_proto_rawDescOnce.Do(func() { + file_module_social_group_proto_group_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_social_group_proto_group_proto_rawDesc), len(file_module_social_group_proto_group_proto_rawDesc))) }) - return file_group_proto_rawDescData + return file_module_social_group_proto_group_proto_rawDescData } -var file_group_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_group_proto_goTypes = []any{ - (*GroupItem)(nil), // 0: group.GroupItem - (*GroupsReply)(nil), // 1: group.GroupsReply - (*SearchRequest)(nil), // 2: group.SearchRequest - (*Empty)(nil), // 3: group.Empty - (*IdentRequest)(nil), // 4: group.IdentRequest - (*StatusReply)(nil), // 5: group.StatusReply +var file_module_social_group_proto_group_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_module_social_group_proto_group_proto_goTypes = []any{ + (*GroupItem)(nil), // 0: group.GroupItem + (*GroupsReply)(nil), // 1: group.GroupsReply + (*protobuf.SearchRequest)(nil), // 2: blocks.SearchRequest + (*protobuf.Empty)(nil), // 3: blocks.Empty + (*protobuf.IdentRequest)(nil), // 4: blocks.IdentRequest + (*protobuf.DataStatusReply)(nil), // 5: blocks.DataStatusReply } -var file_group_proto_depIdxs = []int32{ +var file_module_social_group_proto_group_proto_depIdxs = []int32{ 0, // 0: group.GroupsReply.groups:type_name -> group.GroupItem - 2, // 1: group.Basic.Search:input_type -> group.SearchRequest - 3, // 2: group.Basic.Fetch:input_type -> group.Empty - 4, // 3: group.Basic.Get:input_type -> group.IdentRequest + 2, // 1: group.Basic.Search:input_type -> blocks.SearchRequest + 3, // 2: group.Basic.Fetch:input_type -> blocks.Empty + 4, // 3: group.Basic.Get:input_type -> blocks.IdentRequest 0, // 4: group.Basic.Create:input_type -> group.GroupItem 0, // 5: group.Basic.Modify:input_type -> group.GroupItem - 4, // 6: group.Basic.Disband:input_type -> group.IdentRequest + 4, // 6: group.Basic.Disband:input_type -> blocks.IdentRequest 1, // 7: group.Basic.Search:output_type -> group.GroupsReply 1, // 8: group.Basic.Fetch:output_type -> group.GroupsReply 0, // 9: group.Basic.Get:output_type -> group.GroupItem - 5, // 10: group.Basic.Create:output_type -> group.StatusReply - 5, // 11: group.Basic.Modify:output_type -> group.StatusReply - 5, // 12: group.Basic.Disband:output_type -> group.StatusReply + 5, // 10: group.Basic.Create:output_type -> blocks.DataStatusReply + 5, // 11: group.Basic.Modify:output_type -> blocks.DataStatusReply + 5, // 12: group.Basic.Disband:output_type -> blocks.DataStatusReply 7, // [7:13] is the sub-list for method output_type 1, // [1:7] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -335,27 +336,26 @@ var file_group_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_group_proto_init() } -func file_group_proto_init() { - if File_group_proto != nil { +func init() { file_module_social_group_proto_group_proto_init() } +func file_module_social_group_proto_group_proto_init() { + if File_module_social_group_proto_group_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_group_proto_rawDesc), len(file_group_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_group_proto_group_proto_rawDesc), len(file_module_social_group_proto_group_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_group_proto_goTypes, - DependencyIndexes: file_group_proto_depIdxs, - MessageInfos: file_group_proto_msgTypes, + GoTypes: file_module_social_group_proto_group_proto_goTypes, + DependencyIndexes: file_module_social_group_proto_group_proto_depIdxs, + MessageInfos: file_module_social_group_proto_group_proto_msgTypes, }.Build() - File_group_proto = out.File - file_group_proto_goTypes = nil - file_group_proto_depIdxs = nil + File_module_social_group_proto_group_proto = out.File + file_module_social_group_proto_group_proto_goTypes = nil + file_module_social_group_proto_group_proto_depIdxs = nil } diff --git a/module/social/group/pb/group.pb.gw.go b/module/social/group/pb/group.pb.gw.go index e3f3625..d8acb96 100644 --- a/module/social/group/pb/group.pb.gw.go +++ b/module/social/group/pb/group.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: group.proto +// source: module/social/group/proto/group.proto /* Package group is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package group import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Basic_Search_0(ctx context.Context, marshaler runtime.Marshaler, client BasicClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq SearchRequest + protoReq blocks.SearchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Basic_Search_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Basic_Search_0(ctx context.Context, marshaler runtime.Marshaler, server BasicServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq SearchRequest + protoReq blocks.SearchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -64,7 +65,7 @@ func local_request_Basic_Search_0(ctx context.Context, marshaler runtime.Marshal func request_Basic_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client BasicClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Basic_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Basic_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server BasicServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -91,7 +92,7 @@ func local_request_Basic_Fetch_0(ctx context.Context, marshaler runtime.Marshale func request_Basic_Get_0(ctx context.Context, marshaler runtime.Marshaler, client BasicClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Basic_Get_0(ctx context.Context, marshaler runtime.Marshaler, clien func local_request_Basic_Get_0(ctx context.Context, marshaler runtime.Marshaler, server BasicServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -172,7 +173,7 @@ func local_request_Basic_Modify_0(ctx context.Context, marshaler runtime.Marshal func request_Basic_Disband_0(ctx context.Context, marshaler runtime.Marshaler, client BasicClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -187,7 +188,7 @@ func request_Basic_Disband_0(ctx context.Context, marshaler runtime.Marshaler, c func local_request_Basic_Disband_0(ctx context.Context, marshaler runtime.Marshaler, server BasicServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/social/group/pb/group_grpc.pb.go b/module/social/group/pb/group_grpc.pb.go index 3066a87..c14ca12 100644 --- a/module/social/group/pb/group_grpc.pb.go +++ b/module/social/group/pb/group_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: group.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/social/group/proto/group.proto package group import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -33,18 +34,18 @@ const ( // // 群组 type BasicClient interface { - //搜索 - Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*GroupsReply, error) - //获取群组列表 - Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GroupsReply, error) - //获取群组信息 - Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupItem, error) - //创建群组 - Create(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*StatusReply, error) - //修改群组信息 - Modify(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*StatusReply, error) - //解散群组 - Disband(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + // 搜索 + Search(ctx context.Context, in *protobuf.SearchRequest, opts ...grpc.CallOption) (*GroupsReply, error) + // 获取群组列表 + Fetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*GroupsReply, error) + // 获取群组信息 + Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*GroupItem, error) + // 创建群组 + Create(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 修改群组信息 + Modify(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 解散群组 + Disband(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) } type basicClient struct { @@ -55,7 +56,7 @@ func NewBasicClient(cc grpc.ClientConnInterface) BasicClient { return &basicClient{cc} } -func (c *basicClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*GroupsReply, error) { +func (c *basicClient) Search(ctx context.Context, in *protobuf.SearchRequest, opts ...grpc.CallOption) (*GroupsReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GroupsReply) err := c.cc.Invoke(ctx, Basic_Search_FullMethodName, in, out, cOpts...) @@ -65,7 +66,7 @@ func (c *basicClient) Search(ctx context.Context, in *SearchRequest, opts ...grp return out, nil } -func (c *basicClient) Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GroupsReply, error) { +func (c *basicClient) Fetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*GroupsReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GroupsReply) err := c.cc.Invoke(ctx, Basic_Fetch_FullMethodName, in, out, cOpts...) @@ -75,7 +76,7 @@ func (c *basicClient) Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOpt return out, nil } -func (c *basicClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupItem, error) { +func (c *basicClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*GroupItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GroupItem) err := c.cc.Invoke(ctx, Basic_Get_FullMethodName, in, out, cOpts...) @@ -85,9 +86,9 @@ func (c *basicClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.Ca return out, nil } -func (c *basicClient) Create(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *basicClient) Create(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Basic_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -95,9 +96,9 @@ func (c *basicClient) Create(ctx context.Context, in *GroupItem, opts ...grpc.Ca return out, nil } -func (c *basicClient) Modify(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *basicClient) Modify(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Basic_Modify_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -105,9 +106,9 @@ func (c *basicClient) Modify(ctx context.Context, in *GroupItem, opts ...grpc.Ca return out, nil } -func (c *basicClient) Disband(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *basicClient) Disband(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Basic_Disband_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -116,53 +117,51 @@ func (c *basicClient) Disband(ctx context.Context, in *IdentRequest, opts ...grp } // BasicServer is the server API for Basic service. -// All implementations must embed UnimplementedBasicServer +// All implementations should embed UnimplementedBasicServer // for forward compatibility. // // 群组 type BasicServer interface { - //搜索 - Search(context.Context, *SearchRequest) (*GroupsReply, error) - //获取群组列表 - Fetch(context.Context, *Empty) (*GroupsReply, error) - //获取群组信息 - Get(context.Context, *IdentRequest) (*GroupItem, error) - //创建群组 - Create(context.Context, *GroupItem) (*StatusReply, error) - //修改群组信息 - Modify(context.Context, *GroupItem) (*StatusReply, error) - //解散群组 - Disband(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedBasicServer() + // 搜索 + Search(context.Context, *protobuf.SearchRequest) (*GroupsReply, error) + // 获取群组列表 + Fetch(context.Context, *protobuf.Empty) (*GroupsReply, error) + // 获取群组信息 + Get(context.Context, *protobuf.IdentRequest) (*GroupItem, error) + // 创建群组 + Create(context.Context, *GroupItem) (*protobuf.DataStatusReply, error) + // 修改群组信息 + Modify(context.Context, *GroupItem) (*protobuf.DataStatusReply, error) + // 解散群组 + Disband(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) } -// UnimplementedBasicServer must be embedded to have +// UnimplementedBasicServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedBasicServer struct{} -func (UnimplementedBasicServer) Search(context.Context, *SearchRequest) (*GroupsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Search not implemented") +func (UnimplementedBasicServer) Search(context.Context, *protobuf.SearchRequest) (*GroupsReply, error) { + return nil, status.Error(codes.Unimplemented, "method Search not implemented") } -func (UnimplementedBasicServer) Fetch(context.Context, *Empty) (*GroupsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") +func (UnimplementedBasicServer) Fetch(context.Context, *protobuf.Empty) (*GroupsReply, error) { + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedBasicServer) Get(context.Context, *IdentRequest) (*GroupItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +func (UnimplementedBasicServer) Get(context.Context, *protobuf.IdentRequest) (*GroupItem, error) { + return nil, status.Error(codes.Unimplemented, "method Get not implemented") } -func (UnimplementedBasicServer) Create(context.Context, *GroupItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +func (UnimplementedBasicServer) Create(context.Context, *GroupItem) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedBasicServer) Modify(context.Context, *GroupItem) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented") +func (UnimplementedBasicServer) Modify(context.Context, *GroupItem) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Modify not implemented") } -func (UnimplementedBasicServer) Disband(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Disband not implemented") +func (UnimplementedBasicServer) Disband(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Disband not implemented") } -func (UnimplementedBasicServer) mustEmbedUnimplementedBasicServer() {} -func (UnimplementedBasicServer) testEmbeddedByValue() {} +func (UnimplementedBasicServer) testEmbeddedByValue() {} // UnsafeBasicServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BasicServer will @@ -172,7 +171,7 @@ type UnsafeBasicServer interface { } func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) { - // If the following call pancis, it indicates UnimplementedBasicServer was + // If the following call panics, it indicates UnimplementedBasicServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -183,7 +182,7 @@ func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) { } func _Basic_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchRequest) + in := new(protobuf.SearchRequest) if err := dec(in); err != nil { return nil, err } @@ -195,13 +194,13 @@ func _Basic_Search_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Basic_Search_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BasicServer).Search(ctx, req.(*SearchRequest)) + return srv.(BasicServer).Search(ctx, req.(*protobuf.SearchRequest)) } return interceptor(ctx, in, info, handler) } func _Basic_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -213,13 +212,13 @@ func _Basic_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Basic_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BasicServer).Fetch(ctx, req.(*Empty)) + return srv.(BasicServer).Fetch(ctx, req.(*protobuf.Empty)) } return interceptor(ctx, in, info, handler) } func _Basic_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -231,7 +230,7 @@ func _Basic_Get_Handler(srv interface{}, ctx context.Context, dec func(interface FullMethod: Basic_Get_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BasicServer).Get(ctx, req.(*IdentRequest)) + return srv.(BasicServer).Get(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -273,7 +272,7 @@ func _Basic_Modify_Handler(srv interface{}, ctx context.Context, dec func(interf } func _Basic_Disband_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -285,7 +284,7 @@ func _Basic_Disband_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Basic_Disband_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BasicServer).Disband(ctx, req.(*IdentRequest)) + return srv.(BasicServer).Disband(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -323,5 +322,5 @@ var Basic_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "group.proto", + Metadata: "module/social/group/proto/group.proto", } diff --git a/module/social/group/pb/member.pb.go b/module/social/group/pb/member.pb.go index b8abc26..dd66de7 100644 --- a/module/social/group/pb/member.pb.go +++ b/module/social/group/pb/member.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: member.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/social/group/proto/member.proto package group import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -35,7 +36,7 @@ type PassportInfoSimpleCard struct { func (x *PassportInfoSimpleCard) Reset() { *x = PassportInfoSimpleCard{} - mi := &file_member_proto_msgTypes[0] + mi := &file_module_social_group_proto_member_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +48,7 @@ func (x *PassportInfoSimpleCard) String() string { func (*PassportInfoSimpleCard) ProtoMessage() {} func (x *PassportInfoSimpleCard) ProtoReflect() protoreflect.Message { - mi := &file_member_proto_msgTypes[0] + mi := &file_module_social_group_proto_member_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +61,7 @@ func (x *PassportInfoSimpleCard) ProtoReflect() protoreflect.Message { // Deprecated: Use PassportInfoSimpleCard.ProtoReflect.Descriptor instead. func (*PassportInfoSimpleCard) Descriptor() ([]byte, []int) { - return file_member_proto_rawDescGZIP(), []int{0} + return file_module_social_group_proto_member_proto_rawDescGZIP(), []int{0} } func (x *PassportInfoSimpleCard) GetIdentity() string { @@ -126,7 +127,7 @@ type PassportInfoDetailCard struct { func (x *PassportInfoDetailCard) Reset() { *x = PassportInfoDetailCard{} - mi := &file_member_proto_msgTypes[1] + mi := &file_module_social_group_proto_member_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -138,7 +139,7 @@ func (x *PassportInfoDetailCard) String() string { func (*PassportInfoDetailCard) ProtoMessage() {} func (x *PassportInfoDetailCard) ProtoReflect() protoreflect.Message { - mi := &file_member_proto_msgTypes[1] + mi := &file_module_social_group_proto_member_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -151,7 +152,7 @@ func (x *PassportInfoDetailCard) ProtoReflect() protoreflect.Message { // Deprecated: Use PassportInfoDetailCard.ProtoReflect.Descriptor instead. func (*PassportInfoDetailCard) Descriptor() ([]byte, []int) { - return file_member_proto_rawDescGZIP(), []int{1} + return file_module_social_group_proto_member_proto_rawDescGZIP(), []int{1} } func (x *PassportInfoDetailCard) GetIdentity() string { @@ -256,7 +257,7 @@ type GroupMemberReply struct { func (x *GroupMemberReply) Reset() { *x = GroupMemberReply{} - mi := &file_member_proto_msgTypes[2] + mi := &file_module_social_group_proto_member_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -268,7 +269,7 @@ func (x *GroupMemberReply) String() string { func (*GroupMemberReply) ProtoMessage() {} func (x *GroupMemberReply) ProtoReflect() protoreflect.Message { - mi := &file_member_proto_msgTypes[2] + mi := &file_module_social_group_proto_member_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -281,7 +282,7 @@ func (x *GroupMemberReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupMemberReply.ProtoReflect.Descriptor instead. func (*GroupMemberReply) Descriptor() ([]byte, []int) { - return file_member_proto_rawDescGZIP(), []int{2} + return file_module_social_group_proto_member_proto_rawDescGZIP(), []int{2} } func (x *GroupMemberReply) GetTotal() int32 { @@ -316,7 +317,7 @@ type DoJoinRequest struct { func (x *DoJoinRequest) Reset() { *x = DoJoinRequest{} - mi := &file_member_proto_msgTypes[3] + mi := &file_module_social_group_proto_member_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -328,7 +329,7 @@ func (x *DoJoinRequest) String() string { func (*DoJoinRequest) ProtoMessage() {} func (x *DoJoinRequest) ProtoReflect() protoreflect.Message { - mi := &file_member_proto_msgTypes[3] + mi := &file_module_social_group_proto_member_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -341,7 +342,7 @@ func (x *DoJoinRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DoJoinRequest.ProtoReflect.Descriptor instead. func (*DoJoinRequest) Descriptor() ([]byte, []int) { - return file_member_proto_rawDescGZIP(), []int{3} + return file_module_social_group_proto_member_proto_rawDescGZIP(), []int{3} } func (x *DoJoinRequest) GetId() int64 { @@ -375,7 +376,7 @@ type JoinFetchReply struct { func (x *JoinFetchReply) Reset() { *x = JoinFetchReply{} - mi := &file_member_proto_msgTypes[4] + mi := &file_module_social_group_proto_member_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -387,7 +388,7 @@ func (x *JoinFetchReply) String() string { func (*JoinFetchReply) ProtoMessage() {} func (x *JoinFetchReply) ProtoReflect() protoreflect.Message { - mi := &file_member_proto_msgTypes[4] + mi := &file_module_social_group_proto_member_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -400,7 +401,7 @@ func (x *JoinFetchReply) ProtoReflect() protoreflect.Message { // Deprecated: Use JoinFetchReply.ProtoReflect.Descriptor instead. func (*JoinFetchReply) Descriptor() ([]byte, []int) { - return file_member_proto_rawDescGZIP(), []int{4} + return file_module_social_group_proto_member_proto_rawDescGZIP(), []int{4} } func (x *JoinFetchReply) GetTotal() int32 { @@ -431,7 +432,7 @@ type ApplyJoinGroupItem struct { func (x *ApplyJoinGroupItem) Reset() { *x = ApplyJoinGroupItem{} - mi := &file_member_proto_msgTypes[5] + mi := &file_module_social_group_proto_member_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -443,7 +444,7 @@ func (x *ApplyJoinGroupItem) String() string { func (*ApplyJoinGroupItem) ProtoMessage() {} func (x *ApplyJoinGroupItem) ProtoReflect() protoreflect.Message { - mi := &file_member_proto_msgTypes[5] + mi := &file_module_social_group_proto_member_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -456,7 +457,7 @@ func (x *ApplyJoinGroupItem) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyJoinGroupItem.ProtoReflect.Descriptor instead. func (*ApplyJoinGroupItem) Descriptor() ([]byte, []int) { - return file_member_proto_rawDescGZIP(), []int{5} + return file_module_social_group_proto_member_proto_rawDescGZIP(), []int{5} } func (x *ApplyJoinGroupItem) GetIdentity() string { @@ -512,7 +513,7 @@ type GroupOPRequest struct { func (x *GroupOPRequest) Reset() { *x = GroupOPRequest{} - mi := &file_member_proto_msgTypes[6] + mi := &file_module_social_group_proto_member_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -524,7 +525,7 @@ func (x *GroupOPRequest) String() string { func (*GroupOPRequest) ProtoMessage() {} func (x *GroupOPRequest) ProtoReflect() protoreflect.Message { - mi := &file_member_proto_msgTypes[6] + mi := &file_module_social_group_proto_member_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -537,7 +538,7 @@ func (x *GroupOPRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupOPRequest.ProtoReflect.Descriptor instead. func (*GroupOPRequest) Descriptor() ([]byte, []int) { - return file_member_proto_rawDescGZIP(), []int{6} + return file_module_social_group_proto_member_proto_rawDescGZIP(), []int{6} } func (x *GroupOPRequest) GetIdentity() string { @@ -561,11 +562,11 @@ func (x *GroupOPRequest) GetDirection() string { return "" } -var File_member_proto protoreflect.FileDescriptor +var File_module_social_group_proto_member_proto protoreflect.FileDescriptor -const file_member_proto_rawDesc = "" + +const file_module_social_group_proto_member_proto_rawDesc = "" + "\n" + - "\x19social/group/member.proto\x12\x05group\x1a\x12group/blocks.proto\"\xaf\x01\n" + + "&module/social/group/proto/member.proto\x12\x05group\x1a\x15protobuf/blocks.proto\"\xaf\x01\n" + "\x16PassportInfoSimpleCard\x12\x1a\n" + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1a\n" + "\bnickname\x18\x02 \x01(\tR\bnickname\x12\x1f\n" + @@ -612,59 +613,59 @@ const file_member_proto_rawDesc = "" + "\x0eGroupOPRequest\x12\x1a\n" + "\bidentity\x18\x01 \x01(\tR\bidentity\x12%\n" + "\x0egroup_identity\x18\x02 \x01(\tR\rgroupIdentity\x12\x1c\n" + - "\tdirection\x18\x03 \x01(\tR\tdirection2\x85\x03\n" + - "\x06Member\x125\n" + - "\x05Fetch\x12\x13.group.IdentRequest\x1a\x17.group.GroupMemberReply\x122\n" + - "\x06DoJoin\x12\x14.group.DoJoinRequest\x1a\x12.group.StatusReply\x120\n" + - "\tJoinFetch\x12\f.group.Empty\x1a\x15.group.JoinFetchReply\x129\n" + - "\fJoinDoHandle\x12\x15.group.GroupOPRequest\x1a\x12.group.StatusReply\x129\n" + - "\fDoSetManager\x12\x15.group.GroupOPRequest\x1a\x12.group.StatusReply\x123\n" + - "\x06DoKick\x12\x15.group.GroupOPRequest\x1a\x12.group.StatusReply\x123\n" + - "\x06DoQuit\x12\x15.group.GroupOPRequest\x1a\x12.group.StatusReplyB\tZ\a.;groupb\x06proto3" + "\tdirection\x18\x03 \x01(\tR\tdirection2\xa0\x03\n" + + "\x06Member\x126\n" + + "\x05Fetch\x12\x14.blocks.IdentRequest\x1a\x17.group.GroupMemberReply\x127\n" + + "\x06DoJoin\x12\x14.group.DoJoinRequest\x1a\x17.blocks.DataStatusReply\x121\n" + + "\tJoinFetch\x12\r.blocks.Empty\x1a\x15.group.JoinFetchReply\x12>\n" + + "\fJoinDoHandle\x12\x15.group.GroupOPRequest\x1a\x17.blocks.DataStatusReply\x12>\n" + + "\fDoSetManager\x12\x15.group.GroupOPRequest\x1a\x17.blocks.DataStatusReply\x128\n" + + "\x06DoKick\x12\x15.group.GroupOPRequest\x1a\x17.blocks.DataStatusReply\x128\n" + + "\x06DoQuit\x12\x15.group.GroupOPRequest\x1a\x17.blocks.DataStatusReplyB'Z%bsm/full/module/social/group/pb;groupb\x06proto3" var ( - file_member_proto_rawDescOnce sync.Once - file_member_proto_rawDescData []byte + file_module_social_group_proto_member_proto_rawDescOnce sync.Once + file_module_social_group_proto_member_proto_rawDescData []byte ) -func file_member_proto_rawDescGZIP() []byte { - file_member_proto_rawDescOnce.Do(func() { - file_member_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_member_proto_rawDesc), len(file_member_proto_rawDesc))) +func file_module_social_group_proto_member_proto_rawDescGZIP() []byte { + file_module_social_group_proto_member_proto_rawDescOnce.Do(func() { + file_module_social_group_proto_member_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_social_group_proto_member_proto_rawDesc), len(file_module_social_group_proto_member_proto_rawDesc))) }) - return file_member_proto_rawDescData + return file_module_social_group_proto_member_proto_rawDescData } -var file_member_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_member_proto_goTypes = []any{ - (*PassportInfoSimpleCard)(nil), // 0: group.PassportInfoSimpleCard - (*PassportInfoDetailCard)(nil), // 1: group.PassportInfoDetailCard - (*GroupMemberReply)(nil), // 2: group.GroupMemberReply - (*DoJoinRequest)(nil), // 3: group.DoJoinRequest - (*JoinFetchReply)(nil), // 4: group.JoinFetchReply - (*ApplyJoinGroupItem)(nil), // 5: group.ApplyJoinGroupItem - (*GroupOPRequest)(nil), // 6: group.GroupOPRequest - (*IdentRequest)(nil), // 7: group.IdentRequest - (*Empty)(nil), // 8: group.Empty - (*StatusReply)(nil), // 9: group.StatusReply +var file_module_social_group_proto_member_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_module_social_group_proto_member_proto_goTypes = []any{ + (*PassportInfoSimpleCard)(nil), // 0: group.PassportInfoSimpleCard + (*PassportInfoDetailCard)(nil), // 1: group.PassportInfoDetailCard + (*GroupMemberReply)(nil), // 2: group.GroupMemberReply + (*DoJoinRequest)(nil), // 3: group.DoJoinRequest + (*JoinFetchReply)(nil), // 4: group.JoinFetchReply + (*ApplyJoinGroupItem)(nil), // 5: group.ApplyJoinGroupItem + (*GroupOPRequest)(nil), // 6: group.GroupOPRequest + (*protobuf.IdentRequest)(nil), // 7: blocks.IdentRequest + (*protobuf.Empty)(nil), // 8: blocks.Empty + (*protobuf.DataStatusReply)(nil), // 9: blocks.DataStatusReply } -var file_member_proto_depIdxs = []int32{ +var file_module_social_group_proto_member_proto_depIdxs = []int32{ 0, // 0: group.GroupMemberReply.members:type_name -> group.PassportInfoSimpleCard 5, // 1: group.JoinFetchReply.applys:type_name -> group.ApplyJoinGroupItem 1, // 2: group.ApplyJoinGroupItem.from:type_name -> group.PassportInfoDetailCard - 7, // 3: group.Member.Fetch:input_type -> group.IdentRequest + 7, // 3: group.Member.Fetch:input_type -> blocks.IdentRequest 3, // 4: group.Member.DoJoin:input_type -> group.DoJoinRequest - 8, // 5: group.Member.JoinFetch:input_type -> group.Empty + 8, // 5: group.Member.JoinFetch:input_type -> blocks.Empty 6, // 6: group.Member.JoinDoHandle:input_type -> group.GroupOPRequest 6, // 7: group.Member.DoSetManager:input_type -> group.GroupOPRequest 6, // 8: group.Member.DoKick:input_type -> group.GroupOPRequest 6, // 9: group.Member.DoQuit:input_type -> group.GroupOPRequest 2, // 10: group.Member.Fetch:output_type -> group.GroupMemberReply - 9, // 11: group.Member.DoJoin:output_type -> group.StatusReply + 9, // 11: group.Member.DoJoin:output_type -> blocks.DataStatusReply 4, // 12: group.Member.JoinFetch:output_type -> group.JoinFetchReply - 9, // 13: group.Member.JoinDoHandle:output_type -> group.StatusReply - 9, // 14: group.Member.DoSetManager:output_type -> group.StatusReply - 9, // 15: group.Member.DoKick:output_type -> group.StatusReply - 9, // 16: group.Member.DoQuit:output_type -> group.StatusReply + 9, // 13: group.Member.JoinDoHandle:output_type -> blocks.DataStatusReply + 9, // 14: group.Member.DoSetManager:output_type -> blocks.DataStatusReply + 9, // 15: group.Member.DoKick:output_type -> blocks.DataStatusReply + 9, // 16: group.Member.DoQuit:output_type -> blocks.DataStatusReply 10, // [10:17] is the sub-list for method output_type 3, // [3:10] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name @@ -672,27 +673,26 @@ var file_member_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_member_proto_init() } -func file_member_proto_init() { - if File_member_proto != nil { +func init() { file_module_social_group_proto_member_proto_init() } +func file_module_social_group_proto_member_proto_init() { + if File_module_social_group_proto_member_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_member_proto_rawDesc), len(file_member_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_group_proto_member_proto_rawDesc), len(file_module_social_group_proto_member_proto_rawDesc)), NumEnums: 0, NumMessages: 7, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_member_proto_goTypes, - DependencyIndexes: file_member_proto_depIdxs, - MessageInfos: file_member_proto_msgTypes, + GoTypes: file_module_social_group_proto_member_proto_goTypes, + DependencyIndexes: file_module_social_group_proto_member_proto_depIdxs, + MessageInfos: file_module_social_group_proto_member_proto_msgTypes, }.Build() - File_member_proto = out.File - file_member_proto_goTypes = nil - file_member_proto_depIdxs = nil + File_module_social_group_proto_member_proto = out.File + file_module_social_group_proto_member_proto_goTypes = nil + file_module_social_group_proto_member_proto_depIdxs = nil } diff --git a/module/social/group/pb/member.pb.gw.go b/module/social/group/pb/member.pb.gw.go index cb428f5..06aeb03 100644 --- a/module/social/group/pb/member.pb.gw.go +++ b/module/social/group/pb/member.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: member.proto +// source: module/social/group/proto/member.proto /* Package group is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package group import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Member_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Member_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Member_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -91,7 +92,7 @@ func local_request_Member_DoJoin_0(ctx context.Context, marshaler runtime.Marsha func request_Member_JoinFetch_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Member_JoinFetch_0(ctx context.Context, marshaler runtime.Marshaler func local_request_Member_JoinFetch_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/social/group/pb/member_grpc.pb.go b/module/social/group/pb/member_grpc.pb.go index aea6f4f..a011cc7 100644 --- a/module/social/group/pb/member_grpc.pb.go +++ b/module/social/group/pb/member_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: member.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/social/group/proto/member.proto package group import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -34,20 +35,20 @@ const ( // // relation-关系管理:群组 type MemberClient interface { - //获取群组成员列表 - Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupMemberReply, error) - //申请加群 - DoJoin(ctx context.Context, in *DoJoinRequest, opts ...grpc.CallOption) (*StatusReply, error) - //申请加群列表 - JoinFetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*JoinFetchReply, error) - //申请加群处理 - JoinDoHandle(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) - //设置或取消管理员 - DoSetManager(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) - //踢人 - DoKick(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) - //退群 - DoQuit(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) + // 获取群组成员列表 + Fetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*GroupMemberReply, error) + // 申请加群 + DoJoin(ctx context.Context, in *DoJoinRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 申请加群列表 + JoinFetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*JoinFetchReply, error) + // 申请加群处理 + JoinDoHandle(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 设置或取消管理员 + DoSetManager(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 踢人 + DoKick(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 退群 + DoQuit(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) } type memberClient struct { @@ -58,7 +59,7 @@ func NewMemberClient(cc grpc.ClientConnInterface) MemberClient { return &memberClient{cc} } -func (c *memberClient) Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupMemberReply, error) { +func (c *memberClient) Fetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*GroupMemberReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GroupMemberReply) err := c.cc.Invoke(ctx, Member_Fetch_FullMethodName, in, out, cOpts...) @@ -68,9 +69,9 @@ func (c *memberClient) Fetch(ctx context.Context, in *IdentRequest, opts ...grpc return out, nil } -func (c *memberClient) DoJoin(ctx context.Context, in *DoJoinRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *memberClient) DoJoin(ctx context.Context, in *DoJoinRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Member_DoJoin_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -78,7 +79,7 @@ func (c *memberClient) DoJoin(ctx context.Context, in *DoJoinRequest, opts ...gr return out, nil } -func (c *memberClient) JoinFetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*JoinFetchReply, error) { +func (c *memberClient) JoinFetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*JoinFetchReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(JoinFetchReply) err := c.cc.Invoke(ctx, Member_JoinFetch_FullMethodName, in, out, cOpts...) @@ -88,9 +89,9 @@ func (c *memberClient) JoinFetch(ctx context.Context, in *Empty, opts ...grpc.Ca return out, nil } -func (c *memberClient) JoinDoHandle(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *memberClient) JoinDoHandle(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Member_JoinDoHandle_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -98,9 +99,9 @@ func (c *memberClient) JoinDoHandle(ctx context.Context, in *GroupOPRequest, opt return out, nil } -func (c *memberClient) DoSetManager(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *memberClient) DoSetManager(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Member_DoSetManager_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -108,9 +109,9 @@ func (c *memberClient) DoSetManager(ctx context.Context, in *GroupOPRequest, opt return out, nil } -func (c *memberClient) DoKick(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *memberClient) DoKick(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Member_DoKick_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -118,9 +119,9 @@ func (c *memberClient) DoKick(ctx context.Context, in *GroupOPRequest, opts ...g return out, nil } -func (c *memberClient) DoQuit(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *memberClient) DoQuit(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Member_DoQuit_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -129,58 +130,56 @@ func (c *memberClient) DoQuit(ctx context.Context, in *GroupOPRequest, opts ...g } // MemberServer is the server API for Member service. -// All implementations must embed UnimplementedMemberServer +// All implementations should embed UnimplementedMemberServer // for forward compatibility. // // relation-关系管理:群组 type MemberServer interface { - //获取群组成员列表 - Fetch(context.Context, *IdentRequest) (*GroupMemberReply, error) - //申请加群 - DoJoin(context.Context, *DoJoinRequest) (*StatusReply, error) - //申请加群列表 - JoinFetch(context.Context, *Empty) (*JoinFetchReply, error) - //申请加群处理 - JoinDoHandle(context.Context, *GroupOPRequest) (*StatusReply, error) - //设置或取消管理员 - DoSetManager(context.Context, *GroupOPRequest) (*StatusReply, error) - //踢人 - DoKick(context.Context, *GroupOPRequest) (*StatusReply, error) - //退群 - DoQuit(context.Context, *GroupOPRequest) (*StatusReply, error) - mustEmbedUnimplementedMemberServer() + // 获取群组成员列表 + Fetch(context.Context, *protobuf.IdentRequest) (*GroupMemberReply, error) + // 申请加群 + DoJoin(context.Context, *DoJoinRequest) (*protobuf.DataStatusReply, error) + // 申请加群列表 + JoinFetch(context.Context, *protobuf.Empty) (*JoinFetchReply, error) + // 申请加群处理 + JoinDoHandle(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error) + // 设置或取消管理员 + DoSetManager(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error) + // 踢人 + DoKick(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error) + // 退群 + DoQuit(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error) } -// UnimplementedMemberServer must be embedded to have +// UnimplementedMemberServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedMemberServer struct{} -func (UnimplementedMemberServer) Fetch(context.Context, *IdentRequest) (*GroupMemberReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") +func (UnimplementedMemberServer) Fetch(context.Context, *protobuf.IdentRequest) (*GroupMemberReply, error) { + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedMemberServer) DoJoin(context.Context, *DoJoinRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DoJoin not implemented") +func (UnimplementedMemberServer) DoJoin(context.Context, *DoJoinRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DoJoin not implemented") } -func (UnimplementedMemberServer) JoinFetch(context.Context, *Empty) (*JoinFetchReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method JoinFetch not implemented") +func (UnimplementedMemberServer) JoinFetch(context.Context, *protobuf.Empty) (*JoinFetchReply, error) { + return nil, status.Error(codes.Unimplemented, "method JoinFetch not implemented") } -func (UnimplementedMemberServer) JoinDoHandle(context.Context, *GroupOPRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method JoinDoHandle not implemented") +func (UnimplementedMemberServer) JoinDoHandle(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method JoinDoHandle not implemented") } -func (UnimplementedMemberServer) DoSetManager(context.Context, *GroupOPRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DoSetManager not implemented") +func (UnimplementedMemberServer) DoSetManager(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DoSetManager not implemented") } -func (UnimplementedMemberServer) DoKick(context.Context, *GroupOPRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DoKick not implemented") +func (UnimplementedMemberServer) DoKick(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DoKick not implemented") } -func (UnimplementedMemberServer) DoQuit(context.Context, *GroupOPRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DoQuit not implemented") +func (UnimplementedMemberServer) DoQuit(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DoQuit not implemented") } -func (UnimplementedMemberServer) mustEmbedUnimplementedMemberServer() {} -func (UnimplementedMemberServer) testEmbeddedByValue() {} +func (UnimplementedMemberServer) testEmbeddedByValue() {} // UnsafeMemberServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MemberServer will @@ -190,7 +189,7 @@ type UnsafeMemberServer interface { } func RegisterMemberServer(s grpc.ServiceRegistrar, srv MemberServer) { - // If the following call pancis, it indicates UnimplementedMemberServer was + // If the following call panics, it indicates UnimplementedMemberServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -201,7 +200,7 @@ func RegisterMemberServer(s grpc.ServiceRegistrar, srv MemberServer) { } func _Member_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -213,7 +212,7 @@ func _Member_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Member_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MemberServer).Fetch(ctx, req.(*IdentRequest)) + return srv.(MemberServer).Fetch(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -237,7 +236,7 @@ func _Member_DoJoin_Handler(srv interface{}, ctx context.Context, dec func(inter } func _Member_JoinFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -249,7 +248,7 @@ func _Member_JoinFetch_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: Member_JoinFetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MemberServer).JoinFetch(ctx, req.(*Empty)) + return srv.(MemberServer).JoinFetch(ctx, req.(*protobuf.Empty)) } return interceptor(ctx, in, info, handler) } @@ -363,5 +362,5 @@ var Member_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "member.proto", + Metadata: "module/social/group/proto/member.proto", } diff --git a/module/social/group/proto/blocks.proto b/module/social/group/proto/blocks.proto deleted file mode 100644 index 3daf717..0000000 --- a/module/social/group/proto/blocks.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; -package group; -option go_package = ".;group"; - -message FetchRequest { - int64 page_no=1; // 页数 - int64 page_size=2; // 每页记录数 - map params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11 -} - -message IdentRequest{ - int64 id = 1; // 唯一ID - string identity = 2; // 唯一码 -} - -message VersionRequest { - int64 version=1; // 时序版本号 -} - - -message SearchRequest { - string keyword=1; //关键词 -} - -message StatusReply{ - string data=1; // 数据 - int64 timeseq=2; // 响应时间序列 -} - - -message Empty{ -} - - - -// 推文列表 -message PostListReply{ - repeated PostItem list = 1; - int64 cnt = 2; -} - -// 推文 -message PostItem{ - string identity = 1; // 唯一标识 - string content = 2; // 内容 - int64 passport_id=3; // 通行证ID - string passport_identity = 4; // 通行证Identity - bool is_open =5; // 是否公开:默认为0-公开,1-不公开 - int64 cnt_unlike = 6; // 点踩数量 - int64 cnt_comment = 7; // 评论数量 - int64 cnt_like = 8; // 点赞数量 - repeated AttachItem attachs = 9; // 附件信息 - repeated TagItem tags = 10; // 所属话题 -} - -// 附件 -message AttachItem{ - string identity = 1; // 唯一标识 - string attach_type = 2; // 文件类型 - string url = 3; // 文件路径 -} - -// 标签 -message TagItem { - string key = 1; // 标签唯一码 - string content = 2; // 标签内容 -} \ No newline at end of file diff --git a/module/social/group/proto/group.proto b/module/social/group/proto/group.proto index 9077273..998f1a9 100644 --- a/module/social/group/proto/group.proto +++ b/module/social/group/proto/group.proto @@ -1,27 +1,27 @@ syntax = "proto3"; package group; -option go_package = ".;group"; -import "blocks.proto"; +option go_package = "bsm/full/module/social/group/pb;group"; +import "protobuf/blocks.proto"; // 群组 service Basic{ //搜索 - rpc Search(SearchRequest) returns (GroupsReply); + rpc Search(blocks.SearchRequest) returns (GroupsReply); //获取群组列表 - rpc Fetch(Empty) returns (GroupsReply); + rpc Fetch(blocks.Empty) returns (GroupsReply); //获取群组信息 - rpc Get(IdentRequest) returns (GroupItem); + rpc Get(blocks.IdentRequest) returns (GroupItem); //创建群组 - rpc Create(GroupItem) returns (StatusReply); + rpc Create(GroupItem) returns (blocks.DataStatusReply); //修改群组信息 - rpc Modify(GroupItem) returns (StatusReply); - + rpc Modify(GroupItem) returns (blocks.DataStatusReply); + //解散群组 - rpc Disband(IdentRequest) returns (StatusReply); + rpc Disband(blocks.IdentRequest) returns (blocks.DataStatusReply); } message GroupItem { int64 id =1; // 主键 diff --git a/module/social/group/proto/member.proto b/module/social/group/proto/member.proto index c761cdb..4c9ee4c 100644 --- a/module/social/group/proto/member.proto +++ b/module/social/group/proto/member.proto @@ -1,32 +1,32 @@ syntax = "proto3"; package group; -option go_package = ".;group"; -import "blocks.proto"; +option go_package = "bsm/full/module/social/group/pb;group"; +import "protobuf/blocks.proto"; // relation-关系管理:群组 service Member{ //获取群组成员列表 - rpc Fetch(IdentRequest) returns (GroupMemberReply); + rpc Fetch(blocks.IdentRequest) returns (GroupMemberReply); //申请加群 - rpc DoJoin(DoJoinRequest) returns (StatusReply); + rpc DoJoin(DoJoinRequest) returns (blocks.DataStatusReply); //申请加群列表 - rpc JoinFetch(Empty) returns (JoinFetchReply); + rpc JoinFetch(blocks.Empty) returns (JoinFetchReply); //申请加群处理 - rpc JoinDoHandle(GroupOPRequest) returns (StatusReply); + rpc JoinDoHandle(GroupOPRequest) returns (blocks.DataStatusReply); //设置或取消管理员 - rpc DoSetManager(GroupOPRequest) returns (StatusReply); + rpc DoSetManager(GroupOPRequest) returns (blocks.DataStatusReply); //踢人 - rpc DoKick(GroupOPRequest) returns (StatusReply); + rpc DoKick(GroupOPRequest) returns (blocks.DataStatusReply); //退群 - rpc DoQuit(GroupOPRequest) returns (StatusReply); - + rpc DoQuit(GroupOPRequest) returns (blocks.DataStatusReply); + } message PassportInfoSimpleCard{ diff --git a/module/social/relation/pb/blocks.pb.go b/module/social/relation/pb/blocks.pb.go deleted file mode 100644 index dc7ed31..0000000 --- a/module/social/relation/pb/blocks.pb.go +++ /dev/null @@ -1,604 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: blocks.proto - -package relation - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type FetchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PageNo int64 `protobuf:"varint,1,opt,name=page_no,json=pageNo,proto3" json:"page_no,omitempty"` // 页数 - PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页记录数 - Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:category_id=?,vlaue=11 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchRequest) Reset() { - *x = FetchRequest{} - mi := &file_blocks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRequest) ProtoMessage() {} - -func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. -func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{0} -} - -func (x *FetchRequest) GetPageNo() int64 { - if x != nil { - return x.PageNo - } - return 0 -} - -func (x *FetchRequest) GetPageSize() int64 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *FetchRequest) GetParams() map[string]string { - if x != nil { - return x.Params - } - return nil -} - -type IdentRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IdentRequest) Reset() { - *x = IdentRequest{} - mi := &file_blocks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IdentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IdentRequest) ProtoMessage() {} - -func (x *IdentRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. -func (*IdentRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{1} -} - -func (x *IdentRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *IdentRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -type VersionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 时序版本号 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *VersionRequest) Reset() { - *x = VersionRequest{} - mi := &file_blocks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *VersionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersionRequest) ProtoMessage() {} - -func (x *VersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. -func (*VersionRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{2} -} - -func (x *VersionRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type SearchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` //关键词 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SearchRequest) Reset() { - *x = SearchRequest{} - mi := &file_blocks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SearchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchRequest) ProtoMessage() {} - -func (x *SearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. -func (*SearchRequest) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{3} -} - -func (x *SearchRequest) GetKeyword() string { - if x != nil { - return x.Keyword - } - return "" -} - -type StatusReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // 数据 - Timeseq int64 `protobuf:"varint,2,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusReply) Reset() { - *x = StatusReply{} - mi := &file_blocks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusReply) ProtoMessage() {} - -func (x *StatusReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. -func (*StatusReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{4} -} - -func (x *StatusReply) GetData() string { - if x != nil { - return x.Data - } - return "" -} - -func (x *StatusReply) GetTimeseq() int64 { - if x != nil { - return x.Timeseq - } - return 0 -} - -type Empty struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Empty) Reset() { - *x = Empty{} - mi := &file_blocks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Empty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Empty) ProtoMessage() {} - -func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{5} -} - -type RelationItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` //昵称 - RemarkName string `protobuf:"bytes,3,opt,name=remark_name,json=remarkName,proto3" json:"remark_name,omitempty"` // 备注名称 - Popular int32 `protobuf:"varint,4,opt,name=popular,proto3" json:"popular,omitempty"` //是否置顶 - Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` - Birthday string `protobuf:"bytes,6,opt,name=birthday,proto3" json:"birthday,omitempty"` //生日 - Sex int32 `protobuf:"varint,7,opt,name=sex,proto3" json:"sex,omitempty"` //性别,1为男性,2为女性 - Province int32 `protobuf:"varint,8,opt,name=province,proto3" json:"province,omitempty"` //省 - City int32 `protobuf:"varint,9,opt,name=city,proto3" json:"city,omitempty"` //市 - Area int32 `protobuf:"varint,10,opt,name=area,proto3" json:"area,omitempty"` //区 - Sign string `protobuf:"bytes,11,opt,name=sign,proto3" json:"sign,omitempty"` //签名 - Tags []string `protobuf:"bytes,12,rep,name=tags,proto3" json:"tags,omitempty"` //所属标签组 - ForeignStatus int32 `protobuf:"varint,13,opt,name=foreign_status,json=foreignStatus,proto3" json:"foreign_status,omitempty"` //外表的状态值,根据表不同,值的作用不同 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RelationItem) Reset() { - *x = RelationItem{} - mi := &file_blocks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RelationItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RelationItem) ProtoMessage() {} - -func (x *RelationItem) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RelationItem.ProtoReflect.Descriptor instead. -func (*RelationItem) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{6} -} - -func (x *RelationItem) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *RelationItem) GetNickname() string { - if x != nil { - return x.Nickname - } - return "" -} - -func (x *RelationItem) GetRemarkName() string { - if x != nil { - return x.RemarkName - } - return "" -} - -func (x *RelationItem) GetPopular() int32 { - if x != nil { - return x.Popular - } - return 0 -} - -func (x *RelationItem) GetAvatar() string { - if x != nil { - return x.Avatar - } - return "" -} - -func (x *RelationItem) GetBirthday() string { - if x != nil { - return x.Birthday - } - return "" -} - -func (x *RelationItem) GetSex() int32 { - if x != nil { - return x.Sex - } - return 0 -} - -func (x *RelationItem) GetProvince() int32 { - if x != nil { - return x.Province - } - return 0 -} - -func (x *RelationItem) GetCity() int32 { - if x != nil { - return x.City - } - return 0 -} - -func (x *RelationItem) GetArea() int32 { - if x != nil { - return x.Area - } - return 0 -} - -func (x *RelationItem) GetSign() string { - if x != nil { - return x.Sign - } - return "" -} - -func (x *RelationItem) GetTags() []string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *RelationItem) GetForeignStatus() int32 { - if x != nil { - return x.ForeignStatus - } - return 0 -} - -type FetchRelationItemReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总记录数 - Data []*RelationItem `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchRelationItemReply) Reset() { - *x = FetchRelationItemReply{} - mi := &file_blocks_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchRelationItemReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRelationItemReply) ProtoMessage() {} - -func (x *FetchRelationItemReply) ProtoReflect() protoreflect.Message { - mi := &file_blocks_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchRelationItemReply.ProtoReflect.Descriptor instead. -func (*FetchRelationItemReply) Descriptor() ([]byte, []int) { - return file_blocks_proto_rawDescGZIP(), []int{7} -} - -func (x *FetchRelationItemReply) GetTotal() int64 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *FetchRelationItemReply) GetData() []*RelationItem { - if x != nil { - return x.Data - } - return nil -} - -var File_blocks_proto protoreflect.FileDescriptor - -const file_blocks_proto_rawDesc = "" + - "\n" + - "\x15relation/blocks.proto\x12\brelation\"\xbb\x01\n" + - "\fFetchRequest\x12\x17\n" + - "\apage_no\x18\x01 \x01(\x03R\x06pageNo\x12\x1b\n" + - "\tpage_size\x18\x02 \x01(\x03R\bpageSize\x12:\n" + - "\x06params\x18\x03 \x03(\v2\".relation.FetchRequest.ParamsEntryR\x06params\x1a9\n" + - "\vParamsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" + - "\fIdentRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + - "\bidentity\x18\x02 \x01(\tR\bidentity\"*\n" + - "\x0eVersionRequest\x12\x18\n" + - "\aversion\x18\x01 \x01(\x03R\aversion\")\n" + - "\rSearchRequest\x12\x18\n" + - "\akeyword\x18\x01 \x01(\tR\akeyword\";\n" + - "\vStatusReply\x12\x12\n" + - "\x04data\x18\x01 \x01(\tR\x04data\x12\x18\n" + - "\atimeseq\x18\x02 \x01(\x03R\atimeseq\"\a\n" + - "\x05Empty\"\xda\x02\n" + - "\fRelationItem\x12\x1a\n" + - "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1a\n" + - "\bnickname\x18\x02 \x01(\tR\bnickname\x12\x1f\n" + - "\vremark_name\x18\x03 \x01(\tR\n" + - "remarkName\x12\x18\n" + - "\apopular\x18\x04 \x01(\x05R\apopular\x12\x16\n" + - "\x06avatar\x18\x05 \x01(\tR\x06avatar\x12\x1a\n" + - "\bbirthday\x18\x06 \x01(\tR\bbirthday\x12\x10\n" + - "\x03sex\x18\a \x01(\x05R\x03sex\x12\x1a\n" + - "\bprovince\x18\b \x01(\x05R\bprovince\x12\x12\n" + - "\x04city\x18\t \x01(\x05R\x04city\x12\x12\n" + - "\x04area\x18\n" + - " \x01(\x05R\x04area\x12\x12\n" + - "\x04sign\x18\v \x01(\tR\x04sign\x12\x12\n" + - "\x04tags\x18\f \x03(\tR\x04tags\x12%\n" + - "\x0eforeign_status\x18\r \x01(\x05R\rforeignStatus\"Z\n" + - "\x16FetchRelationItemReply\x12\x14\n" + - "\x05total\x18\x01 \x01(\x03R\x05total\x12*\n" + - "\x04data\x18\x02 \x03(\v2\x16.relation.RelationItemR\x04dataB\fZ\n" + - ".;relationb\x06proto3" - -var ( - file_blocks_proto_rawDescOnce sync.Once - file_blocks_proto_rawDescData []byte -) - -func file_blocks_proto_rawDescGZIP() []byte { - file_blocks_proto_rawDescOnce.Do(func() { - file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc))) - }) - return file_blocks_proto_rawDescData -} - -var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_blocks_proto_goTypes = []any{ - (*FetchRequest)(nil), // 0: relation.FetchRequest - (*IdentRequest)(nil), // 1: relation.IdentRequest - (*VersionRequest)(nil), // 2: relation.VersionRequest - (*SearchRequest)(nil), // 3: relation.SearchRequest - (*StatusReply)(nil), // 4: relation.StatusReply - (*Empty)(nil), // 5: relation.Empty - (*RelationItem)(nil), // 6: relation.RelationItem - (*FetchRelationItemReply)(nil), // 7: relation.FetchRelationItemReply - nil, // 8: relation.FetchRequest.ParamsEntry -} -var file_blocks_proto_depIdxs = []int32{ - 8, // 0: relation.FetchRequest.params:type_name -> relation.FetchRequest.ParamsEntry - 6, // 1: relation.FetchRelationItemReply.data:type_name -> relation.RelationItem - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_blocks_proto_init() } -func file_blocks_proto_init() { - if File_blocks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 9, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_blocks_proto_goTypes, - DependencyIndexes: file_blocks_proto_depIdxs, - MessageInfos: file_blocks_proto_msgTypes, - }.Build() - File_blocks_proto = out.File - file_blocks_proto_goTypes = nil - file_blocks_proto_depIdxs = nil -} diff --git a/module/social/relation/pb/blocks_compat.go b/module/social/relation/pb/blocks_compat.go new file mode 100644 index 0000000..3d79bad --- /dev/null +++ b/module/social/relation/pb/blocks_compat.go @@ -0,0 +1,12 @@ +package relation + +import blocks "bsm/full/protobuf" + +type Empty = blocks.Empty +type FetchRequest = blocks.FetchRequest +type IdentRequest = blocks.IdentRequest +type VersionRequest = blocks.VersionRequest +type SearchRequest = blocks.SearchRequest +type StatusReply = blocks.DataStatusReply +type RelationItem = blocks.RelationItem +type FetchRelationItemReply = blocks.FetchRelationItemReply diff --git a/module/social/relation/pb/follow.pb.go b/module/social/relation/pb/follow.pb.go index b56cc5b..f5e45fd 100644 --- a/module/social/relation/pb/follow.pb.go +++ b/module/social/relation/pb/follow.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: follow.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/social/relation/proto/follow.proto package relation import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -20,33 +21,32 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -var File_follow_proto protoreflect.FileDescriptor +var File_module_social_relation_proto_follow_proto protoreflect.FileDescriptor -const file_follow_proto_rawDesc = "" + +const file_module_social_relation_proto_follow_proto_rawDesc = "" + "\n" + - "\x1csocial/relation/follow.proto\x12\brelation\x1a\x15relation/blocks.proto2\xfa\x01\n" + + ")module/social/relation/proto/follow.proto\x12\brelation\x1a\x15protobuf/blocks.proto2\xf6\x01\n" + "\x06Follow\x128\n" + - "\x05Doing\x12\x16.relation.IdentRequest\x1a\x15.relation.StatusReply\"\x00\x127\n" + - "\x04Undo\x12\x16.relation.IdentRequest\x1a\x15.relation.StatusReply\"\x00\x128\n" + - "\x05State\x12\x16.relation.IdentRequest\x1a\x15.relation.StatusReply\"\x00\x12C\n" + - "\x05Fetch\x12\x16.relation.FetchRequest\x1a .relation.FetchRelationItemReply\"\x00B\fZ\n" + - ".;relationb\x06proto3" + "\x05Doing\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00\x127\n" + + "\x04Undo\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00\x128\n" + + "\x05State\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00\x12?\n" + + "\x05Fetch\x12\x14.blocks.FetchRequest\x1a\x1e.blocks.FetchRelationItemReply\"\x00B-Z+bsm/full/module/social/relation/pb;relationb\x06proto3" -var file_follow_proto_goTypes = []any{ - (*IdentRequest)(nil), // 0: relation.IdentRequest - (*FetchRequest)(nil), // 1: relation.FetchRequest - (*StatusReply)(nil), // 2: relation.StatusReply - (*FetchRelationItemReply)(nil), // 3: relation.FetchRelationItemReply +var file_module_social_relation_proto_follow_proto_goTypes = []any{ + (*protobuf.IdentRequest)(nil), // 0: blocks.IdentRequest + (*protobuf.FetchRequest)(nil), // 1: blocks.FetchRequest + (*protobuf.DataStatusReply)(nil), // 2: blocks.DataStatusReply + (*protobuf.FetchRelationItemReply)(nil), // 3: blocks.FetchRelationItemReply } -var file_follow_proto_depIdxs = []int32{ - 0, // 0: relation.Follow.Doing:input_type -> relation.IdentRequest - 0, // 1: relation.Follow.Undo:input_type -> relation.IdentRequest - 0, // 2: relation.Follow.State:input_type -> relation.IdentRequest - 1, // 3: relation.Follow.Fetch:input_type -> relation.FetchRequest - 2, // 4: relation.Follow.Doing:output_type -> relation.StatusReply - 2, // 5: relation.Follow.Undo:output_type -> relation.StatusReply - 2, // 6: relation.Follow.State:output_type -> relation.StatusReply - 3, // 7: relation.Follow.Fetch:output_type -> relation.FetchRelationItemReply +var file_module_social_relation_proto_follow_proto_depIdxs = []int32{ + 0, // 0: relation.Follow.Doing:input_type -> blocks.IdentRequest + 0, // 1: relation.Follow.Undo:input_type -> blocks.IdentRequest + 0, // 2: relation.Follow.State:input_type -> blocks.IdentRequest + 1, // 3: relation.Follow.Fetch:input_type -> blocks.FetchRequest + 2, // 4: relation.Follow.Doing:output_type -> blocks.DataStatusReply + 2, // 5: relation.Follow.Undo:output_type -> blocks.DataStatusReply + 2, // 6: relation.Follow.State:output_type -> blocks.DataStatusReply + 3, // 7: relation.Follow.Fetch:output_type -> blocks.FetchRelationItemReply 4, // [4:8] is the sub-list for method output_type 0, // [0:4] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -54,26 +54,25 @@ var file_follow_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_follow_proto_init() } -func file_follow_proto_init() { - if File_follow_proto != nil { +func init() { file_module_social_relation_proto_follow_proto_init() } +func file_module_social_relation_proto_follow_proto_init() { + if File_module_social_relation_proto_follow_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_follow_proto_rawDesc), len(file_follow_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_relation_proto_follow_proto_rawDesc), len(file_module_social_relation_proto_follow_proto_rawDesc)), NumEnums: 0, NumMessages: 0, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_follow_proto_goTypes, - DependencyIndexes: file_follow_proto_depIdxs, + GoTypes: file_module_social_relation_proto_follow_proto_goTypes, + DependencyIndexes: file_module_social_relation_proto_follow_proto_depIdxs, }.Build() - File_follow_proto = out.File - file_follow_proto_goTypes = nil - file_follow_proto_depIdxs = nil + File_module_social_relation_proto_follow_proto = out.File + file_module_social_relation_proto_follow_proto_goTypes = nil + file_module_social_relation_proto_follow_proto_depIdxs = nil } diff --git a/module/social/relation/pb/follow.pb.gw.go b/module/social/relation/pb/follow.pb.gw.go index 17056d4..fa257bd 100644 --- a/module/social/relation/pb/follow.pb.gw.go +++ b/module/social/relation/pb/follow.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: follow.proto +// source: module/social/relation/proto/follow.proto /* Package relation is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package relation import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Follow_Doing_0(ctx context.Context, marshaler runtime.Marshaler, client FollowClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Follow_Doing_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Follow_Doing_0(ctx context.Context, marshaler runtime.Marshaler, server FollowServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -64,7 +65,7 @@ func local_request_Follow_Doing_0(ctx context.Context, marshaler runtime.Marshal func request_Follow_Undo_0(ctx context.Context, marshaler runtime.Marshaler, client FollowClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Follow_Undo_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Follow_Undo_0(ctx context.Context, marshaler runtime.Marshaler, server FollowServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -91,7 +92,7 @@ func local_request_Follow_Undo_0(ctx context.Context, marshaler runtime.Marshale func request_Follow_State_0(ctx context.Context, marshaler runtime.Marshaler, client FollowClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Follow_State_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Follow_State_0(ctx context.Context, marshaler runtime.Marshaler, server FollowServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -118,7 +119,7 @@ func local_request_Follow_State_0(ctx context.Context, marshaler runtime.Marshal func request_Follow_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client FollowClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Follow_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Follow_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server FollowServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/social/relation/pb/follow_grpc.pb.go b/module/social/relation/pb/follow_grpc.pb.go index 92fb91b..6c338e6 100644 --- a/module/social/relation/pb/follow_grpc.pb.go +++ b/module/social/relation/pb/follow_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: follow.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/social/relation/proto/follow.proto package relation import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -32,13 +33,13 @@ const ( // relation-关系管理:关注 type FollowClient interface { // 执行关注 - Doing(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + Doing(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) // 撤销关注 - Undo(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + Undo(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) // 关注状态 - State(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + State(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) // 获取关注列表 - Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchRelationItemReply, error) + Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FetchRelationItemReply, error) } type followClient struct { @@ -49,9 +50,9 @@ func NewFollowClient(cc grpc.ClientConnInterface) FollowClient { return &followClient{cc} } -func (c *followClient) Doing(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *followClient) Doing(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Follow_Doing_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -59,9 +60,9 @@ func (c *followClient) Doing(ctx context.Context, in *IdentRequest, opts ...grpc return out, nil } -func (c *followClient) Undo(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *followClient) Undo(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Follow_Undo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -69,9 +70,9 @@ func (c *followClient) Undo(ctx context.Context, in *IdentRequest, opts ...grpc. return out, nil } -func (c *followClient) State(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *followClient) State(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Follow_State_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -79,9 +80,9 @@ func (c *followClient) State(ctx context.Context, in *IdentRequest, opts ...grpc return out, nil } -func (c *followClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchRelationItemReply, error) { +func (c *followClient) Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FetchRelationItemReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(FetchRelationItemReply) + out := new(protobuf.FetchRelationItemReply) err := c.cc.Invoke(ctx, Follow_Fetch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -90,43 +91,41 @@ func (c *followClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc } // FollowServer is the server API for Follow service. -// All implementations must embed UnimplementedFollowServer +// All implementations should embed UnimplementedFollowServer // for forward compatibility. // // relation-关系管理:关注 type FollowServer interface { // 执行关注 - Doing(context.Context, *IdentRequest) (*StatusReply, error) + Doing(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) // 撤销关注 - Undo(context.Context, *IdentRequest) (*StatusReply, error) + Undo(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) // 关注状态 - State(context.Context, *IdentRequest) (*StatusReply, error) + State(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) // 获取关注列表 - Fetch(context.Context, *FetchRequest) (*FetchRelationItemReply, error) - mustEmbedUnimplementedFollowServer() + Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error) } -// UnimplementedFollowServer must be embedded to have +// UnimplementedFollowServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedFollowServer struct{} -func (UnimplementedFollowServer) Doing(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Doing not implemented") +func (UnimplementedFollowServer) Doing(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Doing not implemented") } -func (UnimplementedFollowServer) Undo(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Undo not implemented") +func (UnimplementedFollowServer) Undo(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Undo not implemented") } -func (UnimplementedFollowServer) State(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method State not implemented") +func (UnimplementedFollowServer) State(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method State not implemented") } -func (UnimplementedFollowServer) Fetch(context.Context, *FetchRequest) (*FetchRelationItemReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") +func (UnimplementedFollowServer) Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error) { + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedFollowServer) mustEmbedUnimplementedFollowServer() {} -func (UnimplementedFollowServer) testEmbeddedByValue() {} +func (UnimplementedFollowServer) testEmbeddedByValue() {} // UnsafeFollowServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to FollowServer will @@ -136,7 +135,7 @@ type UnsafeFollowServer interface { } func RegisterFollowServer(s grpc.ServiceRegistrar, srv FollowServer) { - // If the following call pancis, it indicates UnimplementedFollowServer was + // If the following call panics, it indicates UnimplementedFollowServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -147,7 +146,7 @@ func RegisterFollowServer(s grpc.ServiceRegistrar, srv FollowServer) { } func _Follow_Doing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -159,13 +158,13 @@ func _Follow_Doing_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Follow_Doing_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FollowServer).Doing(ctx, req.(*IdentRequest)) + return srv.(FollowServer).Doing(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Follow_Undo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -177,13 +176,13 @@ func _Follow_Undo_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Follow_Undo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FollowServer).Undo(ctx, req.(*IdentRequest)) + return srv.(FollowServer).Undo(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Follow_State_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -195,13 +194,13 @@ func _Follow_State_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Follow_State_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FollowServer).State(ctx, req.(*IdentRequest)) + return srv.(FollowServer).State(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Follow_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -213,7 +212,7 @@ func _Follow_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Follow_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FollowServer).Fetch(ctx, req.(*FetchRequest)) + return srv.(FollowServer).Fetch(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } @@ -243,5 +242,5 @@ var Follow_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "follow.proto", + Metadata: "module/social/relation/proto/follow.proto", } diff --git a/module/social/relation/pb/friend.pb.go b/module/social/relation/pb/friend.pb.go index 6b55bb3..4fcffd0 100644 --- a/module/social/relation/pb/friend.pb.go +++ b/module/social/relation/pb/friend.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: friend.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/social/relation/proto/friend.proto package relation import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -32,7 +33,7 @@ type ApplyFetchReply struct { func (x *ApplyFetchReply) Reset() { *x = ApplyFetchReply{} - mi := &file_friend_proto_msgTypes[0] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +45,7 @@ func (x *ApplyFetchReply) String() string { func (*ApplyFetchReply) ProtoMessage() {} func (x *ApplyFetchReply) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[0] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +58,7 @@ func (x *ApplyFetchReply) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyFetchReply.ProtoReflect.Descriptor instead. func (*ApplyFetchReply) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{0} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{0} } func (x *ApplyFetchReply) GetTotal() int32 { @@ -84,7 +85,7 @@ func (x *ApplyFetchReply) GetApplys() []*ApplyItem { type ApplyItem struct { state protoimpl.MessageState `protogen:"open.v1"` Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识 - From *RelationItem `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + From *protobuf.RelationItem `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` Message *MessageItem `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` CreatedAt string `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` //时间 Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` // 状态 @@ -94,7 +95,7 @@ type ApplyItem struct { func (x *ApplyItem) Reset() { *x = ApplyItem{} - mi := &file_friend_proto_msgTypes[1] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -106,7 +107,7 @@ func (x *ApplyItem) String() string { func (*ApplyItem) ProtoMessage() {} func (x *ApplyItem) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[1] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -119,7 +120,7 @@ func (x *ApplyItem) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyItem.ProtoReflect.Descriptor instead. func (*ApplyItem) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{1} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{1} } func (x *ApplyItem) GetIdentity() string { @@ -129,7 +130,7 @@ func (x *ApplyItem) GetIdentity() string { return "" } -func (x *ApplyItem) GetFrom() *RelationItem { +func (x *ApplyItem) GetFrom() *protobuf.RelationItem { if x != nil { return x.From } @@ -168,7 +169,7 @@ type ApplyDoRequest struct { func (x *ApplyDoRequest) Reset() { *x = ApplyDoRequest{} - mi := &file_friend_proto_msgTypes[2] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -180,7 +181,7 @@ func (x *ApplyDoRequest) String() string { func (*ApplyDoRequest) ProtoMessage() {} func (x *ApplyDoRequest) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[2] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -193,7 +194,7 @@ func (x *ApplyDoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyDoRequest.ProtoReflect.Descriptor instead. func (*ApplyDoRequest) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{2} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{2} } func (x *ApplyDoRequest) GetToId() int64 { @@ -228,7 +229,7 @@ type ApplyDoPassRequest struct { func (x *ApplyDoPassRequest) Reset() { *x = ApplyDoPassRequest{} - mi := &file_friend_proto_msgTypes[3] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -240,7 +241,7 @@ func (x *ApplyDoPassRequest) String() string { func (*ApplyDoPassRequest) ProtoMessage() {} func (x *ApplyDoPassRequest) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[3] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -253,7 +254,7 @@ func (x *ApplyDoPassRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyDoPassRequest.ProtoReflect.Descriptor instead. func (*ApplyDoPassRequest) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{3} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{3} } func (x *ApplyDoPassRequest) GetFriendRelationId() int64 { @@ -287,7 +288,7 @@ type ApplyMessageRequest struct { func (x *ApplyMessageRequest) Reset() { *x = ApplyMessageRequest{} - mi := &file_friend_proto_msgTypes[4] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -299,7 +300,7 @@ func (x *ApplyMessageRequest) String() string { func (*ApplyMessageRequest) ProtoMessage() {} func (x *ApplyMessageRequest) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[4] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -312,7 +313,7 @@ func (x *ApplyMessageRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyMessageRequest.ProtoReflect.Descriptor instead. func (*ApplyMessageRequest) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{4} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{4} } func (x *ApplyMessageRequest) GetApplyId() int64 { @@ -330,17 +331,17 @@ func (x *ApplyMessageRequest) GetBody() string { } type PartFriendReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总记录数 - Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` //版本号 - Friends []*RelationItem `protobuf:"bytes,4,rep,name=friends,proto3" json:"friends,omitempty"` //好友信息 + state protoimpl.MessageState `protogen:"open.v1"` + Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总记录数 + Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` //版本号 + Friends []*protobuf.RelationItem `protobuf:"bytes,4,rep,name=friends,proto3" json:"friends,omitempty"` //好友信息 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *PartFriendReply) Reset() { *x = PartFriendReply{} - mi := &file_friend_proto_msgTypes[5] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -352,7 +353,7 @@ func (x *PartFriendReply) String() string { func (*PartFriendReply) ProtoMessage() {} func (x *PartFriendReply) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[5] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -365,7 +366,7 @@ func (x *PartFriendReply) ProtoReflect() protoreflect.Message { // Deprecated: Use PartFriendReply.ProtoReflect.Descriptor instead. func (*PartFriendReply) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{5} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{5} } func (x *PartFriendReply) GetTotal() int32 { @@ -382,7 +383,7 @@ func (x *PartFriendReply) GetVersion() int64 { return 0 } -func (x *PartFriendReply) GetFriends() []*RelationItem { +func (x *PartFriendReply) GetFriends() []*protobuf.RelationItem { if x != nil { return x.Friends } @@ -390,18 +391,18 @@ func (x *PartFriendReply) GetFriends() []*RelationItem { } type FriendsReply struct { - state protoimpl.MessageState `protogen:"open.v1"` - Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总记录数 - Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` //版本号 - Tags []*TagItem `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"` //分组标签信息 - Friends []*RelationItem `protobuf:"bytes,4,rep,name=friends,proto3" json:"friends,omitempty"` //好友信息 + state protoimpl.MessageState `protogen:"open.v1"` + Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总记录数 + Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` //版本号 + Tags []*TagItem `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"` //分组标签信息 + Friends []*protobuf.RelationItem `protobuf:"bytes,4,rep,name=friends,proto3" json:"friends,omitempty"` //好友信息 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *FriendsReply) Reset() { *x = FriendsReply{} - mi := &file_friend_proto_msgTypes[6] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -413,7 +414,7 @@ func (x *FriendsReply) String() string { func (*FriendsReply) ProtoMessage() {} func (x *FriendsReply) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[6] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -426,7 +427,7 @@ func (x *FriendsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use FriendsReply.ProtoReflect.Descriptor instead. func (*FriendsReply) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{6} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{6} } func (x *FriendsReply) GetTotal() int32 { @@ -450,7 +451,7 @@ func (x *FriendsReply) GetTags() []*TagItem { return nil } -func (x *FriendsReply) GetFriends() []*RelationItem { +func (x *FriendsReply) GetFriends() []*protobuf.RelationItem { if x != nil { return x.Friends } @@ -459,7 +460,7 @@ func (x *FriendsReply) GetFriends() []*RelationItem { type FriendApplyGetReply struct { state protoimpl.MessageState `protogen:"open.v1"` - Data *RelationItem `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // 会员信息卡片 + Data *protobuf.RelationItem `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // 会员信息卡片 Message []*MessageItem `protobuf:"bytes,2,rep,name=message,proto3" json:"message,omitempty"` //聊天记录 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -467,7 +468,7 @@ type FriendApplyGetReply struct { func (x *FriendApplyGetReply) Reset() { *x = FriendApplyGetReply{} - mi := &file_friend_proto_msgTypes[7] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -479,7 +480,7 @@ func (x *FriendApplyGetReply) String() string { func (*FriendApplyGetReply) ProtoMessage() {} func (x *FriendApplyGetReply) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[7] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -492,10 +493,10 @@ func (x *FriendApplyGetReply) ProtoReflect() protoreflect.Message { // Deprecated: Use FriendApplyGetReply.ProtoReflect.Descriptor instead. func (*FriendApplyGetReply) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{7} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{7} } -func (x *FriendApplyGetReply) GetData() *RelationItem { +func (x *FriendApplyGetReply) GetData() *protobuf.RelationItem { if x != nil { return x.Data } @@ -520,7 +521,7 @@ type MessageItem struct { func (x *MessageItem) Reset() { *x = MessageItem{} - mi := &file_friend_proto_msgTypes[8] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -532,7 +533,7 @@ func (x *MessageItem) String() string { func (*MessageItem) ProtoMessage() {} func (x *MessageItem) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[8] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -545,7 +546,7 @@ func (x *MessageItem) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageItem.ProtoReflect.Descriptor instead. func (*MessageItem) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{8} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{8} } func (x *MessageItem) GetRelationIdentity() string { @@ -579,7 +580,7 @@ type ModifyNicknameRequest struct { func (x *ModifyNicknameRequest) Reset() { *x = ModifyNicknameRequest{} - mi := &file_friend_proto_msgTypes[9] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -591,7 +592,7 @@ func (x *ModifyNicknameRequest) String() string { func (*ModifyNicknameRequest) ProtoMessage() {} func (x *ModifyNicknameRequest) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[9] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -604,7 +605,7 @@ func (x *ModifyNicknameRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ModifyNicknameRequest.ProtoReflect.Descriptor instead. func (*ModifyNicknameRequest) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{9} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{9} } func (x *ModifyNicknameRequest) GetIdentity() string { @@ -631,7 +632,7 @@ type FriendTagsReply struct { func (x *FriendTagsReply) Reset() { *x = FriendTagsReply{} - mi := &file_friend_proto_msgTypes[10] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -643,7 +644,7 @@ func (x *FriendTagsReply) String() string { func (*FriendTagsReply) ProtoMessage() {} func (x *FriendTagsReply) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[10] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -656,7 +657,7 @@ func (x *FriendTagsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use FriendTagsReply.ProtoReflect.Descriptor instead. func (*FriendTagsReply) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{10} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{10} } func (x *FriendTagsReply) GetTotal() int64 { @@ -685,7 +686,7 @@ type TagItem struct { func (x *TagItem) Reset() { *x = TagItem{} - mi := &file_friend_proto_msgTypes[11] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -697,7 +698,7 @@ func (x *TagItem) String() string { func (*TagItem) ProtoMessage() {} func (x *TagItem) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[11] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -710,7 +711,7 @@ func (x *TagItem) ProtoReflect() protoreflect.Message { // Deprecated: Use TagItem.ProtoReflect.Descriptor instead. func (*TagItem) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{11} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{11} } func (x *TagItem) GetId() int64 { @@ -751,7 +752,7 @@ type TagDoCreateRequest struct { func (x *TagDoCreateRequest) Reset() { *x = TagDoCreateRequest{} - mi := &file_friend_proto_msgTypes[12] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -763,7 +764,7 @@ func (x *TagDoCreateRequest) String() string { func (*TagDoCreateRequest) ProtoMessage() {} func (x *TagDoCreateRequest) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[12] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -776,7 +777,7 @@ func (x *TagDoCreateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TagDoCreateRequest.ProtoReflect.Descriptor instead. func (*TagDoCreateRequest) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{12} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{12} } func (x *TagDoCreateRequest) GetTagName() string { @@ -804,7 +805,7 @@ type TagDoUpdateRequest struct { func (x *TagDoUpdateRequest) Reset() { *x = TagDoUpdateRequest{} - mi := &file_friend_proto_msgTypes[13] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -816,7 +817,7 @@ func (x *TagDoUpdateRequest) String() string { func (*TagDoUpdateRequest) ProtoMessage() {} func (x *TagDoUpdateRequest) ProtoReflect() protoreflect.Message { - mi := &file_friend_proto_msgTypes[13] + mi := &file_module_social_relation_proto_friend_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -829,7 +830,7 @@ func (x *TagDoUpdateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TagDoUpdateRequest.ProtoReflect.Descriptor instead. func (*TagDoUpdateRequest) Descriptor() ([]byte, []int) { - return file_friend_proto_rawDescGZIP(), []int{13} + return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{13} } func (x *TagDoUpdateRequest) GetTagIdentity() string { @@ -853,18 +854,18 @@ func (x *TagDoUpdateRequest) GetDirection() string { return "" } -var File_friend_proto protoreflect.FileDescriptor +var File_module_social_relation_proto_friend_proto protoreflect.FileDescriptor -const file_friend_proto_rawDesc = "" + +const file_module_social_relation_proto_friend_proto_rawDesc = "" + "\n" + - "\x1csocial/relation/friend.proto\x12\brelation\x1a\x15relation/blocks.proto\"n\n" + + ")module/social/relation/proto/friend.proto\x12\brelation\x1a\x15protobuf/blocks.proto\"n\n" + "\x0fApplyFetchReply\x12\x14\n" + "\x05total\x18\x01 \x01(\x05R\x05total\x12\x18\n" + "\aversion\x18\x02 \x01(\x03R\aversion\x12+\n" + - "\x06applys\x18\x03 \x03(\v2\x13.relation.ApplyItemR\x06applys\"\xbb\x01\n" + + "\x06applys\x18\x03 \x03(\v2\x13.relation.ApplyItemR\x06applys\"\xb9\x01\n" + "\tApplyItem\x12\x1a\n" + - "\bidentity\x18\x01 \x01(\tR\bidentity\x12*\n" + - "\x04from\x18\x02 \x01(\v2\x16.relation.RelationItemR\x04from\x12/\n" + + "\bidentity\x18\x01 \x01(\tR\bidentity\x12(\n" + + "\x04from\x18\x02 \x01(\v2\x14.blocks.RelationItemR\x04from\x12/\n" + "\amessage\x18\x03 \x01(\v2\x15.relation.MessageItemR\amessage\x12\x1d\n" + "\n" + "created_at\x18\x04 \x01(\tR\tcreatedAt\x12\x16\n" + @@ -880,18 +881,18 @@ const file_friend_proto_rawDesc = "" + "\x0eapply_identity\x18\x03 \x01(\tR\rapplyIdentity\"D\n" + "\x13ApplyMessageRequest\x12\x19\n" + "\bapply_id\x18\x01 \x01(\x03R\aapplyId\x12\x12\n" + - "\x04body\x18\x02 \x01(\tR\x04body\"s\n" + + "\x04body\x18\x02 \x01(\tR\x04body\"q\n" + "\x0fPartFriendReply\x12\x14\n" + "\x05total\x18\x01 \x01(\x05R\x05total\x12\x18\n" + - "\aversion\x18\x02 \x01(\x03R\aversion\x120\n" + - "\afriends\x18\x04 \x03(\v2\x16.relation.RelationItemR\afriends\"\x97\x01\n" + + "\aversion\x18\x02 \x01(\x03R\aversion\x12.\n" + + "\afriends\x18\x04 \x03(\v2\x14.blocks.RelationItemR\afriends\"\x95\x01\n" + "\fFriendsReply\x12\x14\n" + "\x05total\x18\x01 \x01(\x05R\x05total\x12\x18\n" + "\aversion\x18\x02 \x01(\x03R\aversion\x12%\n" + - "\x04tags\x18\x03 \x03(\v2\x11.relation.TagItemR\x04tags\x120\n" + - "\afriends\x18\x04 \x03(\v2\x16.relation.RelationItemR\afriends\"r\n" + - "\x13FriendApplyGetReply\x12*\n" + - "\x04data\x18\x01 \x01(\v2\x16.relation.RelationItemR\x04data\x12/\n" + + "\x04tags\x18\x03 \x03(\v2\x11.relation.TagItemR\x04tags\x12.\n" + + "\afriends\x18\x04 \x03(\v2\x14.blocks.RelationItemR\afriends\"p\n" + + "\x13FriendApplyGetReply\x12(\n" + + "\x04data\x18\x01 \x01(\v2\x14.blocks.RelationItemR\x04data\x12/\n" + "\amessage\x18\x02 \x03(\v2\x15.relation.MessageItemR\amessage\"m\n" + "\vMessageItem\x12+\n" + "\x11relation_identity\x18\x01 \x01(\tR\x10relationIdentity\x12\x12\n" + @@ -915,107 +916,106 @@ const file_friend_proto_rawDesc = "" + "\x12TagDoUpdateRequest\x12!\n" + "\ftag_identity\x18\x01 \x01(\tR\vtagIdentity\x12'\n" + "\x0ffriend_identity\x18\x02 \x01(\tR\x0efriendIdentity\x12\x1c\n" + - "\tdirection\x18\x03 \x01(\tR\tdirection2\xc8\b\n" + - "\x06Friend\x12<\n" + - "\x06Search\x12\x17.relation.SearchRequest\x1a\x19.relation.PartFriendReply\x129\n" + - "\x05Fetch\x12\x18.relation.VersionRequest\x1a\x16.relation.FriendsReply\x125\n" + - "\x03Get\x12\x16.relation.IdentRequest\x1a\x16.relation.RelationItem\x12H\n" + - "\x0eModifyNickname\x12\x1f.relation.ModifyNicknameRequest\x1a\x15.relation.StatusReply\x12:\n" + - "\tDoPopular\x12\x16.relation.IdentRequest\x1a\x15.relation.StatusReply\x12<\n" + - "\vUndoPopular\x12\x16.relation.IdentRequest\x1a\x15.relation.StatusReply\x127\n" + - "\x06Delete\x12\x16.relation.IdentRequest\x1a\x15.relation.StatusReply\x12A\n" + + "\tdirection\x18\x03 \x01(\tR\tdirection2\xc4\b\n" + + "\x06Friend\x12:\n" + + "\x06Search\x12\x15.blocks.SearchRequest\x1a\x19.relation.PartFriendReply\x127\n" + + "\x05Fetch\x12\x16.blocks.VersionRequest\x1a\x16.relation.FriendsReply\x121\n" + + "\x03Get\x12\x14.blocks.IdentRequest\x1a\x14.blocks.RelationItem\x12J\n" + + "\x0eModifyNickname\x12\x1f.relation.ModifyNicknameRequest\x1a\x17.blocks.DataStatusReply\x12:\n" + + "\tDoPopular\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\x12<\n" + + "\vUndoPopular\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\x127\n" + + "\x06Delete\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\x12?\n" + "\n" + - "ApplyFetch\x12\x18.relation.VersionRequest\x1a\x19.relation.ApplyFetchReply\x12A\n" + - "\bApplyGet\x12\x16.relation.IdentRequest\x1a\x1d.relation.FriendApplyGetReply\x12:\n" + - "\aApplyDo\x12\x18.relation.ApplyDoRequest\x1a\x15.relation.StatusReply\x12F\n" + - "\x0eApplyDoMessage\x12\x1d.relation.ApplyMessageRequest\x1a\x15.relation.StatusReply\x12B\n" + - "\vApplyDoPass\x12\x1c.relation.ApplyDoPassRequest\x1a\x15.relation.StatusReply\x12>\n" + - "\rApplyDoReject\x12\x16.relation.IdentRequest\x1a\x15.relation.StatusReply\x126\n" + - "\bTagFetch\x12\x0f.relation.Empty\x1a\x19.relation.FriendTagsReply\x12C\n" + - "\x0eTagMemberFetch\x12\x16.relation.IdentRequest\x1a\x19.relation.PartFriendReply\x12B\n" + - "\vTagDoCreate\x12\x1c.relation.TagDoCreateRequest\x1a\x15.relation.StatusReply\x12B\n" + - "\vTagDoUpdate\x12\x1c.relation.TagDoUpdateRequest\x1a\x15.relation.StatusReplyB\fZ\n" + - ".;relationb\x06proto3" + "ApplyFetch\x12\x16.blocks.VersionRequest\x1a\x19.relation.ApplyFetchReply\x12?\n" + + "\bApplyGet\x12\x14.blocks.IdentRequest\x1a\x1d.relation.FriendApplyGetReply\x12<\n" + + "\aApplyDo\x12\x18.relation.ApplyDoRequest\x1a\x17.blocks.DataStatusReply\x12H\n" + + "\x0eApplyDoMessage\x12\x1d.relation.ApplyMessageRequest\x1a\x17.blocks.DataStatusReply\x12D\n" + + "\vApplyDoPass\x12\x1c.relation.ApplyDoPassRequest\x1a\x17.blocks.DataStatusReply\x12>\n" + + "\rApplyDoReject\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\x124\n" + + "\bTagFetch\x12\r.blocks.Empty\x1a\x19.relation.FriendTagsReply\x12A\n" + + "\x0eTagMemberFetch\x12\x14.blocks.IdentRequest\x1a\x19.relation.PartFriendReply\x12D\n" + + "\vTagDoCreate\x12\x1c.relation.TagDoCreateRequest\x1a\x17.blocks.DataStatusReply\x12D\n" + + "\vTagDoUpdate\x12\x1c.relation.TagDoUpdateRequest\x1a\x17.blocks.DataStatusReplyB-Z+bsm/full/module/social/relation/pb;relationb\x06proto3" var ( - file_friend_proto_rawDescOnce sync.Once - file_friend_proto_rawDescData []byte + file_module_social_relation_proto_friend_proto_rawDescOnce sync.Once + file_module_social_relation_proto_friend_proto_rawDescData []byte ) -func file_friend_proto_rawDescGZIP() []byte { - file_friend_proto_rawDescOnce.Do(func() { - file_friend_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_friend_proto_rawDesc), len(file_friend_proto_rawDesc))) +func file_module_social_relation_proto_friend_proto_rawDescGZIP() []byte { + file_module_social_relation_proto_friend_proto_rawDescOnce.Do(func() { + file_module_social_relation_proto_friend_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_social_relation_proto_friend_proto_rawDesc), len(file_module_social_relation_proto_friend_proto_rawDesc))) }) - return file_friend_proto_rawDescData + return file_module_social_relation_proto_friend_proto_rawDescData } -var file_friend_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_friend_proto_goTypes = []any{ - (*ApplyFetchReply)(nil), // 0: relation.ApplyFetchReply - (*ApplyItem)(nil), // 1: relation.ApplyItem - (*ApplyDoRequest)(nil), // 2: relation.ApplyDoRequest - (*ApplyDoPassRequest)(nil), // 3: relation.ApplyDoPassRequest - (*ApplyMessageRequest)(nil), // 4: relation.ApplyMessageRequest - (*PartFriendReply)(nil), // 5: relation.PartFriendReply - (*FriendsReply)(nil), // 6: relation.FriendsReply - (*FriendApplyGetReply)(nil), // 7: relation.FriendApplyGetReply - (*MessageItem)(nil), // 8: relation.MessageItem - (*ModifyNicknameRequest)(nil), // 9: relation.ModifyNicknameRequest - (*FriendTagsReply)(nil), // 10: relation.FriendTagsReply - (*TagItem)(nil), // 11: relation.TagItem - (*TagDoCreateRequest)(nil), // 12: relation.TagDoCreateRequest - (*TagDoUpdateRequest)(nil), // 13: relation.TagDoUpdateRequest - (*RelationItem)(nil), // 14: relation.RelationItem - (*SearchRequest)(nil), // 15: relation.SearchRequest - (*VersionRequest)(nil), // 16: relation.VersionRequest - (*IdentRequest)(nil), // 17: relation.IdentRequest - (*Empty)(nil), // 18: relation.Empty - (*StatusReply)(nil), // 19: relation.StatusReply +var file_module_social_relation_proto_friend_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_module_social_relation_proto_friend_proto_goTypes = []any{ + (*ApplyFetchReply)(nil), // 0: relation.ApplyFetchReply + (*ApplyItem)(nil), // 1: relation.ApplyItem + (*ApplyDoRequest)(nil), // 2: relation.ApplyDoRequest + (*ApplyDoPassRequest)(nil), // 3: relation.ApplyDoPassRequest + (*ApplyMessageRequest)(nil), // 4: relation.ApplyMessageRequest + (*PartFriendReply)(nil), // 5: relation.PartFriendReply + (*FriendsReply)(nil), // 6: relation.FriendsReply + (*FriendApplyGetReply)(nil), // 7: relation.FriendApplyGetReply + (*MessageItem)(nil), // 8: relation.MessageItem + (*ModifyNicknameRequest)(nil), // 9: relation.ModifyNicknameRequest + (*FriendTagsReply)(nil), // 10: relation.FriendTagsReply + (*TagItem)(nil), // 11: relation.TagItem + (*TagDoCreateRequest)(nil), // 12: relation.TagDoCreateRequest + (*TagDoUpdateRequest)(nil), // 13: relation.TagDoUpdateRequest + (*protobuf.RelationItem)(nil), // 14: blocks.RelationItem + (*protobuf.SearchRequest)(nil), // 15: blocks.SearchRequest + (*protobuf.VersionRequest)(nil), // 16: blocks.VersionRequest + (*protobuf.IdentRequest)(nil), // 17: blocks.IdentRequest + (*protobuf.Empty)(nil), // 18: blocks.Empty + (*protobuf.DataStatusReply)(nil), // 19: blocks.DataStatusReply } -var file_friend_proto_depIdxs = []int32{ +var file_module_social_relation_proto_friend_proto_depIdxs = []int32{ 1, // 0: relation.ApplyFetchReply.applys:type_name -> relation.ApplyItem - 14, // 1: relation.ApplyItem.from:type_name -> relation.RelationItem + 14, // 1: relation.ApplyItem.from:type_name -> blocks.RelationItem 8, // 2: relation.ApplyItem.message:type_name -> relation.MessageItem - 14, // 3: relation.PartFriendReply.friends:type_name -> relation.RelationItem + 14, // 3: relation.PartFriendReply.friends:type_name -> blocks.RelationItem 11, // 4: relation.FriendsReply.tags:type_name -> relation.TagItem - 14, // 5: relation.FriendsReply.friends:type_name -> relation.RelationItem - 14, // 6: relation.FriendApplyGetReply.data:type_name -> relation.RelationItem + 14, // 5: relation.FriendsReply.friends:type_name -> blocks.RelationItem + 14, // 6: relation.FriendApplyGetReply.data:type_name -> blocks.RelationItem 8, // 7: relation.FriendApplyGetReply.message:type_name -> relation.MessageItem 11, // 8: relation.FriendTagsReply.data:type_name -> relation.TagItem - 15, // 9: relation.Friend.Search:input_type -> relation.SearchRequest - 16, // 10: relation.Friend.Fetch:input_type -> relation.VersionRequest - 17, // 11: relation.Friend.Get:input_type -> relation.IdentRequest + 15, // 9: relation.Friend.Search:input_type -> blocks.SearchRequest + 16, // 10: relation.Friend.Fetch:input_type -> blocks.VersionRequest + 17, // 11: relation.Friend.Get:input_type -> blocks.IdentRequest 9, // 12: relation.Friend.ModifyNickname:input_type -> relation.ModifyNicknameRequest - 17, // 13: relation.Friend.DoPopular:input_type -> relation.IdentRequest - 17, // 14: relation.Friend.UndoPopular:input_type -> relation.IdentRequest - 17, // 15: relation.Friend.Delete:input_type -> relation.IdentRequest - 16, // 16: relation.Friend.ApplyFetch:input_type -> relation.VersionRequest - 17, // 17: relation.Friend.ApplyGet:input_type -> relation.IdentRequest + 17, // 13: relation.Friend.DoPopular:input_type -> blocks.IdentRequest + 17, // 14: relation.Friend.UndoPopular:input_type -> blocks.IdentRequest + 17, // 15: relation.Friend.Delete:input_type -> blocks.IdentRequest + 16, // 16: relation.Friend.ApplyFetch:input_type -> blocks.VersionRequest + 17, // 17: relation.Friend.ApplyGet:input_type -> blocks.IdentRequest 2, // 18: relation.Friend.ApplyDo:input_type -> relation.ApplyDoRequest 4, // 19: relation.Friend.ApplyDoMessage:input_type -> relation.ApplyMessageRequest 3, // 20: relation.Friend.ApplyDoPass:input_type -> relation.ApplyDoPassRequest - 17, // 21: relation.Friend.ApplyDoReject:input_type -> relation.IdentRequest - 18, // 22: relation.Friend.TagFetch:input_type -> relation.Empty - 17, // 23: relation.Friend.TagMemberFetch:input_type -> relation.IdentRequest + 17, // 21: relation.Friend.ApplyDoReject:input_type -> blocks.IdentRequest + 18, // 22: relation.Friend.TagFetch:input_type -> blocks.Empty + 17, // 23: relation.Friend.TagMemberFetch:input_type -> blocks.IdentRequest 12, // 24: relation.Friend.TagDoCreate:input_type -> relation.TagDoCreateRequest 13, // 25: relation.Friend.TagDoUpdate:input_type -> relation.TagDoUpdateRequest 5, // 26: relation.Friend.Search:output_type -> relation.PartFriendReply 6, // 27: relation.Friend.Fetch:output_type -> relation.FriendsReply - 14, // 28: relation.Friend.Get:output_type -> relation.RelationItem - 19, // 29: relation.Friend.ModifyNickname:output_type -> relation.StatusReply - 19, // 30: relation.Friend.DoPopular:output_type -> relation.StatusReply - 19, // 31: relation.Friend.UndoPopular:output_type -> relation.StatusReply - 19, // 32: relation.Friend.Delete:output_type -> relation.StatusReply + 14, // 28: relation.Friend.Get:output_type -> blocks.RelationItem + 19, // 29: relation.Friend.ModifyNickname:output_type -> blocks.DataStatusReply + 19, // 30: relation.Friend.DoPopular:output_type -> blocks.DataStatusReply + 19, // 31: relation.Friend.UndoPopular:output_type -> blocks.DataStatusReply + 19, // 32: relation.Friend.Delete:output_type -> blocks.DataStatusReply 0, // 33: relation.Friend.ApplyFetch:output_type -> relation.ApplyFetchReply 7, // 34: relation.Friend.ApplyGet:output_type -> relation.FriendApplyGetReply - 19, // 35: relation.Friend.ApplyDo:output_type -> relation.StatusReply - 19, // 36: relation.Friend.ApplyDoMessage:output_type -> relation.StatusReply - 19, // 37: relation.Friend.ApplyDoPass:output_type -> relation.StatusReply - 19, // 38: relation.Friend.ApplyDoReject:output_type -> relation.StatusReply + 19, // 35: relation.Friend.ApplyDo:output_type -> blocks.DataStatusReply + 19, // 36: relation.Friend.ApplyDoMessage:output_type -> blocks.DataStatusReply + 19, // 37: relation.Friend.ApplyDoPass:output_type -> blocks.DataStatusReply + 19, // 38: relation.Friend.ApplyDoReject:output_type -> blocks.DataStatusReply 10, // 39: relation.Friend.TagFetch:output_type -> relation.FriendTagsReply 5, // 40: relation.Friend.TagMemberFetch:output_type -> relation.PartFriendReply - 19, // 41: relation.Friend.TagDoCreate:output_type -> relation.StatusReply - 19, // 42: relation.Friend.TagDoUpdate:output_type -> relation.StatusReply + 19, // 41: relation.Friend.TagDoCreate:output_type -> blocks.DataStatusReply + 19, // 42: relation.Friend.TagDoUpdate:output_type -> blocks.DataStatusReply 26, // [26:43] is the sub-list for method output_type 9, // [9:26] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name @@ -1023,27 +1023,26 @@ var file_friend_proto_depIdxs = []int32{ 0, // [0:9] is the sub-list for field type_name } -func init() { file_friend_proto_init() } -func file_friend_proto_init() { - if File_friend_proto != nil { +func init() { file_module_social_relation_proto_friend_proto_init() } +func file_module_social_relation_proto_friend_proto_init() { + if File_module_social_relation_proto_friend_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_friend_proto_rawDesc), len(file_friend_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_relation_proto_friend_proto_rawDesc), len(file_module_social_relation_proto_friend_proto_rawDesc)), NumEnums: 0, NumMessages: 14, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_friend_proto_goTypes, - DependencyIndexes: file_friend_proto_depIdxs, - MessageInfos: file_friend_proto_msgTypes, + GoTypes: file_module_social_relation_proto_friend_proto_goTypes, + DependencyIndexes: file_module_social_relation_proto_friend_proto_depIdxs, + MessageInfos: file_module_social_relation_proto_friend_proto_msgTypes, }.Build() - File_friend_proto = out.File - file_friend_proto_goTypes = nil - file_friend_proto_depIdxs = nil + File_module_social_relation_proto_friend_proto = out.File + file_module_social_relation_proto_friend_proto_goTypes = nil + file_module_social_relation_proto_friend_proto_depIdxs = nil } diff --git a/module/social/relation/pb/friend.pb.gw.go b/module/social/relation/pb/friend.pb.gw.go index 4372796..33678df 100644 --- a/module/social/relation/pb/friend.pb.gw.go +++ b/module/social/relation/pb/friend.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: friend.proto +// source: module/social/relation/proto/friend.proto /* Package relation is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package relation import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Friend_Search_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq SearchRequest + protoReq blocks.SearchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Friend_Search_0(ctx context.Context, marshaler runtime.Marshaler, c func local_request_Friend_Search_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq SearchRequest + protoReq blocks.SearchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -64,7 +65,7 @@ func local_request_Friend_Search_0(ctx context.Context, marshaler runtime.Marsha func request_Friend_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq VersionRequest + protoReq blocks.VersionRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Friend_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Friend_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq VersionRequest + protoReq blocks.VersionRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -91,7 +92,7 @@ func local_request_Friend_Fetch_0(ctx context.Context, marshaler runtime.Marshal func request_Friend_Get_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Friend_Get_0(ctx context.Context, marshaler runtime.Marshaler, clie func local_request_Friend_Get_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -145,7 +146,7 @@ func local_request_Friend_ModifyNickname_0(ctx context.Context, marshaler runtim func request_Friend_DoPopular_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -160,7 +161,7 @@ func request_Friend_DoPopular_0(ctx context.Context, marshaler runtime.Marshaler func local_request_Friend_DoPopular_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -172,7 +173,7 @@ func local_request_Friend_DoPopular_0(ctx context.Context, marshaler runtime.Mar func request_Friend_UndoPopular_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -187,7 +188,7 @@ func request_Friend_UndoPopular_0(ctx context.Context, marshaler runtime.Marshal func local_request_Friend_UndoPopular_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -199,7 +200,7 @@ func local_request_Friend_UndoPopular_0(ctx context.Context, marshaler runtime.M func request_Friend_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -214,7 +215,7 @@ func request_Friend_Delete_0(ctx context.Context, marshaler runtime.Marshaler, c func local_request_Friend_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -226,7 +227,7 @@ func local_request_Friend_Delete_0(ctx context.Context, marshaler runtime.Marsha func request_Friend_ApplyFetch_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq VersionRequest + protoReq blocks.VersionRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -241,7 +242,7 @@ func request_Friend_ApplyFetch_0(ctx context.Context, marshaler runtime.Marshale func local_request_Friend_ApplyFetch_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq VersionRequest + protoReq blocks.VersionRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -253,7 +254,7 @@ func local_request_Friend_ApplyFetch_0(ctx context.Context, marshaler runtime.Ma func request_Friend_ApplyGet_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -268,7 +269,7 @@ func request_Friend_ApplyGet_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Friend_ApplyGet_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -361,7 +362,7 @@ func local_request_Friend_ApplyDoPass_0(ctx context.Context, marshaler runtime.M func request_Friend_ApplyDoReject_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -376,7 +377,7 @@ func request_Friend_ApplyDoReject_0(ctx context.Context, marshaler runtime.Marsh func local_request_Friend_ApplyDoReject_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -388,7 +389,7 @@ func local_request_Friend_ApplyDoReject_0(ctx context.Context, marshaler runtime func request_Friend_TagFetch_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -403,7 +404,7 @@ func request_Friend_TagFetch_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Friend_TagFetch_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq Empty + protoReq blocks.Empty metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -415,7 +416,7 @@ func local_request_Friend_TagFetch_0(ctx context.Context, marshaler runtime.Mars func request_Friend_TagMemberFetch_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -430,7 +431,7 @@ func request_Friend_TagMemberFetch_0(ctx context.Context, marshaler runtime.Mars func local_request_Friend_TagMemberFetch_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/social/relation/pb/friend_grpc.pb.go b/module/social/relation/pb/friend_grpc.pb.go index ba64d5f..6c5754a 100644 --- a/module/social/relation/pb/friend_grpc.pb.go +++ b/module/social/relation/pb/friend_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: friend.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/social/relation/proto/friend.proto package relation import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -44,40 +45,40 @@ const ( // // relation-关系管理:好友 type FriendClient interface { - //搜索 - Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*PartFriendReply, error) - //获取好友列表 - Fetch(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*FriendsReply, error) - //获取用户信息卡片 - Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*RelationItem, error) - //修改好友备注名称,如果要清除备注,直接nickname传空值 - ModifyNickname(ctx context.Context, in *ModifyNicknameRequest, opts ...grpc.CallOption) (*StatusReply, error) - //受你欢迎的,置顶 - DoPopular(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) - //取消受欢迎的,取消置顶 - UndoPopular(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) - //删除好友 - Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) - //好友申请列表 - ApplyFetch(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*ApplyFetchReply, error) - //好友申请详情 - ApplyGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*FriendApplyGetReply, error) - //好友申请 - ApplyDo(ctx context.Context, in *ApplyDoRequest, opts ...grpc.CallOption) (*StatusReply, error) - //好友申请Do:留言 - ApplyDoMessage(ctx context.Context, in *ApplyMessageRequest, opts ...grpc.CallOption) (*StatusReply, error) - //好友申请Do:确认 - ApplyDoPass(ctx context.Context, in *ApplyDoPassRequest, opts ...grpc.CallOption) (*StatusReply, error) - //好友申请Do:拒绝 - ApplyDoReject(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) - //获取标签列表 - TagFetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*FriendTagsReply, error) - //获取标签成员 - TagMemberFetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*PartFriendReply, error) - //创建标签 - TagDoCreate(ctx context.Context, in *TagDoCreateRequest, opts ...grpc.CallOption) (*StatusReply, error) - //更新标签成员 - TagDoUpdate(ctx context.Context, in *TagDoUpdateRequest, opts ...grpc.CallOption) (*StatusReply, error) + // 搜索 + Search(ctx context.Context, in *protobuf.SearchRequest, opts ...grpc.CallOption) (*PartFriendReply, error) + // 获取好友列表 + Fetch(ctx context.Context, in *protobuf.VersionRequest, opts ...grpc.CallOption) (*FriendsReply, error) + // 获取用户信息卡片 + Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.RelationItem, error) + // 修改好友备注名称,如果要清除备注,直接nickname传空值 + ModifyNickname(ctx context.Context, in *ModifyNicknameRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 受你欢迎的,置顶 + DoPopular(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 取消受欢迎的,取消置顶 + UndoPopular(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 删除好友 + Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 好友申请列表 + ApplyFetch(ctx context.Context, in *protobuf.VersionRequest, opts ...grpc.CallOption) (*ApplyFetchReply, error) + // 好友申请详情 + ApplyGet(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*FriendApplyGetReply, error) + // 好友申请 + ApplyDo(ctx context.Context, in *ApplyDoRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 好友申请Do:留言 + ApplyDoMessage(ctx context.Context, in *ApplyMessageRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 好友申请Do:确认 + ApplyDoPass(ctx context.Context, in *ApplyDoPassRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 好友申请Do:拒绝 + ApplyDoReject(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 获取标签列表 + TagFetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*FriendTagsReply, error) + // 获取标签成员 + TagMemberFetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*PartFriendReply, error) + // 创建标签 + TagDoCreate(ctx context.Context, in *TagDoCreateRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) + // 更新标签成员 + TagDoUpdate(ctx context.Context, in *TagDoUpdateRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) } type friendClient struct { @@ -88,7 +89,7 @@ func NewFriendClient(cc grpc.ClientConnInterface) FriendClient { return &friendClient{cc} } -func (c *friendClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*PartFriendReply, error) { +func (c *friendClient) Search(ctx context.Context, in *protobuf.SearchRequest, opts ...grpc.CallOption) (*PartFriendReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PartFriendReply) err := c.cc.Invoke(ctx, Friend_Search_FullMethodName, in, out, cOpts...) @@ -98,7 +99,7 @@ func (c *friendClient) Search(ctx context.Context, in *SearchRequest, opts ...gr return out, nil } -func (c *friendClient) Fetch(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*FriendsReply, error) { +func (c *friendClient) Fetch(ctx context.Context, in *protobuf.VersionRequest, opts ...grpc.CallOption) (*FriendsReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(FriendsReply) err := c.cc.Invoke(ctx, Friend_Fetch_FullMethodName, in, out, cOpts...) @@ -108,9 +109,9 @@ func (c *friendClient) Fetch(ctx context.Context, in *VersionRequest, opts ...gr return out, nil } -func (c *friendClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*RelationItem, error) { +func (c *friendClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.RelationItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RelationItem) + out := new(protobuf.RelationItem) err := c.cc.Invoke(ctx, Friend_Get_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -118,9 +119,9 @@ func (c *friendClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.C return out, nil } -func (c *friendClient) ModifyNickname(ctx context.Context, in *ModifyNicknameRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *friendClient) ModifyNickname(ctx context.Context, in *ModifyNicknameRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Friend_ModifyNickname_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -128,9 +129,9 @@ func (c *friendClient) ModifyNickname(ctx context.Context, in *ModifyNicknameReq return out, nil } -func (c *friendClient) DoPopular(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *friendClient) DoPopular(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Friend_DoPopular_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -138,9 +139,9 @@ func (c *friendClient) DoPopular(ctx context.Context, in *IdentRequest, opts ... return out, nil } -func (c *friendClient) UndoPopular(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *friendClient) UndoPopular(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Friend_UndoPopular_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -148,9 +149,9 @@ func (c *friendClient) UndoPopular(ctx context.Context, in *IdentRequest, opts . return out, nil } -func (c *friendClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *friendClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Friend_Delete_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -158,7 +159,7 @@ func (c *friendClient) Delete(ctx context.Context, in *IdentRequest, opts ...grp return out, nil } -func (c *friendClient) ApplyFetch(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*ApplyFetchReply, error) { +func (c *friendClient) ApplyFetch(ctx context.Context, in *protobuf.VersionRequest, opts ...grpc.CallOption) (*ApplyFetchReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ApplyFetchReply) err := c.cc.Invoke(ctx, Friend_ApplyFetch_FullMethodName, in, out, cOpts...) @@ -168,7 +169,7 @@ func (c *friendClient) ApplyFetch(ctx context.Context, in *VersionRequest, opts return out, nil } -func (c *friendClient) ApplyGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*FriendApplyGetReply, error) { +func (c *friendClient) ApplyGet(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*FriendApplyGetReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(FriendApplyGetReply) err := c.cc.Invoke(ctx, Friend_ApplyGet_FullMethodName, in, out, cOpts...) @@ -178,9 +179,9 @@ func (c *friendClient) ApplyGet(ctx context.Context, in *IdentRequest, opts ...g return out, nil } -func (c *friendClient) ApplyDo(ctx context.Context, in *ApplyDoRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *friendClient) ApplyDo(ctx context.Context, in *ApplyDoRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Friend_ApplyDo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -188,9 +189,9 @@ func (c *friendClient) ApplyDo(ctx context.Context, in *ApplyDoRequest, opts ... return out, nil } -func (c *friendClient) ApplyDoMessage(ctx context.Context, in *ApplyMessageRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *friendClient) ApplyDoMessage(ctx context.Context, in *ApplyMessageRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Friend_ApplyDoMessage_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -198,9 +199,9 @@ func (c *friendClient) ApplyDoMessage(ctx context.Context, in *ApplyMessageReque return out, nil } -func (c *friendClient) ApplyDoPass(ctx context.Context, in *ApplyDoPassRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *friendClient) ApplyDoPass(ctx context.Context, in *ApplyDoPassRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Friend_ApplyDoPass_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -208,9 +209,9 @@ func (c *friendClient) ApplyDoPass(ctx context.Context, in *ApplyDoPassRequest, return out, nil } -func (c *friendClient) ApplyDoReject(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *friendClient) ApplyDoReject(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Friend_ApplyDoReject_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -218,7 +219,7 @@ func (c *friendClient) ApplyDoReject(ctx context.Context, in *IdentRequest, opts return out, nil } -func (c *friendClient) TagFetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*FriendTagsReply, error) { +func (c *friendClient) TagFetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*FriendTagsReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(FriendTagsReply) err := c.cc.Invoke(ctx, Friend_TagFetch_FullMethodName, in, out, cOpts...) @@ -228,7 +229,7 @@ func (c *friendClient) TagFetch(ctx context.Context, in *Empty, opts ...grpc.Cal return out, nil } -func (c *friendClient) TagMemberFetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*PartFriendReply, error) { +func (c *friendClient) TagMemberFetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*PartFriendReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PartFriendReply) err := c.cc.Invoke(ctx, Friend_TagMemberFetch_FullMethodName, in, out, cOpts...) @@ -238,9 +239,9 @@ func (c *friendClient) TagMemberFetch(ctx context.Context, in *IdentRequest, opt return out, nil } -func (c *friendClient) TagDoCreate(ctx context.Context, in *TagDoCreateRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *friendClient) TagDoCreate(ctx context.Context, in *TagDoCreateRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Friend_TagDoCreate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -248,9 +249,9 @@ func (c *friendClient) TagDoCreate(ctx context.Context, in *TagDoCreateRequest, return out, nil } -func (c *friendClient) TagDoUpdate(ctx context.Context, in *TagDoUpdateRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *friendClient) TagDoUpdate(ctx context.Context, in *TagDoUpdateRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Friend_TagDoUpdate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -259,108 +260,106 @@ func (c *friendClient) TagDoUpdate(ctx context.Context, in *TagDoUpdateRequest, } // FriendServer is the server API for Friend service. -// All implementations must embed UnimplementedFriendServer +// All implementations should embed UnimplementedFriendServer // for forward compatibility. // // relation-关系管理:好友 type FriendServer interface { - //搜索 - Search(context.Context, *SearchRequest) (*PartFriendReply, error) - //获取好友列表 - Fetch(context.Context, *VersionRequest) (*FriendsReply, error) - //获取用户信息卡片 - Get(context.Context, *IdentRequest) (*RelationItem, error) - //修改好友备注名称,如果要清除备注,直接nickname传空值 - ModifyNickname(context.Context, *ModifyNicknameRequest) (*StatusReply, error) - //受你欢迎的,置顶 - DoPopular(context.Context, *IdentRequest) (*StatusReply, error) - //取消受欢迎的,取消置顶 - UndoPopular(context.Context, *IdentRequest) (*StatusReply, error) - //删除好友 - Delete(context.Context, *IdentRequest) (*StatusReply, error) - //好友申请列表 - ApplyFetch(context.Context, *VersionRequest) (*ApplyFetchReply, error) - //好友申请详情 - ApplyGet(context.Context, *IdentRequest) (*FriendApplyGetReply, error) - //好友申请 - ApplyDo(context.Context, *ApplyDoRequest) (*StatusReply, error) - //好友申请Do:留言 - ApplyDoMessage(context.Context, *ApplyMessageRequest) (*StatusReply, error) - //好友申请Do:确认 - ApplyDoPass(context.Context, *ApplyDoPassRequest) (*StatusReply, error) - //好友申请Do:拒绝 - ApplyDoReject(context.Context, *IdentRequest) (*StatusReply, error) - //获取标签列表 - TagFetch(context.Context, *Empty) (*FriendTagsReply, error) - //获取标签成员 - TagMemberFetch(context.Context, *IdentRequest) (*PartFriendReply, error) - //创建标签 - TagDoCreate(context.Context, *TagDoCreateRequest) (*StatusReply, error) - //更新标签成员 - TagDoUpdate(context.Context, *TagDoUpdateRequest) (*StatusReply, error) - mustEmbedUnimplementedFriendServer() + // 搜索 + Search(context.Context, *protobuf.SearchRequest) (*PartFriendReply, error) + // 获取好友列表 + Fetch(context.Context, *protobuf.VersionRequest) (*FriendsReply, error) + // 获取用户信息卡片 + Get(context.Context, *protobuf.IdentRequest) (*protobuf.RelationItem, error) + // 修改好友备注名称,如果要清除备注,直接nickname传空值 + ModifyNickname(context.Context, *ModifyNicknameRequest) (*protobuf.DataStatusReply, error) + // 受你欢迎的,置顶 + DoPopular(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) + // 取消受欢迎的,取消置顶 + UndoPopular(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) + // 删除好友 + Delete(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) + // 好友申请列表 + ApplyFetch(context.Context, *protobuf.VersionRequest) (*ApplyFetchReply, error) + // 好友申请详情 + ApplyGet(context.Context, *protobuf.IdentRequest) (*FriendApplyGetReply, error) + // 好友申请 + ApplyDo(context.Context, *ApplyDoRequest) (*protobuf.DataStatusReply, error) + // 好友申请Do:留言 + ApplyDoMessage(context.Context, *ApplyMessageRequest) (*protobuf.DataStatusReply, error) + // 好友申请Do:确认 + ApplyDoPass(context.Context, *ApplyDoPassRequest) (*protobuf.DataStatusReply, error) + // 好友申请Do:拒绝 + ApplyDoReject(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) + // 获取标签列表 + TagFetch(context.Context, *protobuf.Empty) (*FriendTagsReply, error) + // 获取标签成员 + TagMemberFetch(context.Context, *protobuf.IdentRequest) (*PartFriendReply, error) + // 创建标签 + TagDoCreate(context.Context, *TagDoCreateRequest) (*protobuf.DataStatusReply, error) + // 更新标签成员 + TagDoUpdate(context.Context, *TagDoUpdateRequest) (*protobuf.DataStatusReply, error) } -// UnimplementedFriendServer must be embedded to have +// UnimplementedFriendServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedFriendServer struct{} -func (UnimplementedFriendServer) Search(context.Context, *SearchRequest) (*PartFriendReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Search not implemented") +func (UnimplementedFriendServer) Search(context.Context, *protobuf.SearchRequest) (*PartFriendReply, error) { + return nil, status.Error(codes.Unimplemented, "method Search not implemented") } -func (UnimplementedFriendServer) Fetch(context.Context, *VersionRequest) (*FriendsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") +func (UnimplementedFriendServer) Fetch(context.Context, *protobuf.VersionRequest) (*FriendsReply, error) { + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedFriendServer) Get(context.Context, *IdentRequest) (*RelationItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +func (UnimplementedFriendServer) Get(context.Context, *protobuf.IdentRequest) (*protobuf.RelationItem, error) { + return nil, status.Error(codes.Unimplemented, "method Get not implemented") } -func (UnimplementedFriendServer) ModifyNickname(context.Context, *ModifyNicknameRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyNickname not implemented") +func (UnimplementedFriendServer) ModifyNickname(context.Context, *ModifyNicknameRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method ModifyNickname not implemented") } -func (UnimplementedFriendServer) DoPopular(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DoPopular not implemented") +func (UnimplementedFriendServer) DoPopular(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DoPopular not implemented") } -func (UnimplementedFriendServer) UndoPopular(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UndoPopular not implemented") +func (UnimplementedFriendServer) UndoPopular(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method UndoPopular not implemented") } -func (UnimplementedFriendServer) Delete(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +func (UnimplementedFriendServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedFriendServer) ApplyFetch(context.Context, *VersionRequest) (*ApplyFetchReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplyFetch not implemented") +func (UnimplementedFriendServer) ApplyFetch(context.Context, *protobuf.VersionRequest) (*ApplyFetchReply, error) { + return nil, status.Error(codes.Unimplemented, "method ApplyFetch not implemented") } -func (UnimplementedFriendServer) ApplyGet(context.Context, *IdentRequest) (*FriendApplyGetReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplyGet not implemented") +func (UnimplementedFriendServer) ApplyGet(context.Context, *protobuf.IdentRequest) (*FriendApplyGetReply, error) { + return nil, status.Error(codes.Unimplemented, "method ApplyGet not implemented") } -func (UnimplementedFriendServer) ApplyDo(context.Context, *ApplyDoRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplyDo not implemented") +func (UnimplementedFriendServer) ApplyDo(context.Context, *ApplyDoRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method ApplyDo not implemented") } -func (UnimplementedFriendServer) ApplyDoMessage(context.Context, *ApplyMessageRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplyDoMessage not implemented") +func (UnimplementedFriendServer) ApplyDoMessage(context.Context, *ApplyMessageRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method ApplyDoMessage not implemented") } -func (UnimplementedFriendServer) ApplyDoPass(context.Context, *ApplyDoPassRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplyDoPass not implemented") +func (UnimplementedFriendServer) ApplyDoPass(context.Context, *ApplyDoPassRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method ApplyDoPass not implemented") } -func (UnimplementedFriendServer) ApplyDoReject(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplyDoReject not implemented") +func (UnimplementedFriendServer) ApplyDoReject(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method ApplyDoReject not implemented") } -func (UnimplementedFriendServer) TagFetch(context.Context, *Empty) (*FriendTagsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method TagFetch not implemented") +func (UnimplementedFriendServer) TagFetch(context.Context, *protobuf.Empty) (*FriendTagsReply, error) { + return nil, status.Error(codes.Unimplemented, "method TagFetch not implemented") } -func (UnimplementedFriendServer) TagMemberFetch(context.Context, *IdentRequest) (*PartFriendReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method TagMemberFetch not implemented") +func (UnimplementedFriendServer) TagMemberFetch(context.Context, *protobuf.IdentRequest) (*PartFriendReply, error) { + return nil, status.Error(codes.Unimplemented, "method TagMemberFetch not implemented") } -func (UnimplementedFriendServer) TagDoCreate(context.Context, *TagDoCreateRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method TagDoCreate not implemented") +func (UnimplementedFriendServer) TagDoCreate(context.Context, *TagDoCreateRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method TagDoCreate not implemented") } -func (UnimplementedFriendServer) TagDoUpdate(context.Context, *TagDoUpdateRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method TagDoUpdate not implemented") +func (UnimplementedFriendServer) TagDoUpdate(context.Context, *TagDoUpdateRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method TagDoUpdate not implemented") } -func (UnimplementedFriendServer) mustEmbedUnimplementedFriendServer() {} -func (UnimplementedFriendServer) testEmbeddedByValue() {} +func (UnimplementedFriendServer) testEmbeddedByValue() {} // UnsafeFriendServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to FriendServer will @@ -370,7 +369,7 @@ type UnsafeFriendServer interface { } func RegisterFriendServer(s grpc.ServiceRegistrar, srv FriendServer) { - // If the following call pancis, it indicates UnimplementedFriendServer was + // If the following call panics, it indicates UnimplementedFriendServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -381,7 +380,7 @@ func RegisterFriendServer(s grpc.ServiceRegistrar, srv FriendServer) { } func _Friend_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchRequest) + in := new(protobuf.SearchRequest) if err := dec(in); err != nil { return nil, err } @@ -393,13 +392,13 @@ func _Friend_Search_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Friend_Search_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).Search(ctx, req.(*SearchRequest)) + return srv.(FriendServer).Search(ctx, req.(*protobuf.SearchRequest)) } return interceptor(ctx, in, info, handler) } func _Friend_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VersionRequest) + in := new(protobuf.VersionRequest) if err := dec(in); err != nil { return nil, err } @@ -411,13 +410,13 @@ func _Friend_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Friend_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).Fetch(ctx, req.(*VersionRequest)) + return srv.(FriendServer).Fetch(ctx, req.(*protobuf.VersionRequest)) } return interceptor(ctx, in, info, handler) } func _Friend_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -429,7 +428,7 @@ func _Friend_Get_Handler(srv interface{}, ctx context.Context, dec func(interfac FullMethod: Friend_Get_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).Get(ctx, req.(*IdentRequest)) + return srv.(FriendServer).Get(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -453,7 +452,7 @@ func _Friend_ModifyNickname_Handler(srv interface{}, ctx context.Context, dec fu } func _Friend_DoPopular_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -465,13 +464,13 @@ func _Friend_DoPopular_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: Friend_DoPopular_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).DoPopular(ctx, req.(*IdentRequest)) + return srv.(FriendServer).DoPopular(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Friend_UndoPopular_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -483,13 +482,13 @@ func _Friend_UndoPopular_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: Friend_UndoPopular_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).UndoPopular(ctx, req.(*IdentRequest)) + return srv.(FriendServer).UndoPopular(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Friend_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -501,13 +500,13 @@ func _Friend_Delete_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Friend_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).Delete(ctx, req.(*IdentRequest)) + return srv.(FriendServer).Delete(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Friend_ApplyFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VersionRequest) + in := new(protobuf.VersionRequest) if err := dec(in); err != nil { return nil, err } @@ -519,13 +518,13 @@ func _Friend_ApplyFetch_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: Friend_ApplyFetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).ApplyFetch(ctx, req.(*VersionRequest)) + return srv.(FriendServer).ApplyFetch(ctx, req.(*protobuf.VersionRequest)) } return interceptor(ctx, in, info, handler) } func _Friend_ApplyGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -537,7 +536,7 @@ func _Friend_ApplyGet_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: Friend_ApplyGet_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).ApplyGet(ctx, req.(*IdentRequest)) + return srv.(FriendServer).ApplyGet(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -597,7 +596,7 @@ func _Friend_ApplyDoPass_Handler(srv interface{}, ctx context.Context, dec func( } func _Friend_ApplyDoReject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -609,13 +608,13 @@ func _Friend_ApplyDoReject_Handler(srv interface{}, ctx context.Context, dec fun FullMethod: Friend_ApplyDoReject_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).ApplyDoReject(ctx, req.(*IdentRequest)) + return srv.(FriendServer).ApplyDoReject(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Friend_TagFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -627,13 +626,13 @@ func _Friend_TagFetch_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: Friend_TagFetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).TagFetch(ctx, req.(*Empty)) + return srv.(FriendServer).TagFetch(ctx, req.(*protobuf.Empty)) } return interceptor(ctx, in, info, handler) } func _Friend_TagMemberFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -645,7 +644,7 @@ func _Friend_TagMemberFetch_Handler(srv interface{}, ctx context.Context, dec fu FullMethod: Friend_TagMemberFetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).TagMemberFetch(ctx, req.(*IdentRequest)) + return srv.(FriendServer).TagMemberFetch(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -763,5 +762,5 @@ var Friend_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "friend.proto", + Metadata: "module/social/relation/proto/friend.proto", } diff --git a/module/social/relation/pb/match.pb.go b/module/social/relation/pb/match.pb.go index 86246b1..4efbc49 100644 --- a/module/social/relation/pb/match.pb.go +++ b/module/social/relation/pb/match.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc (unknown) -// source: match.proto +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: module/social/relation/proto/match.proto package relation import ( + protobuf "bsm/full/protobuf" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -20,34 +21,33 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -var File_match_proto protoreflect.FileDescriptor +var File_module_social_relation_proto_match_proto protoreflect.FileDescriptor -const file_match_proto_rawDesc = "" + +const file_module_social_relation_proto_match_proto_rawDesc = "" + "\n" + - "\x1bsocial/relation/match.proto\x12\brelation\x1a\x15relation/blocks.proto2\xfd\x01\n" + - "\x05Match\x12C\n" + - "\x05Fetch\x12\x16.relation.FetchRequest\x1a .relation.FetchRelationItemReply\"\x00\x127\n" + - "\x03Get\x12\x16.relation.IdentRequest\x1a\x16.relation.RelationItem\"\x00\x129\n" + - "\x06DoJoin\x12\x16.relation.IdentRequest\x1a\x15.relation.StatusReply\"\x00\x12;\n" + - "\bDoIgnore\x12\x16.relation.IdentRequest\x1a\x15.relation.StatusReply\"\x00B\fZ\n" + - ".;relationb\x06proto3" + "(module/social/relation/proto/match.proto\x12\brelation\x1a\x15protobuf/blocks.proto2\xf5\x01\n" + + "\x05Match\x12?\n" + + "\x05Fetch\x12\x14.blocks.FetchRequest\x1a\x1e.blocks.FetchRelationItemReply\"\x00\x123\n" + + "\x03Get\x12\x14.blocks.IdentRequest\x1a\x14.blocks.RelationItem\"\x00\x129\n" + + "\x06DoJoin\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00\x12;\n" + + "\bDoIgnore\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00B-Z+bsm/full/module/social/relation/pb;relationb\x06proto3" -var file_match_proto_goTypes = []any{ - (*FetchRequest)(nil), // 0: relation.FetchRequest - (*IdentRequest)(nil), // 1: relation.IdentRequest - (*FetchRelationItemReply)(nil), // 2: relation.FetchRelationItemReply - (*RelationItem)(nil), // 3: relation.RelationItem - (*StatusReply)(nil), // 4: relation.StatusReply +var file_module_social_relation_proto_match_proto_goTypes = []any{ + (*protobuf.FetchRequest)(nil), // 0: blocks.FetchRequest + (*protobuf.IdentRequest)(nil), // 1: blocks.IdentRequest + (*protobuf.FetchRelationItemReply)(nil), // 2: blocks.FetchRelationItemReply + (*protobuf.RelationItem)(nil), // 3: blocks.RelationItem + (*protobuf.DataStatusReply)(nil), // 4: blocks.DataStatusReply } -var file_match_proto_depIdxs = []int32{ - 0, // 0: relation.Match.Fetch:input_type -> relation.FetchRequest - 1, // 1: relation.Match.Get:input_type -> relation.IdentRequest - 1, // 2: relation.Match.DoJoin:input_type -> relation.IdentRequest - 1, // 3: relation.Match.DoIgnore:input_type -> relation.IdentRequest - 2, // 4: relation.Match.Fetch:output_type -> relation.FetchRelationItemReply - 3, // 5: relation.Match.Get:output_type -> relation.RelationItem - 4, // 6: relation.Match.DoJoin:output_type -> relation.StatusReply - 4, // 7: relation.Match.DoIgnore:output_type -> relation.StatusReply +var file_module_social_relation_proto_match_proto_depIdxs = []int32{ + 0, // 0: relation.Match.Fetch:input_type -> blocks.FetchRequest + 1, // 1: relation.Match.Get:input_type -> blocks.IdentRequest + 1, // 2: relation.Match.DoJoin:input_type -> blocks.IdentRequest + 1, // 3: relation.Match.DoIgnore:input_type -> blocks.IdentRequest + 2, // 4: relation.Match.Fetch:output_type -> blocks.FetchRelationItemReply + 3, // 5: relation.Match.Get:output_type -> blocks.RelationItem + 4, // 6: relation.Match.DoJoin:output_type -> blocks.DataStatusReply + 4, // 7: relation.Match.DoIgnore:output_type -> blocks.DataStatusReply 4, // [4:8] is the sub-list for method output_type 0, // [0:4] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -55,26 +55,25 @@ var file_match_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_match_proto_init() } -func file_match_proto_init() { - if File_match_proto != nil { +func init() { file_module_social_relation_proto_match_proto_init() } +func file_module_social_relation_proto_match_proto_init() { + if File_module_social_relation_proto_match_proto != nil { return } - file_blocks_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_match_proto_rawDesc), len(file_match_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_relation_proto_match_proto_rawDesc), len(file_module_social_relation_proto_match_proto_rawDesc)), NumEnums: 0, NumMessages: 0, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_match_proto_goTypes, - DependencyIndexes: file_match_proto_depIdxs, + GoTypes: file_module_social_relation_proto_match_proto_goTypes, + DependencyIndexes: file_module_social_relation_proto_match_proto_depIdxs, }.Build() - File_match_proto = out.File - file_match_proto_goTypes = nil - file_match_proto_depIdxs = nil + File_module_social_relation_proto_match_proto = out.File + file_module_social_relation_proto_match_proto_goTypes = nil + file_module_social_relation_proto_match_proto_depIdxs = nil } diff --git a/module/social/relation/pb/match.pb.gw.go b/module/social/relation/pb/match.pb.gw.go index 7e7a52b..9f9ed4b 100644 --- a/module/social/relation/pb/match.pb.gw.go +++ b/module/social/relation/pb/match.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: match.proto +// source: module/social/relation/proto/match.proto /* Package relation is a reverse proxy. @@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs. package relation import ( + "bsm/full/protobuf" "context" "errors" "io" @@ -37,7 +38,7 @@ var ( func request_Match_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client MatchClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -52,7 +53,7 @@ func request_Match_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, cli func local_request_Match_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server MatchServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchRequest + protoReq blocks.FetchRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -64,7 +65,7 @@ func local_request_Match_Fetch_0(ctx context.Context, marshaler runtime.Marshale func request_Match_Get_0(ctx context.Context, marshaler runtime.Marshaler, client MatchClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -79,7 +80,7 @@ func request_Match_Get_0(ctx context.Context, marshaler runtime.Marshaler, clien func local_request_Match_Get_0(ctx context.Context, marshaler runtime.Marshaler, server MatchServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -91,7 +92,7 @@ func local_request_Match_Get_0(ctx context.Context, marshaler runtime.Marshaler, func request_Match_DoJoin_0(ctx context.Context, marshaler runtime.Marshaler, client MatchClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -106,7 +107,7 @@ func request_Match_DoJoin_0(ctx context.Context, marshaler runtime.Marshaler, cl func local_request_Match_DoJoin_0(ctx context.Context, marshaler runtime.Marshaler, server MatchServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -118,7 +119,7 @@ func local_request_Match_DoJoin_0(ctx context.Context, marshaler runtime.Marshal func request_Match_DoIgnore_0(ctx context.Context, marshaler runtime.Marshaler, client MatchClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { @@ -133,7 +134,7 @@ func request_Match_DoIgnore_0(ctx context.Context, marshaler runtime.Marshaler, func local_request_Match_DoIgnore_0(ctx context.Context, marshaler runtime.Marshaler, server MatchServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq IdentRequest + protoReq blocks.IdentRequest metadata runtime.ServerMetadata ) if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { diff --git a/module/social/relation/pb/match_grpc.pb.go b/module/social/relation/pb/match_grpc.pb.go index 75d14b2..e8caa88 100644 --- a/module/social/relation/pb/match_grpc.pb.go +++ b/module/social/relation/pb/match_grpc.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: match.proto +// - protoc-gen-go-grpc v1.6.2 +// - protoc v7.35.0 +// source: module/social/relation/proto/match.proto package relation import ( + protobuf "bsm/full/protobuf" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -32,13 +33,13 @@ const ( // relation-关系管理:匹配 type MatchClient interface { // 获取匹配列表 - Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchRelationItemReply, error) + Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FetchRelationItemReply, error) // 获取匹配详情 - Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*RelationItem, error) + Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.RelationItem, error) // 执行通过,加为好友 - DoJoin(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + DoJoin(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) // 执行忽略 - DoIgnore(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) + DoIgnore(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) } type matchClient struct { @@ -49,9 +50,9 @@ func NewMatchClient(cc grpc.ClientConnInterface) MatchClient { return &matchClient{cc} } -func (c *matchClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchRelationItemReply, error) { +func (c *matchClient) Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FetchRelationItemReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(FetchRelationItemReply) + out := new(protobuf.FetchRelationItemReply) err := c.cc.Invoke(ctx, Match_Fetch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -59,9 +60,9 @@ func (c *matchClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc. return out, nil } -func (c *matchClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*RelationItem, error) { +func (c *matchClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.RelationItem, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RelationItem) + out := new(protobuf.RelationItem) err := c.cc.Invoke(ctx, Match_Get_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -69,9 +70,9 @@ func (c *matchClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.Ca return out, nil } -func (c *matchClient) DoJoin(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *matchClient) DoJoin(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Match_DoJoin_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -79,9 +80,9 @@ func (c *matchClient) DoJoin(ctx context.Context, in *IdentRequest, opts ...grpc return out, nil } -func (c *matchClient) DoIgnore(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { +func (c *matchClient) DoIgnore(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusReply) + out := new(protobuf.DataStatusReply) err := c.cc.Invoke(ctx, Match_DoIgnore_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -90,43 +91,41 @@ func (c *matchClient) DoIgnore(ctx context.Context, in *IdentRequest, opts ...gr } // MatchServer is the server API for Match service. -// All implementations must embed UnimplementedMatchServer +// All implementations should embed UnimplementedMatchServer // for forward compatibility. // // relation-关系管理:匹配 type MatchServer interface { // 获取匹配列表 - Fetch(context.Context, *FetchRequest) (*FetchRelationItemReply, error) + Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error) // 获取匹配详情 - Get(context.Context, *IdentRequest) (*RelationItem, error) + Get(context.Context, *protobuf.IdentRequest) (*protobuf.RelationItem, error) // 执行通过,加为好友 - DoJoin(context.Context, *IdentRequest) (*StatusReply, error) + DoJoin(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) // 执行忽略 - DoIgnore(context.Context, *IdentRequest) (*StatusReply, error) - mustEmbedUnimplementedMatchServer() + DoIgnore(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) } -// UnimplementedMatchServer must be embedded to have +// UnimplementedMatchServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedMatchServer struct{} -func (UnimplementedMatchServer) Fetch(context.Context, *FetchRequest) (*FetchRelationItemReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") +func (UnimplementedMatchServer) Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error) { + return nil, status.Error(codes.Unimplemented, "method Fetch not implemented") } -func (UnimplementedMatchServer) Get(context.Context, *IdentRequest) (*RelationItem, error) { - return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +func (UnimplementedMatchServer) Get(context.Context, *protobuf.IdentRequest) (*protobuf.RelationItem, error) { + return nil, status.Error(codes.Unimplemented, "method Get not implemented") } -func (UnimplementedMatchServer) DoJoin(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DoJoin not implemented") +func (UnimplementedMatchServer) DoJoin(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DoJoin not implemented") } -func (UnimplementedMatchServer) DoIgnore(context.Context, *IdentRequest) (*StatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DoIgnore not implemented") +func (UnimplementedMatchServer) DoIgnore(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) { + return nil, status.Error(codes.Unimplemented, "method DoIgnore not implemented") } -func (UnimplementedMatchServer) mustEmbedUnimplementedMatchServer() {} -func (UnimplementedMatchServer) testEmbeddedByValue() {} +func (UnimplementedMatchServer) testEmbeddedByValue() {} // UnsafeMatchServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MatchServer will @@ -136,7 +135,7 @@ type UnsafeMatchServer interface { } func RegisterMatchServer(s grpc.ServiceRegistrar, srv MatchServer) { - // If the following call pancis, it indicates UnimplementedMatchServer was + // If the following call panics, it indicates UnimplementedMatchServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -147,7 +146,7 @@ func RegisterMatchServer(s grpc.ServiceRegistrar, srv MatchServer) { } func _Match_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRequest) + in := new(protobuf.FetchRequest) if err := dec(in); err != nil { return nil, err } @@ -159,13 +158,13 @@ func _Match_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: Match_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MatchServer).Fetch(ctx, req.(*FetchRequest)) + return srv.(MatchServer).Fetch(ctx, req.(*protobuf.FetchRequest)) } return interceptor(ctx, in, info, handler) } func _Match_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -177,13 +176,13 @@ func _Match_Get_Handler(srv interface{}, ctx context.Context, dec func(interface FullMethod: Match_Get_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MatchServer).Get(ctx, req.(*IdentRequest)) + return srv.(MatchServer).Get(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Match_DoJoin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -195,13 +194,13 @@ func _Match_DoJoin_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Match_DoJoin_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MatchServer).DoJoin(ctx, req.(*IdentRequest)) + return srv.(MatchServer).DoJoin(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Match_DoIgnore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IdentRequest) + in := new(protobuf.IdentRequest) if err := dec(in); err != nil { return nil, err } @@ -213,7 +212,7 @@ func _Match_DoIgnore_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Match_DoIgnore_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MatchServer).DoIgnore(ctx, req.(*IdentRequest)) + return srv.(MatchServer).DoIgnore(ctx, req.(*protobuf.IdentRequest)) } return interceptor(ctx, in, info, handler) } @@ -243,5 +242,5 @@ var Match_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "match.proto", + Metadata: "module/social/relation/proto/match.proto", } diff --git a/module/social/relation/proto/blocks.proto b/module/social/relation/proto/blocks.proto deleted file mode 100644 index 8ebd272..0000000 --- a/module/social/relation/proto/blocks.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; -package relation; -option go_package = ".;relation"; - -message FetchRequest { - int64 page_no=1; // 页数 - int64 page_size=2; // 每页记录数 - map params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11 -} - -message IdentRequest{ - int64 id = 1; // 唯一ID - string identity = 2; // 唯一码 -} - -message VersionRequest { - int64 version=1; // 时序版本号 -} - - -message SearchRequest { - string keyword=1; //关键词 -} - - -message StatusReply{ - string data=1; // 数据 - int64 timeseq=2; // 响应时间序列 -} - -message Empty{ -} - - -message RelationItem{ - string identity=1; - string nickname=2; //昵称 - string remark_name=3; // 备注名称 - int32 popular=4; //是否置顶 - string avatar=5; - string birthday = 6; //生日 - int32 sex = 7; //性别,1为男性,2为女性 - int32 province = 8; //省 - int32 city = 9; //市 - int32 area = 10; //区 - string sign = 11; //签名 - repeated string tags=12; //所属标签组 - int32 foreign_status=13; //外表的状态值,根据表不同,值的作用不同 -} -message FetchRelationItemReply { - int64 total=1; // 总记录数 - repeated RelationItem data=2; -} \ No newline at end of file diff --git a/module/social/relation/proto/follow.proto b/module/social/relation/proto/follow.proto index 37439f2..6f931ee 100644 --- a/module/social/relation/proto/follow.proto +++ b/module/social/relation/proto/follow.proto @@ -1,21 +1,21 @@ syntax = "proto3"; package relation; -option go_package = ".;relation"; -import "blocks.proto"; +option go_package = "bsm/full/module/social/relation/pb;relation"; +import "protobuf/blocks.proto"; // relation-关系管理:关注 service Follow{ // 执行关注 - rpc Doing(IdentRequest) returns (StatusReply) {} + rpc Doing(blocks.IdentRequest) returns (blocks.DataStatusReply) {} // 撤销关注 - rpc Undo(IdentRequest) returns (StatusReply) {} + rpc Undo(blocks.IdentRequest) returns (blocks.DataStatusReply) {} // 关注状态 - rpc State(IdentRequest) returns (StatusReply) {} + rpc State(blocks.IdentRequest) returns (blocks.DataStatusReply) {} // 获取关注列表 - rpc Fetch(FetchRequest) returns (FetchRelationItemReply) {} + rpc Fetch(blocks.FetchRequest) returns (blocks.FetchRelationItemReply) {} } diff --git a/module/social/relation/proto/friend.proto b/module/social/relation/proto/friend.proto index a59318b..d12c819 100644 --- a/module/social/relation/proto/friend.proto +++ b/module/social/relation/proto/friend.proto @@ -1,66 +1,66 @@ syntax = "proto3"; package relation; -option go_package = ".;relation"; -import "blocks.proto"; +option go_package = "bsm/full/module/social/relation/pb;relation"; +import "protobuf/blocks.proto"; // relation-关系管理:好友 service Friend{ /** 基础操作 **/ //搜索 - rpc Search(SearchRequest) returns (PartFriendReply); + rpc Search(blocks.SearchRequest) returns (PartFriendReply); //获取好友列表 - rpc Fetch(VersionRequest) returns (FriendsReply); + rpc Fetch(blocks.VersionRequest) returns (FriendsReply); //获取用户信息卡片 - rpc Get(IdentRequest) returns (RelationItem); + rpc Get(blocks.IdentRequest) returns (blocks.RelationItem); //修改好友备注名称,如果要清除备注,直接nickname传空值 - rpc ModifyNickname(ModifyNicknameRequest) returns (StatusReply); + rpc ModifyNickname(ModifyNicknameRequest) returns (blocks.DataStatusReply); //受你欢迎的,置顶 - rpc DoPopular(IdentRequest) returns (StatusReply); + rpc DoPopular(blocks.IdentRequest) returns (blocks.DataStatusReply); //取消受欢迎的,取消置顶 - rpc UndoPopular(IdentRequest) returns (StatusReply); + rpc UndoPopular(blocks.IdentRequest) returns (blocks.DataStatusReply); //删除好友 - rpc Delete(IdentRequest) returns (StatusReply); + rpc Delete(blocks.IdentRequest) returns (blocks.DataStatusReply); /** 好友申请管理 **/ //好友申请列表 - rpc ApplyFetch(VersionRequest) returns (ApplyFetchReply); + rpc ApplyFetch(blocks.VersionRequest) returns (ApplyFetchReply); //好友申请详情 - rpc ApplyGet(IdentRequest) returns (FriendApplyGetReply); + rpc ApplyGet(blocks.IdentRequest) returns (FriendApplyGetReply); //好友申请 - rpc ApplyDo(ApplyDoRequest) returns (StatusReply); + rpc ApplyDo(ApplyDoRequest) returns (blocks.DataStatusReply); //好友申请Do:留言 - rpc ApplyDoMessage(ApplyMessageRequest) returns (StatusReply); + rpc ApplyDoMessage(ApplyMessageRequest) returns (blocks.DataStatusReply); //好友申请Do:确认 - rpc ApplyDoPass(ApplyDoPassRequest) returns (StatusReply); + rpc ApplyDoPass(ApplyDoPassRequest) returns (blocks.DataStatusReply); //好友申请Do:拒绝 - rpc ApplyDoReject(IdentRequest) returns (StatusReply); + rpc ApplyDoReject(blocks.IdentRequest) returns (blocks.DataStatusReply); /** 好友标签管理 **/ //获取标签列表 - rpc TagFetch(Empty) returns (FriendTagsReply); + rpc TagFetch(blocks.Empty) returns (FriendTagsReply); //获取标签成员 - rpc TagMemberFetch(IdentRequest) returns (PartFriendReply); + rpc TagMemberFetch(blocks.IdentRequest) returns (PartFriendReply); //创建标签 - rpc TagDoCreate(TagDoCreateRequest) returns (StatusReply); + rpc TagDoCreate(TagDoCreateRequest) returns (blocks.DataStatusReply); //更新标签成员 - rpc TagDoUpdate(TagDoUpdateRequest) returns (StatusReply); + rpc TagDoUpdate(TagDoUpdateRequest) returns (blocks.DataStatusReply); } @@ -74,7 +74,7 @@ message ApplyFetchReply { message ApplyItem { string identity=1; // 唯一标识 - RelationItem from=2; + blocks.RelationItem from=2; MessageItem message=3; string created_at=4; //时间 int32 status =5; // 状态 @@ -100,18 +100,18 @@ message ApplyMessageRequest { message PartFriendReply { int32 total=1; // 总记录数 int64 version=2; //版本号 - repeated RelationItem friends=4; //好友信息 + repeated blocks.RelationItem friends=4; //好友信息 } message FriendsReply { int32 total=1; // 总记录数 int64 version=2; //版本号 repeated TagItem tags=3; //分组标签信息 - repeated RelationItem friends=4; //好友信息 + repeated blocks.RelationItem friends=4; //好友信息 } message FriendApplyGetReply{ - RelationItem data=1; // 会员信息卡片 + blocks.RelationItem data=1; // 会员信息卡片 repeated MessageItem message=2; //聊天记录 } diff --git a/module/social/relation/proto/match.proto b/module/social/relation/proto/match.proto index 0ddf9ae..199052c 100644 --- a/module/social/relation/proto/match.proto +++ b/module/social/relation/proto/match.proto @@ -1,21 +1,21 @@ syntax = "proto3"; package relation; -option go_package = ".;relation"; -import "blocks.proto"; +option go_package = "bsm/full/module/social/relation/pb;relation"; +import "protobuf/blocks.proto"; // relation-关系管理:匹配 service Match{ // 获取匹配列表 - rpc Fetch(FetchRequest) returns (FetchRelationItemReply) {} + rpc Fetch(blocks.FetchRequest) returns (blocks.FetchRelationItemReply) {} // 获取匹配详情 - rpc Get(IdentRequest) returns (RelationItem) {} + rpc Get(blocks.IdentRequest) returns (blocks.RelationItem) {} // 执行通过,加为好友 - rpc DoJoin(IdentRequest) returns (StatusReply) {} + rpc DoJoin(blocks.IdentRequest) returns (blocks.DataStatusReply) {} // 执行忽略 - rpc DoIgnore(IdentRequest) returns (StatusReply) {} + rpc DoIgnore(blocks.IdentRequest) returns (blocks.DataStatusReply) {} } diff --git a/protobuf/blocks.pb.go b/protobuf/blocks.pb.go new file mode 100644 index 0000000..8c1ece5 --- /dev/null +++ b/protobuf/blocks.pb.go @@ -0,0 +1,3368 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.35.0 +// source: protobuf/blocks.proto + +package blocks + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Shared request and response messages. +type Empty struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Empty) Reset() { + *x = Empty{} + mi := &file_protobuf_blocks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Empty) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Empty) ProtoMessage() {} + +func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{0} +} + +type FetchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageNo int64 `protobuf:"varint,1,opt,name=page_no,proto3" json:"page_no,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` + Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FetchRequest) Reset() { + *x = FetchRequest{} + mi := &file_protobuf_blocks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FetchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchRequest) ProtoMessage() {} + +func (x *FetchRequest) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. +func (*FetchRequest) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{1} +} + +func (x *FetchRequest) GetPageNo() int64 { + if x != nil { + return x.PageNo + } + return 0 +} + +func (x *FetchRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *FetchRequest) GetParams() map[string]string { + if x != nil { + return x.Params + } + return nil +} + +type IdentRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IdentRequest) Reset() { + *x = IdentRequest{} + mi := &file_protobuf_blocks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IdentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdentRequest) ProtoMessage() {} + +func (x *IdentRequest) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. +func (*IdentRequest) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{2} +} + +func (x *IdentRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *IdentRequest) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +type VersionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VersionRequest) Reset() { + *x = VersionRequest{} + mi := &file_protobuf_blocks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VersionRequest) ProtoMessage() {} + +func (x *VersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. +func (*VersionRequest) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{3} +} + +func (x *VersionRequest) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +type SearchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchRequest) Reset() { + *x = SearchRequest{} + mi := &file_protobuf_blocks_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchRequest) ProtoMessage() {} + +func (x *SearchRequest) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. +func (*SearchRequest) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{4} +} + +func (x *SearchRequest) GetKeyword() string { + if x != nil { + return x.Keyword + } + return "" +} + +type StatusReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` + Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StatusReply) Reset() { + *x = StatusReply{} + mi := &file_protobuf_blocks_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StatusReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatusReply) ProtoMessage() {} + +func (x *StatusReply) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. +func (*StatusReply) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{5} +} + +func (x *StatusReply) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *StatusReply) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *StatusReply) GetDetails() string { + if x != nil { + return x.Details + } + return "" +} + +func (x *StatusReply) GetTimeseq() int64 { + if x != nil { + return x.Timeseq + } + return 0 +} + +// Service-specific variants whose wire formats differ from the shared types. +type CmsSearchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` + PageNo int64 `protobuf:"varint,2,opt,name=page_no,proto3" json:"page_no,omitempty"` + PageSize int64 `protobuf:"varint,3,opt,name=page_size,proto3" json:"page_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CmsSearchRequest) Reset() { + *x = CmsSearchRequest{} + mi := &file_protobuf_blocks_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CmsSearchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CmsSearchRequest) ProtoMessage() {} + +func (x *CmsSearchRequest) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CmsSearchRequest.ProtoReflect.Descriptor instead. +func (*CmsSearchRequest) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{6} +} + +func (x *CmsSearchRequest) GetKeyword() string { + if x != nil { + return x.Keyword + } + return "" +} + +func (x *CmsSearchRequest) GetPageNo() int64 { + if x != nil { + return x.PageNo + } + return 0 +} + +func (x *CmsSearchRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +type MallFetchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageNo int64 `protobuf:"varint,1,opt,name=page_no,proto3" json:"page_no,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` + Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StoreIdentity string `protobuf:"bytes,4,opt,name=store_identity,proto3" json:"store_identity,omitempty"` + Keyword string `protobuf:"bytes,5,opt,name=keyword,proto3" json:"keyword,omitempty"` + CategoryId []int64 `protobuf:"varint,6,rep,packed,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` + Sort string `protobuf:"bytes,7,opt,name=sort,proto3" json:"sort,omitempty"` + MinPrice int64 `protobuf:"varint,8,opt,name=min_price,proto3" json:"min_price,omitempty"` + MaxPrice int64 `protobuf:"varint,9,opt,name=max_price,proto3" json:"max_price,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MallFetchRequest) Reset() { + *x = MallFetchRequest{} + mi := &file_protobuf_blocks_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MallFetchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MallFetchRequest) ProtoMessage() {} + +func (x *MallFetchRequest) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MallFetchRequest.ProtoReflect.Descriptor instead. +func (*MallFetchRequest) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{7} +} + +func (x *MallFetchRequest) GetPageNo() int64 { + if x != nil { + return x.PageNo + } + return 0 +} + +func (x *MallFetchRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *MallFetchRequest) GetParams() map[string]string { + if x != nil { + return x.Params + } + return nil +} + +func (x *MallFetchRequest) GetStoreIdentity() string { + if x != nil { + return x.StoreIdentity + } + return "" +} + +func (x *MallFetchRequest) GetKeyword() string { + if x != nil { + return x.Keyword + } + return "" +} + +func (x *MallFetchRequest) GetCategoryId() []int64 { + if x != nil { + return x.CategoryId + } + return nil +} + +func (x *MallFetchRequest) GetSort() string { + if x != nil { + return x.Sort + } + return "" +} + +func (x *MallFetchRequest) GetMinPrice() int64 { + if x != nil { + return x.MinPrice + } + return 0 +} + +func (x *MallFetchRequest) GetMaxPrice() int64 { + if x != nil { + return x.MaxPrice + } + return 0 +} + +type MarketFetchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageNo int64 `protobuf:"varint,1,opt,name=page_no,proto3" json:"page_no,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` + Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Identity string `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"` + Keyword string `protobuf:"bytes,5,opt,name=keyword,proto3" json:"keyword,omitempty"` + Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` + Approve int32 `protobuf:"varint,7,opt,name=approve,proto3" json:"approve,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MarketFetchRequest) Reset() { + *x = MarketFetchRequest{} + mi := &file_protobuf_blocks_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MarketFetchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarketFetchRequest) ProtoMessage() {} + +func (x *MarketFetchRequest) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarketFetchRequest.ProtoReflect.Descriptor instead. +func (*MarketFetchRequest) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{8} +} + +func (x *MarketFetchRequest) GetPageNo() int64 { + if x != nil { + return x.PageNo + } + return 0 +} + +func (x *MarketFetchRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *MarketFetchRequest) GetParams() map[string]string { + if x != nil { + return x.Params + } + return nil +} + +func (x *MarketFetchRequest) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *MarketFetchRequest) GetKeyword() string { + if x != nil { + return x.Keyword + } + return "" +} + +func (x *MarketFetchRequest) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *MarketFetchRequest) GetApprove() int32 { + if x != nil { + return x.Approve + } + return 0 +} + +type OrderIdentRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` + Approve int32 `protobuf:"varint,4,opt,name=approve,proto3" json:"approve,omitempty"` + Agency string `protobuf:"bytes,5,opt,name=agency,proto3" json:"agency,omitempty"` + StoreIdentity string `protobuf:"bytes,6,opt,name=store_identity,json=storeIdentity,proto3" json:"store_identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrderIdentRequest) Reset() { + *x = OrderIdentRequest{} + mi := &file_protobuf_blocks_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrderIdentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrderIdentRequest) ProtoMessage() {} + +func (x *OrderIdentRequest) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrderIdentRequest.ProtoReflect.Descriptor instead. +func (*OrderIdentRequest) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{9} +} + +func (x *OrderIdentRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *OrderIdentRequest) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *OrderIdentRequest) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *OrderIdentRequest) GetApprove() int32 { + if x != nil { + return x.Approve + } + return 0 +} + +func (x *OrderIdentRequest) GetAgency() string { + if x != nil { + return x.Agency + } + return "" +} + +func (x *OrderIdentRequest) GetStoreIdentity() string { + if x != nil { + return x.StoreIdentity + } + return "" +} + +type DeliveryStatusReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status int64 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeliveryStatusReply) Reset() { + *x = DeliveryStatusReply{} + mi := &file_protobuf_blocks_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeliveryStatusReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeliveryStatusReply) ProtoMessage() {} + +func (x *DeliveryStatusReply) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeliveryStatusReply.ProtoReflect.Descriptor instead. +func (*DeliveryStatusReply) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{10} +} + +func (x *DeliveryStatusReply) GetStatus() int64 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *DeliveryStatusReply) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *DeliveryStatusReply) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *DeliveryStatusReply) GetTimeseq() int64 { + if x != nil { + return x.Timeseq + } + return 0 +} + +type IdentityStatusReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IdentityStatusReply) Reset() { + *x = IdentityStatusReply{} + mi := &file_protobuf_blocks_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IdentityStatusReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdentityStatusReply) ProtoMessage() {} + +func (x *IdentityStatusReply) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IdentityStatusReply.ProtoReflect.Descriptor instead. +func (*IdentityStatusReply) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{11} +} + +func (x *IdentityStatusReply) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *IdentityStatusReply) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *IdentityStatusReply) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *IdentityStatusReply) GetTimeseq() int64 { + if x != nil { + return x.Timeseq + } + return 0 +} + +type OrderStatusReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` + Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrderStatusReply) Reset() { + *x = OrderStatusReply{} + mi := &file_protobuf_blocks_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrderStatusReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrderStatusReply) ProtoMessage() {} + +func (x *OrderStatusReply) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrderStatusReply.ProtoReflect.Descriptor instead. +func (*OrderStatusReply) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{12} +} + +func (x *OrderStatusReply) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *OrderStatusReply) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *OrderStatusReply) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *OrderStatusReply) GetTimeseq() int64 { + if x != nil { + return x.Timeseq + } + return 0 +} + +func (x *OrderStatusReply) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +type DataStatusReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Timeseq int64 `protobuf:"varint,2,opt,name=timeseq,proto3" json:"timeseq,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DataStatusReply) Reset() { + *x = DataStatusReply{} + mi := &file_protobuf_blocks_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DataStatusReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataStatusReply) ProtoMessage() {} + +func (x *DataStatusReply) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataStatusReply.ProtoReflect.Descriptor instead. +func (*DataStatusReply) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{13} +} + +func (x *DataStatusReply) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *DataStatusReply) GetTimeseq() int64 { + if x != nil { + return x.Timeseq + } + return 0 +} + +type StoreSerialRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + StoreIdentity string `protobuf:"bytes,1,opt,name=store_identity,proto3" json:"store_identity,omitempty"` + SerialId []string `protobuf:"bytes,2,rep,name=serial_id,proto3" json:"serial_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StoreSerialRequest) Reset() { + *x = StoreSerialRequest{} + mi := &file_protobuf_blocks_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StoreSerialRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StoreSerialRequest) ProtoMessage() {} + +func (x *StoreSerialRequest) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StoreSerialRequest.ProtoReflect.Descriptor instead. +func (*StoreSerialRequest) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{14} +} + +func (x *StoreSerialRequest) GetStoreIdentity() string { + if x != nil { + return x.StoreIdentity + } + return "" +} + +func (x *StoreSerialRequest) GetSerialId() []string { + if x != nil { + return x.SerialId + } + return nil +} + +// Cloud messages. +type IDRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IDRequest) Reset() { + *x = IDRequest{} + mi := &file_protobuf_blocks_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IDRequest) ProtoMessage() {} + +func (x *IDRequest) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IDRequest.ProtoReflect.Descriptor instead. +func (*IDRequest) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{15} +} + +func (x *IDRequest) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +type IDListRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ids []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IDListRequest) Reset() { + *x = IDListRequest{} + mi := &file_protobuf_blocks_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IDListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IDListRequest) ProtoMessage() {} + +func (x *IDListRequest) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IDListRequest.ProtoReflect.Descriptor instead. +func (*IDListRequest) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{16} +} + +func (x *IDListRequest) GetIds() []uint64 { + if x != nil { + return x.Ids + } + return nil +} + +type StdIicuds struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedAt string `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt string `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + DeletedAt string `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StdIicuds) Reset() { + *x = StdIicuds{} + mi := &file_protobuf_blocks_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StdIicuds) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StdIicuds) ProtoMessage() {} + +func (x *StdIicuds) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StdIicuds.ProtoReflect.Descriptor instead. +func (*StdIicuds) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{17} +} + +func (x *StdIicuds) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *StdIicuds) GetCreatedAt() string { + if x != nil { + return x.CreatedAt + } + return "" +} + +func (x *StdIicuds) GetUpdatedAt() string { + if x != nil { + return x.UpdatedAt + } + return "" +} + +func (x *StdIicuds) GetDeletedAt() string { + if x != nil { + return x.DeletedAt + } + return "" +} + +type StdPassport struct { + state protoimpl.MessageState `protogen:"open.v1"` + PassportId uint64 `protobuf:"varint,1,opt,name=passport_id,json=passportId,proto3" json:"passport_id,omitempty"` + PassportIdentity string `protobuf:"bytes,2,opt,name=passport_identity,json=passportIdentity,proto3" json:"passport_identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StdPassport) Reset() { + *x = StdPassport{} + mi := &file_protobuf_blocks_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StdPassport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StdPassport) ProtoMessage() {} + +func (x *StdPassport) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StdPassport.ProtoReflect.Descriptor instead. +func (*StdPassport) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{18} +} + +func (x *StdPassport) GetPassportId() uint64 { + if x != nil { + return x.PassportId + } + return 0 +} + +func (x *StdPassport) GetPassportIdentity() string { + if x != nil { + return x.PassportIdentity + } + return "" +} + +type CloudBase struct { + state protoimpl.MessageState `protogen:"open.v1"` + CloudId uint64 `protobuf:"varint,1,opt,name=cloud_id,json=cloudId,proto3" json:"cloud_id,omitempty"` + CloudIdentity string `protobuf:"bytes,2,opt,name=cloud_identity,json=cloudIdentity,proto3" json:"cloud_identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CloudBase) Reset() { + *x = CloudBase{} + mi := &file_protobuf_blocks_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CloudBase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloudBase) ProtoMessage() {} + +func (x *CloudBase) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CloudBase.ProtoReflect.Descriptor instead. +func (*CloudBase) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{19} +} + +func (x *CloudBase) GetCloudId() uint64 { + if x != nil { + return x.CloudId + } + return 0 +} + +func (x *CloudBase) GetCloudIdentity() string { + if x != nil { + return x.CloudIdentity + } + return "" +} + +// CMS messages. +type CmsCategoryItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"` + Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` + ParentId int64 `protobuf:"varint,4,opt,name=parent_id,proto3" json:"parent_id,omitempty"` + Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` + CoverPath string `protobuf:"bytes,6,opt,name=cover_path,proto3" json:"cover_path,omitempty"` + Intro string `protobuf:"bytes,7,opt,name=intro,proto3" json:"intro,omitempty"` + CreatedAt string `protobuf:"bytes,8,opt,name=created_at,proto3" json:"created_at,omitempty"` + UpdatedAt string `protobuf:"bytes,9,opt,name=updated_at,proto3" json:"updated_at,omitempty"` + Child []*CmsCategoryItem `protobuf:"bytes,10,rep,name=child,proto3" json:"child,omitempty"` + CategoryKey string `protobuf:"bytes,11,opt,name=category_key,proto3" json:"category_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CmsCategoryItem) Reset() { + *x = CmsCategoryItem{} + mi := &file_protobuf_blocks_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CmsCategoryItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CmsCategoryItem) ProtoMessage() {} + +func (x *CmsCategoryItem) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CmsCategoryItem.ProtoReflect.Descriptor instead. +func (*CmsCategoryItem) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{20} +} + +func (x *CmsCategoryItem) GetSiteIdentity() string { + if x != nil { + return x.SiteIdentity + } + return "" +} + +func (x *CmsCategoryItem) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *CmsCategoryItem) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *CmsCategoryItem) GetParentId() int64 { + if x != nil { + return x.ParentId + } + return 0 +} + +func (x *CmsCategoryItem) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *CmsCategoryItem) GetCoverPath() string { + if x != nil { + return x.CoverPath + } + return "" +} + +func (x *CmsCategoryItem) GetIntro() string { + if x != nil { + return x.Intro + } + return "" +} + +func (x *CmsCategoryItem) GetCreatedAt() string { + if x != nil { + return x.CreatedAt + } + return "" +} + +func (x *CmsCategoryItem) GetUpdatedAt() string { + if x != nil { + return x.UpdatedAt + } + return "" +} + +func (x *CmsCategoryItem) GetChild() []*CmsCategoryItem { + if x != nil { + return x.Child + } + return nil +} + +func (x *CmsCategoryItem) GetCategoryKey() string { + if x != nil { + return x.CategoryKey + } + return "" +} + +type CmsTagsItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` + CoverPath string `protobuf:"bytes,4,opt,name=cover_path,proto3" json:"cover_path,omitempty"` + Intro string `protobuf:"bytes,5,opt,name=intro,proto3" json:"intro,omitempty"` + CreatedAt string `protobuf:"bytes,6,opt,name=created_at,proto3" json:"created_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CmsTagsItem) Reset() { + *x = CmsTagsItem{} + mi := &file_protobuf_blocks_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CmsTagsItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CmsTagsItem) ProtoMessage() {} + +func (x *CmsTagsItem) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CmsTagsItem.ProtoReflect.Descriptor instead. +func (*CmsTagsItem) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{21} +} + +func (x *CmsTagsItem) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *CmsTagsItem) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *CmsTagsItem) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *CmsTagsItem) GetCoverPath() string { + if x != nil { + return x.CoverPath + } + return "" +} + +func (x *CmsTagsItem) GetIntro() string { + if x != nil { + return x.Intro + } + return "" +} + +func (x *CmsTagsItem) GetCreatedAt() string { + if x != nil { + return x.CreatedAt + } + return "" +} + +type CmsAccessoryItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + FilePath string `protobuf:"bytes,3,opt,name=file_path,proto3" json:"file_path,omitempty"` + CreatedAt string `protobuf:"bytes,4,opt,name=created_at,proto3" json:"created_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CmsAccessoryItem) Reset() { + *x = CmsAccessoryItem{} + mi := &file_protobuf_blocks_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CmsAccessoryItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CmsAccessoryItem) ProtoMessage() {} + +func (x *CmsAccessoryItem) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CmsAccessoryItem.ProtoReflect.Descriptor instead. +func (*CmsAccessoryItem) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{22} +} + +func (x *CmsAccessoryItem) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *CmsAccessoryItem) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *CmsAccessoryItem) GetFilePath() string { + if x != nil { + return x.FilePath + } + return "" +} + +func (x *CmsAccessoryItem) GetCreatedAt() string { + if x != nil { + return x.CreatedAt + } + return "" +} + +// Passport messages. +type VerifyStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + EmailVerify int32 `protobuf:"varint,1,opt,name=email_verify,json=emailVerify,proto3" json:"email_verify,omitempty"` + PhoneVerify int32 `protobuf:"varint,2,opt,name=phone_verify,json=phoneVerify,proto3" json:"phone_verify,omitempty"` + FaceVerify int32 `protobuf:"varint,3,opt,name=face_verify,json=faceVerify,proto3" json:"face_verify,omitempty"` + DocumentVerify int32 `protobuf:"varint,4,opt,name=document_verify,json=documentVerify,proto3" json:"document_verify,omitempty"` + KycVerify int32 `protobuf:"varint,5,opt,name=kyc_verify,json=kycVerify,proto3" json:"kyc_verify,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VerifyStatus) Reset() { + *x = VerifyStatus{} + mi := &file_protobuf_blocks_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VerifyStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyStatus) ProtoMessage() {} + +func (x *VerifyStatus) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerifyStatus.ProtoReflect.Descriptor instead. +func (*VerifyStatus) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{23} +} + +func (x *VerifyStatus) GetEmailVerify() int32 { + if x != nil { + return x.EmailVerify + } + return 0 +} + +func (x *VerifyStatus) GetPhoneVerify() int32 { + if x != nil { + return x.PhoneVerify + } + return 0 +} + +func (x *VerifyStatus) GetFaceVerify() int32 { + if x != nil { + return x.FaceVerify + } + return 0 +} + +func (x *VerifyStatus) GetDocumentVerify() int32 { + if x != nil { + return x.DocumentVerify + } + return 0 +} + +func (x *VerifyStatus) GetKycVerify() int32 { + if x != nil { + return x.KycVerify + } + return 0 +} + +// Market messages. +type MarketLoginReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + MarketIdentity string `protobuf:"bytes,3,opt,name=market_identity,proto3" json:"market_identity,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Account string `protobuf:"bytes,5,opt,name=account,proto3" json:"account,omitempty"` + Role string `protobuf:"bytes,6,opt,name=role,proto3" json:"role,omitempty"` + Status int32 `protobuf:"varint,7,opt,name=status,proto3" json:"status,omitempty"` + CreatedAt string `protobuf:"bytes,8,opt,name=created_at,proto3" json:"created_at,omitempty"` + MarketName string `protobuf:"bytes,9,opt,name=market_name,proto3" json:"market_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MarketLoginReply) Reset() { + *x = MarketLoginReply{} + mi := &file_protobuf_blocks_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MarketLoginReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarketLoginReply) ProtoMessage() {} + +func (x *MarketLoginReply) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarketLoginReply.ProtoReflect.Descriptor instead. +func (*MarketLoginReply) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{24} +} + +func (x *MarketLoginReply) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *MarketLoginReply) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *MarketLoginReply) GetMarketIdentity() string { + if x != nil { + return x.MarketIdentity + } + return "" +} + +func (x *MarketLoginReply) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MarketLoginReply) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *MarketLoginReply) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +func (x *MarketLoginReply) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *MarketLoginReply) GetCreatedAt() string { + if x != nil { + return x.CreatedAt + } + return "" +} + +func (x *MarketLoginReply) GetMarketName() string { + if x != nil { + return x.MarketName + } + return "" +} + +// Order messages. +type OrderSummaryItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + OrderNo string `protobuf:"bytes,2,opt,name=order_no,proto3" json:"order_no,omitempty"` + PartnerId int64 `protobuf:"varint,3,opt,name=partner_id,proto3" json:"partner_id,omitempty"` + Identity string `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"` + TotalPrice int64 `protobuf:"varint,7,opt,name=total_price,proto3" json:"total_price,omitempty"` + TransPrice int64 `protobuf:"varint,8,opt,name=trans_price,proto3" json:"trans_price,omitempty"` + RefundPrice int64 `protobuf:"varint,9,opt,name=refund_price,proto3" json:"refund_price,omitempty"` + LogisticsFee int64 `protobuf:"varint,11,opt,name=logistics_fee,proto3" json:"logistics_fee,omitempty"` + CouponAmount int64 `protobuf:"varint,12,opt,name=coupon_amount,proto3" json:"coupon_amount,omitempty"` + Remark string `protobuf:"bytes,13,opt,name=remark,proto3" json:"remark,omitempty"` + Status int32 `protobuf:"varint,14,opt,name=status,proto3" json:"status,omitempty"` + LogisticsNumber string `protobuf:"bytes,15,opt,name=logistics_number,proto3" json:"logistics_number,omitempty"` + AddressIdentity string `protobuf:"bytes,16,opt,name=address_identity,proto3" json:"address_identity,omitempty"` + County string `protobuf:"bytes,17,opt,name=county,proto3" json:"county,omitempty"` + Province string `protobuf:"bytes,18,opt,name=province,proto3" json:"province,omitempty"` + City string `protobuf:"bytes,19,opt,name=city,proto3" json:"city,omitempty"` + Area string `protobuf:"bytes,20,opt,name=area,proto3" json:"area,omitempty"` + Address string `protobuf:"bytes,21,opt,name=address,proto3" json:"address,omitempty"` + Contact string `protobuf:"bytes,22,opt,name=contact,proto3" json:"contact,omitempty"` + Phone string `protobuf:"bytes,23,opt,name=phone,proto3" json:"phone,omitempty"` + DeliveryTime string `protobuf:"bytes,24,opt,name=delivery_time,proto3" json:"delivery_time,omitempty"` + DeliveryIdentity string `protobuf:"bytes,25,opt,name=delivery_identity,proto3" json:"delivery_identity,omitempty"` + PayType int32 `protobuf:"varint,26,opt,name=pay_type,proto3" json:"pay_type,omitempty"` + PayAmount int64 `protobuf:"varint,27,opt,name=pay_amount,proto3" json:"pay_amount,omitempty"` + PayTradeNo string `protobuf:"bytes,28,opt,name=pay_trade_no,proto3" json:"pay_trade_no,omitempty"` + PayTime string `protobuf:"bytes,29,opt,name=pay_time,proto3" json:"pay_time,omitempty"` + PayRemark string `protobuf:"bytes,30,opt,name=pay_remark,proto3" json:"pay_remark,omitempty"` + Created string `protobuf:"bytes,31,opt,name=created,proto3" json:"created,omitempty"` + Updated string `protobuf:"bytes,32,opt,name=updated,proto3" json:"updated,omitempty"` + Details []*OrderDetails `protobuf:"bytes,33,rep,name=details,proto3" json:"details,omitempty"` + Addr string `protobuf:"bytes,34,opt,name=addr,proto3" json:"addr,omitempty"` + CarIdentity string `protobuf:"bytes,35,opt,name=car_identity,proto3" json:"car_identity,omitempty"` + DeliveryAddress string `protobuf:"bytes,36,opt,name=delivery_address,proto3" json:"delivery_address,omitempty"` + Brand string `protobuf:"bytes,37,opt,name=brand,proto3" json:"brand,omitempty"` + Version string `protobuf:"bytes,38,opt,name=version,proto3" json:"version,omitempty"` + LicenseNumber string `protobuf:"bytes,39,opt,name=license_number,proto3" json:"license_number,omitempty"` + MemberName string `protobuf:"bytes,40,opt,name=member_name,proto3" json:"member_name,omitempty"` + MemberPhone string `protobuf:"bytes,41,opt,name=member_phone,proto3" json:"member_phone,omitempty"` + Approve int32 `protobuf:"varint,42,opt,name=approve,proto3" json:"approve,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrderSummaryItem) Reset() { + *x = OrderSummaryItem{} + mi := &file_protobuf_blocks_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrderSummaryItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrderSummaryItem) ProtoMessage() {} + +func (x *OrderSummaryItem) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrderSummaryItem.ProtoReflect.Descriptor instead. +func (*OrderSummaryItem) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{25} +} + +func (x *OrderSummaryItem) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *OrderSummaryItem) GetOrderNo() string { + if x != nil { + return x.OrderNo + } + return "" +} + +func (x *OrderSummaryItem) GetPartnerId() int64 { + if x != nil { + return x.PartnerId + } + return 0 +} + +func (x *OrderSummaryItem) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *OrderSummaryItem) GetTotalPrice() int64 { + if x != nil { + return x.TotalPrice + } + return 0 +} + +func (x *OrderSummaryItem) GetTransPrice() int64 { + if x != nil { + return x.TransPrice + } + return 0 +} + +func (x *OrderSummaryItem) GetRefundPrice() int64 { + if x != nil { + return x.RefundPrice + } + return 0 +} + +func (x *OrderSummaryItem) GetLogisticsFee() int64 { + if x != nil { + return x.LogisticsFee + } + return 0 +} + +func (x *OrderSummaryItem) GetCouponAmount() int64 { + if x != nil { + return x.CouponAmount + } + return 0 +} + +func (x *OrderSummaryItem) GetRemark() string { + if x != nil { + return x.Remark + } + return "" +} + +func (x *OrderSummaryItem) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *OrderSummaryItem) GetLogisticsNumber() string { + if x != nil { + return x.LogisticsNumber + } + return "" +} + +func (x *OrderSummaryItem) GetAddressIdentity() string { + if x != nil { + return x.AddressIdentity + } + return "" +} + +func (x *OrderSummaryItem) GetCounty() string { + if x != nil { + return x.County + } + return "" +} + +func (x *OrderSummaryItem) GetProvince() string { + if x != nil { + return x.Province + } + return "" +} + +func (x *OrderSummaryItem) GetCity() string { + if x != nil { + return x.City + } + return "" +} + +func (x *OrderSummaryItem) GetArea() string { + if x != nil { + return x.Area + } + return "" +} + +func (x *OrderSummaryItem) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *OrderSummaryItem) GetContact() string { + if x != nil { + return x.Contact + } + return "" +} + +func (x *OrderSummaryItem) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *OrderSummaryItem) GetDeliveryTime() string { + if x != nil { + return x.DeliveryTime + } + return "" +} + +func (x *OrderSummaryItem) GetDeliveryIdentity() string { + if x != nil { + return x.DeliveryIdentity + } + return "" +} + +func (x *OrderSummaryItem) GetPayType() int32 { + if x != nil { + return x.PayType + } + return 0 +} + +func (x *OrderSummaryItem) GetPayAmount() int64 { + if x != nil { + return x.PayAmount + } + return 0 +} + +func (x *OrderSummaryItem) GetPayTradeNo() string { + if x != nil { + return x.PayTradeNo + } + return "" +} + +func (x *OrderSummaryItem) GetPayTime() string { + if x != nil { + return x.PayTime + } + return "" +} + +func (x *OrderSummaryItem) GetPayRemark() string { + if x != nil { + return x.PayRemark + } + return "" +} + +func (x *OrderSummaryItem) GetCreated() string { + if x != nil { + return x.Created + } + return "" +} + +func (x *OrderSummaryItem) GetUpdated() string { + if x != nil { + return x.Updated + } + return "" +} + +func (x *OrderSummaryItem) GetDetails() []*OrderDetails { + if x != nil { + return x.Details + } + return nil +} + +func (x *OrderSummaryItem) GetAddr() string { + if x != nil { + return x.Addr + } + return "" +} + +func (x *OrderSummaryItem) GetCarIdentity() string { + if x != nil { + return x.CarIdentity + } + return "" +} + +func (x *OrderSummaryItem) GetDeliveryAddress() string { + if x != nil { + return x.DeliveryAddress + } + return "" +} + +func (x *OrderSummaryItem) GetBrand() string { + if x != nil { + return x.Brand + } + return "" +} + +func (x *OrderSummaryItem) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *OrderSummaryItem) GetLicenseNumber() string { + if x != nil { + return x.LicenseNumber + } + return "" +} + +func (x *OrderSummaryItem) GetMemberName() string { + if x != nil { + return x.MemberName + } + return "" +} + +func (x *OrderSummaryItem) GetMemberPhone() string { + if x != nil { + return x.MemberPhone + } + return "" +} + +func (x *OrderSummaryItem) GetApprove() int32 { + if x != nil { + return x.Approve + } + return 0 +} + +type OrderDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + ProductId int64 `protobuf:"varint,2,opt,name=product_id,proto3" json:"product_id,omitempty"` + SpecNo string `protobuf:"bytes,3,opt,name=spec_no,proto3" json:"spec_no,omitempty"` + Spec string `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Type int64 `protobuf:"varint,5,opt,name=type,proto3" json:"type,omitempty"` + Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"` + CoverImage string `protobuf:"bytes,7,opt,name=cover_image,proto3" json:"cover_image,omitempty"` + SalesPrice int64 `protobuf:"varint,8,opt,name=sales_price,proto3" json:"sales_price,omitempty"` + ProductArgs string `protobuf:"bytes,9,opt,name=product_args,proto3" json:"product_args,omitempty"` + Number int64 `protobuf:"varint,10,opt,name=number,proto3" json:"number,omitempty"` + UnitPrice int64 `protobuf:"varint,11,opt,name=unit_price,proto3" json:"unit_price,omitempty"` + SpecId int64 `protobuf:"varint,12,opt,name=spec_id,proto3" json:"spec_id,omitempty"` + ProductIdentity string `protobuf:"bytes,13,opt,name=product_identity,proto3" json:"product_identity,omitempty"` + GasTypes int64 `protobuf:"varint,14,opt,name=gas_types,proto3" json:"gas_types,omitempty"` + TotalPrice int64 `protobuf:"varint,15,opt,name=total_price,proto3" json:"total_price,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrderDetails) Reset() { + *x = OrderDetails{} + mi := &file_protobuf_blocks_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrderDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrderDetails) ProtoMessage() {} + +func (x *OrderDetails) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrderDetails.ProtoReflect.Descriptor instead. +func (*OrderDetails) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{26} +} + +func (x *OrderDetails) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *OrderDetails) GetProductId() int64 { + if x != nil { + return x.ProductId + } + return 0 +} + +func (x *OrderDetails) GetSpecNo() string { + if x != nil { + return x.SpecNo + } + return "" +} + +func (x *OrderDetails) GetSpec() string { + if x != nil { + return x.Spec + } + return "" +} + +func (x *OrderDetails) GetType() int64 { + if x != nil { + return x.Type + } + return 0 +} + +func (x *OrderDetails) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *OrderDetails) GetCoverImage() string { + if x != nil { + return x.CoverImage + } + return "" +} + +func (x *OrderDetails) GetSalesPrice() int64 { + if x != nil { + return x.SalesPrice + } + return 0 +} + +func (x *OrderDetails) GetProductArgs() string { + if x != nil { + return x.ProductArgs + } + return "" +} + +func (x *OrderDetails) GetNumber() int64 { + if x != nil { + return x.Number + } + return 0 +} + +func (x *OrderDetails) GetUnitPrice() int64 { + if x != nil { + return x.UnitPrice + } + return 0 +} + +func (x *OrderDetails) GetSpecId() int64 { + if x != nil { + return x.SpecId + } + return 0 +} + +func (x *OrderDetails) GetProductIdentity() string { + if x != nil { + return x.ProductIdentity + } + return "" +} + +func (x *OrderDetails) GetGasTypes() int64 { + if x != nil { + return x.GasTypes + } + return 0 +} + +func (x *OrderDetails) GetTotalPrice() int64 { + if x != nil { + return x.TotalPrice + } + return 0 +} + +// Social feed messages. +type FeedPostListReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + List []*FeedPostItem `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` + Cnt int64 `protobuf:"varint,2,opt,name=cnt,proto3" json:"cnt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FeedPostListReply) Reset() { + *x = FeedPostListReply{} + mi := &file_protobuf_blocks_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FeedPostListReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeedPostListReply) ProtoMessage() {} + +func (x *FeedPostListReply) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeedPostListReply.ProtoReflect.Descriptor instead. +func (*FeedPostListReply) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{27} +} + +func (x *FeedPostListReply) GetList() []*FeedPostItem { + if x != nil { + return x.List + } + return nil +} + +func (x *FeedPostListReply) GetCnt() int64 { + if x != nil { + return x.Cnt + } + return 0 +} + +type FeedPostItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` + FeedId int64 `protobuf:"varint,3,opt,name=feed_id,json=feedId,proto3" json:"feed_id,omitempty"` + FeedIdentity string `protobuf:"bytes,4,opt,name=feed_identity,json=feedIdentity,proto3" json:"feed_identity,omitempty"` + IsOpen bool `protobuf:"varint,5,opt,name=is_open,json=isOpen,proto3" json:"is_open,omitempty"` + CntUnlike int64 `protobuf:"varint,6,opt,name=cnt_unlike,json=cntUnlike,proto3" json:"cnt_unlike,omitempty"` + CntComment int64 `protobuf:"varint,7,opt,name=cnt_comment,json=cntComment,proto3" json:"cnt_comment,omitempty"` + CntLike int64 `protobuf:"varint,8,opt,name=cnt_like,json=cntLike,proto3" json:"cnt_like,omitempty"` + Attachs []*FeedAttachItem `protobuf:"bytes,9,rep,name=attachs,proto3" json:"attachs,omitempty"` + Tags []*FeedTagItem `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FeedPostItem) Reset() { + *x = FeedPostItem{} + mi := &file_protobuf_blocks_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FeedPostItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeedPostItem) ProtoMessage() {} + +func (x *FeedPostItem) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeedPostItem.ProtoReflect.Descriptor instead. +func (*FeedPostItem) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{28} +} + +func (x *FeedPostItem) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *FeedPostItem) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *FeedPostItem) GetFeedId() int64 { + if x != nil { + return x.FeedId + } + return 0 +} + +func (x *FeedPostItem) GetFeedIdentity() string { + if x != nil { + return x.FeedIdentity + } + return "" +} + +func (x *FeedPostItem) GetIsOpen() bool { + if x != nil { + return x.IsOpen + } + return false +} + +func (x *FeedPostItem) GetCntUnlike() int64 { + if x != nil { + return x.CntUnlike + } + return 0 +} + +func (x *FeedPostItem) GetCntComment() int64 { + if x != nil { + return x.CntComment + } + return 0 +} + +func (x *FeedPostItem) GetCntLike() int64 { + if x != nil { + return x.CntLike + } + return 0 +} + +func (x *FeedPostItem) GetAttachs() []*FeedAttachItem { + if x != nil { + return x.Attachs + } + return nil +} + +func (x *FeedPostItem) GetTags() []*FeedTagItem { + if x != nil { + return x.Tags + } + return nil +} + +type FeedAttachItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + AttachType string `protobuf:"bytes,2,opt,name=attach_type,json=attachType,proto3" json:"attach_type,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FeedAttachItem) Reset() { + *x = FeedAttachItem{} + mi := &file_protobuf_blocks_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FeedAttachItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeedAttachItem) ProtoMessage() {} + +func (x *FeedAttachItem) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeedAttachItem.ProtoReflect.Descriptor instead. +func (*FeedAttachItem) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{29} +} + +func (x *FeedAttachItem) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *FeedAttachItem) GetAttachType() string { + if x != nil { + return x.AttachType + } + return "" +} + +func (x *FeedAttachItem) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type FeedTagItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FeedTagItem) Reset() { + *x = FeedTagItem{} + mi := &file_protobuf_blocks_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FeedTagItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeedTagItem) ProtoMessage() {} + +func (x *FeedTagItem) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeedTagItem.ProtoReflect.Descriptor instead. +func (*FeedTagItem) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{30} +} + +func (x *FeedTagItem) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *FeedTagItem) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +// Social group messages. +type GroupPostListReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + List []*GroupPostItem `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` + Cnt int64 `protobuf:"varint,2,opt,name=cnt,proto3" json:"cnt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GroupPostListReply) Reset() { + *x = GroupPostListReply{} + mi := &file_protobuf_blocks_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GroupPostListReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupPostListReply) ProtoMessage() {} + +func (x *GroupPostListReply) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupPostListReply.ProtoReflect.Descriptor instead. +func (*GroupPostListReply) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{31} +} + +func (x *GroupPostListReply) GetList() []*GroupPostItem { + if x != nil { + return x.List + } + return nil +} + +func (x *GroupPostListReply) GetCnt() int64 { + if x != nil { + return x.Cnt + } + return 0 +} + +type GroupPostItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` + PassportId int64 `protobuf:"varint,3,opt,name=passport_id,json=passportId,proto3" json:"passport_id,omitempty"` + PassportIdentity string `protobuf:"bytes,4,opt,name=passport_identity,json=passportIdentity,proto3" json:"passport_identity,omitempty"` + IsOpen bool `protobuf:"varint,5,opt,name=is_open,json=isOpen,proto3" json:"is_open,omitempty"` + CntUnlike int64 `protobuf:"varint,6,opt,name=cnt_unlike,json=cntUnlike,proto3" json:"cnt_unlike,omitempty"` + CntComment int64 `protobuf:"varint,7,opt,name=cnt_comment,json=cntComment,proto3" json:"cnt_comment,omitempty"` + CntLike int64 `protobuf:"varint,8,opt,name=cnt_like,json=cntLike,proto3" json:"cnt_like,omitempty"` + Attachs []*GroupAttachItem `protobuf:"bytes,9,rep,name=attachs,proto3" json:"attachs,omitempty"` + Tags []*GroupTagItem `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GroupPostItem) Reset() { + *x = GroupPostItem{} + mi := &file_protobuf_blocks_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GroupPostItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupPostItem) ProtoMessage() {} + +func (x *GroupPostItem) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupPostItem.ProtoReflect.Descriptor instead. +func (*GroupPostItem) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{32} +} + +func (x *GroupPostItem) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *GroupPostItem) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *GroupPostItem) GetPassportId() int64 { + if x != nil { + return x.PassportId + } + return 0 +} + +func (x *GroupPostItem) GetPassportIdentity() string { + if x != nil { + return x.PassportIdentity + } + return "" +} + +func (x *GroupPostItem) GetIsOpen() bool { + if x != nil { + return x.IsOpen + } + return false +} + +func (x *GroupPostItem) GetCntUnlike() int64 { + if x != nil { + return x.CntUnlike + } + return 0 +} + +func (x *GroupPostItem) GetCntComment() int64 { + if x != nil { + return x.CntComment + } + return 0 +} + +func (x *GroupPostItem) GetCntLike() int64 { + if x != nil { + return x.CntLike + } + return 0 +} + +func (x *GroupPostItem) GetAttachs() []*GroupAttachItem { + if x != nil { + return x.Attachs + } + return nil +} + +func (x *GroupPostItem) GetTags() []*GroupTagItem { + if x != nil { + return x.Tags + } + return nil +} + +type GroupAttachItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + AttachType string `protobuf:"bytes,2,opt,name=attach_type,json=attachType,proto3" json:"attach_type,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GroupAttachItem) Reset() { + *x = GroupAttachItem{} + mi := &file_protobuf_blocks_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GroupAttachItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupAttachItem) ProtoMessage() {} + +func (x *GroupAttachItem) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupAttachItem.ProtoReflect.Descriptor instead. +func (*GroupAttachItem) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{33} +} + +func (x *GroupAttachItem) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *GroupAttachItem) GetAttachType() string { + if x != nil { + return x.AttachType + } + return "" +} + +func (x *GroupAttachItem) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type GroupTagItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GroupTagItem) Reset() { + *x = GroupTagItem{} + mi := &file_protobuf_blocks_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GroupTagItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupTagItem) ProtoMessage() {} + +func (x *GroupTagItem) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupTagItem.ProtoReflect.Descriptor instead. +func (*GroupTagItem) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{34} +} + +func (x *GroupTagItem) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *GroupTagItem) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +// Social relation messages. +type RelationItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` + RemarkName string `protobuf:"bytes,3,opt,name=remark_name,json=remarkName,proto3" json:"remark_name,omitempty"` + Popular int32 `protobuf:"varint,4,opt,name=popular,proto3" json:"popular,omitempty"` + Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` + Birthday string `protobuf:"bytes,6,opt,name=birthday,proto3" json:"birthday,omitempty"` + Sex int32 `protobuf:"varint,7,opt,name=sex,proto3" json:"sex,omitempty"` + Province int32 `protobuf:"varint,8,opt,name=province,proto3" json:"province,omitempty"` + City int32 `protobuf:"varint,9,opt,name=city,proto3" json:"city,omitempty"` + Area int32 `protobuf:"varint,10,opt,name=area,proto3" json:"area,omitempty"` + Sign string `protobuf:"bytes,11,opt,name=sign,proto3" json:"sign,omitempty"` + Tags []string `protobuf:"bytes,12,rep,name=tags,proto3" json:"tags,omitempty"` + ForeignStatus int32 `protobuf:"varint,13,opt,name=foreign_status,json=foreignStatus,proto3" json:"foreign_status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RelationItem) Reset() { + *x = RelationItem{} + mi := &file_protobuf_blocks_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RelationItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RelationItem) ProtoMessage() {} + +func (x *RelationItem) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RelationItem.ProtoReflect.Descriptor instead. +func (*RelationItem) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{35} +} + +func (x *RelationItem) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *RelationItem) GetNickname() string { + if x != nil { + return x.Nickname + } + return "" +} + +func (x *RelationItem) GetRemarkName() string { + if x != nil { + return x.RemarkName + } + return "" +} + +func (x *RelationItem) GetPopular() int32 { + if x != nil { + return x.Popular + } + return 0 +} + +func (x *RelationItem) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *RelationItem) GetBirthday() string { + if x != nil { + return x.Birthday + } + return "" +} + +func (x *RelationItem) GetSex() int32 { + if x != nil { + return x.Sex + } + return 0 +} + +func (x *RelationItem) GetProvince() int32 { + if x != nil { + return x.Province + } + return 0 +} + +func (x *RelationItem) GetCity() int32 { + if x != nil { + return x.City + } + return 0 +} + +func (x *RelationItem) GetArea() int32 { + if x != nil { + return x.Area + } + return 0 +} + +func (x *RelationItem) GetSign() string { + if x != nil { + return x.Sign + } + return "" +} + +func (x *RelationItem) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +func (x *RelationItem) GetForeignStatus() int32 { + if x != nil { + return x.ForeignStatus + } + return 0 +} + +type FetchRelationItemReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` + Data []*RelationItem `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FetchRelationItemReply) Reset() { + *x = FetchRelationItemReply{} + mi := &file_protobuf_blocks_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FetchRelationItemReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchRelationItemReply) ProtoMessage() {} + +func (x *FetchRelationItemReply) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_blocks_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchRelationItemReply.ProtoReflect.Descriptor instead. +func (*FetchRelationItemReply) Descriptor() ([]byte, []int) { + return file_protobuf_blocks_proto_rawDescGZIP(), []int{36} +} + +func (x *FetchRelationItemReply) GetTotal() int64 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *FetchRelationItemReply) GetData() []*RelationItem { + if x != nil { + return x.Data + } + return nil +} + +var File_protobuf_blocks_proto protoreflect.FileDescriptor + +const file_protobuf_blocks_proto_rawDesc = "" + + "\n" + + "\x15protobuf/blocks.proto\x12\x06blocks\"\a\n" + + "\x05Empty\"\xbb\x01\n" + + "\fFetchRequest\x12\x18\n" + + "\apage_no\x18\x01 \x01(\x03R\apage_no\x12\x1c\n" + + "\tpage_size\x18\x02 \x01(\x03R\tpage_size\x128\n" + + "\x06params\x18\x03 \x03(\v2 .blocks.FetchRequest.ParamsEntryR\x06params\x1a9\n" + + "\vParamsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" + + "\fIdentRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + + "\bidentity\x18\x02 \x01(\tR\bidentity\"*\n" + + "\x0eVersionRequest\x12\x18\n" + + "\aversion\x18\x01 \x01(\x03R\aversion\")\n" + + "\rSearchRequest\x12\x18\n" + + "\akeyword\x18\x01 \x01(\tR\akeyword\"o\n" + + "\vStatusReply\x12\x12\n" + + "\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\x12\x18\n" + + "\adetails\x18\x03 \x01(\tR\adetails\x12\x18\n" + + "\atimeseq\x18\x04 \x01(\x03R\atimeseq\"d\n" + + "\x10CmsSearchRequest\x12\x18\n" + + "\akeyword\x18\x01 \x01(\tR\akeyword\x12\x18\n" + + "\apage_no\x18\x02 \x01(\x03R\apage_no\x12\x1c\n" + + "\tpage_size\x18\x03 \x01(\x03R\tpage_size\"\xf6\x02\n" + + "\x10MallFetchRequest\x12\x18\n" + + "\apage_no\x18\x01 \x01(\x03R\apage_no\x12\x1c\n" + + "\tpage_size\x18\x02 \x01(\x03R\tpage_size\x12<\n" + + "\x06params\x18\x03 \x03(\v2$.blocks.MallFetchRequest.ParamsEntryR\x06params\x12&\n" + + "\x0estore_identity\x18\x04 \x01(\tR\x0estore_identity\x12\x18\n" + + "\akeyword\x18\x05 \x01(\tR\akeyword\x12\x1f\n" + + "\vcategory_id\x18\x06 \x03(\x03R\n" + + "categoryId\x12\x12\n" + + "\x04sort\x18\a \x01(\tR\x04sort\x12\x1c\n" + + "\tmin_price\x18\b \x01(\x03R\tmin_price\x12\x1c\n" + + "\tmax_price\x18\t \x01(\x03R\tmax_price\x1a9\n" + + "\vParamsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xaf\x02\n" + + "\x12MarketFetchRequest\x12\x18\n" + + "\apage_no\x18\x01 \x01(\x03R\apage_no\x12\x1c\n" + + "\tpage_size\x18\x02 \x01(\x03R\tpage_size\x12>\n" + + "\x06params\x18\x03 \x03(\v2&.blocks.MarketFetchRequest.ParamsEntryR\x06params\x12\x1a\n" + + "\bidentity\x18\x04 \x01(\tR\bidentity\x12\x18\n" + + "\akeyword\x18\x05 \x01(\tR\akeyword\x12\x16\n" + + "\x06status\x18\x06 \x01(\x05R\x06status\x12\x18\n" + + "\aapprove\x18\a \x01(\x05R\aapprove\x1a9\n" + + "\vParamsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xb0\x01\n" + + "\x11OrderIdentRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x16\n" + + "\x06reason\x18\x03 \x01(\tR\x06reason\x12\x18\n" + + "\aapprove\x18\x04 \x01(\x05R\aapprove\x12\x16\n" + + "\x06agency\x18\x05 \x01(\tR\x06agency\x12%\n" + + "\x0estore_identity\x18\x06 \x01(\tR\rstoreIdentity\"}\n" + + "\x13DeliveryStatusReply\x12\x16\n" + + "\x06status\x18\x01 \x01(\x03R\x06status\x12\x1a\n" + + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x18\n" + + "\amessage\x18\x03 \x01(\tR\amessage\x12\x18\n" + + "\atimeseq\x18\x04 \x01(\x03R\atimeseq\"y\n" + + "\x13IdentityStatusReply\x12\x12\n" + + "\x04code\x18\x01 \x01(\x05R\x04code\x12\x1a\n" + + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x18\n" + + "\amessage\x18\x03 \x01(\tR\amessage\x12\x18\n" + + "\atimeseq\x18\x04 \x01(\x03R\atimeseq\"\x8e\x01\n" + + "\x10OrderStatusReply\x12\x12\n" + + "\x04code\x18\x01 \x01(\x05R\x04code\x12\x1a\n" + + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x18\n" + + "\amessage\x18\x03 \x01(\tR\amessage\x12\x18\n" + + "\atimeseq\x18\x04 \x01(\x03R\atimeseq\x12\x16\n" + + "\x06reason\x18\x05 \x01(\tR\x06reason\"?\n" + + "\x0fDataStatusReply\x12\x12\n" + + "\x04data\x18\x01 \x01(\tR\x04data\x12\x18\n" + + "\atimeseq\x18\x02 \x01(\x03R\atimeseq\"Z\n" + + "\x12StoreSerialRequest\x12&\n" + + "\x0estore_identity\x18\x01 \x01(\tR\x0estore_identity\x12\x1c\n" + + "\tserial_id\x18\x02 \x03(\tR\tserial_id\"\x1b\n" + + "\tIDRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x04R\x02id\"!\n" + + "\rIDListRequest\x12\x10\n" + + "\x03ids\x18\x01 \x03(\x04R\x03ids\"x\n" + + "\tStdIicuds\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x04R\x02id\x12\x1d\n" + + "\n" + + "created_at\x18\x02 \x01(\tR\tcreatedAt\x12\x1d\n" + + "\n" + + "updated_at\x18\x03 \x01(\tR\tupdatedAt\x12\x1d\n" + + "\n" + + "deleted_at\x18\x04 \x01(\tR\tdeletedAt\"[\n" + + "\vStdPassport\x12\x1f\n" + + "\vpassport_id\x18\x01 \x01(\x04R\n" + + "passportId\x12+\n" + + "\x11passport_identity\x18\x02 \x01(\tR\x10passportIdentity\"M\n" + + "\tCloudBase\x12\x19\n" + + "\bcloud_id\x18\x01 \x01(\x04R\acloudId\x12%\n" + + "\x0ecloud_identity\x18\x02 \x01(\tR\rcloudIdentity\"\xe0\x02\n" + + "\x0fCmsCategoryItem\x12$\n" + + "\rsite_identity\x18\x01 \x01(\tR\rsite_identity\x12\x0e\n" + + "\x02id\x18\x02 \x01(\x03R\x02id\x12\x1a\n" + + "\bidentity\x18\x03 \x01(\tR\bidentity\x12\x1c\n" + + "\tparent_id\x18\x04 \x01(\x03R\tparent_id\x12\x14\n" + + "\x05title\x18\x05 \x01(\tR\x05title\x12\x1e\n" + + "\n" + + "cover_path\x18\x06 \x01(\tR\n" + + "cover_path\x12\x14\n" + + "\x05intro\x18\a \x01(\tR\x05intro\x12\x1e\n" + + "\n" + + "created_at\x18\b \x01(\tR\n" + + "created_at\x12\x1e\n" + + "\n" + + "updated_at\x18\t \x01(\tR\n" + + "updated_at\x12-\n" + + "\x05child\x18\n" + + " \x03(\v2\x17.blocks.CmsCategoryItemR\x05child\x12\"\n" + + "\fcategory_key\x18\v \x01(\tR\fcategory_key\"\xa5\x01\n" + + "\vCmsTagsItem\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x14\n" + + "\x05title\x18\x03 \x01(\tR\x05title\x12\x1e\n" + + "\n" + + "cover_path\x18\x04 \x01(\tR\n" + + "cover_path\x12\x14\n" + + "\x05intro\x18\x05 \x01(\tR\x05intro\x12\x1e\n" + + "\n" + + "created_at\x18\x06 \x01(\tR\n" + + "created_at\"\x82\x01\n" + + "\x10CmsAccessoryItem\x12\x1a\n" + + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x14\n" + + "\x05title\x18\x02 \x01(\tR\x05title\x12\x1c\n" + + "\tfile_path\x18\x03 \x01(\tR\tfile_path\x12\x1e\n" + + "\n" + + "created_at\x18\x04 \x01(\tR\n" + + "created_at\"\xbd\x01\n" + + "\fVerifyStatus\x12!\n" + + "\femail_verify\x18\x01 \x01(\x05R\vemailVerify\x12!\n" + + "\fphone_verify\x18\x02 \x01(\x05R\vphoneVerify\x12\x1f\n" + + "\vface_verify\x18\x03 \x01(\x05R\n" + + "faceVerify\x12'\n" + + "\x0fdocument_verify\x18\x04 \x01(\x05R\x0edocumentVerify\x12\x1d\n" + + "\n" + + "kyc_verify\x18\x05 \x01(\x05R\tkycVerify\"\x8a\x02\n" + + "\x10MarketLoginReply\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\x12\x1a\n" + + "\bidentity\x18\x02 \x01(\tR\bidentity\x12(\n" + + "\x0fmarket_identity\x18\x03 \x01(\tR\x0fmarket_identity\x12\x12\n" + + "\x04name\x18\x04 \x01(\tR\x04name\x12\x18\n" + + "\aaccount\x18\x05 \x01(\tR\aaccount\x12\x12\n" + + "\x04role\x18\x06 \x01(\tR\x04role\x12\x16\n" + + "\x06status\x18\a \x01(\x05R\x06status\x12\x1e\n" + + "\n" + + "created_at\x18\b \x01(\tR\n" + + "created_at\x12 \n" + + "\vmarket_name\x18\t \x01(\tR\vmarket_name\"\xcc\t\n" + + "\x10OrderSummaryItem\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + + "\border_no\x18\x02 \x01(\tR\border_no\x12\x1e\n" + + "\n" + + "partner_id\x18\x03 \x01(\x03R\n" + + "partner_id\x12\x1a\n" + + "\bidentity\x18\x04 \x01(\tR\bidentity\x12 \n" + + "\vtotal_price\x18\a \x01(\x03R\vtotal_price\x12 \n" + + "\vtrans_price\x18\b \x01(\x03R\vtrans_price\x12\"\n" + + "\frefund_price\x18\t \x01(\x03R\frefund_price\x12$\n" + + "\rlogistics_fee\x18\v \x01(\x03R\rlogistics_fee\x12$\n" + + "\rcoupon_amount\x18\f \x01(\x03R\rcoupon_amount\x12\x16\n" + + "\x06remark\x18\r \x01(\tR\x06remark\x12\x16\n" + + "\x06status\x18\x0e \x01(\x05R\x06status\x12*\n" + + "\x10logistics_number\x18\x0f \x01(\tR\x10logistics_number\x12*\n" + + "\x10address_identity\x18\x10 \x01(\tR\x10address_identity\x12\x16\n" + + "\x06county\x18\x11 \x01(\tR\x06county\x12\x1a\n" + + "\bprovince\x18\x12 \x01(\tR\bprovince\x12\x12\n" + + "\x04city\x18\x13 \x01(\tR\x04city\x12\x12\n" + + "\x04area\x18\x14 \x01(\tR\x04area\x12\x18\n" + + "\aaddress\x18\x15 \x01(\tR\aaddress\x12\x18\n" + + "\acontact\x18\x16 \x01(\tR\acontact\x12\x14\n" + + "\x05phone\x18\x17 \x01(\tR\x05phone\x12$\n" + + "\rdelivery_time\x18\x18 \x01(\tR\rdelivery_time\x12,\n" + + "\x11delivery_identity\x18\x19 \x01(\tR\x11delivery_identity\x12\x1a\n" + + "\bpay_type\x18\x1a \x01(\x05R\bpay_type\x12\x1e\n" + + "\n" + + "pay_amount\x18\x1b \x01(\x03R\n" + + "pay_amount\x12\"\n" + + "\fpay_trade_no\x18\x1c \x01(\tR\fpay_trade_no\x12\x1a\n" + + "\bpay_time\x18\x1d \x01(\tR\bpay_time\x12\x1e\n" + + "\n" + + "pay_remark\x18\x1e \x01(\tR\n" + + "pay_remark\x12\x18\n" + + "\acreated\x18\x1f \x01(\tR\acreated\x12\x18\n" + + "\aupdated\x18 \x01(\tR\aupdated\x12.\n" + + "\adetails\x18! \x03(\v2\x14.blocks.OrderDetailsR\adetails\x12\x12\n" + + "\x04addr\x18\" \x01(\tR\x04addr\x12\"\n" + + "\fcar_identity\x18# \x01(\tR\fcar_identity\x12*\n" + + "\x10delivery_address\x18$ \x01(\tR\x10delivery_address\x12\x14\n" + + "\x05brand\x18% \x01(\tR\x05brand\x12\x18\n" + + "\aversion\x18& \x01(\tR\aversion\x12&\n" + + "\x0elicense_number\x18' \x01(\tR\x0elicense_number\x12 \n" + + "\vmember_name\x18( \x01(\tR\vmember_name\x12\"\n" + + "\fmember_phone\x18) \x01(\tR\fmember_phone\x12\x18\n" + + "\aapprove\x18* \x01(\x05R\aapprove\"\xbc\x03\n" + + "\fOrderDetails\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1e\n" + + "\n" + + "product_id\x18\x02 \x01(\x03R\n" + + "product_id\x12\x18\n" + + "\aspec_no\x18\x03 \x01(\tR\aspec_no\x12\x12\n" + + "\x04spec\x18\x04 \x01(\tR\x04spec\x12\x12\n" + + "\x04type\x18\x05 \x01(\x03R\x04type\x12\x14\n" + + "\x05title\x18\x06 \x01(\tR\x05title\x12 \n" + + "\vcover_image\x18\a \x01(\tR\vcover_image\x12 \n" + + "\vsales_price\x18\b \x01(\x03R\vsales_price\x12\"\n" + + "\fproduct_args\x18\t \x01(\tR\fproduct_args\x12\x16\n" + + "\x06number\x18\n" + + " \x01(\x03R\x06number\x12\x1e\n" + + "\n" + + "unit_price\x18\v \x01(\x03R\n" + + "unit_price\x12\x18\n" + + "\aspec_id\x18\f \x01(\x03R\aspec_id\x12*\n" + + "\x10product_identity\x18\r \x01(\tR\x10product_identity\x12\x1c\n" + + "\tgas_types\x18\x0e \x01(\x03R\tgas_types\x12 \n" + + "\vtotal_price\x18\x0f \x01(\x03R\vtotal_price\"O\n" + + "\x11FeedPostListReply\x12(\n" + + "\x04list\x18\x01 \x03(\v2\x14.blocks.FeedPostItemR\x04list\x12\x10\n" + + "\x03cnt\x18\x02 \x01(\x03R\x03cnt\"\xd1\x02\n" + + "\fFeedPostItem\x12\x1a\n" + + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" + + "\acontent\x18\x02 \x01(\tR\acontent\x12\x17\n" + + "\afeed_id\x18\x03 \x01(\x03R\x06feedId\x12#\n" + + "\rfeed_identity\x18\x04 \x01(\tR\ffeedIdentity\x12\x17\n" + + "\ais_open\x18\x05 \x01(\bR\x06isOpen\x12\x1d\n" + + "\n" + + "cnt_unlike\x18\x06 \x01(\x03R\tcntUnlike\x12\x1f\n" + + "\vcnt_comment\x18\a \x01(\x03R\n" + + "cntComment\x12\x19\n" + + "\bcnt_like\x18\b \x01(\x03R\acntLike\x120\n" + + "\aattachs\x18\t \x03(\v2\x16.blocks.FeedAttachItemR\aattachs\x12'\n" + + "\x04tags\x18\n" + + " \x03(\v2\x13.blocks.FeedTagItemR\x04tags\"_\n" + + "\x0eFeedAttachItem\x12\x1a\n" + + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1f\n" + + "\vattach_type\x18\x02 \x01(\tR\n" + + "attachType\x12\x10\n" + + "\x03url\x18\x03 \x01(\tR\x03url\"9\n" + + "\vFeedTagItem\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x18\n" + + "\acontent\x18\x02 \x01(\tR\acontent\"Q\n" + + "\x12GroupPostListReply\x12)\n" + + "\x04list\x18\x01 \x03(\v2\x15.blocks.GroupPostItemR\x04list\x12\x10\n" + + "\x03cnt\x18\x02 \x01(\x03R\x03cnt\"\xe4\x02\n" + + "\rGroupPostItem\x12\x1a\n" + + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" + + "\acontent\x18\x02 \x01(\tR\acontent\x12\x1f\n" + + "\vpassport_id\x18\x03 \x01(\x03R\n" + + "passportId\x12+\n" + + "\x11passport_identity\x18\x04 \x01(\tR\x10passportIdentity\x12\x17\n" + + "\ais_open\x18\x05 \x01(\bR\x06isOpen\x12\x1d\n" + + "\n" + + "cnt_unlike\x18\x06 \x01(\x03R\tcntUnlike\x12\x1f\n" + + "\vcnt_comment\x18\a \x01(\x03R\n" + + "cntComment\x12\x19\n" + + "\bcnt_like\x18\b \x01(\x03R\acntLike\x121\n" + + "\aattachs\x18\t \x03(\v2\x17.blocks.GroupAttachItemR\aattachs\x12(\n" + + "\x04tags\x18\n" + + " \x03(\v2\x14.blocks.GroupTagItemR\x04tags\"`\n" + + "\x0fGroupAttachItem\x12\x1a\n" + + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1f\n" + + "\vattach_type\x18\x02 \x01(\tR\n" + + "attachType\x12\x10\n" + + "\x03url\x18\x03 \x01(\tR\x03url\":\n" + + "\fGroupTagItem\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x18\n" + + "\acontent\x18\x02 \x01(\tR\acontent\"\xda\x02\n" + + "\fRelationItem\x12\x1a\n" + + "\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1a\n" + + "\bnickname\x18\x02 \x01(\tR\bnickname\x12\x1f\n" + + "\vremark_name\x18\x03 \x01(\tR\n" + + "remarkName\x12\x18\n" + + "\apopular\x18\x04 \x01(\x05R\apopular\x12\x16\n" + + "\x06avatar\x18\x05 \x01(\tR\x06avatar\x12\x1a\n" + + "\bbirthday\x18\x06 \x01(\tR\bbirthday\x12\x10\n" + + "\x03sex\x18\a \x01(\x05R\x03sex\x12\x1a\n" + + "\bprovince\x18\b \x01(\x05R\bprovince\x12\x12\n" + + "\x04city\x18\t \x01(\x05R\x04city\x12\x12\n" + + "\x04area\x18\n" + + " \x01(\x05R\x04area\x12\x12\n" + + "\x04sign\x18\v \x01(\tR\x04sign\x12\x12\n" + + "\x04tags\x18\f \x03(\tR\x04tags\x12%\n" + + "\x0eforeign_status\x18\r \x01(\x05R\rforeignStatus\"X\n" + + "\x16FetchRelationItemReply\x12\x14\n" + + "\x05total\x18\x01 \x01(\x03R\x05total\x12(\n" + + "\x04data\x18\x02 \x03(\v2\x14.blocks.RelationItemR\x04dataB\x1aZ\x18bsm/full/protobuf;blocksb\x06proto3" + +var ( + file_protobuf_blocks_proto_rawDescOnce sync.Once + file_protobuf_blocks_proto_rawDescData []byte +) + +func file_protobuf_blocks_proto_rawDescGZIP() []byte { + file_protobuf_blocks_proto_rawDescOnce.Do(func() { + file_protobuf_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_protobuf_blocks_proto_rawDesc), len(file_protobuf_blocks_proto_rawDesc))) + }) + return file_protobuf_blocks_proto_rawDescData +} + +var file_protobuf_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 40) +var file_protobuf_blocks_proto_goTypes = []any{ + (*Empty)(nil), // 0: blocks.Empty + (*FetchRequest)(nil), // 1: blocks.FetchRequest + (*IdentRequest)(nil), // 2: blocks.IdentRequest + (*VersionRequest)(nil), // 3: blocks.VersionRequest + (*SearchRequest)(nil), // 4: blocks.SearchRequest + (*StatusReply)(nil), // 5: blocks.StatusReply + (*CmsSearchRequest)(nil), // 6: blocks.CmsSearchRequest + (*MallFetchRequest)(nil), // 7: blocks.MallFetchRequest + (*MarketFetchRequest)(nil), // 8: blocks.MarketFetchRequest + (*OrderIdentRequest)(nil), // 9: blocks.OrderIdentRequest + (*DeliveryStatusReply)(nil), // 10: blocks.DeliveryStatusReply + (*IdentityStatusReply)(nil), // 11: blocks.IdentityStatusReply + (*OrderStatusReply)(nil), // 12: blocks.OrderStatusReply + (*DataStatusReply)(nil), // 13: blocks.DataStatusReply + (*StoreSerialRequest)(nil), // 14: blocks.StoreSerialRequest + (*IDRequest)(nil), // 15: blocks.IDRequest + (*IDListRequest)(nil), // 16: blocks.IDListRequest + (*StdIicuds)(nil), // 17: blocks.StdIicuds + (*StdPassport)(nil), // 18: blocks.StdPassport + (*CloudBase)(nil), // 19: blocks.CloudBase + (*CmsCategoryItem)(nil), // 20: blocks.CmsCategoryItem + (*CmsTagsItem)(nil), // 21: blocks.CmsTagsItem + (*CmsAccessoryItem)(nil), // 22: blocks.CmsAccessoryItem + (*VerifyStatus)(nil), // 23: blocks.VerifyStatus + (*MarketLoginReply)(nil), // 24: blocks.MarketLoginReply + (*OrderSummaryItem)(nil), // 25: blocks.OrderSummaryItem + (*OrderDetails)(nil), // 26: blocks.OrderDetails + (*FeedPostListReply)(nil), // 27: blocks.FeedPostListReply + (*FeedPostItem)(nil), // 28: blocks.FeedPostItem + (*FeedAttachItem)(nil), // 29: blocks.FeedAttachItem + (*FeedTagItem)(nil), // 30: blocks.FeedTagItem + (*GroupPostListReply)(nil), // 31: blocks.GroupPostListReply + (*GroupPostItem)(nil), // 32: blocks.GroupPostItem + (*GroupAttachItem)(nil), // 33: blocks.GroupAttachItem + (*GroupTagItem)(nil), // 34: blocks.GroupTagItem + (*RelationItem)(nil), // 35: blocks.RelationItem + (*FetchRelationItemReply)(nil), // 36: blocks.FetchRelationItemReply + nil, // 37: blocks.FetchRequest.ParamsEntry + nil, // 38: blocks.MallFetchRequest.ParamsEntry + nil, // 39: blocks.MarketFetchRequest.ParamsEntry +} +var file_protobuf_blocks_proto_depIdxs = []int32{ + 37, // 0: blocks.FetchRequest.params:type_name -> blocks.FetchRequest.ParamsEntry + 38, // 1: blocks.MallFetchRequest.params:type_name -> blocks.MallFetchRequest.ParamsEntry + 39, // 2: blocks.MarketFetchRequest.params:type_name -> blocks.MarketFetchRequest.ParamsEntry + 20, // 3: blocks.CmsCategoryItem.child:type_name -> blocks.CmsCategoryItem + 26, // 4: blocks.OrderSummaryItem.details:type_name -> blocks.OrderDetails + 28, // 5: blocks.FeedPostListReply.list:type_name -> blocks.FeedPostItem + 29, // 6: blocks.FeedPostItem.attachs:type_name -> blocks.FeedAttachItem + 30, // 7: blocks.FeedPostItem.tags:type_name -> blocks.FeedTagItem + 32, // 8: blocks.GroupPostListReply.list:type_name -> blocks.GroupPostItem + 33, // 9: blocks.GroupPostItem.attachs:type_name -> blocks.GroupAttachItem + 34, // 10: blocks.GroupPostItem.tags:type_name -> blocks.GroupTagItem + 35, // 11: blocks.FetchRelationItemReply.data:type_name -> blocks.RelationItem + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_protobuf_blocks_proto_init() } +func file_protobuf_blocks_proto_init() { + if File_protobuf_blocks_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_protobuf_blocks_proto_rawDesc), len(file_protobuf_blocks_proto_rawDesc)), + NumEnums: 0, + NumMessages: 40, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_protobuf_blocks_proto_goTypes, + DependencyIndexes: file_protobuf_blocks_proto_depIdxs, + MessageInfos: file_protobuf_blocks_proto_msgTypes, + }.Build() + File_protobuf_blocks_proto = out.File + file_protobuf_blocks_proto_goTypes = nil + file_protobuf_blocks_proto_depIdxs = nil +} diff --git a/protobuf/blocks.proto b/protobuf/blocks.proto new file mode 100644 index 0000000..33a95f6 --- /dev/null +++ b/protobuf/blocks.proto @@ -0,0 +1,327 @@ +syntax = "proto3"; + +package blocks; + +option go_package = "bsm/full/protobuf;blocks"; + +// Shared request and response messages. +message Empty {} + +message FetchRequest { + int64 page_no = 1 [json_name = "page_no"]; + int64 page_size = 2 [json_name = "page_size"]; + map params = 3; +} + +message IdentRequest { + int64 id = 1; + string identity = 2; +} + +message VersionRequest { + int64 version = 1; +} + +message SearchRequest { + string keyword = 1; +} + +message StatusReply { + int32 code = 1; + string message = 2; + string details = 3; + int64 timeseq = 4; +} + +// Service-specific variants whose wire formats differ from the shared types. +message CmsSearchRequest { + string keyword = 1; + int64 page_no = 2 [json_name = "page_no"]; + int64 page_size = 3 [json_name = "page_size"]; +} + +message MallFetchRequest { + int64 page_no = 1 [json_name = "page_no"]; + int64 page_size = 2 [json_name = "page_size"]; + map params = 3; + string store_identity = 4 [json_name = "store_identity"]; + string keyword = 5; + repeated int64 category_id = 6; + string sort = 7; + int64 min_price = 8 [json_name = "min_price"]; + int64 max_price = 9 [json_name = "max_price"]; +} + +message MarketFetchRequest { + int64 page_no = 1 [json_name = "page_no"]; + int64 page_size = 2 [json_name = "page_size"]; + map params = 3; + string identity = 4; + string keyword = 5; + int32 status = 6; + int32 approve = 7; +} + +message OrderIdentRequest { + int64 id = 1; + string identity = 2; + string reason = 3; + int32 approve = 4; + string agency = 5; + string store_identity = 6; +} + +message DeliveryStatusReply { + int64 status = 1; + string identity = 2; + string message = 3; + int64 timeseq = 4; +} + +message IdentityStatusReply { + int32 code = 1; + string identity = 2; + string message = 3; + int64 timeseq = 4; +} + +message OrderStatusReply { + int32 code = 1; + string identity = 2; + string message = 3; + int64 timeseq = 4; + string reason = 5; +} + +message DataStatusReply { + string data = 1; + int64 timeseq = 2; +} + +message StoreSerialRequest { + string store_identity = 1 [json_name = "store_identity"]; + repeated string serial_id = 2 [json_name = "serial_id"]; +} + +// Cloud messages. +message IDRequest { + uint64 id = 1; +} + +message IDListRequest { + repeated uint64 ids = 1; +} + +message StdIicuds { + uint64 id = 1; + string created_at = 2; + string updated_at = 3; + string deleted_at = 4; +} + +message StdPassport { + uint64 passport_id = 1; + string passport_identity = 2; +} + +message CloudBase { + uint64 cloud_id = 1; + string cloud_identity = 2; +} + +// CMS messages. +message CmsCategoryItem { + string site_identity = 1 [json_name = "site_identity"]; + int64 id = 2; + string identity = 3; + int64 parent_id = 4 [json_name = "parent_id"]; + string title = 5; + string cover_path = 6 [json_name = "cover_path"]; + string intro = 7; + string created_at = 8 [json_name = "created_at"]; + string updated_at = 9 [json_name = "updated_at"]; + repeated CmsCategoryItem child = 10; + string category_key = 11 [json_name = "category_key"]; +} + +message CmsTagsItem { + int64 id = 1; + string identity = 2; + string title = 3; + string cover_path = 4 [json_name = "cover_path"]; + string intro = 5; + string created_at = 6 [json_name = "created_at"]; +} + +message CmsAccessoryItem { + string identity = 1; + string title = 2; + string file_path = 3 [json_name = "file_path"]; + string created_at = 4 [json_name = "created_at"]; +} + +// Passport messages. +message VerifyStatus { + int32 email_verify = 1; + int32 phone_verify = 2; + int32 face_verify = 3; + int32 document_verify = 4; + int32 kyc_verify = 5; +} + +// Market messages. +message MarketLoginReply { + string token = 1; + string identity = 2; + string market_identity = 3 [json_name = "market_identity"]; + string name = 4; + string account = 5; + string role = 6; + int32 status = 7; + string created_at = 8 [json_name = "created_at"]; + string market_name = 9 [json_name = "market_name"]; +} + +// Order messages. +message OrderSummaryItem { + int64 id = 1; + string order_no = 2 [json_name = "order_no"]; + int64 partner_id = 3 [json_name = "partner_id"]; + string identity = 4; + int64 total_price = 7 [json_name = "total_price"]; + int64 trans_price = 8 [json_name = "trans_price"]; + int64 refund_price = 9 [json_name = "refund_price"]; + int64 logistics_fee = 11 [json_name = "logistics_fee"]; + int64 coupon_amount = 12 [json_name = "coupon_amount"]; + string remark = 13; + int32 status = 14; + string logistics_number = 15 [json_name = "logistics_number"]; + string address_identity = 16 [json_name = "address_identity"]; + string county = 17; + string province = 18; + string city = 19; + string area = 20; + string address = 21; + string contact = 22; + string phone = 23; + string delivery_time = 24 [json_name = "delivery_time"]; + string delivery_identity = 25 [json_name = "delivery_identity"]; + int32 pay_type = 26 [json_name = "pay_type"]; + int64 pay_amount = 27 [json_name = "pay_amount"]; + string pay_trade_no = 28 [json_name = "pay_trade_no"]; + string pay_time = 29 [json_name = "pay_time"]; + string pay_remark = 30 [json_name = "pay_remark"]; + string created = 31; + string updated = 32; + repeated OrderDetails details = 33; + string addr = 34; + string car_identity = 35 [json_name = "car_identity"]; + string delivery_address = 36 [json_name = "delivery_address"]; + string brand = 37; + string version = 38; + string license_number = 39 [json_name = "license_number"]; + string member_name = 40 [json_name = "member_name"]; + string member_phone = 41 [json_name = "member_phone"]; + int32 approve = 42; +} + +message OrderDetails { + int64 id = 1; + int64 product_id = 2 [json_name = "product_id"]; + string spec_no = 3 [json_name = "spec_no"]; + string spec = 4; + int64 type = 5; + string title = 6; + string cover_image = 7 [json_name = "cover_image"]; + int64 sales_price = 8 [json_name = "sales_price"]; + string product_args = 9 [json_name = "product_args"]; + int64 number = 10; + int64 unit_price = 11 [json_name = "unit_price"]; + int64 spec_id = 12 [json_name = "spec_id"]; + string product_identity = 13 [json_name = "product_identity"]; + int64 gas_types = 14 [json_name = "gas_types"]; + int64 total_price = 15 [json_name = "total_price"]; +} + +// Social feed messages. +message FeedPostListReply { + repeated FeedPostItem list = 1; + int64 cnt = 2; +} + +message FeedPostItem { + string identity = 1; + string content = 2; + int64 feed_id = 3; + string feed_identity = 4; + bool is_open = 5; + int64 cnt_unlike = 6; + int64 cnt_comment = 7; + int64 cnt_like = 8; + repeated FeedAttachItem attachs = 9; + repeated FeedTagItem tags = 10; +} + +message FeedAttachItem { + string identity = 1; + string attach_type = 2; + string url = 3; +} + +message FeedTagItem { + string key = 1; + string content = 2; +} + +// Social group messages. +message GroupPostListReply { + repeated GroupPostItem list = 1; + int64 cnt = 2; +} + +message GroupPostItem { + string identity = 1; + string content = 2; + int64 passport_id = 3; + string passport_identity = 4; + bool is_open = 5; + int64 cnt_unlike = 6; + int64 cnt_comment = 7; + int64 cnt_like = 8; + repeated GroupAttachItem attachs = 9; + repeated GroupTagItem tags = 10; +} + +message GroupAttachItem { + string identity = 1; + string attach_type = 2; + string url = 3; +} + +message GroupTagItem { + string key = 1; + string content = 2; +} + +// Social relation messages. +message RelationItem { + string identity = 1; + string nickname = 2; + string remark_name = 3; + int32 popular = 4; + string avatar = 5; + string birthday = 6; + int32 sex = 7; + int32 province = 8; + int32 city = 9; + int32 area = 10; + string sign = 11; + repeated string tags = 12; + int32 foreign_status = 13; +} + +message FetchRelationItemReply { + int64 total = 1; + repeated RelationItem data = 2; +} + diff --git a/protobuf/go.mod b/protobuf/go.mod new file mode 100644 index 0000000..2ed9a40 --- /dev/null +++ b/protobuf/go.mod @@ -0,0 +1,7 @@ +module bsm/full/protobuf + +go 1.26.5 + +replace git.apinb.com/bsm-sdk/core => D:/work/bsm-sdk/core + +require google.golang.org/protobuf v1.36.11 diff --git a/protobuf/go.sum b/protobuf/go.sum new file mode 100644 index 0000000..296be18 --- /dev/null +++ b/protobuf/go.sum @@ -0,0 +1,4 @@ +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= diff --git a/scripts/generate-protobuf.sh b/scripts/generate-protobuf.sh new file mode 100644 index 0000000..3454144 --- /dev/null +++ b/scripts/generate-protobuf.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +readonly SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" +readonly WORKSPACE_ROOT="$(cd -- "${SCRIPT_DIR}/.." && pwd)" +readonly TOOL_ROOT="${WORKSPACE_ROOT}/.tools" + +protoc_bin="${TOOL_ROOT}/protoc/bin/protoc" +plugin_dir="${TOOL_ROOT}/bin" + +if [[ "${OS:-}" == "Windows_NT" ]]; then + protoc_bin="${protoc_bin}.exe" +fi + +if [[ ! -x "${protoc_bin}" ]]; then + protoc_bin="$(command -v protoc || true)" +fi + +if [[ -z "${protoc_bin}" ]]; then + echo "error: protoc was not found; install it or place it under .tools/protoc" >&2 + exit 1 +fi + +export PATH="${plugin_dir}:${PATH}" + +for plugin in protoc-gen-go protoc-gen-go-grpc protoc-gen-grpc-gateway; do + if ! command -v "${plugin}" >/dev/null 2>&1; then + echo "error: ${plugin} was not found in PATH or .tools/bin" >&2 + exit 1 + fi +done + +cd -- "${WORKSPACE_ROOT}" + +echo "==> protobuf/blocks.proto" +"${protoc_bin}" \ + --proto_path="${WORKSPACE_ROOT}" \ + --go_out="${WORKSPACE_ROOT}/protobuf" \ + --go_opt=module=bsm/full/protobuf \ + protobuf/blocks.proto + +while IFS= read -r -d '' go_mod; do + module_dir="$(dirname -- "${go_mod}")" + proto_dir="${module_dir}/proto" + [[ -d "${proto_dir}" ]] || continue + + module_path="$(awk '$1 == "module" { print $2; exit }' "${go_mod}")" + module_path="${module_path//$'\r'/}" + + if [[ "$(basename -- "${module_dir}")" == "delivery" ]]; then + output_dir="${module_dir}/external/pb/delivery" + else + output_dir="${module_dir}/pb" + fi + + mkdir -p "${output_dir}" + find "${output_dir}" -maxdepth 1 -type f \ + \( -name '*.pb.go' -o -name '*_grpc.pb.go' -o -name '*.pb.gw.go' \) -delete + + mapfile -d '' proto_files < <(find "${proto_dir}" -maxdepth 1 -type f -name '*.proto' -print0 | sort -z) + (( ${#proto_files[@]} > 0 )) || continue + + echo "==> ${module_path} (${#proto_files[@]} files)" + "${protoc_bin}" \ + --proto_path="${WORKSPACE_ROOT}" \ + --go_out="${module_dir}" \ + --go_opt="module=${module_path}" \ + --go-grpc_out="${module_dir}" \ + --go-grpc_opt="module=${module_path},require_unimplemented_servers=false" \ + --grpc-gateway_out="${module_dir}" \ + --grpc-gateway_opt="module=${module_path},generate_unbound_methods=true" \ + "${proto_files[@]}" +done < <(find "${WORKSPACE_ROOT}/module" -type f -name go.mod -print0 | sort -z) + +echo "Protobuf generation completed successfully." diff --git a/shared/go.mod b/shared/go.mod new file mode 100644 index 0000000..286a3c6 --- /dev/null +++ b/shared/go.mod @@ -0,0 +1,15 @@ +module bsm/full/shared + +go 1.26.5 + +require google.golang.org/grpc v1.83.0 + +require ( + golang.org/x/net v0.55.0 // indirect + golang.org/x/sys v0.45.0 // indirect + golang.org/x/text v0.37.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect + google.golang.org/protobuf v1.36.11 // indirect +) + +replace git.apinb.com/bsm-sdk/core => D:/work/bsm-sdk/core diff --git a/shared/go.sum b/shared/go.sum new file mode 100644 index 0000000..2010d3d --- /dev/null +++ b/shared/go.sum @@ -0,0 +1,38 @@ +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= +go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= +go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= +go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= +go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= +go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= +go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= +go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= +go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= +go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= +golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= +golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= +golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc= +golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38= +gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= +gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1:mZHHdPZl0dbGHCflZgAq/Q468DWVFcU2whhB2KAo8fk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/grpc v1.83.0 h1:JeNZEKJFbQxArAMl+hiytHauacDNqJUllNfmIMmpqnQ= +google.golang.org/grpc v1.83.0/go.mod h1:kDyl6SKsiHKt0uylY5gtn5cEjkrIOhQOGDgIc4JGwzQ= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= diff --git a/shared/grpcconn/provider.go b/shared/grpcconn/provider.go new file mode 100644 index 0000000..c71324f --- /dev/null +++ b/shared/grpcconn/provider.go @@ -0,0 +1,9 @@ +// Package grpcconn defines the smallest connection contract required by generated RPC clients. +package grpcconn + +import "google.golang.org/grpc" + +// Provider is implemented by grpc.ClientConn wrappers, including legacy clients exposing Conn. +type Provider interface { + Conn() *grpc.ClientConn +} diff --git a/shared/logging/context.go b/shared/logging/context.go new file mode 100644 index 0000000..9858cad --- /dev/null +++ b/shared/logging/context.go @@ -0,0 +1,13 @@ +// Package logging centralizes application logging without coupling services to a framework. +package logging + +import ( + "context" + "log/slog" +) + +// Context returns the process logger. The context parameter keeps call sites ready for +// a future trace-aware handler without imposing one on every service today. +func Context(_ context.Context) *slog.Logger { + return slog.Default() +}