upgrade go-mir to github.com/alimy/mir/v5 v5.0.0-alpha.2

pull/632/head
alimy 4 months ago
parent 335d6e0e7d
commit 4600fcc1e2

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
@ -69,7 +69,7 @@ func RegisterUserServant(e *gin.Engine, s User) {
router.Use(middlewares...) router.Use(middlewares...)
// register routes info to router // register routes info to router
router.Handle("POST", "/user/logout/", func(c *gin.Context) { router.Handle("POST", "user/logout", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -78,7 +78,7 @@ func RegisterUserServant(e *gin.Engine, s User) {
s.Render(c, nil, s.Logout()) s.Render(c, nil, s.Logout())
}) })
router.Handle("POST", "/user/login/", func(c *gin.Context) { router.Handle("POST", "user/login", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
@ -69,7 +69,7 @@ func RegisterUserServant(e *gin.Engine, s User) {
router.Use(middlewares...) router.Use(middlewares...)
// register routes info to router // register routes info to router
router.Handle("POST", "/user/logout/", func(c *gin.Context) { router.Handle("POST", "user/logout", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -78,7 +78,7 @@ func RegisterUserServant(e *gin.Engine, s User) {
s.Render(c, nil, s.Logout()) s.Render(c, nil, s.Logout())
}) })
router.Handle("POST", "/user/login/", func(c *gin.Context) { router.Handle("POST", "user/login", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
@ -64,7 +64,7 @@ func RegisterUserServant(e *gin.Engine, s User) {
router := e.Group("s/v1") router := e.Group("s/v1")
// register routes info to router // register routes info to router
router.Handle("POST", "/user/logout/", func(c *gin.Context) { router.Handle("POST", "user/logout", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -73,7 +73,7 @@ func RegisterUserServant(e *gin.Engine, s User) {
s.Render(c, nil, s.Logout()) s.Render(c, nil, s.Logout())
}) })
router.Handle("POST", "/user/login/", func(c *gin.Context) { router.Handle("POST", "user/login", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -87,7 +87,7 @@ func RegisterUserServant(e *gin.Engine, s User) {
resp, err := s.Login(req) resp, err := s.Login(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/index/", func(c *gin.Context) { router.Handle("GET", "index", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
@ -46,7 +46,7 @@ func RegisterAdminServant(e *gin.Engine, s Admin) {
router.Use(middlewares...) router.Use(middlewares...)
// register routes info to router // register routes info to router
router.Handle("GET", "/admin/site/status", func(c *gin.Context) { router.Handle("GET", "admin/site/status", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -60,7 +60,7 @@ func RegisterAdminServant(e *gin.Engine, s Admin) {
resp, err := s.SiteInfo(req) resp, err := s.SiteInfo(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/admin/user/status", func(c *gin.Context) { router.Handle("POST", "admin/user/status", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
@ -33,7 +33,7 @@ func RegisterAlipayPrivServant(e *gin.Engine, s AlipayPriv) {
router.Use(middlewares...) router.Use(middlewares...)
// register routes info to router // register routes info to router
router.Handle("GET", "/user/wallet/bills", func(c *gin.Context) { router.Handle("GET", "user/wallet/bills", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -48,7 +48,7 @@ func RegisterAlipayPrivServant(e *gin.Engine, s AlipayPriv) {
resp, err := s.UserWalletBills(req) resp, err := s.UserWalletBills(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/user/recharge", func(c *gin.Context) { router.Handle("GET", "user/recharge", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -63,7 +63,7 @@ func RegisterAlipayPrivServant(e *gin.Engine, s AlipayPriv) {
resp, err := s.UserRechargeResult(req) resp, err := s.UserRechargeResult(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/user/recharge", func(c *gin.Context) { router.Handle("POST", "user/recharge", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
@ -25,7 +25,7 @@ func RegisterAlipayPubServant(e *gin.Engine, s AlipayPub) {
router := e.Group("v1") router := e.Group("v1")
// register routes info to router // register routes info to router
router.Handle("POST", "/alipay/notify", func(c *gin.Context) { router.Handle("POST", "alipay/notify", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
@ -46,7 +46,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
router.Use(middlewares...) router.Use(middlewares...)
// register routes info to router // register routes info to router
router.Handle("GET", "/post/collection", func(c *gin.Context) { router.Handle("GET", "post/collection", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -61,7 +61,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
resp, err := s.TweetCollectionStatus(req) resp, err := s.TweetCollectionStatus(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/post/star", func(c *gin.Context) { router.Handle("GET", "post/star", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -76,7 +76,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
resp, err := s.TweetStarStatus(req) resp, err := s.TweetStarStatus(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/suggest/tags", func(c *gin.Context) { router.Handle("GET", "suggest/tags", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -91,7 +91,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
resp, err := s.SuggestTags(req) resp, err := s.SuggestTags(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/suggest/users", func(c *gin.Context) { router.Handle("GET", "suggest/users", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -106,7 +106,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
resp, err := s.SuggestUsers(req) resp, err := s.SuggestUsers(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/user/avatar", func(c *gin.Context) { router.Handle("POST", "user/avatar", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -119,7 +119,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
} }
s.Render(c, nil, s.ChangeAvatar(req)) s.Render(c, nil, s.ChangeAvatar(req))
}) })
router.Handle("POST", "/user/nickname", func(c *gin.Context) { router.Handle("POST", "user/nickname", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -132,7 +132,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
} }
s.Render(c, nil, s.ChangeNickname(req)) s.Render(c, nil, s.ChangeNickname(req))
}) })
router.Handle("POST", "/user/password", func(c *gin.Context) { router.Handle("POST", "user/password", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -145,7 +145,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
} }
s.Render(c, nil, s.ChangePassword(req)) s.Render(c, nil, s.ChangePassword(req))
}) })
router.Handle("POST", "/user/phone", func(c *gin.Context) { router.Handle("POST", "user/phone", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -158,7 +158,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
} }
s.Render(c, nil, s.UserPhoneBind(req)) s.Render(c, nil, s.UserPhoneBind(req))
}) })
router.Handle("GET", "/user/stars", func(c *gin.Context) { router.Handle("GET", "user/stars", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -173,7 +173,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
resp, err := s.GetStars(req) resp, err := s.GetStars(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/user/collections", func(c *gin.Context) { router.Handle("GET", "user/collections", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -188,7 +188,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
resp, err := s.GetCollections(req) resp, err := s.GetCollections(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/user/whisper", func(c *gin.Context) { router.Handle("POST", "user/whisper", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -201,7 +201,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
} }
s.Render(c, nil, s.SendUserWhisper(req)) s.Render(c, nil, s.SendUserWhisper(req))
}) })
router.Handle("POST", "/user/message/readall", func(c *gin.Context) { router.Handle("POST", "user/message/readall", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -214,7 +214,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
} }
s.Render(c, nil, s.ReadAllMessage(req)) s.Render(c, nil, s.ReadAllMessage(req))
}) })
router.Handle("POST", "/user/message/read", func(c *gin.Context) { router.Handle("POST", "user/message/read", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -227,7 +227,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
} }
s.Render(c, nil, s.ReadMessage(req)) s.Render(c, nil, s.ReadMessage(req))
}) })
router.Handle("GET", "/user/messages", func(c *gin.Context) { router.Handle("GET", "user/messages", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -246,7 +246,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
var rv _render_ = resp var rv _render_ = resp
rv.Render(c) rv.Render(c)
}) })
router.Handle("GET", "/user/info", func(c *gin.Context) { router.Handle("GET", "user/info", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -261,7 +261,7 @@ func RegisterCoreServant(e *gin.Engine, s Core) {
resp, err := s.GetUserInfo(req) resp, err := s.GetUserInfo(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/sync/index", func(c *gin.Context) { router.Handle("GET", "sync/index", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
@ -34,7 +34,7 @@ func RegisterFollowshipServant(e *gin.Engine, s Followship) {
router.Use(middlewares...) router.Use(middlewares...)
// register routes info to router // register routes info to router
router.Handle("GET", "/user/followings", func(c *gin.Context) { router.Handle("GET", "user/followings", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -48,7 +48,7 @@ func RegisterFollowshipServant(e *gin.Engine, s Followship) {
resp, err := s.ListFollowings(req) resp, err := s.ListFollowings(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/user/follows", func(c *gin.Context) { router.Handle("GET", "user/follows", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -62,7 +62,7 @@ func RegisterFollowshipServant(e *gin.Engine, s Followship) {
resp, err := s.ListFollows(req) resp, err := s.ListFollows(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/user/unfollow", func(c *gin.Context) { router.Handle("POST", "user/unfollow", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -75,7 +75,7 @@ func RegisterFollowshipServant(e *gin.Engine, s Followship) {
} }
s.Render(c, nil, s.UnfollowUser(req)) s.Render(c, nil, s.UnfollowUser(req))
}) })
router.Handle("POST", "/user/follow", func(c *gin.Context) { router.Handle("POST", "user/follow", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
@ -35,7 +35,7 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship) {
router.Use(middlewares...) router.Use(middlewares...)
// register routes info to router // register routes info to router
router.Handle("GET", "/user/contacts", func(c *gin.Context) { router.Handle("GET", "user/contacts", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -49,7 +49,7 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship) {
resp, err := s.GetContacts(req) resp, err := s.GetContacts(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/friend/delete", func(c *gin.Context) { router.Handle("POST", "friend/delete", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -62,7 +62,7 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship) {
} }
s.Render(c, nil, s.DeleteFriend(req)) s.Render(c, nil, s.DeleteFriend(req))
}) })
router.Handle("POST", "/friend/reject", func(c *gin.Context) { router.Handle("POST", "friend/reject", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -75,7 +75,7 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship) {
} }
s.Render(c, nil, s.RejectFriend(req)) s.Render(c, nil, s.RejectFriend(req))
}) })
router.Handle("POST", "/friend/add", func(c *gin.Context) { router.Handle("POST", "friend/add", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -88,7 +88,7 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship) {
} }
s.Render(c, nil, s.AddFriend(req)) s.Render(c, nil, s.AddFriend(req))
}) })
router.Handle("POST", "/friend/requesting", func(c *gin.Context) { router.Handle("POST", "friend/requesting", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
@ -36,7 +36,7 @@ func RegisterLooseServant(e *gin.Engine, s Loose) {
router.Use(middlewares...) router.Use(middlewares...)
// register routes info to router // register routes info to router
router.Handle("GET", "/post", func(c *gin.Context) { router.Handle("GET", "post", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -50,7 +50,7 @@ func RegisterLooseServant(e *gin.Engine, s Loose) {
resp, err := s.TweetDetail(req) resp, err := s.TweetDetail(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/post/comments", func(c *gin.Context) { router.Handle("GET", "post/comments", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -69,7 +69,7 @@ func RegisterLooseServant(e *gin.Engine, s Loose) {
var rv _render_ = resp var rv _render_ = resp
rv.Render(c) rv.Render(c)
}) })
router.Handle("GET", "/tags", func(c *gin.Context) { router.Handle("GET", "tags", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -83,7 +83,7 @@ func RegisterLooseServant(e *gin.Engine, s Loose) {
resp, err := s.TopicList(req) resp, err := s.TopicList(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/user/profile", func(c *gin.Context) { router.Handle("GET", "user/profile", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -97,7 +97,7 @@ func RegisterLooseServant(e *gin.Engine, s Loose) {
resp, err := s.GetUserProfile(req) resp, err := s.GetUserProfile(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/user/posts", func(c *gin.Context) { router.Handle("GET", "user/posts", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -116,7 +116,7 @@ func RegisterLooseServant(e *gin.Engine, s Loose) {
var rv _render_ = resp var rv _render_ = resp
rv.Render(c) rv.Render(c)
}) })
router.Handle("GET", "/posts", func(c *gin.Context) { router.Handle("GET", "posts", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
@ -66,7 +66,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
router.Use(middlewares...) router.Use(middlewares...)
// register routes info to router // register routes info to router
router.Handle("POST", "/topic/unfollow", func(c *gin.Context) { router.Handle("POST", "topic/unfollow", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -79,7 +79,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
} }
s.Render(c, nil, s.UnfollowTopic(req)) s.Render(c, nil, s.UnfollowTopic(req))
}) })
router.Handle("POST", "/topic/follow", func(c *gin.Context) { router.Handle("POST", "topic/follow", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -92,7 +92,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
} }
s.Render(c, nil, s.FollowTopic(req)) s.Render(c, nil, s.FollowTopic(req))
}) })
router.Handle("POST", "/topic/pin", func(c *gin.Context) { router.Handle("POST", "topic/pin", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -106,7 +106,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.PinTopic(req) resp, err := s.PinTopic(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/topic/stick", func(c *gin.Context) { router.Handle("POST", "topic/stick", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -120,7 +120,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.StickTopic(req) resp, err := s.StickTopic(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/tweet/reply/thumbsdown", func(c *gin.Context) { router.Handle("POST", "tweet/reply/thumbsdown", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -133,7 +133,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
} }
s.Render(c, nil, s.ThumbsDownTweetReply(req)) s.Render(c, nil, s.ThumbsDownTweetReply(req))
}) })
router.Handle("POST", "/tweet/reply/thumbsup", func(c *gin.Context) { router.Handle("POST", "tweet/reply/thumbsup", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -146,7 +146,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
} }
s.Render(c, nil, s.ThumbsUpTweetReply(req)) s.Render(c, nil, s.ThumbsUpTweetReply(req))
}) })
router.Handle("POST", "/tweet/comment/thumbsdown", func(c *gin.Context) { router.Handle("POST", "tweet/comment/thumbsdown", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -159,7 +159,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
} }
s.Render(c, nil, s.ThumbsDownTweetComment(req)) s.Render(c, nil, s.ThumbsDownTweetComment(req))
}) })
router.Handle("POST", "/tweet/comment/thumbsup", func(c *gin.Context) { router.Handle("POST", "tweet/comment/thumbsup", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -172,7 +172,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
} }
s.Render(c, nil, s.ThumbsUpTweetComment(req)) s.Render(c, nil, s.ThumbsUpTweetComment(req))
}) })
router.Handle("DELETE", "/post/comment/reply", func(c *gin.Context) { router.Handle("DELETE", "post/comment/reply", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -185,7 +185,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
} }
s.Render(c, nil, s.DeleteCommentReply(req)) s.Render(c, nil, s.DeleteCommentReply(req))
}) })
router.Handle("POST", "/post/comment/reply", func(c *gin.Context) { router.Handle("POST", "post/comment/reply", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -200,7 +200,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.CreateCommentReply(req) resp, err := s.CreateCommentReply(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/post/comment/highlight", func(c *gin.Context) { router.Handle("POST", "post/comment/highlight", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -214,7 +214,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.HighlightComment(req) resp, err := s.HighlightComment(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("DELETE", "/post/comment", func(c *gin.Context) { router.Handle("DELETE", "post/comment", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -227,7 +227,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
} }
s.Render(c, nil, s.DeleteComment(req)) s.Render(c, nil, s.DeleteComment(req))
}) })
router.Handle("POST", "/post/comment", func(c *gin.Context) { router.Handle("POST", "post/comment", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -242,7 +242,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.CreateComment(req) resp, err := s.CreateComment(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/post/visibility", func(c *gin.Context) { router.Handle("POST", "post/visibility", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -256,7 +256,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.VisibleTweet(req) resp, err := s.VisibleTweet(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/post/highlight", func(c *gin.Context) { router.Handle("POST", "post/highlight", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -270,7 +270,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.HighlightTweet(req) resp, err := s.HighlightTweet(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/post/stick", func(c *gin.Context) { router.Handle("POST", "post/stick", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -284,7 +284,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.StickTweet(req) resp, err := s.StickTweet(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/post/lock", func(c *gin.Context) { router.Handle("POST", "post/lock", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -298,7 +298,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.LockTweet(req) resp, err := s.LockTweet(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/post/collection", func(c *gin.Context) { router.Handle("POST", "post/collection", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -312,7 +312,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.CollectionTweet(req) resp, err := s.CollectionTweet(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/post/star", func(c *gin.Context) { router.Handle("POST", "post/star", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -326,7 +326,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.StarTweet(req) resp, err := s.StarTweet(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("DELETE", "/post", func(c *gin.Context) { router.Handle("DELETE", "post", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -339,7 +339,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
} }
s.Render(c, nil, s.DeleteTweet(req)) s.Render(c, nil, s.DeleteTweet(req))
}) })
router.Handle("POST", "/post", append(cc.ChainCreateTweet(), func(c *gin.Context) { router.Handle("POST", "post", append(cc.ChainCreateTweet(), func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -359,7 +359,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
var rv _render_ = resp var rv _render_ = resp
rv.Render(c) rv.Render(c)
})...) })...)
router.Handle("GET", "/attachment", func(c *gin.Context) { router.Handle("GET", "attachment", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -374,7 +374,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.DownloadAttachment(req) resp, err := s.DownloadAttachment(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/attachment/precheck", func(c *gin.Context) { router.Handle("GET", "attachment/precheck", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -389,7 +389,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.DownloadAttachmentPrecheck(req) resp, err := s.DownloadAttachmentPrecheck(req)
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/attachment", func(c *gin.Context) { router.Handle("POST", "attachment", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
@ -43,7 +43,7 @@ func RegisterRelaxServant(e *gin.Engine, s Relax, m ...RelaxChain) {
router.Use(middlewares...) router.Use(middlewares...)
// register routes info to router // register routes info to router
router.Handle("GET", "/user/msgcount/unread", append(cc.ChainGetUnreadMsgCount(), func(c *gin.Context) { router.Handle("GET", "user/msgcount/unread", append(cc.ChainGetUnreadMsgCount(), func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/conf" "github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
@ -27,7 +27,7 @@ func RegisterSiteServant(e *gin.Engine, s Site) {
router := e.Group("v1") router := e.Group("v1")
// register routes info to router // register routes info to router
router.Handle("GET", "/site/profile", func(c *gin.Context) { router.Handle("GET", "site/profile", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -37,7 +37,7 @@ func RegisterSiteServant(e *gin.Engine, s Site) {
resp, err := s.Profile() resp, err := s.Profile()
s.Render(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/site/version", func(c *gin.Context) { router.Handle("GET", "site/version", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
@ -31,7 +31,7 @@ func RegisterTrendsServant(e *gin.Engine, s Trends) {
router.Use(middlewares...) router.Use(middlewares...)
// register routes info to router // register routes info to router
router.Handle("GET", "/trends/index", func(c *gin.Context) { router.Handle("GET", "trends/index", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -1,13 +1,13 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v4.2.0 // - mir 5.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
@ -69,7 +69,7 @@ func RegisterUserServant(e *gin.Engine, s User) {
router.Use(middlewares...) router.Use(middlewares...)
// register routes info to router // register routes info to router
router.Handle("POST", "/user/logout/", func(c *gin.Context) { router.Handle("POST", "user/logout", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return
@ -78,7 +78,7 @@ func RegisterUserServant(e *gin.Engine, s User) {
s.Render(c, nil, s.Logout()) s.Render(c, nil, s.Logout())
}) })
router.Handle("POST", "/user/login/", func(c *gin.Context) { router.Handle("POST", "user/login", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
return return

@ -6,7 +6,7 @@ require (
github.com/Masterminds/semver/v3 v3.2.1 github.com/Masterminds/semver/v3 v3.2.1
github.com/RoaringBitmap/roaring v1.9.4 github.com/RoaringBitmap/roaring v1.9.4
github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868 github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868
github.com/alimy/mir/v4 v4.2.0-alpha.5 github.com/alimy/mir/v5 v5.0.0-alpha.2
github.com/alimy/tryst v1.1.0 github.com/alimy/tryst v1.1.0
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
github.com/allegro/bigcache/v3 v3.1.0 github.com/allegro/bigcache/v3 v3.1.0
@ -52,7 +52,7 @@ require (
go.opentelemetry.io/otel/sdk/log v0.10.0 go.opentelemetry.io/otel/sdk/log v0.10.0
go.opentelemetry.io/otel/sdk/metric v1.34.0 go.opentelemetry.io/otel/sdk/metric v1.34.0
go.uber.org/automaxprocs v1.5.3 go.uber.org/automaxprocs v1.5.3
golang.org/x/crypto v0.36.0 golang.org/x/crypto v0.38.0
google.golang.org/grpc v1.71.1 google.golang.org/grpc v1.71.1
google.golang.org/protobuf v1.36.4 google.golang.org/protobuf v1.36.4
gopkg.in/natefinch/lumberjack.v2 v2.2.1 gopkg.in/natefinch/lumberjack.v2 v2.2.1
@ -160,12 +160,13 @@ require (
golang.org/x/arch v0.8.0 // indirect golang.org/x/arch v0.8.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/image v0.0.0-20210216034530-4410531fe030 // indirect golang.org/x/image v0.0.0-20210216034530-4410531fe030 // indirect
golang.org/x/net v0.34.0 // indirect golang.org/x/mod v0.24.0 // indirect
golang.org/x/sync v0.12.0 // indirect golang.org/x/net v0.40.0 // indirect
golang.org/x/sys v0.31.0 // indirect golang.org/x/sync v0.14.0 // indirect
golang.org/x/text v0.23.0 // indirect golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.25.0 // indirect
golang.org/x/time v0.5.0 // indirect golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.24.0 // indirect golang.org/x/tools v0.33.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect

@ -9,8 +9,8 @@ github.com/RoaringBitmap/roaring v1.9.4 h1:yhEIoH4YezLYT04s1nHehNO64EKFTop/wBhxv
github.com/RoaringBitmap/roaring v1.9.4/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= github.com/RoaringBitmap/roaring v1.9.4/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90=
github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868 h1:uFrPOl1VBt/Abfl2z+A/DFc+AwmFLxEHR1+Yq6cXvww= github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868 h1:uFrPOl1VBt/Abfl2z+A/DFc+AwmFLxEHR1+Yq6cXvww=
github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868/go.mod h1:srphKZ1i+yGXxl/LpBS7ZIECTjCTPzZzAMtJWoG3sLo= github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868/go.mod h1:srphKZ1i+yGXxl/LpBS7ZIECTjCTPzZzAMtJWoG3sLo=
github.com/alimy/mir/v4 v4.2.0-alpha.5 h1:ExSJpbFzKX3Avk1CoTOU3OLyvo4PTB2SnTSQXfeJNIc= github.com/alimy/mir/v5 v5.0.0-alpha.2 h1:FWynGRqSV3tENJdG2wvYC2q8RUitneHDuokypAFE5So=
github.com/alimy/mir/v4 v4.2.0-alpha.5/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc= github.com/alimy/mir/v5 v5.0.0-alpha.2/go.mod h1:R76XQiU3K7T4V0aOcd4r5OeO7Gf8yTIVtnLbt1LLf2U=
github.com/alimy/tryst v1.1.0 h1:EiGiTLLw9n6bfg1WwnqoZTb1gnDHDHxozjfE/cuVjlI= github.com/alimy/tryst v1.1.0 h1:EiGiTLLw9n6bfg1WwnqoZTb1gnDHDHxozjfE/cuVjlI=
github.com/alimy/tryst v1.1.0/go.mod h1:t/Ocn3Qd2P8Sg5VIL11s1H7cBCYZcDy+VNwiFHix+lI= github.com/alimy/tryst v1.1.0/go.mod h1:t/Ocn3Qd2P8Sg5VIL11s1H7cBCYZcDy+VNwiFHix+lI=
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible h1:8psS8a+wKfiLt1iVDX79F7Y6wUM49Lcha2FMXt4UM8g= github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible h1:8psS8a+wKfiLt1iVDX79F7Y6wUM49Lcha2FMXt4UM8g=
@ -383,8 +383,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8=
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
@ -394,8 +394,8 @@ 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.3.0/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.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.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 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-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@ -409,15 +409,15 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/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-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-20201020160332-67f06af15bc9/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.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.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -435,8 +435,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
@ -450,8 +450,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.5.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-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@ -460,8 +460,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 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.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc=
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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-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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

@ -7,7 +7,7 @@ package web
import ( import (
"context" "context"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/conf" "github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/base"

@ -5,7 +5,7 @@
package web package web
import ( import (
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/core/cs" "github.com/rocboss/paopao-ce/internal/core/cs"
"github.com/rocboss/paopao-ce/internal/model/joint" "github.com/rocboss/paopao-ce/internal/model/joint"

@ -5,7 +5,7 @@
package web package web
import ( import (
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/conf" "github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/core" "github.com/rocboss/paopao-ce/internal/core"

@ -10,7 +10,7 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/core" "github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/core/cs" "github.com/rocboss/paopao-ce/internal/core/cs"

@ -5,7 +5,7 @@
package web package web
import ( import (
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/rocboss/paopao-ce/pkg/xerror" "github.com/rocboss/paopao-ce/pkg/xerror"
) )

@ -5,7 +5,7 @@
package web package web
import ( import (
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/core/ms" "github.com/rocboss/paopao-ce/internal/core/ms"
"github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/base"

@ -10,7 +10,7 @@ import (
"math" "math"
"net/http" "net/http"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/cockroachdb/errors" "github.com/cockroachdb/errors"
"github.com/getsentry/sentry-go" "github.com/getsentry/sentry-go"
sentrygin "github.com/getsentry/sentry-go/gin" sentrygin "github.com/getsentry/sentry-go/gin"

@ -7,7 +7,7 @@ package web
import ( import (
"time" "time"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/conf" "github.com/rocboss/paopao-ce/internal/conf"

@ -7,7 +7,7 @@ package web
import ( import (
"fmt" "fmt"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"

@ -11,7 +11,7 @@ import (
"time" "time"
"unicode/utf8" "unicode/utf8"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/conf" "github.com/rocboss/paopao-ce/internal/conf"

@ -5,7 +5,7 @@
package web package web
import ( import (
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/dao/cache" "github.com/rocboss/paopao-ce/internal/dao/cache"

@ -5,7 +5,7 @@
package web package web
import ( import (
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"

@ -7,7 +7,7 @@ package web
import ( import (
"fmt" "fmt"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/conf" "github.com/rocboss/paopao-ce/internal/conf"

@ -10,7 +10,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/alimy/tryst/cfg" "github.com/alimy/tryst/cfg"
"github.com/disintegration/imaging" "github.com/disintegration/imaging"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"

@ -14,7 +14,7 @@ import (
"unicode/utf8" "unicode/utf8"
"github.com/afocus/captcha" "github.com/afocus/captcha"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gofrs/uuid/v5" "github.com/gofrs/uuid/v5"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/core/ms" "github.com/rocboss/paopao-ce/internal/core/ms"

@ -5,7 +5,7 @@
package web package web
import ( import (
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/redis/rueidis" "github.com/redis/rueidis"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"

@ -5,7 +5,7 @@
package web package web
import ( import (
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/conf" "github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"

@ -7,7 +7,7 @@ package web
import ( import (
"fmt" "fmt"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/conf" "github.com/rocboss/paopao-ce/internal/conf"

@ -11,7 +11,7 @@ import (
"time" "time"
"unicode/utf8" "unicode/utf8"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
"github.com/gofrs/uuid/v5" "github.com/gofrs/uuid/v5"
"github.com/rocboss/paopao-ce/internal/core" "github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/core/ms" "github.com/rocboss/paopao-ce/internal/core/ms"

@ -1,14 +1,9 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
) )
func init() {
Entry[User]()
}
type AgentInfo struct { type AgentInfo struct {
Platform string `json:"platform"` Platform string `json:"platform"`
UserAgent string `json:"user_agent"` UserAgent string `json:"user_agent"`
@ -35,8 +30,8 @@ type LoginResp struct {
} }
type User struct { type User struct {
Chain `mir:"-"` Schema `mir:"m/v1,chain"`
Group `mir:"m/v1"`
Login func(Post, LoginReq) LoginResp `mir:"/user/login/"` Login func(Post, LoginReq) LoginResp `mir:"user/login"`
Logout func(Post) `mir:"/user/logout/"` Logout func(Post) `mir:"user/logout"`
} }

@ -1,14 +1,9 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
) )
func init() {
Entry[User]()
}
type AgentInfo struct { type AgentInfo struct {
Platform string `json:"platform"` Platform string `json:"platform"`
UserAgent string `json:"user_agent"` UserAgent string `json:"user_agent"`
@ -35,8 +30,8 @@ type LoginResp struct {
} }
type User struct { type User struct {
Chain `mir:"-"` Schema `mir:"r/v1,chain"`
Group `mir:"r/v1"`
Login func(Post, LoginReq) LoginResp `mir:"/user/login/"` Login func(Post, LoginReq) LoginResp `mir:"user/login"`
Logout func(Post) `mir:"/user/logout/"` Logout func(Post) `mir:"user/logout"`
} }

@ -10,28 +10,20 @@ package main
import ( import (
"log" "log"
. "github.com/alimy/mir/v4/core" . "github.com/alimy/mir/v5/core"
. "github.com/alimy/mir/v4/engine" . "github.com/alimy/mir/v5/engine"
"github.com/gin-gonic/gin"
_ "github.com/rocboss/paopao-ce/mirc/admin/v1"
_ "github.com/rocboss/paopao-ce/mirc/bot/v1"
_ "github.com/rocboss/paopao-ce/mirc/localoss/v1"
_ "github.com/rocboss/paopao-ce/mirc/space/v1"
_ "github.com/rocboss/paopao-ce/mirc/web/v1"
) )
//go:generate go run $GOFILE //go:generate go run $GOFILE
func main() { func main() {
log.Println("[Mir] generate code start") log.Println("[Mir] generate code start")
opts := Options{ if err := Generate(
Schema("web", "space", "localoss", "bot", "admin"),
UseGin(), UseGin(),
SinkPath("../auto"), SinkPath("../auto"),
WatchCtxDone(true), WatchCtxDone(true),
RunMode(InSerialMode), RunMode(InSerialMode),
AssertType[*gin.Context](), ); err != nil {
}
if err := Generate(opts); err != nil {
log.Fatal(err) log.Fatal(err)
} }
log.Println("[Mir] generate code finish") log.Println("[Mir] generate code finish")

@ -1,14 +1,9 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
) )
func init() {
Entry[User]()
}
type AgentInfo struct { type AgentInfo struct {
Platform string `json:"platform"` Platform string `json:"platform"`
UserAgent string `json:"user_agent"` UserAgent string `json:"user_agent"`
@ -35,8 +30,9 @@ type LoginResp struct {
} }
type User struct { type User struct {
Group `mir:"s/v1"` Schema `mir:"s/v1"`
Index func(Get) `mir:"/index/"`
Login func(Post, LoginReq) LoginResp `mir:"/user/login/"` Index func(Get) `mir:"index"`
Logout func(Post) `mir:"/user/logout/"` Login func(Post, LoginReq) LoginResp `mir:"user/login"`
Logout func(Post) `mir:"user/logout"`
} }

@ -1,14 +1,9 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
) )
func init() {
Entry[User]()
}
type AgentInfo struct { type AgentInfo struct {
Platform string `json:"platform"` Platform string `json:"platform"`
UserAgent string `json:"user_agent"` UserAgent string `json:"user_agent"`
@ -35,8 +30,8 @@ type LoginResp struct {
} }
type User struct { type User struct {
Chain `mir:"-"` Schema `mir:"x/v1,chain"`
Group `mir:"x/v1"`
Login func(Post, LoginReq) LoginResp `mir:"/user/login/"` Login func(Post, LoginReq) LoginResp `mir:"user/login"`
Logout func(Post) `mir:"/user/logout/"` Logout func(Post) `mir:"user/logout"`
} }

@ -1,21 +1,16 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
func init() {
Entry[Admin]()
}
// Admin 运维相关服务 // Admin 运维相关服务
type Admin struct { type Admin struct {
Chain `mir:"-"` Schema `mir:"v1,chain"`
Group `mir:"v1"`
// ChangeUserStatus 管理·禁言/解封用户 // ChangeUserStatus 管理·禁言/解封用户
ChangeUserStatus func(Post, web.ChangeUserStatusReq) `mir:"/admin/user/status"` ChangeUserStatus func(Post, web.ChangeUserStatusReq) `mir:"admin/user/status"`
SiteInfo func(Get, web.SiteInfoReq) web.SiteInfoResp `mir:"/admin/site/status"` SiteInfo func(Get, web.SiteInfoReq) web.SiteInfoResp `mir:"admin/site/status"`
} }

@ -1,34 +1,29 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
func init() {
AddEntry(new(AlipayPub), new(AlipayPriv))
}
// AlipayPub 支付宝相关不用授权的服务 // AlipayPub 支付宝相关不用授权的服务
type AlipayPub struct { type AlipayPub struct {
Group `mir:"v1"` Schema `mir:"v1"`
// AlipayNotify 支付宝回调 // AlipayNotify 支付宝回调
AlipayNotify func(Post, web.AlipayNotifyReq) `mir:"/alipay/notify"` AlipayNotify func(Post, web.AlipayNotifyReq) `mir:"alipay/notify"`
} }
// AlipayPub 支付宝相关授权的服务 // AlipayPub 支付宝相关授权的服务
type AlipayPriv struct { type AlipayPriv struct {
Chain Chain `mir:"-"` Schema `mir:"v1,chain"`
Group Group `mir:"v1"`
// UserRechargeLink 用户充值 // UserRechargeLink 用户充值
UserRechargeLink func(Post, web.UserRechargeLinkReq) web.UserRechargeLinkResp `mir:"/user/recharge"` UserRechargeLink func(Post, web.UserRechargeLinkReq) web.UserRechargeLinkResp `mir:"user/recharge"`
// UserRechargeResult 获取充值结果 // UserRechargeResult 获取充值结果
UserRechargeResult func(Get, web.UserRechargeResultReq) web.UserRechargeResultResp `mir:"/user/recharge"` UserRechargeResult func(Get, web.UserRechargeResultReq) web.UserRechargeResultResp `mir:"user/recharge"`
// UserWalletBills 获取用户账单 // UserWalletBills 获取用户账单
UserWalletBills func(Get, web.UserWalletBillsReq) web.UserWalletBillsResp `mir:"/user/wallet/bills"` UserWalletBills func(Get, web.UserWalletBillsReq) web.UserWalletBillsResp `mir:"user/wallet/bills"`
} }

@ -1,65 +1,60 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
func init() {
Entry[Core]()
}
// Core 核心服务,需要授权访问 // Core 核心服务,需要授权访问
type Core struct { type Core struct {
Chain `mir:"-"` Schema `mir:"v1,chain"`
Group `mir:"v1"`
// SyncSearchIndex 同步索引 // SyncSearchIndex 同步索引
SyncSearchIndex func(Get, web.SyncSearchIndexReq) `mir:"/sync/index"` SyncSearchIndex func(Get, web.SyncSearchIndexReq) `mir:"sync/index"`
// GetUserInfo 获取当前用户信息 // GetUserInfo 获取当前用户信息
GetUserInfo func(Get, web.UserInfoReq) web.UserInfoResp `mir:"/user/info"` GetUserInfo func(Get, web.UserInfoReq) web.UserInfoResp `mir:"user/info"`
// GetMessages 获取消息列表 // GetMessages 获取消息列表
GetMessages func(Get, web.GetMessagesReq) web.GetMessagesResp `mir:"/user/messages"` GetMessages func(Get, web.GetMessagesReq) web.GetMessagesResp `mir:"user/messages"`
// ReadMessage 标记未读消息已读 // ReadMessage 标记未读消息已读
ReadMessage func(Post, web.ReadMessageReq) `mir:"/user/message/read"` ReadMessage func(Post, web.ReadMessageReq) `mir:"user/message/read"`
// ReadAllMessage 标记所有未读消息已读 // ReadAllMessage 标记所有未读消息已读
ReadAllMessage func(Post, web.ReadAllMessageReq) `mir:"/user/message/readall"` ReadAllMessage func(Post, web.ReadAllMessageReq) `mir:"user/message/readall"`
// SendUserWhisper 发送用户私信 // SendUserWhisper 发送用户私信
SendUserWhisper func(Post, web.SendWhisperReq) `mir:"/user/whisper"` SendUserWhisper func(Post, web.SendWhisperReq) `mir:"user/whisper"`
// GetCollections 获取用户收藏列表 // GetCollections 获取用户收藏列表
GetCollections func(Get, web.GetCollectionsReq) web.GetCollectionsResp `mir:"/user/collections"` GetCollections func(Get, web.GetCollectionsReq) web.GetCollectionsResp `mir:"user/collections"`
// GetStars 获取用户点赞列表 // GetStars 获取用户点赞列表
GetStars func(Get, web.GetStarsReq) web.GetStarsResp `mir:"/user/stars"` GetStars func(Get, web.GetStarsReq) web.GetStarsResp `mir:"user/stars"`
// UserPhoneBind 绑定用户手机号 // UserPhoneBind 绑定用户手机号
UserPhoneBind func(Post, web.UserPhoneBindReq) `mir:"/user/phone"` UserPhoneBind func(Post, web.UserPhoneBindReq) `mir:"user/phone"`
// ChangePassword 修改密码 // ChangePassword 修改密码
ChangePassword func(Post, web.ChangePasswordReq) `mir:"/user/password"` ChangePassword func(Post, web.ChangePasswordReq) `mir:"user/password"`
// ChangeNickname 修改昵称 // ChangeNickname 修改昵称
ChangeNickname func(Post, web.ChangeNicknameReq) `mir:"/user/nickname"` ChangeNickname func(Post, web.ChangeNicknameReq) `mir:"user/nickname"`
// ChangeAvatar 修改头像 // ChangeAvatar 修改头像
ChangeAvatar func(Post, web.ChangeAvatarReq) `mir:"/user/avatar"` ChangeAvatar func(Post, web.ChangeAvatarReq) `mir:"user/avatar"`
// SuggestUsers 检索用户 // SuggestUsers 检索用户
SuggestUsers func(Get, web.SuggestUsersReq) web.SuggestUsersResp `mir:"/suggest/users"` SuggestUsers func(Get, web.SuggestUsersReq) web.SuggestUsersResp `mir:"suggest/users"`
// SuggestTags 检索标签 // SuggestTags 检索标签
SuggestTags func(Get, web.SuggestTagsReq) web.SuggestTagsResp `mir:"/suggest/tags"` SuggestTags func(Get, web.SuggestTagsReq) web.SuggestTagsResp `mir:"suggest/tags"`
// TweetStarStatus 获取动态点赞状态 // TweetStarStatus 获取动态点赞状态
TweetStarStatus func(Get, web.TweetStarStatusReq) web.TweetStarStatusResp `mir:"/post/star"` TweetStarStatus func(Get, web.TweetStarStatusReq) web.TweetStarStatusResp `mir:"post/star"`
// TweetCollectionStatus 获取动态收藏状态 // TweetCollectionStatus 获取动态收藏状态
TweetCollectionStatus func(Get, web.TweetCollectionStatusReq) web.TweetCollectionStatusResp `mir:"/post/collection"` TweetCollectionStatus func(Get, web.TweetCollectionStatusReq) web.TweetCollectionStatusResp `mir:"post/collection"`
} }

@ -1,29 +1,24 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
func init() {
Entry[Followship]()
}
// Followship 关注者模式 服务 // Followship 关注者模式 服务
type Followship struct { type Followship struct {
Chain `mir:"-"` Schema `mir:"v1,chain"`
Group `mir:"v1"`
// FollowUser 关注用户 // FollowUser 关注用户
FollowUser func(Post, web.FollowUserReq) `mir:"/user/follow"` FollowUser func(Post, web.FollowUserReq) `mir:"user/follow"`
// UnfollowUser 取消关注用户 // UnfollowUser 取消关注用户
UnfollowUser func(Post, web.UnfollowUserReq) `mir:"/user/unfollow"` UnfollowUser func(Post, web.UnfollowUserReq) `mir:"user/unfollow"`
// ListFollows 获取用户的关注列表 // ListFollows 获取用户的关注列表
ListFollows func(Get, web.ListFollowsReq) web.ListFollowsResp `mir:"/user/follows"` ListFollows func(Get, web.ListFollowsReq) web.ListFollowsResp `mir:"user/follows"`
// ListFollowings 获取用户的追随者列表 // ListFollowings 获取用户的追随者列表
ListFollowings func(Get, web.ListFollowingsReq) web.ListFollowingsResp `mir:"/user/followings"` ListFollowings func(Get, web.ListFollowingsReq) web.ListFollowingsResp `mir:"user/followings"`
} }

@ -1,32 +1,27 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
func init() {
Entry[Friendship]()
}
// Friendship 好友模式 服务 // Friendship 好友模式 服务
type Friendship struct { type Friendship struct {
Chain `mir:"-"` Schema `mir:"v1,chain"`
Group `mir:"v1"`
// RequestingFriend 请求添加朋友 // RequestingFriend 请求添加朋友
RequestingFriend func(Post, web.RequestingFriendReq) `mir:"/friend/requesting" binding:"json"` RequestingFriend func(Post, web.RequestingFriendReq) `mir:"friend/requesting" binding:"json"`
// AddFriend 同意添加好友 // AddFriend 同意添加好友
AddFriend func(Post, web.AddFriendReq) `mir:"/friend/add" binding:"json"` AddFriend func(Post, web.AddFriendReq) `mir:"friend/add" binding:"json"`
// RejectFriend 拒绝添加好友 // RejectFriend 拒绝添加好友
RejectFriend func(Post, web.RejectFriendReq) `mir:"/friend/reject" binding:"json"` RejectFriend func(Post, web.RejectFriendReq) `mir:"friend/reject" binding:"json"`
// DeleteFriend 删除好友 // DeleteFriend 删除好友
DeleteFriend func(Post, web.DeleteFriendReq) `mir:"/friend/delete" binding:"json"` DeleteFriend func(Post, web.DeleteFriendReq) `mir:"friend/delete" binding:"json"`
// GetContacts 获取好友列表 // GetContacts 获取好友列表
GetContacts func(Get, web.GetContactsReq) web.GetContactsResp `mir:"/user/contacts"` GetContacts func(Get, web.GetContactsReq) web.GetContactsResp `mir:"user/contacts"`
} }

@ -1,35 +1,30 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
func init() {
Entry[Loose]()
}
// Loose 宽松授权的服务 // Loose 宽松授权的服务
type Loose struct { type Loose struct {
Chain `mir:"-"` Schema `mir:"v1,chain"`
Group `mir:"v1"`
// Timeline 获取广场流 // Timeline 获取广场流
Timeline func(Get, web.TimelineReq) web.TimelineResp `mir:"/posts"` Timeline func(Get, web.TimelineReq) web.TimelineResp `mir:"posts"`
// GetUserTweets 获取用户动态列表 // GetUserTweets 获取用户动态列表
GetUserTweets func(Get, web.GetUserTweetsReq) web.GetUserTweetsResp `mir:"/user/posts"` GetUserTweets func(Get, web.GetUserTweetsReq) web.GetUserTweetsResp `mir:"user/posts"`
// GetUserProfile 获取用户基本信息 // GetUserProfile 获取用户基本信息
GetUserProfile func(Get, web.GetUserProfileReq) web.GetUserProfileResp `mir:"/user/profile"` GetUserProfile func(Get, web.GetUserProfileReq) web.GetUserProfileResp `mir:"user/profile"`
// TopicList 获取话题列表 // TopicList 获取话题列表
TopicList func(Get, web.TopicListReq) web.TopicListResp `mir:"/tags"` TopicList func(Get, web.TopicListReq) web.TopicListResp `mir:"tags"`
// TweetComments 获取动态评论 // TweetComments 获取动态评论
TweetComments func(Get, web.TweetCommentsReq) web.TweetCommentsResp `mir:"/post/comments"` TweetComments func(Get, web.TweetCommentsReq) web.TweetCommentsResp `mir:"post/comments"`
// TweetDetail 获取动态详情 // TweetDetail 获取动态详情
TweetDetail func(Get, web.TweetDetailReq) web.TweetDetailResp `mir:"/post"` TweetDetail func(Get, web.TweetDetailReq) web.TweetDetailResp `mir:"post"`
} }

@ -1,89 +1,84 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
func init() {
Entry[Priv]()
}
// Priv 私有授权的服务 // Priv 私有授权的服务
type Priv struct { type Priv struct {
Chain `mir:"-"` Schema `mir:"v1,chain"`
Group `mir:"v1"`
// UploadAttachment 上传资源 // UploadAttachment 上传资源
UploadAttachment func(Post, web.UploadAttachmentReq) web.UploadAttachmentResp `mir:"/attachment"` UploadAttachment func(Post, web.UploadAttachmentReq) web.UploadAttachmentResp `mir:"attachment"`
// DownloadAttachmentPrecheck 下载资源预检 // DownloadAttachmentPrecheck 下载资源预检
DownloadAttachmentPrecheck func(Get, web.DownloadAttachmentPrecheckReq) web.DownloadAttachmentPrecheckResp `mir:"/attachment/precheck"` DownloadAttachmentPrecheck func(Get, web.DownloadAttachmentPrecheckReq) web.DownloadAttachmentPrecheckResp `mir:"attachment/precheck"`
// DownloadAttachment 下载资源 // DownloadAttachment 下载资源
DownloadAttachment func(Get, web.DownloadAttachmentReq) web.DownloadAttachmentResp `mir:"/attachment"` DownloadAttachment func(Get, web.DownloadAttachmentReq) web.DownloadAttachmentResp `mir:"attachment"`
// CreateTweet 发布动态 // CreateTweet 发布动态
CreateTweet func(Post, Chain, web.CreateTweetReq) web.CreateTweetResp `mir:"/post"` CreateTweet func(Post, Chain, web.CreateTweetReq) web.CreateTweetResp `mir:"post"`
// DeleteTweet 删除动态 // DeleteTweet 删除动态
DeleteTweet func(Delete, web.DeleteTweetReq) `mir:"/post"` DeleteTweet func(Delete, web.DeleteTweetReq) `mir:"post"`
// StarTweet 动态点赞操作 // StarTweet 动态点赞操作
StarTweet func(Post, web.StarTweetReq) web.StarTweetResp `mir:"/post/star"` StarTweet func(Post, web.StarTweetReq) web.StarTweetResp `mir:"post/star"`
// CollectionTweet 动态收藏操作 // CollectionTweet 动态收藏操作
CollectionTweet func(Post, web.CollectionTweetReq) web.CollectionTweetResp `mir:"/post/collection"` CollectionTweet func(Post, web.CollectionTweetReq) web.CollectionTweetResp `mir:"post/collection"`
// LockTweet 锁定动态 // LockTweet 锁定动态
LockTweet func(Post, web.LockTweetReq) web.LockTweetResp `mir:"/post/lock"` LockTweet func(Post, web.LockTweetReq) web.LockTweetResp `mir:"post/lock"`
// StickTweet 置顶动态 // StickTweet 置顶动态
StickTweet func(Post, web.StickTweetReq) web.StickTweetResp `mir:"/post/stick"` StickTweet func(Post, web.StickTweetReq) web.StickTweetResp `mir:"post/stick"`
// HighlightTweet 推文亮点设置 // HighlightTweet 推文亮点设置
HighlightTweet func(Post, web.HighlightTweetReq) web.HighlightTweetResp `mir:"/post/highlight"` HighlightTweet func(Post, web.HighlightTweetReq) web.HighlightTweetResp `mir:"post/highlight"`
// VisibleTweet 修改动态可见度 // VisibleTweet 修改动态可见度
VisibleTweet func(Post, web.VisibleTweetReq) web.VisibleTweetResp `mir:"/post/visibility"` VisibleTweet func(Post, web.VisibleTweetReq) web.VisibleTweetResp `mir:"post/visibility"`
// CreateTweetComment 发布动态评论 // CreateTweetComment 发布动态评论
CreateComment func(Post, web.CreateCommentReq) web.CreateCommentResp `mir:"/post/comment"` CreateComment func(Post, web.CreateCommentReq) web.CreateCommentResp `mir:"post/comment"`
// DeletePostComment 删除动态评论 // DeletePostComment 删除动态评论
DeleteComment func(Delete, web.DeleteCommentReq) `mir:"/post/comment"` DeleteComment func(Delete, web.DeleteCommentReq) `mir:"post/comment"`
// HighlightComment 精选动态评论 // HighlightComment 精选动态评论
HighlightComment func(Post, web.HighlightCommentReq) web.HighlightCommentResp `mir:"/post/comment/highlight"` HighlightComment func(Post, web.HighlightCommentReq) web.HighlightCommentResp `mir:"post/comment/highlight"`
// CreateCommentReply 发布评论回复 // CreateCommentReply 发布评论回复
CreateCommentReply func(Post, web.CreateCommentReplyReq) web.CreateCommentReplyResp `mir:"/post/comment/reply"` CreateCommentReply func(Post, web.CreateCommentReplyReq) web.CreateCommentReplyResp `mir:"post/comment/reply"`
// DeleteCommentReply 删除评论回复 // DeleteCommentReply 删除评论回复
DeleteCommentReply func(Delete, web.DeleteCommentReplyReq) `mir:"/post/comment/reply"` DeleteCommentReply func(Delete, web.DeleteCommentReplyReq) `mir:"post/comment/reply"`
// ThumbsUpTweetComment 点赞评论 // ThumbsUpTweetComment 点赞评论
ThumbsUpTweetComment func(Post, web.TweetCommentThumbsReq) `mir:"/tweet/comment/thumbsup"` ThumbsUpTweetComment func(Post, web.TweetCommentThumbsReq) `mir:"tweet/comment/thumbsup"`
// ThumbsDownTweetComment 点踩评论 // ThumbsDownTweetComment 点踩评论
ThumbsDownTweetComment func(Post, web.TweetCommentThumbsReq) `mir:"/tweet/comment/thumbsdown"` ThumbsDownTweetComment func(Post, web.TweetCommentThumbsReq) `mir:"tweet/comment/thumbsdown"`
// ThumbsUpTweetReply 点赞评论回复· // ThumbsUpTweetReply 点赞评论回复·
ThumbsUpTweetReply func(Post, web.TweetReplyThumbsReq) `mir:"/tweet/reply/thumbsup"` ThumbsUpTweetReply func(Post, web.TweetReplyThumbsReq) `mir:"tweet/reply/thumbsup"`
// ThumbsDownTweetReply 点踩评论回复 // ThumbsDownTweetReply 点踩评论回复
ThumbsDownTweetReply func(Post, web.TweetReplyThumbsReq) `mir:"/tweet/reply/thumbsdown"` ThumbsDownTweetReply func(Post, web.TweetReplyThumbsReq) `mir:"tweet/reply/thumbsdown"`
// StickTopic 置顶话题 // StickTopic 置顶话题
StickTopic func(Post, web.StickTopicReq) web.StickTopicResp `mir:"/topic/stick"` StickTopic func(Post, web.StickTopicReq) web.StickTopicResp `mir:"topic/stick"`
// PinTopic 钉住话题 // PinTopic 钉住话题
PinTopic func(Post, web.PinTopicReq) web.PinTopicResp `mir:"/topic/pin"` PinTopic func(Post, web.PinTopicReq) web.PinTopicResp `mir:"topic/pin"`
// FollowTopic 关注话题 // FollowTopic 关注话题
FollowTopic func(Post, web.FollowTopicReq) `mir:"/topic/follow"` FollowTopic func(Post, web.FollowTopicReq) `mir:"topic/follow"`
// UnfollowTopic 取消关注话题 // UnfollowTopic 取消关注话题
UnfollowTopic func(Post, web.UnfollowTopicReq) `mir:"/topic/unfollow"` UnfollowTopic func(Post, web.UnfollowTopicReq) `mir:"topic/unfollow"`
} }

@ -1,18 +1,14 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
func init() {
Entry[Pub]()
}
// Pub 不用授权的公开服务 // Pub 不用授权的公开服务
type Pub struct { type Pub struct {
Group `mir:"v1"` Schema `mir:"v1"`
// Version 获取后台版本信息 // Version 获取后台版本信息
Version func(Get) web.VersionResp `mir:"/"` Version func(Get) web.VersionResp `mir:"/"`

@ -1,20 +1,15 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
func init() {
Entry[Relax]()
}
// Relax 放宽授权的服务 // Relax 放宽授权的服务
type Relax struct { type Relax struct {
Chain `mir:"-"` Schema `mir:"v1,chain"`
Group `mir:"v1"`
// GetUnreadMsgCount 获取当前用户未读消息数量 // GetUnreadMsgCount 获取当前用户未读消息数量
GetUnreadMsgCount func(Get, Chain, web.GetUnreadMsgCountReq) web.GetUnreadMsgCountResp `mir:"/user/msgcount/unread"` GetUnreadMsgCount func(Get, Chain, web.GetUnreadMsgCountReq) web.GetUnreadMsgCountResp `mir:"user/msgcount/unread"`
} }

@ -1,22 +1,18 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
func init() {
Entry[Site]()
}
// Site 站点本身相关的信息服务 // Site 站点本身相关的信息服务
type Site struct { type Site struct {
Group `mir:"v1"` Schema `mir:"v1"`
// Version 获取后台版本信息 // Version 获取后台版本信息
Version func(Get) web.VersionResp `mir:"/site/version"` Version func(Get) web.VersionResp `mir:"site/version"`
// Profile 站点配置概要信息 // Profile 站点配置概要信息
Profile func(Get) web.SiteProfileResp `mir:"/site/profile"` Profile func(Get) web.SiteProfileResp `mir:"site/profile"`
} }

@ -1,20 +1,15 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v4" . "github.com/alimy/mir/v5"
. "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
func init() {
Entry[Trends]()
}
// Trends 动态相关 服务 // Trends 动态相关 服务
type Trends struct { type Trends struct {
Chain `mir:"-"` Schema `mir:"v1,chain"`
Group `mir:"v1"`
// GetIndexTrends 获取广场页面动态条栏的索引item // GetIndexTrends 获取广场页面动态条栏的索引item
GetIndexTrends func(Get, web.GetIndexTrendsReq) web.GetIndexTrendsResp `mir:"/trends/index"` GetIndexTrends func(Get, web.GetIndexTrendsReq) web.GetIndexTrendsResp `mir:"trends/index"`
} }

@ -9,7 +9,7 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/alimy/mir/v4" "github.com/alimy/mir/v5"
) )
var ( var (

Loading…
Cancel
Save