optimize web interface defile in mirc

pull/249/head
Michael Li 2 years ago
parent 842fabe85d
commit 77c768fa12
No known key found for this signature in database

@ -6,7 +6,7 @@
"type": "go", "type": "go",
"request": "launch", "request": "launch",
"mode": "exec", "mode": "exec",
"program": "${fileDirname}/__debug_bin", "program": "${workspaceFolder}/.vscode/__debug_bin",
"preLaunchTask": "go: build (debug)", "preLaunchTask": "go: build (debug)",
"cwd": "${workspaceFolder}" "cwd": "${workspaceFolder}"
} }

@ -35,8 +35,8 @@ type LoginResp struct {
} }
type User struct { type User struct {
Chain Chain `mir:"-"` Chain `mir:"-"`
Group Group `mir:"m/v1"` 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/"`
} }

@ -35,8 +35,8 @@ type LoginResp struct {
} }
type User struct { type User struct {
Chain Chain `mir:"-"` Chain `mir:"-"`
Group Group `mir:"r/v1"` 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/"`
} }

@ -35,7 +35,7 @@ type LoginResp struct {
} }
type User struct { type User struct {
Group Group `mir:"s/v1"` Group `mir:"s/v1"`
Index func(Get) `mir:"/index/"` Index func(Get) `mir:"/index/"`
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/"`

@ -35,8 +35,8 @@ type LoginResp struct {
} }
type User struct { type User struct {
Chain Chain `mir:"-"` Chain `mir:"-"`
Group Group `mir:"x/v1"` 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/"`
} }

@ -12,8 +12,8 @@ func init() {
// Admin 运维相关服务 // Admin 运维相关服务
type Admin struct { type Admin struct {
Chain Chain `mir:"-"` Chain `mir:"-"`
Group Group `mir:"v1"` Group `mir:"v1"`
// ChangeUserStatus 管理·禁言/解封用户 // ChangeUserStatus 管理·禁言/解封用户
ChangeUserStatus func(Post, web.ChangeUserStatusReq) `mir:"/admin/user/status"` ChangeUserStatus func(Post, web.ChangeUserStatusReq) `mir:"/admin/user/status"`

@ -12,7 +12,7 @@ func init() {
// AlipayPub 支付宝相关不用授权的服务 // AlipayPub 支付宝相关不用授权的服务
type AlipayPub struct { type AlipayPub struct {
Group Group `mir:"v1"` Group `mir:"v1"`
// AlipayNotify 支付宝回调 // AlipayNotify 支付宝回调
AlipayNotify func(Post, web.AlipayNotifyReq) `mir:"/alipay/notify"` AlipayNotify func(Post, web.AlipayNotifyReq) `mir:"/alipay/notify"`

@ -12,8 +12,8 @@ func init() {
// Core 核心服务,需要授权访问 // Core 核心服务,需要授权访问
type Core struct { type Core struct {
Chain Chain `mir:"-"` Chain `mir:"-"`
Group Group `mir:"v1"` Group `mir:"v1"`
// SyncSearchIndex 同步索引 // SyncSearchIndex 同步索引
SyncSearchIndex func(Get, web.SyncSearchIndexReq) `mir:"/sync/index"` SyncSearchIndex func(Get, web.SyncSearchIndexReq) `mir:"/sync/index"`

@ -12,8 +12,8 @@ func init() {
// Followship 关注者模式 服务 // Followship 关注者模式 服务
type Followship struct { type Followship struct {
Chain Chain `mir:"-"` Chain `mir:"-"`
Group Group `mir:"v1"` Group `mir:"v1"`
// AddFollowing 添加关注 // AddFollowing 添加关注
AddFollowing func(Post, web.AddFollowingReq) `mir:"/following/add"` AddFollowing func(Post, web.AddFollowingReq) `mir:"/following/add"`

@ -12,8 +12,8 @@ func init() {
// Friendship 好友模式 服务 // Friendship 好友模式 服务
type Friendship struct { type Friendship struct {
Chain Chain `mir:"-"` Chain `mir:"-"`
Group Group `mir:"v1"` Group `mir:"v1"`
// RequestingFriend 请求添加朋友 // RequestingFriend 请求添加朋友
RequestingFriend func(Post, web.RequestingFriendReq) `mir:"/friend/requesting"` RequestingFriend func(Post, web.RequestingFriendReq) `mir:"/friend/requesting"`

@ -12,8 +12,8 @@ func init() {
// Loose 宽松授权的服务 // Loose 宽松授权的服务
type Loose struct { type Loose struct {
Chain Chain `mir:"-"` Chain `mir:"-"`
Group Group `mir:"v1"` Group `mir:"v1"`
// Timeline 获取广场流 // Timeline 获取广场流
Timeline func(Get, web.TimelineReq) web.TimelineResp `mir:"/posts"` Timeline func(Get, web.TimelineReq) web.TimelineResp `mir:"/posts"`

@ -12,8 +12,8 @@ func init() {
// Priv 私有授权的服务 // Priv 私有授权的服务
type Priv struct { type Priv struct {
Chain Chain `mir:"-"` Chain `mir:"-"`
Group Group `mir:"v1"` Group `mir:"v1"`
// UploadAttachment 上传资源 // UploadAttachment 上传资源
UploadAttachment func(Post, web.UploadAttachmentReq) web.UploadAttachmentResp `mir:"/attachment"` UploadAttachment func(Post, web.UploadAttachmentReq) web.UploadAttachmentResp `mir:"/attachment"`

@ -12,7 +12,7 @@ func init() {
// Pub 不用授权的公开服务 // Pub 不用授权的公开服务
type Pub struct { type Pub struct {
Group Group `mir:"v1"` Group `mir:"v1"`
// Version 获取后台版本信息 // Version 获取后台版本信息
Version func(Get) web.VersionResp `mir:"/"` Version func(Get) web.VersionResp `mir:"/"`

Loading…
Cancel
Save