From f1e5f43609630fb01759d1a360ca71dd457bc2f6 Mon Sep 17 00:00:00 2001 From: Michael Li Date: Fri, 30 Jun 2023 09:36:11 +0800 Subject: [PATCH] upgrade github.com/alimy/mir/v4 => v4.0.0-alpha.5 --- auto/api/m/v1/user.go | 1 - auto/api/r/v1/user.go | 1 - auto/api/s/v1/user.go | 1 - auto/api/v1/admin.go | 14 -------------- auto/api/v1/alipay_priv.go | 3 --- auto/api/v1/alipay_pub.go | 14 +++++++++++++- auto/api/v1/core.go | 16 ---------------- auto/api/v1/followship.go | 4 ---- auto/api/v1/friendship.go | 5 ----- auto/api/v1/loose.go | 5 ----- auto/api/v1/priv.go | 21 --------------------- auto/api/v1/pub.go | 4 ---- auto/api/x/v1/user.go | 1 - go.mod | 4 ++-- go.sum | 8 ++++---- 15 files changed, 19 insertions(+), 83 deletions(-) diff --git a/auto/api/m/v1/user.go b/auto/api/m/v1/user.go index d9fe36c9..8918a199 100644 --- a/auto/api/m/v1/user.go +++ b/auto/api/m/v1/user.go @@ -84,7 +84,6 @@ func RegisterUserServant(e *gin.Engine, s User) { return default: } - req := new(LoginReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) diff --git a/auto/api/r/v1/user.go b/auto/api/r/v1/user.go index d5dce055..e7f98082 100644 --- a/auto/api/r/v1/user.go +++ b/auto/api/r/v1/user.go @@ -84,7 +84,6 @@ func RegisterUserServant(e *gin.Engine, s User) { return default: } - req := new(LoginReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) diff --git a/auto/api/s/v1/user.go b/auto/api/s/v1/user.go index 061fa293..c0b7dae3 100644 --- a/auto/api/s/v1/user.go +++ b/auto/api/s/v1/user.go @@ -79,7 +79,6 @@ func RegisterUserServant(e *gin.Engine, s User) { return default: } - req := new(LoginReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) diff --git a/auto/api/v1/admin.go b/auto/api/v1/admin.go index 2b2e2c4a..4e5658a0 100644 --- a/auto/api/v1/admin.go +++ b/auto/api/v1/admin.go @@ -12,19 +12,6 @@ import ( "github.com/rocboss/paopao-ce/internal/model/web" ) -type _binding_ interface { - Bind(*gin.Context) mir.Error -} - -type _render_ interface { - Render(*gin.Context) -} - -type _default_ interface { - Bind(*gin.Context, any) mir.Error - Render(*gin.Context, any, mir.Error) -} - type Admin interface { _default_ @@ -50,7 +37,6 @@ func RegisterAdminServant(e *gin.Engine, s Admin) { return default: } - req := new(web.ChangeUserStatusReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) diff --git a/auto/api/v1/alipay_priv.go b/auto/api/v1/alipay_priv.go index d4b1e534..02500522 100644 --- a/auto/api/v1/alipay_priv.go +++ b/auto/api/v1/alipay_priv.go @@ -39,7 +39,6 @@ func RegisterAlipayPrivServant(e *gin.Engine, s AlipayPriv) { return default: } - req := new(web.UserWalletBillsReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -55,7 +54,6 @@ func RegisterAlipayPrivServant(e *gin.Engine, s AlipayPriv) { return default: } - req := new(web.UserRechargeResultReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -71,7 +69,6 @@ func RegisterAlipayPrivServant(e *gin.Engine, s AlipayPriv) { return default: } - req := new(web.UserRechargeLinkReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { diff --git a/auto/api/v1/alipay_pub.go b/auto/api/v1/alipay_pub.go index abe85bee..10e067ad 100644 --- a/auto/api/v1/alipay_pub.go +++ b/auto/api/v1/alipay_pub.go @@ -12,6 +12,19 @@ import ( "github.com/rocboss/paopao-ce/internal/model/web" ) +type _binding_ interface { + Bind(*gin.Context) mir.Error +} + +type _render_ interface { + Render(*gin.Context) +} + +type _default_ interface { + Bind(*gin.Context, any) mir.Error + Render(*gin.Context, any, mir.Error) +} + type AlipayPub interface { _default_ @@ -31,7 +44,6 @@ func RegisterAlipayPubServant(e *gin.Engine, s AlipayPub) { return default: } - req := new(web.AlipayNotifyReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { diff --git a/auto/api/v1/core.go b/auto/api/v1/core.go index e34cc058..159e938f 100644 --- a/auto/api/v1/core.go +++ b/auto/api/v1/core.go @@ -52,7 +52,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.TweetCollectionStatusReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -68,7 +67,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.TweetStarStatusReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -84,7 +82,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.SuggestTagsReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -100,7 +97,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.SuggestUsersReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -116,7 +112,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.ChangeAvatarReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -130,7 +125,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.ChangeNicknameReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -144,7 +138,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.ChangePasswordReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -158,7 +151,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.UserPhoneBindReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -172,7 +164,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.GetStarsReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -188,7 +179,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.GetCollectionsReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -204,7 +194,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.SendWhisperReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -218,7 +207,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.ReadMessageReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -232,7 +220,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.GetMessagesReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -248,7 +235,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.GetUnreadMsgCountReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -263,7 +249,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.UserInfoReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -279,7 +264,6 @@ func RegisterCoreServant(e *gin.Engine, s Core) { return default: } - req := new(web.SyncSearchIndexReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) diff --git a/auto/api/v1/followship.go b/auto/api/v1/followship.go index 34f4a8a8..fa6c0f8b 100644 --- a/auto/api/v1/followship.go +++ b/auto/api/v1/followship.go @@ -40,7 +40,6 @@ func RegisterFollowshipServant(e *gin.Engine, s Followship) { return default: } - req := new(web.ListFollowersReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -55,7 +54,6 @@ func RegisterFollowshipServant(e *gin.Engine, s Followship) { return default: } - req := new(web.ListFollowingsReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -70,7 +68,6 @@ func RegisterFollowshipServant(e *gin.Engine, s Followship) { return default: } - req := new(web.DeleteFollowingReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -84,7 +81,6 @@ func RegisterFollowshipServant(e *gin.Engine, s Followship) { return default: } - req := new(web.AddFollowingReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) diff --git a/auto/api/v1/friendship.go b/auto/api/v1/friendship.go index dc29ee26..e6e912fe 100644 --- a/auto/api/v1/friendship.go +++ b/auto/api/v1/friendship.go @@ -41,7 +41,6 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship) { return default: } - req := new(web.GetContactsReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -56,7 +55,6 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship) { return default: } - req := new(web.DeleteFriendReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -70,7 +68,6 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship) { return default: } - req := new(web.RejectFriendReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -84,7 +81,6 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship) { return default: } - req := new(web.AddFriendReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -98,7 +94,6 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship) { return default: } - req := new(web.RequestingFriendReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) diff --git a/auto/api/v1/loose.go b/auto/api/v1/loose.go index 94a07f88..4c9f9c6f 100644 --- a/auto/api/v1/loose.go +++ b/auto/api/v1/loose.go @@ -41,7 +41,6 @@ func RegisterLooseServant(e *gin.Engine, s Loose) { return default: } - req := new(web.TweetCommentsReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -56,7 +55,6 @@ func RegisterLooseServant(e *gin.Engine, s Loose) { return default: } - req := new(web.TopicListReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -71,7 +69,6 @@ func RegisterLooseServant(e *gin.Engine, s Loose) { return default: } - req := new(web.GetUserProfileReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -86,7 +83,6 @@ func RegisterLooseServant(e *gin.Engine, s Loose) { return default: } - req := new(web.GetUserTweetsReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -101,7 +97,6 @@ func RegisterLooseServant(e *gin.Engine, s Loose) { return default: } - req := new(web.TimelineReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { diff --git a/auto/api/v1/priv.go b/auto/api/v1/priv.go index 633b7299..d0254345 100644 --- a/auto/api/v1/priv.go +++ b/auto/api/v1/priv.go @@ -57,7 +57,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.UnfollowTopicReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -71,7 +70,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.FollowTopicReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -85,7 +83,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.StickTopicReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -100,7 +97,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.TweetReplyThumbsReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -114,7 +110,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.TweetReplyThumbsReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -128,7 +123,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.TweetCommentThumbsReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -142,7 +136,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.TweetCommentThumbsReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -156,7 +149,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.DeleteCommentReplyReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -170,7 +162,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.CreateCommentReplyReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -186,7 +177,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.DeleteCommentReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -200,7 +190,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.CreateCommentReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -216,7 +205,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.VisibleTweetReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -231,7 +219,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.StickTweetReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -246,7 +233,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.LockTweetReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -261,7 +247,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.CollectionTweetReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -276,7 +261,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.StarTweetReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -291,7 +275,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.DeleteTweetReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -305,7 +288,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.CreateTweetReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -321,7 +303,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.DownloadAttachmentReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -337,7 +318,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.DownloadAttachmentPrecheckReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { @@ -353,7 +333,6 @@ func RegisterPrivServant(e *gin.Engine, s Priv) { return default: } - req := new(web.UploadAttachmentReq) var bv _binding_ = req if err := bv.Bind(c); err != nil { diff --git a/auto/api/v1/pub.go b/auto/api/v1/pub.go index ae2f8367..850a7906 100644 --- a/auto/api/v1/pub.go +++ b/auto/api/v1/pub.go @@ -36,7 +36,6 @@ func RegisterPubServant(e *gin.Engine, s Pub) { return default: } - req := new(web.TweetDetailReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -51,7 +50,6 @@ func RegisterPubServant(e *gin.Engine, s Pub) { return default: } - req := new(web.SendCaptchaReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -75,7 +73,6 @@ func RegisterPubServant(e *gin.Engine, s Pub) { return default: } - req := new(web.RegisterReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) @@ -90,7 +87,6 @@ func RegisterPubServant(e *gin.Engine, s Pub) { return default: } - req := new(web.LoginReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) diff --git a/auto/api/x/v1/user.go b/auto/api/x/v1/user.go index 1ec46b0d..9de31b49 100644 --- a/auto/api/x/v1/user.go +++ b/auto/api/x/v1/user.go @@ -84,7 +84,6 @@ func RegisterUserServant(e *gin.Engine, s User) { return default: } - req := new(LoginReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) diff --git a/go.mod b/go.mod index 84ee87ea..aeed41e7 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ require ( github.com/Masterminds/semver/v3 v3.2.1 github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868 github.com/alimy/cfg v0.3.0 - github.com/alimy/mir/engine/gin/v4 v4.0.0 - github.com/alimy/mir/v4 v4.0.0-alpha.4 + github.com/alimy/mir/engine/gin/v4 v4.0.0-alpha.5 + github.com/alimy/mir/v4 v4.0.0-alpha.5 github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible github.com/allegro/bigcache/v3 v3.1.0 github.com/bytedance/sonic v1.9.1 diff --git a/go.sum b/go.sum index 0e4ba506..710dea0c 100644 --- a/go.sum +++ b/go.sum @@ -125,10 +125,10 @@ github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:C github.com/alexflint/go-filemutex v1.1.0/go.mod h1:7P4iRhttt/nUvUOrYIhcpMzv2G6CY9UnI16Z+UJqRyk= github.com/alimy/cfg v0.3.0 h1:9xgA0QWVCPSq9fFNRcYahVCAX22IL9ts2wrTQPfAStY= github.com/alimy/cfg v0.3.0/go.mod h1:rOxbasTH2srl6StAjNF5Vyi8bfrdkl3fLGmOYtSw81c= -github.com/alimy/mir/engine/gin/v4 v4.0.0 h1:N3nvpniFLW2z1WxU26gHw1FKx+/G+B/5cllOjOTjsWI= -github.com/alimy/mir/engine/gin/v4 v4.0.0/go.mod h1:M28AJQ5h1CEA+m2s6acuVjGXI8ElLNDA5IKtSdWI48k= -github.com/alimy/mir/v4 v4.0.0-alpha.4 h1:UKYwkvYnGo/5wr5pMwy+n2MW1+K8b4btCfdhTQhQB1A= -github.com/alimy/mir/v4 v4.0.0-alpha.4/go.mod h1:X09f2IOQ4NTyJFKJ10S+J7Jk988T5IvvprwTijQZAsg= +github.com/alimy/mir/engine/gin/v4 v4.0.0-alpha.5 h1:VcsxrgQthRHZiBgKhQwl6jcx8RUhrrLr0KYY67tCvtI= +github.com/alimy/mir/engine/gin/v4 v4.0.0-alpha.5/go.mod h1:QGiJqcbwlCOC86hoIr7TS8QJvtn1+AvKwlV7FFioqb8= +github.com/alimy/mir/v4 v4.0.0-alpha.5 h1:su6Qu57VYGFKi1V0+4kWKhn3Wq1DuDz9Wl82h+IQc0c= +github.com/alimy/mir/v4 v4.0.0-alpha.5/go.mod h1:X09f2IOQ4NTyJFKJ10S+J7Jk988T5IvvprwTijQZAsg= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible h1:KpbJFXwhVeuxNtBJ74MCGbIoaBok2uZvkD7QXp2+Wis= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3bSzwk=