u
This commit is contained in:
1 parent
f7b0c6ad2f
commit
e81f605999
23 files changed
+1286
-413
No files matched your search
@@ -11,6 +11,7 @@ import (
|
||||
"context"
|
||||
|
||||
money "cn/oneao/base-go/biz/model/money"
|
||||
|
||||
"github.com/cloudwego/hertz/pkg/app"
|
||||
"github.com/cloudwego/hertz/pkg/protocol/consts"
|
||||
)
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
"context"
|
||||
|
||||
space "cn/oneao/base-go/biz/model/space"
|
||||
|
||||
"github.com/cloudwego/hertz/pkg/app"
|
||||
"github.com/cloudwego/hertz/pkg/protocol/consts"
|
||||
)
|
||||
@@ -73,23 +74,93 @@ func InsertSpace(ctx context.Context, c *app.RequestContext) {
|
||||
// 如果存在,继续循环重新生成
|
||||
}
|
||||
|
||||
// 创建空间
|
||||
spaceId := idgen.NextId()
|
||||
params := repo.InsertSpaceParams{
|
||||
ID: spaceId,
|
||||
InviteCode: inviteCode,
|
||||
}
|
||||
|
||||
err = db.Queries.InsertSpace(ctx, params)
|
||||
err = db.WithTx(ctx, func(q *repo.Queries) error {
|
||||
// 创建空间
|
||||
params := repo.InsertSpaceParams{
|
||||
ID: spaceId,
|
||||
InviteCode: inviteCode,
|
||||
}
|
||||
|
||||
err = q.InsertSpace(ctx, params)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// 将创建用户默认添加到该空间内
|
||||
userParams := repo.InsertSpaceUserParams{
|
||||
ID: idgen.NextId(),
|
||||
SpaceID: spaceId,
|
||||
UserID: userID,
|
||||
Role: 0,
|
||||
}
|
||||
err := q.InsertSpaceUser(ctx, userParams)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
errorx.AddError(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
var resp space.InsertSpaceResult
|
||||
resp.Id = spaceId
|
||||
resp.InviteCode = inviteCode
|
||||
resp := &space.InsertSpaceResult{
|
||||
Id: spaceId,
|
||||
InviteCode: inviteCode,
|
||||
}
|
||||
|
||||
response.Success(c).Data(resp).Send()
|
||||
}
|
||||
|
||||
// DeleteSpace .
|
||||
// @router /space/delete [POST]
|
||||
func DeleteSpace(ctx context.Context, c *app.RequestContext) {
|
||||
var err error
|
||||
var req space.DeleteSpaceParams
|
||||
err = c.BindAndValidate(&req)
|
||||
if err != nil {
|
||||
c.String(consts.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
userID := middleware.GetUserID(ctx)
|
||||
spaceByUserId, err := db.Queries.GetSpaceByUserId(ctx, userID)
|
||||
|
||||
if err != nil {
|
||||
if errorx.IsNotFound(err) {
|
||||
response.Success(c).Send()
|
||||
return
|
||||
} else {
|
||||
errorx.AddError(c, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
spaceId := spaceByUserId.ID
|
||||
|
||||
err = db.WithTx(ctx, func(q *repo.Queries) error {
|
||||
err := q.DeleteSpace(ctx, spaceId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = q.DeleteSpaceUserAll(ctx, spaceId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
errorx.AddError(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
response.Success(c).Send()
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
// Code generated by hertz generator.
|
||||
|
||||
package space
|
||||
|
||||
import (
|
||||
space "cn/oneao/base-go/biz/model/space"
|
||||
"cn/oneao/base-go/biz/router/middleware"
|
||||
"cn/oneao/base-go/db"
|
||||
"cn/oneao/base-go/db/repo"
|
||||
"cn/oneao/base-go/utils/errorx"
|
||||
"cn/oneao/base-go/utils/response"
|
||||
"context"
|
||||
|
||||
"github.com/cloudwego/hertz/pkg/app"
|
||||
"github.com/cloudwego/hertz/pkg/protocol/consts"
|
||||
)
|
||||
|
||||
// ExitSpace .
|
||||
// @router /space_user/exit [POST]
|
||||
func ExitSpace(ctx context.Context, c *app.RequestContext) {
|
||||
var err error
|
||||
var req space.ExitSpaceParams
|
||||
err = c.BindAndValidate(&req)
|
||||
if err != nil {
|
||||
c.String(consts.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
userID := middleware.GetUserID(ctx)
|
||||
|
||||
err = db.Queries.DeleteSpaceUser(ctx, userID)
|
||||
|
||||
if err != nil {
|
||||
errorx.AddError(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
response.Success(c).Send()
|
||||
}
|
||||
|
||||
// ListSpaceUsers .
|
||||
// @router /space_user/list [POST]
|
||||
func ListSpaceUsers(ctx context.Context, c *app.RequestContext) {
|
||||
var err error
|
||||
var req space.ListSpaceUsersParams
|
||||
err = c.BindAndValidate(&req)
|
||||
if err != nil {
|
||||
c.String(consts.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
spaceId := req.SpaceId
|
||||
|
||||
users, err := db.Queries.ListSpaceUsers(ctx, spaceId)
|
||||
|
||||
if err != nil {
|
||||
errorx.AddError(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp := &space.ListSpaceUsersResult{}
|
||||
for _, u := range users {
|
||||
resp.Users = append(resp.Users, &space.SpaceUser{
|
||||
UserId: u.UserID,
|
||||
Username: u.Username.String,
|
||||
SpaceRole: u.Role,
|
||||
})
|
||||
}
|
||||
|
||||
response.Success(c).Data(resp).Send()
|
||||
}
|
||||
|
||||
// RemoveSpaceUser .
|
||||
// @router /space_user/remove [POST]
|
||||
func RemoveSpaceUser(ctx context.Context, c *app.RequestContext) {
|
||||
var req space.RemoveSpaceUserParams
|
||||
if err := c.BindAndValidate(&req); err != nil {
|
||||
c.String(consts.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
spaceId := req.SpaceId
|
||||
delUserId := req.UserId
|
||||
userID := middleware.GetUserID(ctx)
|
||||
|
||||
if userID == delUserId {
|
||||
response.Fail(c).Message("请退出空间或解散空间").Send()
|
||||
return
|
||||
}
|
||||
|
||||
// 当前操作者信息
|
||||
spaceUser, err := db.Queries.GetSpaceUserByUserId(ctx, userID)
|
||||
if err != nil {
|
||||
if errorx.IsNotFound(err) {
|
||||
response.Fail(c).Message("权限不足").Send()
|
||||
return
|
||||
}
|
||||
errorx.AddError(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
if spaceUser.SpaceID != spaceId {
|
||||
response.Fail(c).Message("权限不足").Send()
|
||||
return
|
||||
}
|
||||
|
||||
if spaceUser.Role != 0 && spaceUser.Role != 1 {
|
||||
response.Fail(c).Message("权限不足").Send()
|
||||
return
|
||||
}
|
||||
|
||||
// 被踢用户是否在该空间
|
||||
targetUser, err := db.Queries.GetSpaceUserByUserId(ctx, delUserId)
|
||||
if err != nil {
|
||||
if errorx.IsNotFound(err) {
|
||||
response.Success(c).Message("用户不在空间").Send()
|
||||
return
|
||||
}
|
||||
errorx.AddError(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
if targetUser.SpaceID != spaceId {
|
||||
response.Fail(c).Message("用户不在该空间").Send()
|
||||
return
|
||||
}
|
||||
|
||||
// 删除
|
||||
err = db.Queries.DeleteSpaceUser(ctx, delUserId)
|
||||
|
||||
if err != nil {
|
||||
errorx.AddError(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
response.Success(c).Message("移除成功").Send()
|
||||
}
|
||||
|
||||
// UpdateSpaceUserRole .
|
||||
// @router /space_user/updateRole [POST]
|
||||
func UpdateSpaceUserRole(ctx context.Context, c *app.RequestContext) {
|
||||
var req space.UpdateSpaceUserRoleParams
|
||||
if err := c.BindAndValidate(&req); err != nil {
|
||||
c.String(consts.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// 1. 获取当前操作者信息
|
||||
userID := middleware.GetUserID(ctx)
|
||||
operator, err := db.Queries.GetSpaceUserByUserId(ctx, userID)
|
||||
if err != nil {
|
||||
if errorx.IsNotFound(err) {
|
||||
response.Fail(c).Message("权限不足").Send()
|
||||
return
|
||||
}
|
||||
errorx.AddError(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// 2. 检查操作者是否属于该空间
|
||||
if operator.SpaceID != req.SpaceId {
|
||||
response.Fail(c).Message("权限不足").Send()
|
||||
return
|
||||
}
|
||||
|
||||
// 3. 权限检查:只有创建者或管理员可以修改他人角色
|
||||
// 假设 Role: 0=创建者, 1=管理员, 2=普通成员
|
||||
if operator.Role != 0 && operator.Role != 1 {
|
||||
response.Fail(c).Message("权限不足").Send()
|
||||
return
|
||||
}
|
||||
|
||||
// 4. 校验目标 Role 是否合法
|
||||
if req.Role != 1 && req.Role != 2 {
|
||||
response.Fail(c).Message("Role 只能是 1 或 2").Send()
|
||||
return
|
||||
}
|
||||
|
||||
// 5. 获取被修改的用户
|
||||
targetUser, err := db.Queries.GetSpaceUserByUserId(ctx, req.UserId)
|
||||
if err != nil {
|
||||
if errorx.IsNotFound(err) {
|
||||
response.Fail(c).Message("目标用户不存在").Send()
|
||||
return
|
||||
}
|
||||
errorx.AddError(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
if targetUser.SpaceID != req.SpaceId {
|
||||
response.Fail(c).Message("目标用户不在该空间").Send()
|
||||
return
|
||||
}
|
||||
|
||||
// 6. 执行更新
|
||||
err = db.Queries.UpdateSpaceUserRole(ctx, repo.UpdateSpaceUserRoleParams{
|
||||
SpaceID: req.SpaceId,
|
||||
UserID: req.UserId,
|
||||
Role: req.Role,
|
||||
})
|
||||
if err != nil {
|
||||
errorx.AddError(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
response.Success(c).Data().Send()
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v4.25.3
|
||||
// protoc v6.33.1
|
||||
// source: api.proto
|
||||
|
||||
package api
|
||||
|
||||
+17
-17
@@ -1,8 +1,8 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v4.25.3
|
||||
// source: index.proto
|
||||
// protoc v6.33.1
|
||||
// source: money.proto
|
||||
|
||||
package money
|
||||
|
||||
@@ -20,10 +20,10 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
var File_index_proto protoreflect.FileDescriptor
|
||||
var File_money_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_index_proto_rawDesc = []byte{
|
||||
0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d,
|
||||
var file_money_proto_rawDesc = []byte{
|
||||
0x0a, 0x0b, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d,
|
||||
0x6f, 0x6e, 0x65, 0x79, 0x1a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x20, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x63, 0x61, 0x74,
|
||||
0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
@@ -87,7 +87,7 @@ var file_index_proto_rawDesc = []byte{
|
||||
0x6f, 0x6e, 0x65, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var file_index_proto_goTypes = []interface{}{
|
||||
var file_money_proto_goTypes = []interface{}{
|
||||
(*QueryMoneyCategoryReq)(nil), // 0: money.QueryMoneyCategoryReq
|
||||
(*DeleteMoneyCategoryReq)(nil), // 1: money.DeleteMoneyCategoryReq
|
||||
(*UpdateMoneyCategorySortReq)(nil), // 2: money.UpdateMoneyCategorySortReq
|
||||
@@ -103,7 +103,7 @@ var file_index_proto_goTypes = []interface{}{
|
||||
(*UpdateMoneyRecordResult)(nil), // 12: money.UpdateMoneyRecordResult
|
||||
(*DeleteMoneyRecordResult)(nil), // 13: money.DeleteMoneyRecordResult
|
||||
}
|
||||
var file_index_proto_depIdxs = []int32{
|
||||
var file_money_proto_depIdxs = []int32{
|
||||
0, // 0: money.MoneyCategoryService.QueryUserMoneyCategory:input_type -> money.QueryMoneyCategoryReq
|
||||
1, // 1: money.MoneyCategoryService.DeleteUserMoneyCategory:input_type -> money.DeleteMoneyCategoryReq
|
||||
2, // 2: money.MoneyCategoryService.UpdateMoneyCategorySort:input_type -> money.UpdateMoneyCategorySortReq
|
||||
@@ -125,9 +125,9 @@ var file_index_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_index_proto_init() }
|
||||
func file_index_proto_init() {
|
||||
if File_index_proto != nil {
|
||||
func init() { file_money_proto_init() }
|
||||
func file_money_proto_init() {
|
||||
if File_money_proto != nil {
|
||||
return
|
||||
}
|
||||
file_money_money_category_types_proto_init()
|
||||
@@ -136,17 +136,17 @@ func file_index_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_index_proto_rawDesc,
|
||||
RawDescriptor: file_money_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 2,
|
||||
},
|
||||
GoTypes: file_index_proto_goTypes,
|
||||
DependencyIndexes: file_index_proto_depIdxs,
|
||||
GoTypes: file_money_proto_goTypes,
|
||||
DependencyIndexes: file_money_proto_depIdxs,
|
||||
}.Build()
|
||||
File_index_proto = out.File
|
||||
file_index_proto_rawDesc = nil
|
||||
file_index_proto_goTypes = nil
|
||||
file_index_proto_depIdxs = nil
|
||||
File_money_proto = out.File
|
||||
file_money_proto_rawDesc = nil
|
||||
file_money_proto_goTypes = nil
|
||||
file_money_proto_depIdxs = nil
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v4.25.3
|
||||
// protoc v6.33.1
|
||||
// source: money/money_category_types.proto
|
||||
|
||||
package money
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v4.25.3
|
||||
// protoc v6.33.1
|
||||
// source: money/money_record_types.proto
|
||||
|
||||
package money
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v4.25.3
|
||||
// source: index.proto
|
||||
|
||||
package space
|
||||
|
||||
import (
|
||||
_ "cn/oneao/base-go/biz/model/api"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
var File_index_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_index_proto_rawDesc = []byte{
|
||||
0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x1a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x17, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70,
|
||||
0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x64, 0x0a, 0x0c, 0x53, 0x70, 0x61, 0x63,
|
||||
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x49, 0x6e, 0x73, 0x65,
|
||||
0x72, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e,
|
||||
0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x73, 0x1a, 0x18, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74,
|
||||
0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x11, 0xd2, 0xc1, 0x18,
|
||||
0x0d, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x42, 0x22,
|
||||
0x5a, 0x20, 0x63, 0x6e, 0x2f, 0x6f, 0x6e, 0x65, 0x61, 0x6f, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2d,
|
||||
0x67, 0x6f, 0x2f, 0x62, 0x69, 0x7a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var file_index_proto_goTypes = []interface{}{
|
||||
(*InsertSpaceParams)(nil), // 0: space.InsertSpaceParams
|
||||
(*InsertSpaceResult)(nil), // 1: space.InsertSpaceResult
|
||||
}
|
||||
var file_index_proto_depIdxs = []int32{
|
||||
0, // 0: space.SpaceService.InsertSpace:input_type -> space.InsertSpaceParams
|
||||
1, // 1: space.SpaceService.InsertSpace:output_type -> space.InsertSpaceResult
|
||||
1, // [1:2] is the sub-list for method output_type
|
||||
0, // [0:1] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_index_proto_init() }
|
||||
func file_index_proto_init() {
|
||||
if File_index_proto != nil {
|
||||
return
|
||||
}
|
||||
file_space_space_types_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_index_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_index_proto_goTypes,
|
||||
DependencyIndexes: file_index_proto_depIdxs,
|
||||
}.Build()
|
||||
File_index_proto = out.File
|
||||
file_index_proto_rawDesc = nil
|
||||
file_index_proto_goTypes = nil
|
||||
file_index_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v6.33.1
|
||||
// source: space.proto
|
||||
|
||||
package space
|
||||
|
||||
import (
|
||||
_ "cn/oneao/base-go/biz/model/api"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
var File_space_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_space_proto_rawDesc = []byte{
|
||||
0x0a, 0x0b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x1a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x17, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70,
|
||||
0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xba, 0x01, 0x0a, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x49, 0x6e, 0x73, 0x65, 0x72,
|
||||
0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x49,
|
||||
0x6e, 0x73, 0x65, 0x72, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
|
||||
0x1a, 0x18, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x53,
|
||||
0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x11, 0xd2, 0xc1, 0x18, 0x0d,
|
||||
0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x12, 0x54, 0x0a,
|
||||
0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x18, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
|
||||
0x22, 0x11, 0xd2, 0xc1, 0x18, 0x0d, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x64, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x32, 0xa5, 0x03, 0x0a, 0x10, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x65,
|
||||
0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x09, 0x45, 0x78, 0x69, 0x74,
|
||||
0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x45, 0x78,
|
||||
0x69, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x16, 0x2e,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x45, 0x78, 0x69, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52,
|
||||
0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x14, 0xd2, 0xc1, 0x18, 0x10, 0x2f, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x65, 0x78, 0x69, 0x74, 0x12, 0x60, 0x0a, 0x0e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x2e,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55,
|
||||
0x73, 0x65, 0x72, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1b, 0x2e, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72,
|
||||
0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x14, 0xd2, 0xc1, 0x18, 0x10, 0x2f, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x65, 0x0a,
|
||||
0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72,
|
||||
0x12, 0x1c, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53,
|
||||
0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1c,
|
||||
0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x70, 0x61,
|
||||
0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x16, 0xd2, 0xc1,
|
||||
0x18, 0x12, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x72, 0x65,
|
||||
0x6d, 0x6f, 0x76, 0x65, 0x12, 0x75, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x70,
|
||||
0x61, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x20, 0x2e, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55,
|
||||
0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x20, 0x2e,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x70, 0x61, 0x63,
|
||||
0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22,
|
||||
0x1a, 0xd2, 0xc1, 0x18, 0x16, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72,
|
||||
0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x22, 0x5a, 0x20, 0x63,
|
||||
0x6e, 0x2f, 0x6f, 0x6e, 0x65, 0x61, 0x6f, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2d, 0x67, 0x6f, 0x2f,
|
||||
0x62, 0x69, 0x7a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var file_space_proto_goTypes = []interface{}{
|
||||
(*InsertSpaceParams)(nil), // 0: space.InsertSpaceParams
|
||||
(*DeleteSpaceParams)(nil), // 1: space.DeleteSpaceParams
|
||||
(*ExitSpaceParams)(nil), // 2: space.ExitSpaceParams
|
||||
(*ListSpaceUsersParams)(nil), // 3: space.ListSpaceUsersParams
|
||||
(*RemoveSpaceUserParams)(nil), // 4: space.RemoveSpaceUserParams
|
||||
(*UpdateSpaceUserRoleParams)(nil), // 5: space.UpdateSpaceUserRoleParams
|
||||
(*InsertSpaceResult)(nil), // 6: space.InsertSpaceResult
|
||||
(*DeleteSpaceResult)(nil), // 7: space.DeleteSpaceResult
|
||||
(*ExitSpaceResult)(nil), // 8: space.ExitSpaceResult
|
||||
(*ListSpaceUsersResult)(nil), // 9: space.ListSpaceUsersResult
|
||||
(*RemoveSpaceUserResult)(nil), // 10: space.RemoveSpaceUserResult
|
||||
(*UpdateSpaceUserRoleResult)(nil), // 11: space.UpdateSpaceUserRoleResult
|
||||
}
|
||||
var file_space_proto_depIdxs = []int32{
|
||||
0, // 0: space.SpaceService.InsertSpace:input_type -> space.InsertSpaceParams
|
||||
1, // 1: space.SpaceService.DeleteSpace:input_type -> space.DeleteSpaceParams
|
||||
2, // 2: space.SpaceUserService.ExitSpace:input_type -> space.ExitSpaceParams
|
||||
3, // 3: space.SpaceUserService.ListSpaceUsers:input_type -> space.ListSpaceUsersParams
|
||||
4, // 4: space.SpaceUserService.RemoveSpaceUser:input_type -> space.RemoveSpaceUserParams
|
||||
5, // 5: space.SpaceUserService.UpdateSpaceUserRole:input_type -> space.UpdateSpaceUserRoleParams
|
||||
6, // 6: space.SpaceService.InsertSpace:output_type -> space.InsertSpaceResult
|
||||
7, // 7: space.SpaceService.DeleteSpace:output_type -> space.DeleteSpaceResult
|
||||
8, // 8: space.SpaceUserService.ExitSpace:output_type -> space.ExitSpaceResult
|
||||
9, // 9: space.SpaceUserService.ListSpaceUsers:output_type -> space.ListSpaceUsersResult
|
||||
10, // 10: space.SpaceUserService.RemoveSpaceUser:output_type -> space.RemoveSpaceUserResult
|
||||
11, // 11: space.SpaceUserService.UpdateSpaceUserRole:output_type -> space.UpdateSpaceUserRoleResult
|
||||
6, // [6:12] is the sub-list for method output_type
|
||||
0, // [0:6] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_space_proto_init() }
|
||||
func file_space_proto_init() {
|
||||
if File_space_proto != nil {
|
||||
return
|
||||
}
|
||||
file_space_space_types_proto_init()
|
||||
file_space_space_user_types_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_space_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 2,
|
||||
},
|
||||
GoTypes: file_space_proto_goTypes,
|
||||
DependencyIndexes: file_space_proto_depIdxs,
|
||||
}.Build()
|
||||
File_space_proto = out.File
|
||||
file_space_proto_rawDesc = nil
|
||||
file_space_proto_goTypes = nil
|
||||
file_space_proto_depIdxs = nil
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v4.25.3
|
||||
// protoc v6.33.1
|
||||
// source: space/space_types.proto
|
||||
|
||||
package space
|
||||
@@ -192,130 +192,6 @@ func (*DeleteSpaceResult) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_types_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
// 获取空间下的所有用户
|
||||
type QuerySpaceUsersParams struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SpaceId int64 `protobuf:"varint,1,opt,name=SpaceId,proto3" form:"space_id" json:"space_id" vd:"$ != 0"`
|
||||
}
|
||||
|
||||
func (x *QuerySpaceUsersParams) Reset() {
|
||||
*x = QuerySpaceUsersParams{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_types_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *QuerySpaceUsersParams) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*QuerySpaceUsersParams) ProtoMessage() {}
|
||||
|
||||
func (x *QuerySpaceUsersParams) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_types_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use QuerySpaceUsersParams.ProtoReflect.Descriptor instead.
|
||||
func (*QuerySpaceUsersParams) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_types_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *QuerySpaceUsersParams) GetSpaceId() int64 {
|
||||
if x != nil {
|
||||
return x.SpaceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SpaceUser struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *SpaceUser) Reset() {
|
||||
*x = SpaceUser{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_types_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SpaceUser) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SpaceUser) ProtoMessage() {}
|
||||
|
||||
func (x *SpaceUser) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_types_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SpaceUser.ProtoReflect.Descriptor instead.
|
||||
func (*SpaceUser) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_types_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
type QuerySpaceUsersResult struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *QuerySpaceUsersResult) Reset() {
|
||||
*x = QuerySpaceUsersResult{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_types_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *QuerySpaceUsersResult) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*QuerySpaceUsersResult) ProtoMessage() {}
|
||||
|
||||
func (x *QuerySpaceUsersResult) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_types_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use QuerySpaceUsersResult.ProtoReflect.Descriptor instead.
|
||||
func (*QuerySpaceUsersResult) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_types_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
var File_space_space_types_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_space_space_types_proto_rawDesc = []byte{
|
||||
@@ -331,17 +207,10 @@ var file_space_space_types_proto_rawDesc = []byte{
|
||||
0x64, 0x65, 0x52, 0x0a, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x13,
|
||||
0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72,
|
||||
0x61, 0x6d, 0x73, 0x22, 0x13, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x70, 0x61,
|
||||
0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x49, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72,
|
||||
0x79, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x73, 0x12, 0x30, 0x0a, 0x07, 0x53, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x03, 0x42, 0x16, 0xca, 0xbb, 0x18, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64,
|
||||
0xda, 0xbb, 0x18, 0x06, 0x24, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x52, 0x07, 0x53, 0x70, 0x61, 0x63,
|
||||
0x65, 0x49, 0x64, 0x22, 0x0b, 0x0a, 0x09, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72,
|
||||
0x22, 0x17, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73,
|
||||
0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x22, 0x5a, 0x20, 0x63, 0x6e, 0x2f,
|
||||
0x6f, 0x6e, 0x65, 0x61, 0x6f, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x62, 0x69,
|
||||
0x7a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x22, 0x5a, 0x20, 0x63, 0x6e, 0x2f, 0x6f,
|
||||
0x6e, 0x65, 0x61, 0x6f, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x62, 0x69, 0x7a,
|
||||
0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -356,15 +225,12 @@ func file_space_space_types_proto_rawDescGZIP() []byte {
|
||||
return file_space_space_types_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_space_space_types_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_space_space_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_space_space_types_proto_goTypes = []interface{}{
|
||||
(*InsertSpaceParams)(nil), // 0: space.InsertSpaceParams
|
||||
(*InsertSpaceResult)(nil), // 1: space.InsertSpaceResult
|
||||
(*DeleteSpaceParams)(nil), // 2: space.DeleteSpaceParams
|
||||
(*DeleteSpaceResult)(nil), // 3: space.DeleteSpaceResult
|
||||
(*QuerySpaceUsersParams)(nil), // 4: space.QuerySpaceUsersParams
|
||||
(*SpaceUser)(nil), // 5: space.SpaceUser
|
||||
(*QuerySpaceUsersResult)(nil), // 6: space.QuerySpaceUsersResult
|
||||
(*InsertSpaceParams)(nil), // 0: space.InsertSpaceParams
|
||||
(*InsertSpaceResult)(nil), // 1: space.InsertSpaceResult
|
||||
(*DeleteSpaceParams)(nil), // 2: space.DeleteSpaceParams
|
||||
(*DeleteSpaceResult)(nil), // 3: space.DeleteSpaceResult
|
||||
}
|
||||
var file_space_space_types_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
@@ -428,42 +294,6 @@ func file_space_space_types_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_space_space_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*QuerySpaceUsersParams); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_space_space_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SpaceUser); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_space_space_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*QuerySpaceUsersResult); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
@@ -471,7 +301,7 @@ func file_space_space_types_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_space_space_types_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v4.25.3
|
||||
// protoc v6.33.1
|
||||
// source: space/space_user_types.proto
|
||||
|
||||
package space
|
||||
@@ -21,17 +21,17 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 加入空间
|
||||
type InsertSpaceUserParams struct {
|
||||
// 获取空间下的成员
|
||||
type ListSpaceUsersParams struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
InviteCode int64 `protobuf:"varint,1,opt,name=InviteCode,proto3" form:"invite_code" json:"invite_code"` // 邀请码
|
||||
SpaceId int64 `protobuf:"varint,1,opt,name=SpaceId,proto3" form:"space_id" json:"space_id" vd:"$ != 0"`
|
||||
}
|
||||
|
||||
func (x *InsertSpaceUserParams) Reset() {
|
||||
*x = InsertSpaceUserParams{}
|
||||
func (x *ListSpaceUsersParams) Reset() {
|
||||
*x = ListSpaceUsersParams{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -39,13 +39,13 @@ func (x *InsertSpaceUserParams) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *InsertSpaceUserParams) String() string {
|
||||
func (x *ListSpaceUsersParams) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*InsertSpaceUserParams) ProtoMessage() {}
|
||||
func (*ListSpaceUsersParams) ProtoMessage() {}
|
||||
|
||||
func (x *InsertSpaceUserParams) ProtoReflect() protoreflect.Message {
|
||||
func (x *ListSpaceUsersParams) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -57,29 +57,30 @@ func (x *InsertSpaceUserParams) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use InsertSpaceUserParams.ProtoReflect.Descriptor instead.
|
||||
func (*InsertSpaceUserParams) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use ListSpaceUsersParams.ProtoReflect.Descriptor instead.
|
||||
func (*ListSpaceUsersParams) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_user_types_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *InsertSpaceUserParams) GetInviteCode() int64 {
|
||||
func (x *ListSpaceUsersParams) GetSpaceId() int64 {
|
||||
if x != nil {
|
||||
return x.InviteCode
|
||||
return x.SpaceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type InsertSpaceUserResult struct {
|
||||
type SpaceUser struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SpaceId int64 `protobuf:"varint,1,opt,name=SpaceId,proto3" form:"space_id" json:"space_id"`
|
||||
InviteCode string `protobuf:"bytes,2,opt,name=InviteCode,proto3" form:"invite_code" json:"invite_code"`
|
||||
UserId int64 `protobuf:"varint,1,opt,name=UserId,proto3" form:"user_id" json:"user_id"`
|
||||
Username string `protobuf:"bytes,2,opt,name=Username,proto3" form:"username" json:"username"`
|
||||
SpaceRole int32 `protobuf:"varint,4,opt,name=SpaceRole,proto3" form:"space_role" json:"space_role"`
|
||||
}
|
||||
|
||||
func (x *InsertSpaceUserResult) Reset() {
|
||||
*x = InsertSpaceUserResult{}
|
||||
func (x *SpaceUser) Reset() {
|
||||
*x = SpaceUser{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -87,13 +88,13 @@ func (x *InsertSpaceUserResult) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *InsertSpaceUserResult) String() string {
|
||||
func (x *SpaceUser) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*InsertSpaceUserResult) ProtoMessage() {}
|
||||
func (*SpaceUser) ProtoMessage() {}
|
||||
|
||||
func (x *InsertSpaceUserResult) ProtoReflect() protoreflect.Message {
|
||||
func (x *SpaceUser) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -105,43 +106,514 @@ func (x *InsertSpaceUserResult) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use InsertSpaceUserResult.ProtoReflect.Descriptor instead.
|
||||
func (*InsertSpaceUserResult) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use SpaceUser.ProtoReflect.Descriptor instead.
|
||||
func (*SpaceUser) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_user_types_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *InsertSpaceUserResult) GetSpaceId() int64 {
|
||||
func (x *SpaceUser) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SpaceUser) GetUsername() string {
|
||||
if x != nil {
|
||||
return x.Username
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SpaceUser) GetSpaceRole() int32 {
|
||||
if x != nil {
|
||||
return x.SpaceRole
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListSpaceUsersResult struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Users []*SpaceUser `protobuf:"bytes,1,rep,name=users,proto3" form:"users" json:"users" query:"users"`
|
||||
}
|
||||
|
||||
func (x *ListSpaceUsersResult) Reset() {
|
||||
*x = ListSpaceUsersResult{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListSpaceUsersResult) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListSpaceUsersResult) ProtoMessage() {}
|
||||
|
||||
func (x *ListSpaceUsersResult) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListSpaceUsersResult.ProtoReflect.Descriptor instead.
|
||||
func (*ListSpaceUsersResult) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_user_types_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ListSpaceUsersResult) GetUsers() []*SpaceUser {
|
||||
if x != nil {
|
||||
return x.Users
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 加入空间
|
||||
type JoinSpaceParams struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
InviteCode int64 `protobuf:"varint,1,opt,name=InviteCode,proto3" form:"invite_code" json:"invite_code"` // 邀请码
|
||||
}
|
||||
|
||||
func (x *JoinSpaceParams) Reset() {
|
||||
*x = JoinSpaceParams{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JoinSpaceParams) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JoinSpaceParams) ProtoMessage() {}
|
||||
|
||||
func (x *JoinSpaceParams) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use JoinSpaceParams.ProtoReflect.Descriptor instead.
|
||||
func (*JoinSpaceParams) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_user_types_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *JoinSpaceParams) GetInviteCode() int64 {
|
||||
if x != nil {
|
||||
return x.InviteCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type JoinSpaceResult struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SpaceId int64 `protobuf:"varint,1,opt,name=SpaceId,proto3" form:"space_id" json:"space_id"`
|
||||
InviteCode string `protobuf:"bytes,2,opt,name=InviteCode,proto3" form:"invite_code" json:"invite_code"`
|
||||
}
|
||||
|
||||
func (x *JoinSpaceResult) Reset() {
|
||||
*x = JoinSpaceResult{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JoinSpaceResult) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JoinSpaceResult) ProtoMessage() {}
|
||||
|
||||
func (x *JoinSpaceResult) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use JoinSpaceResult.ProtoReflect.Descriptor instead.
|
||||
func (*JoinSpaceResult) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_user_types_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *JoinSpaceResult) GetSpaceId() int64 {
|
||||
if x != nil {
|
||||
return x.SpaceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *InsertSpaceUserResult) GetInviteCode() string {
|
||||
func (x *JoinSpaceResult) GetInviteCode() string {
|
||||
if x != nil {
|
||||
return x.InviteCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// 退出空间
|
||||
type ExitSpaceParams struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *ExitSpaceParams) Reset() {
|
||||
*x = ExitSpaceParams{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ExitSpaceParams) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExitSpaceParams) ProtoMessage() {}
|
||||
|
||||
func (x *ExitSpaceParams) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ExitSpaceParams.ProtoReflect.Descriptor instead.
|
||||
func (*ExitSpaceParams) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_user_types_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
type ExitSpaceResult struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *ExitSpaceResult) Reset() {
|
||||
*x = ExitSpaceResult{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ExitSpaceResult) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExitSpaceResult) ProtoMessage() {}
|
||||
|
||||
func (x *ExitSpaceResult) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ExitSpaceResult.ProtoReflect.Descriptor instead.
|
||||
func (*ExitSpaceResult) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_user_types_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
// 踢出成员
|
||||
type RemoveSpaceUserParams struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SpaceId int64 `protobuf:"varint,1,opt,name=SpaceId,proto3" form:"space_id" json:"space_id" vd:"$ != 0"`
|
||||
UserId int64 `protobuf:"varint,2,opt,name=UserId,proto3" form:"user_id" json:"user_id" vd:"$ != 0"`
|
||||
}
|
||||
|
||||
func (x *RemoveSpaceUserParams) Reset() {
|
||||
*x = RemoveSpaceUserParams{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RemoveSpaceUserParams) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RemoveSpaceUserParams) ProtoMessage() {}
|
||||
|
||||
func (x *RemoveSpaceUserParams) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RemoveSpaceUserParams.ProtoReflect.Descriptor instead.
|
||||
func (*RemoveSpaceUserParams) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_user_types_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *RemoveSpaceUserParams) GetSpaceId() int64 {
|
||||
if x != nil {
|
||||
return x.SpaceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RemoveSpaceUserParams) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type RemoveSpaceUserResult struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *RemoveSpaceUserResult) Reset() {
|
||||
*x = RemoveSpaceUserResult{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RemoveSpaceUserResult) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RemoveSpaceUserResult) ProtoMessage() {}
|
||||
|
||||
func (x *RemoveSpaceUserResult) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RemoveSpaceUserResult.ProtoReflect.Descriptor instead.
|
||||
func (*RemoveSpaceUserResult) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_user_types_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
// 更新用户权限
|
||||
type UpdateSpaceUserRoleParams struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SpaceId int64 `protobuf:"varint,1,opt,name=SpaceId,proto3" form:"space_id" json:"space_id" vd:"$ != 0"`
|
||||
UserId int64 `protobuf:"varint,2,opt,name=UserId,proto3" form:"user_id" json:"user_id" vd:"$ != 0"`
|
||||
Role int32 `protobuf:"varint,3,opt,name=Role,proto3" form:"role" json:"role" vd:"$ == 1 || $ == 2"`
|
||||
}
|
||||
|
||||
func (x *UpdateSpaceUserRoleParams) Reset() {
|
||||
*x = UpdateSpaceUserRoleParams{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UpdateSpaceUserRoleParams) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateSpaceUserRoleParams) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateSpaceUserRoleParams) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateSpaceUserRoleParams.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateSpaceUserRoleParams) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_user_types_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *UpdateSpaceUserRoleParams) GetSpaceId() int64 {
|
||||
if x != nil {
|
||||
return x.SpaceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateSpaceUserRoleParams) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateSpaceUserRoleParams) GetRole() int32 {
|
||||
if x != nil {
|
||||
return x.Role
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type UpdateSpaceUserRoleResult struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *UpdateSpaceUserRoleResult) Reset() {
|
||||
*x = UpdateSpaceUserRoleResult{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UpdateSpaceUserRoleResult) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateSpaceUserRoleResult) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateSpaceUserRoleResult) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_space_space_user_types_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateSpaceUserRoleResult.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateSpaceUserRoleResult) Descriptor() ([]byte, []int) {
|
||||
return file_space_space_user_types_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
var File_space_space_user_types_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_space_space_user_types_proto_rawDesc = []byte{
|
||||
0x0a, 0x1c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x75, 0x73,
|
||||
0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x1a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0x48, 0x0a, 0x15, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55,
|
||||
0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2f, 0x0a, 0x0a, 0x49, 0x6e, 0x76,
|
||||
0x69, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0f, 0xca,
|
||||
0xbb, 0x18, 0x0b, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x0a,
|
||||
0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x70, 0x0a, 0x15, 0x49, 0x6e,
|
||||
0x73, 0x65, 0x72, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73,
|
||||
0x75, 0x6c, 0x74, 0x12, 0x26, 0x0a, 0x07, 0x53, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x03, 0x42, 0x0c, 0xca, 0xbb, 0x18, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f,
|
||||
0x69, 0x64, 0x52, 0x07, 0x53, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x49,
|
||||
0x6e, 0x76, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
|
||||
0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65,
|
||||
0x52, 0x0a, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x22, 0x5a, 0x20,
|
||||
0x22, 0x48, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x65,
|
||||
0x72, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x53, 0x70, 0x61, 0x63,
|
||||
0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x16, 0xca, 0xbb, 0x18, 0x08, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0xda, 0xbb, 0x18, 0x06, 0x24, 0x20, 0x21, 0x3d, 0x20,
|
||||
0x30, 0x52, 0x07, 0x53, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x88, 0x01, 0x0a, 0x09, 0x53,
|
||||
0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72,
|
||||
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0b, 0xca, 0xbb, 0x18, 0x07, 0x75, 0x73,
|
||||
0x65, 0x72, 0x5f, 0x69, 0x64, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a,
|
||||
0x08, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
|
||||
0x0c, 0xca, 0xbb, 0x18, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x08, 0x55,
|
||||
0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x09, 0x53, 0x70, 0x61, 0x63, 0x65,
|
||||
0x52, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0e, 0xca, 0xbb, 0x18, 0x0a,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x52, 0x09, 0x53, 0x70, 0x61, 0x63,
|
||||
0x65, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x3e, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x61,
|
||||
0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x26, 0x0a,
|
||||
0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05,
|
||||
0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x42, 0x0a, 0x0f, 0x4a, 0x6f, 0x69, 0x6e, 0x53, 0x70, 0x61,
|
||||
0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2f, 0x0a, 0x0a, 0x49, 0x6e, 0x76, 0x69,
|
||||
0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0f, 0xca, 0xbb,
|
||||
0x18, 0x0b, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x49,
|
||||
0x6e, 0x76, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x6a, 0x0a, 0x0f, 0x4a, 0x6f, 0x69,
|
||||
0x6e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x26, 0x0a, 0x07,
|
||||
0x53, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0c, 0xca,
|
||||
0xbb, 0x18, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x52, 0x07, 0x53, 0x70, 0x61,
|
||||
0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x69, 0x6e,
|
||||
0x76, 0x69, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x49, 0x6e, 0x76, 0x69, 0x74,
|
||||
0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x45, 0x78, 0x69, 0x74, 0x53, 0x70, 0x61,
|
||||
0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x45, 0x78, 0x69, 0x74,
|
||||
0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x78, 0x0a, 0x15, 0x52,
|
||||
0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61,
|
||||
0x72, 0x61, 0x6d, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x53, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x16, 0xca, 0xbb, 0x18, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x5f, 0x69, 0x64, 0xda, 0xbb, 0x18, 0x06, 0x24, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x52, 0x07, 0x53,
|
||||
0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x15, 0xca, 0xbb, 0x18, 0x07, 0x75, 0x73, 0x65, 0x72,
|
||||
0x5f, 0x69, 0x64, 0xda, 0xbb, 0x18, 0x06, 0x24, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x52, 0x06, 0x55,
|
||||
0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53,
|
||||
0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xae,
|
||||
0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73,
|
||||
0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x30, 0x0a, 0x07,
|
||||
0x53, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x16, 0xca,
|
||||
0xbb, 0x18, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0xda, 0xbb, 0x18, 0x06, 0x24,
|
||||
0x20, 0x21, 0x3d, 0x20, 0x30, 0x52, 0x07, 0x53, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2d,
|
||||
0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x15,
|
||||
0xca, 0xbb, 0x18, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0xda, 0xbb, 0x18, 0x06, 0x24,
|
||||
0x20, 0x21, 0x3d, 0x20, 0x30, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x30, 0x0a,
|
||||
0x04, 0x52, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x1c, 0xca, 0xbb, 0x18,
|
||||
0x04, 0x72, 0x6f, 0x6c, 0x65, 0xda, 0xbb, 0x18, 0x10, 0x24, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x20,
|
||||
0x7c, 0x7c, 0x20, 0x24, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x52, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x22,
|
||||
0x1b, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73,
|
||||
0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x22, 0x5a, 0x20,
|
||||
0x63, 0x6e, 0x2f, 0x6f, 0x6e, 0x65, 0x61, 0x6f, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2d, 0x67, 0x6f,
|
||||
0x2f, 0x62, 0x69, 0x7a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
@@ -159,17 +631,27 @@ func file_space_space_user_types_proto_rawDescGZIP() []byte {
|
||||
return file_space_space_user_types_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_space_space_user_types_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_space_space_user_types_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_space_space_user_types_proto_goTypes = []interface{}{
|
||||
(*InsertSpaceUserParams)(nil), // 0: space.InsertSpaceUserParams
|
||||
(*InsertSpaceUserResult)(nil), // 1: space.InsertSpaceUserResult
|
||||
(*ListSpaceUsersParams)(nil), // 0: space.ListSpaceUsersParams
|
||||
(*SpaceUser)(nil), // 1: space.SpaceUser
|
||||
(*ListSpaceUsersResult)(nil), // 2: space.ListSpaceUsersResult
|
||||
(*JoinSpaceParams)(nil), // 3: space.JoinSpaceParams
|
||||
(*JoinSpaceResult)(nil), // 4: space.JoinSpaceResult
|
||||
(*ExitSpaceParams)(nil), // 5: space.ExitSpaceParams
|
||||
(*ExitSpaceResult)(nil), // 6: space.ExitSpaceResult
|
||||
(*RemoveSpaceUserParams)(nil), // 7: space.RemoveSpaceUserParams
|
||||
(*RemoveSpaceUserResult)(nil), // 8: space.RemoveSpaceUserResult
|
||||
(*UpdateSpaceUserRoleParams)(nil), // 9: space.UpdateSpaceUserRoleParams
|
||||
(*UpdateSpaceUserRoleResult)(nil), // 10: space.UpdateSpaceUserRoleResult
|
||||
}
|
||||
var file_space_space_user_types_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
1, // 0: space.ListSpaceUsersResult.users:type_name -> space.SpaceUser
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_space_space_user_types_proto_init() }
|
||||
@@ -179,7 +661,7 @@ func file_space_space_user_types_proto_init() {
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_space_space_user_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*InsertSpaceUserParams); i {
|
||||
switch v := v.(*ListSpaceUsersParams); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@@ -191,7 +673,115 @@ func file_space_space_user_types_proto_init() {
|
||||
}
|
||||
}
|
||||
file_space_space_user_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*InsertSpaceUserResult); i {
|
||||
switch v := v.(*SpaceUser); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_space_space_user_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListSpaceUsersResult); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_space_space_user_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JoinSpaceParams); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_space_space_user_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JoinSpaceResult); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_space_space_user_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ExitSpaceParams); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_space_space_user_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ExitSpaceResult); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_space_space_user_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RemoveSpaceUserParams); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_space_space_user_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RemoveSpaceUserResult); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_space_space_user_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateSpaceUserRoleParams); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_space_space_user_types_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateSpaceUserRoleResult); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@@ -209,7 +799,7 @@ func file_space_space_user_types_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_space_space_user_types_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
||||
File renamed without changes.
@@ -20,3 +20,38 @@ func _insertspaceMw() []app.HandlerFunc {
|
||||
// your code...
|
||||
return nil
|
||||
}
|
||||
|
||||
func _deletespaceMw() []app.HandlerFunc {
|
||||
// your code...
|
||||
return nil
|
||||
}
|
||||
|
||||
func _space_userMw() []app.HandlerFunc {
|
||||
// your code...
|
||||
return nil
|
||||
}
|
||||
|
||||
func _exitspaceMw() []app.HandlerFunc {
|
||||
// your code...
|
||||
return nil
|
||||
}
|
||||
|
||||
func _queryspaceusersMw() []app.HandlerFunc {
|
||||
// your code...
|
||||
return nil
|
||||
}
|
||||
|
||||
func _listspaceusersMw() []app.HandlerFunc {
|
||||
// your code...
|
||||
return nil
|
||||
}
|
||||
|
||||
func _removespaceuserMw() []app.HandlerFunc {
|
||||
// your code...
|
||||
return nil
|
||||
}
|
||||
|
||||
func _updatespaceuserroleMw() []app.HandlerFunc {
|
||||
// your code...
|
||||
return nil
|
||||
}
|
||||
+8
@@ -19,6 +19,14 @@ func Register(r *server.Hertz) {
|
||||
root := r.Group("/", rootMw()...)
|
||||
{
|
||||
_space := root.Group("/space", _spaceMw()...)
|
||||
_space.POST("/delete", append(_deletespaceMw(), space.DeleteSpace)...)
|
||||
_space.POST("/insert", append(_insertspaceMw(), space.InsertSpace)...)
|
||||
}
|
||||
{
|
||||
_space_user := root.Group("/space_user", _space_userMw()...)
|
||||
_space_user.POST("/exit", append(_exitspaceMw(), space.ExitSpace)...)
|
||||
_space_user.POST("/list", append(_listspaceusersMw(), space.ListSpaceUsers)...)
|
||||
_space_user.POST("/remove", append(_removespaceuserMw(), space.RemoveSpaceUser)...)
|
||||
_space_user.POST("/updateRole", append(_updatespaceuserroleMw(), space.UpdateSpaceUserRole)...)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user