mirror of https://github.com/rocboss/paopao-ce
parent
335d6e0e7d
commit
4600fcc1e2
@ -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,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"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue