Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release

pull/351/head
Gordon 2 years ago
commit 97b1a774fb

@ -1 +1 @@
Subproject commit 1667b0f4e205fc4ed7c690ab55b662087d61c277
Subproject commit 5e8d3f5366700f00db7db2905da27189b9353630

@ -17,13 +17,15 @@ import (
"Open_IM/pkg/utils"
"flag"
"fmt"
//_ "github.com/razeencheng/demo-go/swaggo-gin/docs"
swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger"
"io"
"os"
"strconv"
swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger"
"github.com/gin-gonic/gin"
//"syscall"
"Open_IM/pkg/common/constant"
@ -134,6 +136,7 @@ func main() {
thirdGroup.POST("/get_rtc_invitation_info", apiThird.GetRTCInvitationInfo)
thirdGroup.POST("/get_rtc_invitation_start_app", apiThird.GetRTCInvitationInfoStartApp)
thirdGroup.POST("/fcm_update_token", apiThird.FcmUpdateToken)
thirdGroup.POST("/aws_storage_credential", apiThird.AwsStorageCredential)
}
//Message
chatGroup := r.Group("/msg")

@ -40,8 +40,22 @@ func main() {
demoRouterGroup.POST("/login", register.Login)
demoRouterGroup.POST("/reset_password", register.ResetPassword)
}
cmsRouterGroup := r.Group("/cms_admin")
{
cmsRouterGroup.POST("/generate_invitation_code", register.GenerateInvitationCode)
cmsRouterGroup.POST("/query_invitation_code", register.QueryInvitationCode)
cmsRouterGroup.POST("/get_invitation_codes", register.GetInvitationCodes)
cmsRouterGroup.POST("/query_user_ip_limit_login", register.QueryUserIDLimitLogin)
cmsRouterGroup.POST("/add_user_ip_limit_login", register.AddUserIPLimitLogin)
cmsRouterGroup.POST("/remove_user_ip_limit_login", register.RemoveUserIPLimitLogin)
cmsRouterGroup.POST("/query_ip_register", register.QueryIPRegister)
cmsRouterGroup.POST("/add_ip_limit", register.AddIPLimit)
cmsRouterGroup.POST("/remove_ip_Limit", register.RemoveIPLimit)
}
defaultPorts := config.Config.Demo.Port
ginPort := flag.Int("port", defaultPorts[0], "get ginServerPort from cmd,default 42233 as port")
ginPort := flag.Int("port", defaultPorts[0], "get ginServerPort from cmd,default 10004 as port")
flag.Parse()
fmt.Println("start demo api server, port: ", *ginPort)
address := "0.0.0.0:" + strconv.Itoa(*ginPort)
@ -51,6 +65,7 @@ func main() {
address = config.Config.CmsApi.ListenIP + ":" + strconv.Itoa(*ginPort)
fmt.Println("start demo api server address: ", address)
go register.OnboardingProcessRoutine()
go register.ImportFriendRoutine()
err := r.Run(address)
if err != nil {
log.Error("", "run failed ", *ginPort, err.Error())

@ -46,16 +46,16 @@ redis:
kafka:
ws2mschat:
addr: [ 127.0.0.1:9092 ] #kafka配置默认即可
topic: "ws2ms_chat"
ws2mschatoffline:
addr: [ 127.0.0.1:9092 ] #kafka配置默认即可
topic: "ws2ms_chat_offline"
topic: "ws2ms_chat" #用于mongo和mysql保存消息
# ws2mschatoffline:
# addr: [ 127.0.0.1:9092 ] #kafka配置默认即可
# topic: "ws2ms_chat_offline" #原为离线用户消息处理,目前暂时弃用
msgtomongo:
addr: [ 127.0.0.1:9092 ] #kafka配置默认即可
topic: "msg_to_mongo"
ms2pschat:
addr: [ 127.0.0.1:9092 ] #kafka配置默认即可
topic: "ms2ps_chat"
topic: "ms2ps_chat" #消息push
consumergroupid:
msgToTransfer: mongo
msgToMongo: mongo_ex
@ -131,6 +131,15 @@ credential: #腾讯cos发送图片、视频、文件时需要请自行申
finalHost: "http://bucket1.oss-cn-beijing.aliyuncs.com"
stsDurationSeconds: 3600
OssRoleArn: "acs:ram::xxx:role/xxx"
aws:
accessKeyID: 1 #AssumeRole用户关联的accessKeyID
accessKeySecret: 2 #AssumeRole用户关联的accessKeySecrect
region: ap-southeast-1 #分区
bucket: ouyang #桶
finalHost: ouyang.s3.ap-southeast-1.amazonaws.com #对外Host
roleArn: arn:aws:iam::192209831083:role/AWS_S3_FOR_OUYANG #RoleArn
externalId: AssumeRoleExtend #角色扩展Id
roleSessionName: Required-AWS-ID-OPENIM #角色SESSION名称
dtm:
serverURL: 127.0.0.1:10007
@ -724,6 +733,7 @@ demo:
verificationCodeTemplateCode: 2902877
enable: true
superCode: 666666 #超级验证码,建议修改掉,收不到短信验证码时可以用此替代
needInvitationCode: false
# second
codeTTL: 60
useSuperCode: true

@ -11,6 +11,10 @@ require (
github.com/alibabacloud-go/sts-20150401 v1.1.0
github.com/alibabacloud-go/tea v1.1.17
github.com/antonfisher/nested-logrus-formatter v1.3.0
github.com/aws/aws-sdk-go-v2 v1.16.7
github.com/aws/aws-sdk-go-v2/config v1.15.14
github.com/aws/aws-sdk-go-v2/credentials v1.12.9
github.com/aws/aws-sdk-go-v2/service/sts v1.16.9
github.com/bwmarrin/snowflake v0.3.0
github.com/dtm-labs/rockscache v0.0.11
github.com/fatih/structs v1.1.0

@ -99,6 +99,28 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd
github.com/antonfisher/nested-logrus-formatter v1.3.0 h1:8zixYquU1Odk+vzAaAQPAdRh1ZjmUXNQ1T+dUBvlhVo=
github.com/antonfisher/nested-logrus-formatter v1.3.0/go.mod h1:6WTfyWFkBc9+zyBaKIqRrg/KwMqBbodBjgbHjDz7zjA=
github.com/aws/aws-sdk-go v1.38.3/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v1.16.7 h1:zfBwXus3u14OszRxGcqCDS4MfMCv10e8SMJ2r8Xm0Ns=
github.com/aws/aws-sdk-go-v2 v1.16.7/go.mod h1:6CpKuLXg2w7If3ABZCl/qZ6rEgwtjZTn4eAf4RcEyuw=
github.com/aws/aws-sdk-go-v2/config v1.15.14 h1:+BqpqlydTq4c2et9Daury7gE+o67P4lbk7eybiCBNc4=
github.com/aws/aws-sdk-go-v2/config v1.15.14/go.mod h1:CQBv+VVv8rR5z2xE+Chdh5m+rFfsqeY4k0veEZeq6QM=
github.com/aws/aws-sdk-go-v2/credentials v1.12.9 h1:DloAJr0/jbvm0iVRFDFh8GlWxrOd9XKyX82U+dfVeZs=
github.com/aws/aws-sdk-go-v2/credentials v1.12.9/go.mod h1:2Vavxl1qqQXJ8MUcQZTsIEW8cwenFCWYXtLRPba3L/o=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.8 h1:VfBdn2AxwMbFyJN/lF/xuT3SakomJ86PZu3rCxb5K0s=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.8/go.mod h1:oL1Q3KuCq1D4NykQnIvtRiBGLUXhcpY5pl6QZB2XEPU=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.14 h1:2C0pYHcUBmdzPj+EKNC4qj97oK6yjrUhc1KoSodglvk=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.14/go.mod h1:kdjrMwHwrC3+FsKhNcCMJ7tUVj/8uSD5CZXeQ4wV6fM=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.8 h1:2J+jdlBJWEmTyAwC82Ym68xCykIvnSnIN18b8xHGlcc=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.8/go.mod h1:ZIV8GYoC6WLBW5KGs+o4rsc65/ozd+eQ0L31XF5VDwk=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.15 h1:QquxR7NH3ULBsKC+NoTpilzbKKS+5AELfNREInbhvas=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.15/go.mod h1:Tkrthp/0sNBShQQsamR7j/zY4p19tVTAs+nnqhH6R3c=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.8 h1:oKnAXxSF2FUvfgw8uzU/v9OTYorJJZ8eBmWhr9TWVVQ=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.8/go.mod h1:rDVhIMAX9N2r8nWxDUlbubvvaFMnfsm+3jAV7q+rpM4=
github.com/aws/aws-sdk-go-v2/service/sso v1.11.12 h1:760bUnTX/+d693FT6T6Oa7PZHfEQT9XMFZeM5IQIB0A=
github.com/aws/aws-sdk-go-v2/service/sso v1.11.12/go.mod h1:MO4qguFjs3wPGcCSpQ7kOFTwRvb+eu+fn+1vKleGHUk=
github.com/aws/aws-sdk-go-v2/service/sts v1.16.9 h1:yOfILxyjmtr2ubRkRJldlHDFBhf5vw4CzhbwWIBmimQ=
github.com/aws/aws-sdk-go-v2/service/sts v1.16.9/go.mod h1:O1IvkYxr+39hRf960Us6j0x1P8pDqhTX+oXM5kQNl/Y=
github.com/aws/smithy-go v1.12.0 h1:gXpeZel/jPoWQ7OEmLIgCUnhkFftqNfwWUwAHSlp1v0=
github.com/aws/smithy-go v1.12.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
@ -273,8 +295,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=

@ -69,6 +69,8 @@ func UserRegister(c *gin.Context) {
log.NewError(req.OperationID, errMsg)
if reply.CommonResp.ErrCode == constant.RegisterLimit {
c.JSON(http.StatusOK, gin.H{"errCode": constant.RegisterLimit, "errMsg": "用户注册被限制"})
} else if reply.CommonResp.ErrCode == constant.InvitationError {
c.JSON(http.StatusOK, gin.H{"errCode": constant.InvitationError, "errMsg": "邀请码错误"})
} else {
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
}

@ -0,0 +1,76 @@
package apiThird
import (
api "Open_IM/pkg/base_info"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/token_verify"
"Open_IM/pkg/utils"
"context"
"net/http"
"github.com/aws/aws-sdk-go-v2/aws"
awsConfig "github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/sts"
"github.com/gin-gonic/gin"
)
func AwsStorageCredential(c *gin.Context) {
var (
req api.AwsStorageCredentialReq
resp api.AwsStorageCredentialResp
)
if err := c.BindJSON(&req); err != nil {
log.NewError("0", utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
var ok bool
var errInfo string
ok, _, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
//原始帐号信息
awsSourceConfig, err := awsConfig.LoadDefaultConfig(context.TODO(), awsConfig.WithRegion(config.Config.Credential.Aws.Region),
awsConfig.WithCredentialsProvider(credentials.StaticCredentialsProvider{
Value: aws.Credentials{
AccessKeyID: config.Config.Credential.Aws.AccessKeyID,
SecretAccessKey: config.Config.Credential.Aws.AccessKeySecret,
Source: "Open IM OSS",
},
}))
if err != nil {
errMsg := req.OperationID + " " + "Init AWS S3 Credential failed " + err.Error() + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
//帐号转化
awsStsClient := sts.NewFromConfig(awsSourceConfig)
StsRole, err := awsStsClient.AssumeRole(context.Background(), &sts.AssumeRoleInput{
RoleArn: aws.String(config.Config.Credential.Aws.RoleArn),
DurationSeconds: aws.Int32(constant.AwsDurationTimes),
RoleSessionName: aws.String(config.Config.Credential.Aws.RoleSessionName),
ExternalId: aws.String(config.Config.Credential.Aws.ExternalId),
})
if err != nil {
errMsg := req.OperationID + " " + "AWS S3 AssumeRole failed " + err.Error() + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
resp.CosData.AccessKeyId = string(*StsRole.Credentials.AccessKeyId)
resp.CosData.SecretAccessKey = string(*StsRole.Credentials.SecretAccessKey)
resp.CosData.SessionToken = string(*StsRole.Credentials.SessionToken)
resp.CosData.Bucket = config.Config.Credential.Aws.Bucket
resp.CosData.RegionID = config.Config.Credential.Aws.Region
resp.CosData.FinalHost = config.Config.Credential.Aws.FinalHost
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
}

@ -8,6 +8,7 @@ import (
"Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbAdmin "Open_IM/pkg/proto/admin_cms"
pbCommon "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
"context"
"github.com/minio/minio-go/v7"
@ -63,7 +64,7 @@ func AdminLogin(c *gin.Context) {
reqPb pbAdmin.AdminLoginReq
)
if err := c.BindJSON(&req); err != nil {
log.NewInfo("0", utils.GetSelfFuncName(), err.Error())
log.NewError("0", utils.GetSelfFuncName(), err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
@ -87,3 +88,94 @@ func AdminLogin(c *gin.Context) {
resp.Token = respPb.Token
openIMHttp.RespHttp200(c, constant.OK, resp)
}
func AddUserRegisterAddFriendIDList(c *gin.Context) {
var (
req apiStruct.AddUserRegisterAddFriendIDListRequest
resp apiStruct.AddUserRegisterAddFriendIDListResponse
)
if err := c.BindJSON(&req); err != nil {
log.NewError("0", utils.GetSelfFuncName(), err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, req.OperationID)
if etcdConn == nil {
errMsg := req.OperationID + "getcdv3.GetConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
client := pbAdmin.NewAdminCMSClient(etcdConn)
_, err := client.AddUserRegisterAddFriendIDList(context.Background(), &pbAdmin.AddUserRegisterAddFriendIDListReq{OperationID: req.OperationID, UserIDList: req.UserIDList})
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "rpc failed", err.Error())
openIMHttp.RespHttp200(c, err, nil)
return
}
openIMHttp.RespHttp200(c, constant.OK, resp)
}
func ReduceUserRegisterAddFriendIDList(c *gin.Context) {
var (
req apiStruct.ReduceUserRegisterAddFriendIDListRequest
resp apiStruct.ReduceUserRegisterAddFriendIDListResponse
)
if err := c.BindJSON(&req); err != nil {
log.NewError("0", utils.GetSelfFuncName(), err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, req.OperationID)
if etcdConn == nil {
errMsg := req.OperationID + "getcdv3.GetConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
client := pbAdmin.NewAdminCMSClient(etcdConn)
_, err := client.ReduceUserRegisterAddFriendIDList(context.Background(), &pbAdmin.ReduceUserRegisterAddFriendIDListReq{OperationID: req.OperationID, UserIDList: req.UserIDList, Operation: req.Operation})
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "rpc failed", err.Error())
openIMHttp.RespHttp200(c, err, nil)
return
}
openIMHttp.RespHttp200(c, constant.OK, resp)
}
func GetUserRegisterAddFriendIDList(c *gin.Context) {
var (
req apiStruct.GetUserRegisterAddFriendIDListRequest
resp apiStruct.GetUserRegisterAddFriendIDListResponse
)
if err := c.BindJSON(&req); err != nil {
log.NewError("0", utils.GetSelfFuncName(), err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, req.OperationID)
if etcdConn == nil {
errMsg := req.OperationID + "getcdv3.GetConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
client := pbAdmin.NewAdminCMSClient(etcdConn)
respPb, err := client.GetUserRegisterAddFriendIDList(context.Background(), &pbAdmin.GetUserRegisterAddFriendIDListReq{OperationID: req.OperationID, Pagination: &pbCommon.RequestPagination{
PageNumber: int32(req.PageNumber),
ShowNumber: int32(req.ShowNumber),
}})
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "rpc failed", err.Error())
openIMHttp.RespHttp200(c, err, nil)
return
}
resp.Users = respPb.UserInfoList
resp.ShowNumber = int(respPb.Pagination.ShowNumber)
resp.CurrentPage = int(respPb.Pagination.CurrentPage)
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp)
openIMHttp.RespHttp200(c, constant.OK, resp)
}

@ -220,8 +220,10 @@ func GetGroupMembers(c *gin.Context) {
ShowNumber: int(respPb.Pagination.ShowNumber),
}
resp.MemberNums = int(respPb.MemberNums)
for _, groupMembers := range respPb.Members {
resp.GroupMembers = append(resp.GroupMembers, *groupMembers)
for _, groupMember := range respPb.Members {
memberResp := cms_api_struct.GroupMemberResponse{}
utils.CopyStructFields(&memberResp, groupMember)
resp.GroupMembers = append(resp.GroupMembers, memberResp)
}
log.NewInfo("", utils.GetSelfFuncName(), "req: ", resp)
openIMHttp.RespHttp200(c, constant.OK, resp)

@ -20,6 +20,10 @@ func NewGinRouter() *gin.Engine {
adminRouterGroup := router.Group("/admin")
{
adminRouterGroup.POST("/login", admin.AdminLogin)
adminRouterGroup.Use(middleware.JWTAuth())
adminRouterGroup.POST("/add_user_register_add_friend_id", admin.AddUserRegisterAddFriendIDList)
adminRouterGroup.POST("/reduce_user_register_reduce_friend_id", admin.ReduceUserRegisterAddFriendIDList)
adminRouterGroup.POST("/get_user_register_reduce_friend_id_list", admin.GetUserRegisterAddFriendIDList)
}
r2 := router.Group("")
r2.Use(middleware.JWTAuth())
@ -73,12 +77,6 @@ func NewGinRouter() *gin.Engine {
userRouterGroup.POST("/delete_user", user.DeleteUser)
userRouterGroup.GET("/get_users_by_name", user.GetUsersByName)
}
friendRouterGroup := r2.Group("/friend")
{
friendRouterGroup.POST("/get_friends_by_id")
friendRouterGroup.POST("/set_friend")
friendRouterGroup.POST("/remove_friend")
}
messageCMSRouterGroup := r2.Group("/message")
{
messageCMSRouterGroup.GET("/get_chat_logs", messageCMS.GetChatLogs)

@ -323,6 +323,10 @@ func GetBlockUsers(c *gin.Context) {
ProfilePhoto: v.User.ProfilePhoto,
Nickname: v.User.Nickname,
IsBlock: v.User.IsBlock,
Birth: v.User.Birth,
PhoneNumber: v.User.PhoneNumber,
Email: v.User.Email,
Gender: int(v.User.Gender),
CreateTime: v.User.CreateTime,
},
BeginDisableTime: v.BeginDisableTime,

@ -15,6 +15,7 @@ import (
const cronTaskOperationID = "cronTaskOperationID-"
func StartCronTask() {
log.NewPrivateLog("cron")
log.NewInfo(utils.OperationIDGenerator(), "start cron task")
c := cron.New()
fmt.Println("config", config.Config.Mongo.ChatRecordsClearTime)

@ -1,3 +1,7 @@
package main
func main() {}
import "Open_IM/pkg/common/db"
func main() {
db.DB.BatchInsertChat()
}

@ -0,0 +1,120 @@
package register
import (
apiStruct "Open_IM/pkg/base_info"
"Open_IM/pkg/common/constant"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log"
"Open_IM/pkg/utils"
"github.com/gin-gonic/gin"
"net/http"
"time"
)
type InvitationCode struct {
InvitationCode string `json:"invitationCode"`
CreateTime time.Time `json:"createTime"`
UserID string `json:"userID"`
LastTime time.Time `json:"lastTime"`
Status int32 `json:"status"`
}
type GenerateInvitationCodeReq struct {
CodesNum int `json:"codesNum" binding:"required"`
CodeLen int `json:"codeLen" binding:"required"`
OperationID string `json:"operationID" binding:"required"`
}
type GenerateInvitationCodeResp struct {
Codes []string `json:"codes"`
}
func GenerateInvitationCode(c *gin.Context) {
req := GenerateInvitationCodeReq{}
resp := GenerateInvitationCodeResp{}
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
return
}
var err error
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
resp.Codes, err = imdb.BatchCreateInvitationCodes(req.CodesNum, req.CodeLen)
if err != nil {
log.NewError(req.OperationID, "BatchCreateInvitationCodes failed", req.CodesNum, req.CodeLen)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "Verification code error!"})
return
}
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
}
type QueryInvitationCodeReq struct {
Code string `json:"code" binding:"required"`
OperationID string `json:"operationID" binding:"required"`
}
type QueryInvitationCodeResp struct {
InvitationCode
}
func QueryInvitationCode(c *gin.Context) {
req := QueryInvitationCodeReq{}
resp := QueryInvitationCodeResp{}
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
invitation, err := imdb.GetInvitationCode(req.Code)
if err != nil {
log.NewError(req.OperationID, "GetInvitationCode failed", req.Code)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "Verification code error!"})
return
}
resp.UserID = invitation.UserID
resp.CreateTime = invitation.CreateTime
resp.Status = invitation.Status
resp.LastTime = invitation.LastTime
resp.InvitationCode.InvitationCode = invitation.InvitationCode
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp:", resp)
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
}
type GetInvitationCodesReq struct {
Status int32 `json:"status"`
OperationID string `json:"operationID" binding:"required"`
apiStruct.Pagination
}
type GetInvitationCodesResp struct {
apiStruct.Pagination
Codes []InvitationCode `json:"codes"`
}
func GetInvitationCodes(c *gin.Context) {
req := GetInvitationCodesReq{}
resp := GetInvitationCodesResp{}
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
codes, err := imdb.GetInvitationCodes(req.ShowNumber, req.PageNumber, req.Status)
if err != nil {
log.NewError(req.OperationID, "GetInvitationCode failed", req.ShowNumber, req.PageNumber, req.Status)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "Verification code error!"})
return
}
resp.Pagination.PageNumber = req.PageNumber
resp.Pagination.ShowNumber = req.ShowNumber
for _, v := range codes {
resp.Codes = append(resp.Codes, InvitationCode{
InvitationCode: v.InvitationCode,
CreateTime: v.CreateTime,
UserID: v.UserID,
LastTime: v.LastTime,
Status: v.Status,
})
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp:", resp)
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
}

@ -0,0 +1,223 @@
package register
import (
//api "Open_IM/pkg/base_info"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log"
"Open_IM/pkg/utils"
"github.com/gin-gonic/gin"
//"github.com/jinzhu/gorm"
"net/http"
"time"
)
type QueryIPRegisterReq struct {
OperationID string `json:"operationID"`
IP string `json:"ip"`
}
type QueryIPRegisterResp struct {
IP string `json:"ip"`
RegisterNum int `json:"num"`
Status int `json:"status"`
UserIDList []string `json:"userIDList"`
}
func QueryIPRegister(c *gin.Context) {
req := QueryIPRegisterReq{}
resp := QueryIPRegisterResp{}
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
userIDList, err := imdb.GetRegisterUserNum(req.IP)
if err != nil {
log.NewError(req.OperationID, "GetInvitationCode failed", req.IP)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB.ErrCode, "errMsg": "GetRegisterUserNum error!"})
return
}
resp.IP = req.IP
resp.RegisterNum = len(userIDList)
resp.UserIDList = userIDList
ipLimit, err := imdb.QueryIPLimits(req.IP)
if err != nil {
log.NewError(req.OperationID, "QueryIPLimits failed", req.IP, err.Error())
} else {
if ipLimit != nil {
if ipLimit.Ip != "" {
resp.Status = 1
}
}
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp:", resp)
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
}
type AddIPLimitReq struct {
OperationID string `json:"operationID"`
IP string `json:"ip"`
LimitTime int32 `json:"limitTime"`
}
type AddIPLimitResp struct {
}
func AddIPLimit(c *gin.Context) {
req := AddIPLimitReq{}
//resp := AddIPLimitResp{}
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
if err := imdb.InsertOneIntoIpLimits(db.IpLimit{
Ip: req.IP,
LimitRegister: 1,
LimitLogin: 1,
CreateTime: time.Now(),
LimitTime: utils.UnixSecondToTime(int64(req.LimitTime)),
}); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.IP, req.LimitTime)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB.ErrCode, "errMsg": "InsertOneIntoIpLimits error!"})
return
}
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": ""})
}
type RemoveIPLimitReq struct {
OperationID string `json:"operationID"`
IP string `json:"ip"`
}
type RemoveIPLimitResp struct {
}
func RemoveIPLimit(c *gin.Context) {
req := RemoveIPLimitReq{}
//resp := AddIPLimitResp{}
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.ErrArgs, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
if err := imdb.DeleteOneFromIpLimits(req.IP); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.IP)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB.ErrCode, "errMsg": "InsertOneIntoIpLimits error!"})
return
}
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": ""})
}
// ===========================================sk ==========================
type QueryUserIDIPLimitLoginReq struct {
UserID string `json:"userID" binding:"required"`
OperationID string `json:"operationID" binding:"required"`
}
//type QueryUserIDIPLimitLoginResp struct {
// UserIpLimit []db.UserIpLimit `json:"userIpLimit"`
//}
func QueryUserIDLimitLogin(c *gin.Context) {
req := QueryUserIDIPLimitLoginReq{}
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
resp, err := imdb.GetIpLimitsLoginByUserID(req.UserID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserID)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB.ErrCode, "errMsg": "GetIpLimitsByUserID error!"})
return
}
if len(resp) > 0 {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp:", resp)
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
return
}
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
}
type AddUserIPLimitLoginReq struct {
UserID string `json:"userID" binding:"required"`
OperationID string `json:"operationID" binding:"required"`
IP string `json:"ip"`
}
type AddUserIPLimitLoginResp struct {
}
// 添加ip 特定用户才能登录 user_ip_limits 表
func AddUserIPLimitLogin(c *gin.Context) {
req := AddUserIPLimitLoginReq{}
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
userIp := db.UserIpLimit{UserID: req.UserID, Ip: req.IP}
err := imdb.UpdateUserInfo(db.User{
UserID: req.UserID,
LoginLimit: 1,
})
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserID)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "InsertUserIpLimitsLogin error!"})
return
}
err = imdb.InsertUserIpLimitsLogin(&userIp)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserID)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "InsertUserIpLimitsLogin error!"})
return
}
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": ""})
}
type RemoveUserIPLimitReq struct {
UserID string `json:"userID" binding:"required"`
OperationID string `json:"operationID" binding:"required"`
IP string `json:"ip"`
}
type RemoveUserIPLimitResp struct {
}
// 删除ip 特定用户才能登录 user_ip_limits 表
func RemoveUserIPLimitLogin(c *gin.Context) {
req := RemoveUserIPLimitReq{}
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
err := imdb.DeleteUserIpLimitsLogin(req.UserID, req.IP)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserID)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "DeleteUserIpLimitsLogin error!"})
return
}
ips, err := imdb.GetIpLimitsLoginByUserID(req.UserID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserID)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "GetIpLimitsLoginByUserID error!"})
return
}
if len(ips) == 0 {
err := imdb.UpdateUserInfoByMap(db.User{
UserID: req.UserID,
}, map[string]interface{}{"login_limit": 0})
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserID)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrDB, "errMsg": "UpdateUserInfo error!"})
return
}
}
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": ""})
}

@ -57,12 +57,17 @@ func Login(c *gin.Context) {
} else {
userID = r.Account
}
ip := c.Request.Header.Get("X-Forward-For")
if ip == "" {
ip = c.ClientIP()
}
url := fmt.Sprintf("http://%s:%d/auth/user_token", utils.ServerIP, config.Config.Api.GinPort[0])
openIMGetUserToken := api.UserTokenReq{}
openIMGetUserToken.OperationID = params.OperationID
openIMGetUserToken.Platform = params.Platform
openIMGetUserToken.Secret = config.Config.Secret
openIMGetUserToken.UserID = userID
openIMGetUserToken.LoginIp = ip
loginIp := c.Request.Header.Get("X-Forward-For")
if loginIp == "" {
loginIp = c.ClientIP()

@ -9,6 +9,7 @@ import (
"Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
groupRpc "Open_IM/pkg/proto/group"
organizationRpc "Open_IM/pkg/proto/organization"
commonPb "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"

@ -0,0 +1,52 @@
package register
import (
"Open_IM/pkg/common/config"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbFriend "Open_IM/pkg/proto/friend"
"Open_IM/pkg/utils"
"context"
"strings"
)
var ChImportFriend chan *pbFriend.ImportFriendReq
func init() {
ChImportFriend = make(chan *pbFriend.ImportFriendReq, 1000)
}
func ImportFriendRoutine() {
for {
req := <-ChImportFriend
go func() {
friendUserIDList, err := imdb.GetRegisterAddFriendList(0, 0)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), req, err.Error())
return
}
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "ImportFriendRoutine IDList", friendUserIDList)
if len(friendUserIDList) == 0 {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "len==0")
return
}
req.FriendUserIDList = friendUserIDList
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.OperationID)
if etcdConn == nil {
errMsg := req.OperationID + "getcdv3.GetConn == nil"
log.NewError(req.OperationID, errMsg)
return
}
client := pbFriend.NewFriendClient(etcdConn)
rpcResp, err := client.ImportFriend(context.Background(), req)
if err != nil {
log.NewError(req.OperationID, "ImportFriend failed ", err.Error(), req.String())
return
}
if rpcResp.CommonResp.ErrCode != 0 {
log.NewError(req.OperationID, "ImportFriend failed ", rpcResp)
}
}()
}
}

@ -8,12 +8,12 @@ import (
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/utils"
"fmt"
"github.com/gin-gonic/gin"
"gopkg.in/gomail.v2"
"math/rand"
"net/http"
"time"
"github.com/gin-gonic/gin"
"gopkg.in/gomail.v2"
)
var sms SMS
@ -73,6 +73,15 @@ func SendVerificationCode(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"errCode": constant.HasRegistered, "errMsg": "The phone number has been registered"})
return
}
//需要邀请码
if config.Config.Demo.NeedInvitationCode {
err = im_mysql_model.CheckInvitationCode(params.InvitationCode)
if err != nil {
log.NewError(params.OperationID, "邀请码错误", params)
c.JSON(http.StatusOK, gin.H{"errCode": constant.InvitationError, "errMsg": "邀请码错误"})
return
}
}
accountKey = accountKey + "_" + constant.VerificationCodeForRegisterSuffix
ok, err := db.DB.JudgeAccountEXISTS(accountKey)
if ok || err != nil {

@ -5,9 +5,10 @@ import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/db/mysql_model/im_mysql_model"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
http2 "Open_IM/pkg/common/http"
"Open_IM/pkg/common/log"
pbFriend "Open_IM/pkg/proto/friend"
"Open_IM/pkg/utils"
"encoding/json"
"math/big"
@ -40,6 +41,23 @@ func SetPassword(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.FormattingError, "errMsg": err.Error()})
return
}
ip := c.Request.Header.Get("X-Forward-For")
if ip == "" {
ip = c.ClientIP()
}
log.NewDebug(params.OperationID, utils.GetSelfFuncName(), "ip:", ip)
Limited, LimitError := imdb.IsLimitRegisterIp(ip)
if LimitError != nil {
log.Error(params.OperationID, utils.GetSelfFuncName(), LimitError, ip)
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.ErrDB.ErrCode, "errMsg": LimitError.Error()})
return
}
if Limited {
c.JSON(http.StatusBadRequest, gin.H{"errCode": constant.RegisterLimit, "errMsg": "limited"})
return
}
var account string
if params.Email != "" {
account = params.Email
@ -63,6 +81,13 @@ func SetPassword(c *gin.Context) {
return
}
}
if config.Config.Demo.NeedInvitationCode && params.InvitationCode != "" {
err := imdb.CheckInvitationCode(params.InvitationCode)
if err != nil {
c.JSON(http.StatusOK, gin.H{"errCode": constant.InvitationError, "errMsg": "邀请码错误"})
return
}
}
}
//userID := utils.Base64Encode(account)
var userID string
@ -83,11 +108,9 @@ func SetPassword(c *gin.Context) {
openIMRegisterReq.Nickname = params.Nickname
openIMRegisterReq.Secret = config.Config.Secret
openIMRegisterReq.FaceURL = params.FaceURL
createIp := c.Request.Header.Get("X-Forward-For")
if createIp == "" {
createIp = c.ClientIP()
}
openIMRegisterReq.CreateIp = createIp
openIMRegisterReq.CreateIp = ip
openIMRegisterReq.LastLoginIp = ip
openIMRegisterReq.InvitationCode = params.InvitationCode
openIMRegisterResp := api.UserRegisterResp{}
log.NewDebug(params.OperationID, utils.GetSelfFuncName(), "register req:", openIMRegisterReq)
bMsg, err := http2.Post(url, openIMRegisterReq, 2)
@ -104,18 +127,30 @@ func SetPassword(c *gin.Context) {
}
if openIMRegisterResp.ErrCode == constant.RegisterLimit {
c.JSON(http.StatusOK, gin.H{"errCode": constant.RegisterLimit, "errMsg": "用户注册被限制"})
return
} else if openIMRegisterResp.ErrCode == constant.InvitationError {
c.JSON(http.StatusOK, gin.H{"errCode": constant.InvitationError, "errMsg": "邀请码错误"})
return
} else {
c.JSON(http.StatusOK, gin.H{"errCode": constant.RegisterFailed, "errMsg": "register failed: " + openIMRegisterResp.ErrMsg})
return
}
return
}
log.Info(params.OperationID, "begin store mysql", account, params.Password, "info", params.FaceURL, params.Nickname)
err = im_mysql_model.SetPassword(account, params.Password, params.Ex, userID, params.AreaCode)
err = imdb.SetPassword(account, params.Password, params.Ex, userID, params.AreaCode, ip)
if err != nil {
log.NewError(params.OperationID, "set phone number password error", account, "err", err.Error())
c.JSON(http.StatusOK, gin.H{"errCode": constant.RegisterFailed, "errMsg": err.Error()})
return
}
if config.Config.Demo.NeedInvitationCode && params.InvitationCode != "" {
//判断一下验证码的使用情况
LockSucc := imdb.TryLockInvitationCode(params.InvitationCode, userID)
if LockSucc {
imdb.FinishInvitationCode(params.InvitationCode, userID)
}
}
log.Info(params.OperationID, "end setPassword", account, params.Password)
// demo onboarding
if params.UserID == "" && config.Config.Demo.OnboardProcess {
@ -132,6 +167,17 @@ func SetPassword(c *gin.Context) {
log.NewWarn(params.OperationID, utils.GetSelfFuncName(), "to ch timeOut")
}
}
select {
case ChImportFriend <- &pbFriend.ImportFriendReq{
OperationID: params.OperationID,
FromUserID: userID,
OpUserID: config.Config.Manager.AppManagerUid[0],
}:
case <-time.After(time.Second * 2):
log.NewWarn(params.OperationID, utils.GetSelfFuncName(), "to ChImportFriend timeOut")
}
c.JSON(http.StatusOK, gin.H{"errCode": constant.NoError, "errMsg": "", "data": openIMRegisterResp.UserToken})
return
}

@ -3,11 +3,13 @@ package admin_cms
import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
openIMHttp "Open_IM/pkg/common/http"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/token_verify"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbAdminCMS "Open_IM/pkg/proto/admin_cms"
server_api_params "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
"context"
"net"
@ -100,3 +102,55 @@ func (s *adminCMSServer) AdminLogin(_ context.Context, req *pbAdminCMS.AdminLogi
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
func (s *adminCMSServer) AddUserRegisterAddFriendIDList(_ context.Context, req *pbAdminCMS.AddUserRegisterAddFriendIDListReq) (*pbAdminCMS.AddUserRegisterAddFriendIDListResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp := &pbAdminCMS.AddUserRegisterAddFriendIDListResp{}
if err := imdb.AddUserRegisterAddFriendIDList(req.UserIDList...); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserIDList)
return resp, openIMHttp.WrapError(constant.ErrDB)
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", req.String())
return resp, nil
}
func (s *adminCMSServer) ReduceUserRegisterAddFriendIDList(_ context.Context, req *pbAdminCMS.ReduceUserRegisterAddFriendIDListReq) (*pbAdminCMS.ReduceUserRegisterAddFriendIDListResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp := &pbAdminCMS.ReduceUserRegisterAddFriendIDListResp{}
if req.Operation == 0 {
if err := imdb.ReduceUserRegisterAddFriendIDList(req.UserIDList...); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserIDList)
return resp, openIMHttp.WrapError(constant.ErrDB)
}
} else {
if err := imdb.DeleteAllRegisterAddFriendIDList(); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserIDList)
return resp, openIMHttp.WrapError(constant.ErrDB)
}
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", req.String())
return resp, nil
}
func (s *adminCMSServer) GetUserRegisterAddFriendIDList(_ context.Context, req *pbAdminCMS.GetUserRegisterAddFriendIDListReq) (*pbAdminCMS.GetUserRegisterAddFriendIDListResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp := &pbAdminCMS.GetUserRegisterAddFriendIDListResp{UserInfoList: []*server_api_params.UserInfo{}}
userIDList, err := imdb.GetRegisterAddFriendList(req.Pagination.ShowNumber, req.Pagination.PageNumber)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
return resp, openIMHttp.WrapError(constant.ErrDB)
}
userList, err := imdb.GetUsersByUserIDList(userIDList)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), userIDList)
return resp, openIMHttp.WrapError(constant.ErrDB)
}
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), userList, userIDList)
resp.Pagination = &server_api_params.ResponsePagination{
CurrentPage: req.Pagination.PageNumber,
ShowNumber: req.Pagination.ShowNumber,
}
utils.CopyStructFields(&resp.UserInfoList, userList)
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", req.String())
return resp, nil
}

@ -30,15 +30,11 @@ func (rpc *rpcAuth) UserRegister(_ context.Context, req *pbAuth.UserRegisterReq)
user.Birth = utils.UnixSecondToTime(int64(req.UserInfo.Birth))
}
log.Debug(req.OperationID, "copy ", user, req.UserInfo)
Limited, LimitError := imdb.IsLimitRegisterIp(req.UserInfo.CreateIp)
if LimitError != nil {
return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: LimitError.Error()}}, nil
}
if Limited {
return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.RegisterLimit, ErrMsg: "Register Limit"}}, nil
}
err := imdb.UserRegister(user)
if err != nil {
if err == constant.InvitationMsg {
return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.InvitationError, ErrMsg: "邀请码错误"}}, nil
}
errMsg := req.OperationID + " imdb.UserRegister failed " + err.Error() + user.UserID
log.NewError(req.OperationID, errMsg, user)
return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}}, nil

@ -623,7 +623,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
continue
}
err = imdb.RemoveGroupMember(req.GroupID, v)
err = imdb.DeleteGroupMemberByGroupIDAndUserID(req.GroupID, v)
if err != nil {
log.NewError(req.OperationID, "RemoveGroupMember failed ", err.Error(), req.GroupID, v)
resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: -1})
@ -1344,7 +1344,7 @@ func (s *groupServer) GetGroupByID(_ context.Context, req *pbGroup.GetGroupByIDR
return resp, http.WrapError(constant.ErrDB)
}
utils.CopyStructFields(resp.CMSGroup.GroupInfo, group)
groupMember, err := imdb.GetGroupMaster(group.GroupID)
groupMember, err := imdb.GetGroupOwnerInfoByGroupID(group.GroupID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMaster", err.Error())
return resp, http.WrapError(constant.ErrDB)
@ -1358,6 +1358,7 @@ func (s *groupServer) GetGroupByID(_ context.Context, req *pbGroup.GetGroupByIDR
resp.CMSGroup.GroupOwnerUserName = groupMember.Nickname
resp.CMSGroup.GroupOwnerUserID = groupMember.UserID
resp.CMSGroup.GroupInfo.CreatorUserID = group.CreatorUserID
resp.CMSGroup.GroupInfo.CreateTime = uint32(group.CreateTime.Unix())
utils.CopyStructFields(resp.CMSGroup.GroupInfo, group)
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
@ -1387,12 +1388,14 @@ func (s *groupServer) GetGroup(_ context.Context, req *pbGroup.GetGroupReq) (*pb
for _, v := range groups {
group := &pbGroup.CMSGroup{GroupInfo: &open_im_sdk.GroupInfo{}}
utils.CopyStructFields(group.GroupInfo, v)
groupMember, err := imdb.GetGroupMaster(v.GroupID)
groupMember, err := imdb.GetGroupOwnerInfoByGroupID(v.GroupID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMaster error", err.Error())
continue
}
group.GroupOwnerUserID = groupMember.GroupID
group.GroupInfo.CreateTime = uint32(v.CreateTime.Unix())
group.GroupOwnerUserID = groupMember.UserID
group.GroupOwnerUserName = groupMember.Nickname
resp.CMSGroups = append(resp.CMSGroups, group)
}
@ -1411,24 +1414,23 @@ func (s *groupServer) GetGroups(_ context.Context, req *pbGroup.GetGroupsReq) (*
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroups error", err.Error())
return resp, http.WrapError(constant.ErrDB)
}
groupsCountNum, err := imdb.GetGroupsCountNum(db.Group{})
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "groupsCountNum ", groupsCountNum)
resp.GroupNum, err = imdb.GetGroupsCountNum(db.Group{})
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupsCountNum", err.Error())
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupsCountNum error", err.Error())
return resp, http.WrapError(constant.ErrDB)
}
resp.GroupNum = groupsCountNum
resp.Pagination.PageNumber = req.Pagination.PageNumber
resp.Pagination.ShowNumber = req.Pagination.ShowNumber
for _, v := range groups {
group := &pbGroup.CMSGroup{GroupInfo: &open_im_sdk.GroupInfo{}}
utils.CopyStructFields(group.GroupInfo, v)
groupMember, err := imdb.GetGroupMaster(v.GroupID)
groupMember, err := imdb.GetGroupOwnerInfoByGroupID(v.GroupID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMaster failed", err.Error(), v)
continue
}
group.GroupOwnerUserID = groupMember.GroupID
group.GroupInfo.CreateTime = uint32(v.CreateTime.Unix())
group.GroupOwnerUserID = groupMember.UserID
group.GroupOwnerUserName = groupMember.Nickname
resp.CMSGroups = append(resp.CMSGroups, group)
}
@ -1439,7 +1441,7 @@ func (s *groupServer) GetGroups(_ context.Context, req *pbGroup.GetGroupsReq) (*
func (s *groupServer) OperateUserRole(_ context.Context, req *pbGroup.OperateUserRoleReq) (*pbGroup.OperateUserRoleResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "args:", req.String())
resp := &pbGroup.OperateUserRoleResp{}
oldOwnerUserID, err := imdb.GetGroupMaster(req.GroupID)
oldOwnerUserID, err := imdb.GetGroupOwnerInfoByGroupID(req.GroupID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMaster failed", err.Error())
return resp, http.WrapError(constant.ErrDB)
@ -1485,6 +1487,8 @@ func (s *groupServer) GetGroupMembersCMS(_ context.Context, req *pbGroup.GetGrou
for _, groupMember := range groupMembers {
member := open_im_sdk.GroupMemberFullInfo{}
utils.CopyStructFields(&member, groupMember)
member.JoinTime = int32(groupMember.JoinTime.Unix())
member.MuteEndTime = uint32(groupMember.MuteEndTime.Unix())
resp.Members = append(resp.Members, &member)
}
resp.Pagination = &open_im_sdk.ResponsePagination{
@ -1499,7 +1503,7 @@ func (s *groupServer) RemoveGroupMembersCMS(_ context.Context, req *pbGroup.Remo
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "args:", req.String())
resp := &pbGroup.RemoveGroupMembersCMSResp{}
for _, userId := range req.UserIDList {
err := imdb.RemoveGroupMember(req.GroupID, userId)
err := imdb.DeleteGroupMemberByGroupIDAndUserID(req.GroupID, userId)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
resp.Failed = append(resp.Failed, userId)

@ -150,7 +150,7 @@ func (s *messageCMSServer) GetChatLogs(_ context.Context, req *pbMessageCMS.GetC
pbChatLog.ReciverNickName = recvUser.Nickname
case constant.GroupChatType:
group, err := imdb.GetGroupById(chatLog.RecvID)
group, err := imdb.GetGroupInfoByGroupID(chatLog.RecvID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupById failed")
continue

@ -21,8 +21,8 @@ type rpcChat struct {
etcdSchema string
etcdAddr []string
onlineProducer *kafka.Producer
offlineProducer *kafka.Producer
delMsgCh chan deleteMsg
//offlineProducer *kafka.Producer
delMsgCh chan deleteMsg
}
type deleteMsg struct {
@ -41,7 +41,7 @@ func NewRpcChatServer(port int) *rpcChat {
etcdAddr: config.Config.Etcd.EtcdAddr,
}
rc.onlineProducer = kafka.NewKafkaProducer(config.Config.Kafka.Ws2mschat.Addr, config.Config.Kafka.Ws2mschat.Topic)
rc.offlineProducer = kafka.NewKafkaProducer(config.Config.Kafka.Ws2mschatOffline.Addr, config.Config.Kafka.Ws2mschatOffline.Topic)
//rc.offlineProducer = kafka.NewKafkaProducer(config.Config.Kafka.Ws2mschatOffline.Addr, config.Config.Kafka.Ws2mschatOffline.Topic)
rc.delMsgCh = make(chan deleteMsg, 1000)
return &rc
}

@ -305,31 +305,8 @@ func (s *organizationServer) CreateOrganizationUser(ctx context.Context, req *rp
}
func (s *organizationServer) UpdateOrganizationUser(ctx context.Context, req *rpc.UpdateOrganizationUserReq) (*rpc.UpdateOrganizationUserResp, error) {
authReq := &pbAuth.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}}
utils.CopyStructFields(authReq.UserInfo, req.OrganizationUser)
authReq.OperationID = req.OperationID
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
if etcdConn == nil {
errMsg := req.OperationID + "getcdv3.GetConn == nil"
log.NewError(req.OperationID, errMsg)
return &rpc.UpdateOrganizationUserResp{ErrCode: constant.ErrInternal.ErrCode, ErrMsg: errMsg}, nil
}
client := pbAuth.NewAuthClient(etcdConn)
reply, err := client.UserRegister(context.Background(), authReq)
if err != nil {
errMsg := "UserRegister failed " + err.Error()
log.NewError(req.OperationID, errMsg)
return &rpc.UpdateOrganizationUserResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
}
if reply.CommonResp.ErrCode != 0 {
errMsg := "UserRegister failed " + reply.CommonResp.ErrMsg
log.NewError(req.OperationID, errMsg)
return &rpc.UpdateOrganizationUserResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}, nil
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
if !token_verify.IsManagerUserID(req.OpUserID) {
if !token_verify.IsManagerUserID(req.OpUserID) && req.OpUserID != req.OrganizationUser.UserID {
errMsg := req.OperationID + " " + req.OpUserID + " is not app manager"
log.Error(req.OperationID, errMsg)
return &rpc.UpdateOrganizationUserResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}, nil
@ -342,7 +319,7 @@ func (s *organizationServer) UpdateOrganizationUser(ctx context.Context, req *rp
}
log.Debug(req.OperationID, "src ", *req.OrganizationUser, "dst ", organizationUser)
err = imdb.UpdateOrganizationUser(&organizationUser, nil)
err := imdb.UpdateOrganizationUser(&organizationUser, nil)
if err != nil {
errMsg := req.OperationID + " " + "CreateOrganizationUser failed " + err.Error()
log.Error(req.OperationID, errMsg, organizationUser)

@ -12,6 +12,7 @@ import (
"Open_IM/pkg/common/token_verify"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbFriend "Open_IM/pkg/proto/friend"
pbOrganization "Open_IM/pkg/proto/organization"
sdkws "Open_IM/pkg/proto/sdk_ws"
pbUser "Open_IM/pkg/proto/user"
"Open_IM/pkg/utils"
@ -19,6 +20,7 @@ import (
"net"
"strconv"
"strings"
"time"
"google.golang.org/grpc"
)
@ -431,21 +433,33 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI
if req.UserInfo.Nickname != "" {
go s.SyncJoinedGroupMemberNickname(req.UserInfo.UserID, req.UserInfo.Nickname, oldNickname, req.OperationID, req.OpUserID)
}
//updateUserInfoToCacheReq := &cache.UpdateUserInfoToCacheReq{
// OperationID: req.OperationID,
// UserInfoList: []*sdkws.UserInfo{req.UserInfo},
//}
//cacheEtcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName)
//cacheClient := cache.NewCacheClient(cacheEtcdConn)
//resp, err := cacheClient.UpdateUserInfoToCache(context.Background(), updateUserInfoToCacheReq)
//if err != nil {
// log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), updateUserInfoToCacheReq.String())
// return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrServer.ErrCode, ErrMsg: err.Error()}}, nil
//}
//if resp.CommonResp.ErrCode != 0 {
// log.NewError(req.OperationID, utils.GetSelfFuncName(), resp.String())
// return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrServer.ErrCode, ErrMsg: resp.CommonResp.ErrMsg}}, nil
//}
etcdConn = getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
clientOrg := pbOrganization.NewOrganizationClient(etcdConn)
out, err := clientOrg.UpdateOrganizationUser(context.Background(), &pbOrganization.UpdateOrganizationUserReq{
OrganizationUser: &sdkws.OrganizationUser{
UserID: req.UserInfo.UserID,
Nickname: req.UserInfo.Nickname,
EnglishName: req.UserInfo.Nickname,
FaceURL: req.UserInfo.FaceURL,
Gender: req.UserInfo.Gender,
Mobile: req.UserInfo.PhoneNumber,
Telephone: req.UserInfo.PhoneNumber,
Birth: req.UserInfo.Birth,
Email: req.UserInfo.Email,
Ex: req.UserInfo.Ex,
},
OperationID: req.OperationID,
OpUserID: req.OpUserID,
})
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "UpdateOrganizationUser failed", err.Error())
} else {
if out.ErrCode != 0 {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "grpc resp: ", out)
}
}
return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil
}
func (s *userServer) SetGlobalRecvMessageOpt(ctx context.Context, req *pbUser.SetGlobalRecvMessageOptReq) (*pbUser.SetGlobalRecvMessageOptResp, error) {
@ -660,11 +674,19 @@ func (s *userServer) ResignUser(ctx context.Context, req *pbUser.ResignUserReq)
func (s *userServer) AlterUser(ctx context.Context, req *pbUser.AlterUserReq) (*pbUser.AlterUserResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp := &pbUser.AlterUserResp{}
birth, _ := time.ParseInLocation("2006-01-02", req.Birth, time.Local)
gender, gendererr := strconv.Atoi(req.Gender)
if gendererr != nil {
gender = 0
}
user := db.User{
PhoneNumber: strconv.FormatInt(req.PhoneNumber, 10),
PhoneNumber: req.PhoneNumber,
Nickname: req.Nickname,
Email: req.Email,
UserID: req.UserId,
Gender: int32(gender),
FaceURL: req.Photo,
Birth: birth,
}
if err := imdb.UpdateUserInfo(user); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "UpdateUserInfo", err.Error())
@ -678,7 +700,7 @@ func (s *userServer) AlterUser(ctx context.Context, req *pbUser.AlterUserReq) (*
func (s *userServer) AddUser(ctx context.Context, req *pbUser.AddUserReq) (*pbUser.AddUserResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp := &pbUser.AddUserResp{}
err := imdb.AddUser(req.UserId, req.PhoneNumber, req.Name)
err := imdb.AddUser(req.UserId, req.PhoneNumber, req.Name, req.Email, req.Gender, req.Photo, req.Birth)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "AddUser", err.Error())
return resp, errors.WrapError(constant.ErrDB)
@ -723,6 +745,10 @@ func (s *userServer) GetBlockUsers(ctx context.Context, req *pbUser.GetBlockUser
Nickname: v.User.Nickname,
UserId: v.User.UserID,
IsBlock: true,
Birth: v.User.Birth.Format("2006-01-02"),
PhoneNumber: v.User.PhoneNumber,
Email: v.User.Email,
Gender: v.User.Gender,
},
BeginDisableTime: (v.BeginDisableTime).String(),
EndDisableTime: (v.EndDisableTime).String(),
@ -755,6 +781,10 @@ func (s *userServer) GetBlockUserById(_ context.Context, req *pbUser.GetBlockUse
Nickname: user.User.Nickname,
UserId: user.User.UserID,
IsBlock: true,
Birth: user.User.Birth.Format("2006-01-02"),
PhoneNumber: user.User.PhoneNumber,
Email: user.User.Email,
Gender: user.User.Gender,
},
BeginDisableTime: (user.BeginDisableTime).String(),
EndDisableTime: (user.EndDisableTime).String(),

@ -0,0 +1,20 @@
package base_info
type AwsStorageCredentialReq struct {
OperationID string `json:"operationID"`
}
type AwsStorageCredentialRespData struct {
AccessKeyId string `json:"accessKeyID"`
SecretAccessKey string `json:"secretAccessKey"`
SessionToken string `json:"sessionToken"`
RegionID string `json:"regionId"`
Bucket string `json:"bucket"`
FinalHost string `json:"FinalHost"`
}
type AwsStorageCredentialResp struct {
CommResp
CosData AwsStorageCredentialRespData
Data map[string]interface{} `json:"data"`
}

@ -0,0 +1,6 @@
package base_info
type Pagination struct {
PageNumber int32 `json:"pageNumber" binding:"required"`
ShowNumber int32 `json:"showNumber" binding:"required"`
}

@ -7,20 +7,21 @@ import (
)
type ApiUserInfo struct {
UserID string `json:"userID" binding:"required,min=1,max=64" swaggo:"true,用户ID,"`
Nickname string `json:"nickname" binding:"omitempty,min=1,max=64" swaggo:"true,my id,19"`
FaceURL string `json:"faceURL" binding:"omitempty,max=1024"`
Gender int32 `json:"gender" binding:"omitempty,oneof=0 1 2"`
PhoneNumber string `json:"phoneNumber" binding:"omitempty,max=32"`
Birth uint32 `json:"birth" binding:"omitempty"`
Email string `json:"email" binding:"omitempty,max=64"`
CreateIp string `json:"createIp" binding:"omitempty,max=15"`
CreateTime int64 `json:"createTime"`
LastLoginIp string `json:"LastLoginIp" binding:"omitempty,max=15"`
LastLoginTime int64 `json:"lastLoginTime"`
LoginTimes int32 `json:"loginTimes" binding:"omitempty"`
LoginLimit int32 `json:"loginLimit" binding:"omitempty"`
Ex string `json:"ex" binding:"omitempty,max=1024"`
UserID string `json:"userID" binding:"required,min=1,max=64" swaggo:"true,用户ID,"`
Nickname string `json:"nickname" binding:"omitempty,min=1,max=64" swaggo:"true,my id,19"`
FaceURL string `json:"faceURL" binding:"omitempty,max=1024"`
Gender int32 `json:"gender" binding:"omitempty,oneof=0 1 2"`
PhoneNumber string `json:"phoneNumber" binding:"omitempty,max=32"`
Birth uint32 `json:"birth" binding:"omitempty"`
Email string `json:"email" binding:"omitempty,max=64"`
CreateIp string `json:"createIp" binding:"omitempty,max=15"`
CreateTime int64 `json:"createTime"`
LastLoginIp string `json:"LastLoginIp" binding:"omitempty,max=15"`
LastLoginTime int64 `json:"lastLoginTime"`
LoginTimes int32 `json:"loginTimes" binding:"omitempty"`
LoginLimit int32 `json:"loginLimit" binding:"omitempty"`
Ex string `json:"ex" binding:"omitempty,max=1024"`
InvitationCode string `json:"invitationCode" binding:"omitempty"`
}
//type Conversation struct {

@ -1,8 +1,6 @@
package cms_api_struct
import (
apiStruct "Open_IM/pkg/base_info"
)
import server_api_params "Open_IM/pkg/proto/sdk_ws"
type AdminLoginRequest struct {
AdminName string `json:"admin_name" binding:"required"`
@ -13,31 +11,29 @@ type AdminLoginResponse struct {
Token string `json:"token"`
}
type UploadUpdateAppReq struct {
OperationID string `form:"operationID" binding:"required"`
Type int `form:"type" binding:"required"`
Version string `form:"version" binding:"required"`
//File *multipart.FileHeader `form:"file" binding:"required"`
//Yaml *multipart.FileHeader `form:"yaml" binding:"required"`
ForceUpdate bool `form:"forceUpdate" binding:"required"`
type AddUserRegisterAddFriendIDListRequest struct {
OperationID string `json:"operationID" binding:"required"`
UserIDList []string `json:"userIDList" binding:"required"`
}
type UploadUpdateAppResp struct {
apiStruct.CommResp
type AddUserRegisterAddFriendIDListResponse struct {
}
type GetDownloadURLReq struct {
type ReduceUserRegisterAddFriendIDListRequest struct {
OperationID string `json:"operationID" binding:"required"`
UserIDList []string `json:"userIDList" binding:"required"`
Operation int32 `json:"operation"`
}
type ReduceUserRegisterAddFriendIDListResponse struct {
}
type GetUserRegisterAddFriendIDListRequest struct {
OperationID string `json:"operationID" binding:"required"`
Type int `json:"type" binding:"required"`
Version string `json:"version" binding:"required"`
}
type GetDownloadURLResp struct {
apiStruct.CommResp
Data struct {
HasNewVersion bool `json:"hasNewVersion"`
ForceUpdate bool `json:"forceUpdate"`
FileURL string `json:"fileURL"`
YamlURL string `json:"yamlURL"`
} `json:"data"`
RequestPaginationBody
}
type GetUserRegisterAddFriendIDListResponse struct {
Users []*server_api_params.UserInfo `json:"users"`
ResponsePagination
}

@ -5,7 +5,12 @@ type RequestPagination struct {
ShowNumber int `form:"show_number" binding:"required"`
}
type RequestPaginationBody struct {
PageNumber int `json:"pageNumber" binding:"required"`
ShowNumber int `json:"showNumber" binding:"required"`
}
type ResponsePagination struct {
CurrentPage int `json:"current_number" binding:"required"`
ShowNumber int `json:"show_number" binding:"required"`
}
ShowNumber int `json:"show_number" binding:"required"`
}

@ -1,9 +1,5 @@
package cms_api_struct
import (
server_api_params "Open_IM/pkg/proto/sdk_ws"
)
type GroupResponse struct {
GroupOwnerName string `json:"GroupOwnerName"`
GroupOwnerID string `json:"GroupOwnerID"`
@ -108,8 +104,23 @@ type GetGroupMembersRequest struct {
RequestPagination
}
type GroupMemberResponse struct {
GroupID string `json:"groupID"`
UserID string `json:"userID"`
RoleLevel int32 `json:"roleLevel"`
JoinTime int32 `json:"joinTime"`
Nickname string `json:"nickname"`
FaceURL string `json:"faceURL"`
AppMangerLevel int32 `json:"appMangerLevel"` //if >0
JoinSource int32 `json:"joinSource"`
OperatorUserID string `json:"operatorUserID"`
Ex string `json:"ex"`
MuteEndTime uint32 `json:"muteEndTime"`
InviterUserID string `json:"inviterUserID"`
}
type GetGroupMembersResponse struct {
GroupMembers []server_api_params.GroupMemberFullInfo `json:"groupMembers"`
GroupMembers []GroupMemberResponse `json:"groupMembers"`
ResponsePagination
MemberNums int `json:"memberNums"`
}

@ -56,8 +56,11 @@ type ResignUserResponse struct {
type AlterUserRequest struct {
UserId string `json:"user_id" binding:"required"`
Nickname string `json:"nickname"`
PhoneNumber int `json:"phone_number" validate:"len=11"`
PhoneNumber string `json:"phone_number" validate:"len=11"`
Email string `json:"email"`
Birth string `json:"birth"`
Gender string `json:"gender"`
Photo string `json:"photo"`
}
type AlterUserResponse struct {
@ -67,6 +70,10 @@ type AddUserRequest struct {
PhoneNumber string `json:"phone_number" binding:"required"`
UserId string `json:"user_id" binding:"required"`
Name string `json:"name" binding:"required"`
Email string `json:"email"`
Birth string `json:"birth"`
Gender string `json:"gender"`
Photo string `json:"photo"`
}
type AddUserResponse struct {

@ -74,6 +74,16 @@ type config struct {
StorageTime int `yaml:"storageTime"`
IsDistributedMod bool `yaml:"isDistributedMod"`
} `yaml:"minio"`
Aws struct {
AccessKeyID string `yaml:"accessKeyID"`
AccessKeySecret string `yaml:"accessKeySecret"`
Region string `yaml:"region"`
Bucket string `yaml:"bucket"`
FinalHost string `yaml:"finalHost"`
RoleArn string `yaml:"roleArn"`
ExternalId string `yaml:"externalId"`
RoleSessionName string `yaml:"roleSessionName"`
} `yaml:"aws"`
}
Dtm struct {
@ -215,10 +225,10 @@ type config struct {
Addr []string `yaml:"addr"`
Topic string `yaml:"topic"`
}
Ws2mschatOffline struct {
Addr []string `yaml:"addr"`
Topic string `yaml:"topic"`
}
//Ws2mschatOffline struct {
// Addr []string `yaml:"addr"`
// Topic string `yaml:"topic"`
//}
MsgToMongo struct {
Addr []string `yaml:"addr"`
Topic string `yaml:"topic"`
@ -492,6 +502,7 @@ type config struct {
}
TestDepartMentID string `yaml:"testDepartMentID"`
ImAPIURL string `yaml:"imAPIURL"`
NeedInvitationCode bool `yaml:"needInvitationCode"`
OnboardProcess bool `yaml:"onboardProcess"`
JoinDepartmentIDList []string `yaml:"joinDepartmentIDList"`
JoinDepartmentGroups bool `yaml:"joinDepartmentGroups"`

@ -185,7 +185,8 @@ const (
//Minio
MinioDurationTimes = 3600
//Aws
AwsDurationTimes = 3600
// verificationCode used for
VerificationCodeForRegister = 1
VerificationCodeForReset = 2

@ -50,6 +50,7 @@ var (
DBMsg = errors.New("db failed")
ArgsMsg = errors.New("args failed")
CallBackMsg = errors.New("callback failed")
InvitationMsg = errors.New("invitationCode error")
ThirdPartyMsg = errors.New("third party error")
)
@ -69,6 +70,7 @@ const (
ResetPasswordFailed = 10011
RegisterLimit = 10012
LoginLimit = 10013
InvitationError = 10014
DatabaseError = 10002
ServerError = 10004
HttpError = 10005

@ -9,11 +9,15 @@ type Register struct {
UserID string `gorm:"column:user_id;type:varchar(255)" json:"userID"`
AreaCode string `gorm:"column:area_code;type:varchar(255)"`
InvitationCode string `gorm:"column:invitation_code;type:varchar(255)"`
RegisterIP string `gorm:"column:register_ip;type:varchar(255)"`
}
type Invitation struct {
InvitationCode string `gorm:"column:invitation_code;primary_key;type:varchar(255)"`
InvitationCode string `gorm:"column:invitation_code;primary_key;type:varchar(32)"`
CreateTime time.Time `gorm:"column:create_time"`
UserID string `gorm:"column:user_id"`
LastTime time.Time `gorm:"column:last_time"`
Status int32 `gorm:"column:status"`
}
//
@ -180,6 +184,7 @@ type User struct {
LoginLimit int32 `gorm:"column:login_limit"`
AppMangerLevel int32 `gorm:"column:app_manger_level"`
GlobalRecvMsgOpt int32 `gorm:"column:global_recv_msg_opt"`
InvitationCode string `gorm:"column:invitation_code"`
status int32 `gorm:"column:status"`
}
@ -325,3 +330,11 @@ type AppVersion struct {
func (AppVersion) TableName() string {
return "app_version"
}
type RegisterAddFriend struct {
UserID string `gorm:"column:user_id;primary_key;size:64"`
}
func (RegisterAddFriend) TableName() string {
return "register_add_friend"
}

@ -78,7 +78,7 @@ func initMysqlDB() {
&GroupMember{},
&GroupRequest{},
&User{},
&Black{}, &ChatLog{}, &Register{}, &Conversation{}, &AppVersion{}, &Department{}, &BlackList{}, &IpLimit{}, &UserIpLimit{}, &Invitation{})
&Black{}, &ChatLog{}, &Register{}, &Conversation{}, &AppVersion{}, &Department{}, &BlackList{}, &IpLimit{}, &UserIpLimit{}, &Invitation{}, &RegisterAddFriend{})
db.Set("gorm:table_options", "CHARSET=utf8")
db.Set("gorm:table_options", "collation=utf8_unicode_ci")
@ -154,6 +154,15 @@ func initMysqlDB() {
fmt.Println("CreateTable UserIpLimit")
db.Migrator().CreateTable(&UserIpLimit{})
}
if !db.Migrator().HasTable(&RegisterAddFriend{}) {
fmt.Println("CreateTable RegisterAddFriend")
db.Migrator().CreateTable(&RegisterAddFriend{})
}
if !db.Migrator().HasTable(&Invitation{}) {
fmt.Println("CreateTable Invitation")
db.Migrator().CreateTable(&Invitation{})
}
DB.MysqlDB.db = db
return
}

@ -2,6 +2,7 @@ package im_mysql_model
import (
"Open_IM/pkg/common/db"
"errors"
_ "gorm.io/gorm"
)
@ -11,13 +12,14 @@ func GetRegister(account, areaCode, userID string) (*db.Register, error) {
userID, "", account, account, areaCode).Take(&r).Error
}
func SetPassword(account, password, ex, userID, areaCode string) error {
func SetPassword(account, password, ex, userID, areaCode, ip string) error {
r := db.Register{
Account: account,
Password: password,
Ex: ex,
UserID: userID,
AreaCode: areaCode,
Account: account,
Password: password,
Ex: ex,
UserID: userID,
RegisterIP: ip,
AreaCode: areaCode,
}
return db.DB.MysqlDB.DefaultGormDB().Table("registers").Create(&r).Error
}
@ -28,3 +30,42 @@ func ResetPassword(account, password string) error {
}
return db.DB.MysqlDB.DefaultGormDB().Table("registers").Where("account = ?", account).Updates(&r).Error
}
func GetRegisterAddFriendList(showNumber, pageNumber int32) ([]string, error) {
var IDList []string
var err error
model := db.DB.MysqlDB.DefaultGormDB().Model(&db.RegisterAddFriend{})
if showNumber == 0 {
err = model.Pluck("user_id", &IDList).Error
} else {
err = model.Limit(int(showNumber)).Offset(int(showNumber*(pageNumber-1))).Pluck("user_id", &IDList).Error
}
return IDList, err
}
func AddUserRegisterAddFriendIDList(userIDList ...string) error {
var list []db.RegisterAddFriend
for _, v := range userIDList {
list = append(list, db.RegisterAddFriend{UserID: v})
}
result := db.DB.MysqlDB.DefaultGormDB().Create(list)
if int(result.RowsAffected) < len(userIDList) {
return errors.New("some line insert failed")
}
err := result.Error
return err
}
func ReduceUserRegisterAddFriendIDList(userIDList ...string) error {
var list []db.RegisterAddFriend
for _, v := range userIDList {
list = append(list, db.RegisterAddFriend{UserID: v})
}
err := db.DB.MysqlDB.DefaultGormDB().Delete(list).Error
return err
}
func DeleteAllRegisterAddFriendIDList() error {
err := db.DB.MysqlDB.DefaultGormDB().Where("1 = 1").Delete(&db.RegisterAddFriend{}).Error
return err
}

@ -140,14 +140,6 @@ func IsExistGroupMember(groupID, userID string) bool {
return true
}
func RemoveGroupMember(groupID string, UserID string) error {
return DeleteGroupMemberByGroupIDAndUserID(groupID, UserID)
}
func GetMemberInfoByID(groupID string, userID string) (*db.GroupMember, error) {
return GetGroupMemberInfoByGroupIDAndUserID(groupID, userID)
}
func GetGroupMemberByGroupID(groupID string, filter int32, begin int32, maxNumber int32) ([]db.GroupMember, error) {
var memberList []db.GroupMember
var err error

@ -1,12 +1,9 @@
package im_mysql_model
import (
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
"Open_IM/pkg/utils"
"errors"
"fmt"
"gorm.io/gorm"
"time"
)
@ -36,32 +33,35 @@ func InsertIntoGroup(groupInfo db.Group) error {
if err != nil {
return err
}
return nil
}
func GetGroupInfoByGroupID(groupId string) (*db.Group, error) {
func GetGroupInfoByGroupID(groupID string) (*db.Group, error) {
var groupInfo db.Group
err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Where("group_id=?", groupId).Take(&groupInfo).Error
if err != nil {
return nil, err
}
return &groupInfo, nil
err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Where("group_id=?", groupID).Take(&groupInfo).Error
return &groupInfo, err
}
func SetGroupInfo(groupInfo db.Group) error {
return db.DB.MysqlDB.DefaultGormDB().Table("groups").Where("group_id=?", groupInfo.GroupID).Updates(&groupInfo).Error
}
func GetGroupsByName(groupName string, pageNumber, showNumber int32) ([]db.Group, error) {
var groups []db.Group
err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Where(fmt.Sprintf(" name like '%%%s%%' ", groupName)).Limit(int(showNumber)).Offset(int(showNumber * (pageNumber - 1))).Find(&groups).Error
type GroupWithNum struct {
db.Group
MemberCount int `gorm:"column:num"`
}
func GetGroupsByName(groupName string, pageNumber, showNumber int32) ([]GroupWithNum, error) {
var groups []GroupWithNum
err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Select("groups.*, (select count(*) from group_members where group_members.group_id=groups.group_id) as num").
Where(fmt.Sprintf(" name like '%%%s%%' ", groupName)).Limit(int(showNumber)).Offset(int(showNumber * (pageNumber - 1))).Find(&groups).Error
return groups, err
}
func GetGroups(pageNumber, showNumber int) ([]db.Group, error) {
var groups []db.Group
if err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Limit(showNumber).Offset(showNumber * (pageNumber - 1)).Find(&groups).Error; err != nil {
func GetGroups(pageNumber, showNumber int) ([]GroupWithNum, error) {
var groups []GroupWithNum
if err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Select("groups.*, (select count(*) from group_members where group_members.group_id=groups.group_id) as num").
Limit(showNumber).Offset(showNumber * (pageNumber - 1)).Find(&groups).Error; err != nil {
return groups, err
}
return groups, nil
@ -78,77 +78,6 @@ func OperateGroupStatus(groupId string, groupStatus int32) error {
return nil
}
func DeleteGroup(groupId string) error {
var group db.Group
var groupMembers []db.GroupMember
if err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Where("group_id=?", groupId).Delete(&group).Error; err != nil {
return err
}
if err := db.DB.MysqlDB.DefaultGormDB().Table("group_members").Where("group_id=?", groupId).Delete(groupMembers).Error; err != nil {
return err
}
return nil
}
func OperateGroupRole(userId, groupId string, roleLevel int32) (string, string, error) {
groupMember := db.GroupMember{
UserID: userId,
GroupID: groupId,
}
updateInfo := db.GroupMember{
RoleLevel: roleLevel,
}
groupMaster := db.GroupMember{}
var err error
switch roleLevel {
case constant.GroupOwner:
err = db.DB.MysqlDB.DefaultGormDB().Transaction(func(tx *gorm.DB) error {
result := db.DB.MysqlDB.DefaultGormDB().Table("group_members").Where("group_id = ? and role_level = ?", groupId, constant.GroupOwner).First(&groupMaster).Updates(&db.GroupMember{
RoleLevel: constant.GroupOrdinaryUsers,
})
if result.Error != nil {
return result.Error
}
if result.RowsAffected == 0 {
return errors.New(fmt.Sprintf("user %s not exist in group %s or already operate", userId, groupId))
}
result = db.DB.MysqlDB.DefaultGormDB().Table("group_members").First(&groupMember).Updates(updateInfo)
if result.Error != nil {
return result.Error
}
if result.RowsAffected == 0 {
return errors.New(fmt.Sprintf("user %s not exist in group %s or already operate", userId, groupId))
}
return nil
})
case constant.GroupOrdinaryUsers:
err = db.DB.MysqlDB.DefaultGormDB().Transaction(func(tx *gorm.DB) error {
result := db.DB.MysqlDB.DefaultGormDB().Table("group_members").Where("group_id = ? and role_level = ?", groupId, constant.GroupOwner).First(&groupMaster)
if result.Error != nil {
return result.Error
}
if result.RowsAffected == 0 {
return errors.New(fmt.Sprintf("user %s not exist in group %s or already operate", userId, groupId))
}
if groupMaster.UserID == userId {
return errors.New(fmt.Sprintf("user %s is master of %s, cant set to ordinary user", userId, groupId))
} else {
result = db.DB.MysqlDB.DefaultGormDB().Table("group_members").Find(&groupMember).Updates(updateInfo)
if result.Error != nil {
return result.Error
}
if result.RowsAffected == 0 {
return errors.New(fmt.Sprintf("user %s not exist in group %s or already operate", userId, groupId))
}
}
return nil
})
}
return "", "", err
}
func GetGroupsCountNum(group db.Group) (int32, error) {
var count int64
if err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Where(fmt.Sprintf(" name like '%%%s%%' ", group.GroupName)).Count(&count).Error; err != nil {
@ -157,34 +86,10 @@ func GetGroupsCountNum(group db.Group) (int32, error) {
return int32(count), nil
}
func GetGroupById(groupId string) (db.Group, error) {
group := db.Group{
GroupID: groupId,
}
if err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Find(&group).Error; err != nil {
return group, err
}
return group, nil
}
func GetGroupMaster(groupId string) (db.GroupMember, error) {
groupMember := db.GroupMember{}
if err := db.DB.MysqlDB.DefaultGormDB().Table("group_members").Where("role_level=? and group_id=?", constant.GroupOwner, groupId).Find(&groupMember).Error; err != nil {
return groupMember, err
}
return groupMember, nil
}
func UpdateGroupInfoDefaultZero(groupID string, args map[string]interface{}) error {
return db.DB.MysqlDB.DefaultGormDB().Table("groups").Where("group_id = ? ", groupID).Updates(args).Error
}
func GetAllGroupIDList() ([]string, error) {
var groupIDList []string
err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Pluck("group_id", &groupIDList).Error
return groupIDList, err
}
func GetGroupIDListByGroupType(groupType int) ([]string, error) {
var groupIDList []string
if err := db.DB.MysqlDB.DefaultGormDB().Table("groups").Where("group_type = ? ", groupType).Pluck("group_id", &groupIDList).Error; err != nil {

@ -0,0 +1,113 @@
package im_mysql_model
import (
"Open_IM/pkg/common/db"
"errors"
"github.com/jinzhu/gorm"
"math/rand"
"time"
)
/**
*
*/
func BatchCreateInvitationCodes(CodeNums int, CodeLen int) ([]string, error) {
i := CodeNums
var codes []string
for {
if i == 0 {
break
}
code := CreateRandomString(CodeLen)
invitation := new(db.Invitation)
invitation.CreateTime = time.Now()
invitation.InvitationCode = code
invitation.LastTime = time.Now()
invitation.Status = 0
invitation.UserID = ""
result := db.DB.MysqlDB.DefaultGormDB().Table("invitations").Create(&invitation)
if result.Error != nil {
continue
}
if result.RowsAffected > 0 {
i = i - 1
}
codes = append(codes, code)
}
return codes, nil
}
/**
*
*/
func CheckInvitationCode(code string) error {
var invitationCode db.Invitation
err := db.DB.MysqlDB.DefaultGormDB().Table("invitations").Where("invitation_code=?", code).Take(&invitationCode).Error
if err != nil {
return err
}
if invitationCode.InvitationCode != code {
return errors.New("邀请码不存在")
}
if invitationCode.Status != 0 {
return errors.New("邀请码已经被使用")
}
return nil
}
/**
*
*/
func TryLockInvitationCode(Code string, UserID string) bool {
Data := make(map[string]interface{}, 0)
Data["user_id"] = UserID
Data["status"] = 1
Data["last_time"] = time.Now()
result := db.DB.MysqlDB.DefaultGormDB().Table("invitations").Where("invitation_code=? and user_id=? and status=?", Code, "", 0).Updates(Data)
if result.Error != nil {
return false
}
return result.RowsAffected > 0
}
/**
*
*/
func FinishInvitationCode(Code string, UserId string) bool {
Data := make(map[string]interface{}, 0)
Data["status"] = 2
result := db.DB.MysqlDB.DefaultGormDB().Table("invitations").Where("invitation_code=? and user_id=? and status=?", Code, UserId, 1).Updates(Data)
if result.Error != nil {
return false
}
return result.RowsAffected > 0
}
func GetInvitationCode(code string) (*db.Invitation, error) {
invitation := &db.Invitation{
InvitationCode: code,
}
err := db.DB.MysqlDB.DefaultGormDB().Model(invitation).Find(invitation).Error
if gorm.IsRecordNotFoundError(err) {
return invitation, nil
}
return invitation, err
}
func CreateRandomString(strlen int) string {
str := "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
bytes := []byte(str)
result := []byte{}
r := rand.New(rand.NewSource(time.Now().UnixNano()))
for i := 0; i < strlen; i++ {
result = append(result, bytes[r.Intn(len(bytes))])
}
return string(result)
}
func GetInvitationCodes(showNumber, pageNumber, status int32) ([]db.Invitation, error) {
var invitationList []db.Invitation
err := db.DB.MysqlDB.DefaultGormDB().Model(db.Invitation{}).Limit(int(showNumber)).Offset(int(showNumber*(pageNumber-1))).Where("status=?", status).
Order("create_time desc").Find(&invitationList).Error
return invitationList, err
}

@ -0,0 +1,76 @@
package im_mysql_model
import (
"Open_IM/pkg/common/db"
"time"
)
func IsLimitRegisterIp(RegisterIp string) (bool, error) {
//如果已经存在则限制
var count int64
if err := db.DB.MysqlDB.DefaultGormDB().Table("ip_limits").Where("ip=? and limit_register=? and limit_time>now()", RegisterIp, 1).Count(&count).Error; err != nil {
return false, err
}
return count > 0, nil
}
func IsLimitLoginIp(LoginIp string) (bool, error) {
//如果已经存在则限制
var count int64
if err := db.DB.MysqlDB.DefaultGormDB().Table("ip_limits").Where("ip=? and limit_login=? and limit_time>now()", LoginIp, 1).Count(&count).Error; err != nil {
return false, err
}
return count > 0, nil
}
func IsLimitUserLoginIp(userID string, LoginIp string) (bool, error) {
//如果已经存在则放行
var count int64
if err := db.DB.MysqlDB.DefaultGormDB().Table("user_ip_limits").Where("ip=? and user_id=?", LoginIp, userID).Count(&count).Error; err != nil {
return false, err
}
return count == 0, nil
}
func QueryIPLimits(ip string) (*db.IpLimit, error) {
var ipLimit db.IpLimit
err := db.DB.MysqlDB.DefaultGormDB().Model(&db.IpLimit{}).Where("ip=?", ip).First(&ipLimit).Error
return &ipLimit, err
}
func QueryUserIPLimits(ip string) ([]db.UserIpLimit, error) {
var ips []db.UserIpLimit
err := db.DB.MysqlDB.DefaultGormDB().Model(&db.UserIpLimit{}).Where("ip=?", ip).Find(&ips).Error
return ips, err
}
func InsertOneIntoIpLimits(ipLimits db.IpLimit) error {
return db.DB.MysqlDB.DefaultGormDB().Model(&db.IpLimit{}).Create(ipLimits).Error
}
func DeleteOneFromIpLimits(ip string) error {
ipLimits := &db.IpLimit{Ip: ip}
return db.DB.MysqlDB.DefaultGormDB().Model(ipLimits).Where("ip=?", ip).Delete(ipLimits).Error
}
func GetIpLimitsLoginByUserID(userID string) ([]db.UserIpLimit, error) {
var ips []db.UserIpLimit
err := db.DB.MysqlDB.DefaultGormDB().Model(&db.UserIpLimit{}).Where("user_id=?", userID).Find(&ips).Error
return ips, err
}
func InsertUserIpLimitsLogin(userIp *db.UserIpLimit) error {
userIp.CreateTime = time.Now()
return db.DB.MysqlDB.DefaultGormDB().Model(&db.UserIpLimit{}).Create(userIp).Error
}
func DeleteUserIpLimitsLogin(userID, ip string) error {
userIp := db.UserIpLimit{UserID: userID, Ip: ip}
return db.DB.MysqlDB.DefaultGormDB().Model(&db.UserIpLimit{}).Delete(&userIp).Error
}
func GetRegisterUserNum(ip string) ([]string, error) {
var userIDList []string
err := db.DB.MysqlDB.DefaultGormDB().Model(&db.Register{}).Where("register_ip=?", ip).Pluck("user_id", &userIDList).Error
return userIDList, err
}

@ -6,6 +6,7 @@ import (
"Open_IM/pkg/common/db"
"Open_IM/pkg/utils"
"fmt"
"strconv"
"time"
)
@ -72,6 +73,12 @@ func GetUserByUserID(userID string) (*db.User, error) {
return &user, nil
}
func GetUsersByUserIDList(userIDList []string) ([]*db.User, error) {
var userList []*db.User
err := db.DB.MysqlDB.DefaultGormDB().Table("users").Where("user_id in (?)", userIDList).Find(&userList).Error
return userList, err
}
func GetUserNameByUserID(userID string) (string, error) {
var user db.User
err := db.DB.MysqlDB.DefaultGormDB().Table("users").Select("name").Where("user_id=?", userID).First(&user).Error
@ -117,13 +124,31 @@ func GetUsers(showNumber, pageNumber int32) ([]db.User, error) {
return users, err
}
func AddUser(userId, phoneNumber, name string) error {
func AddUser(userId string, phoneNumber string, name string, email string, gender string, photo string, birth string) error {
_gender, _err := strconv.Atoi(gender)
if _err != nil {
_gender = 0
}
_birth, _err := time.ParseInLocation("2006-01-02", birth, time.Local)
if _err != nil {
_birth = time.Now()
}
user := db.User{
PhoneNumber: phoneNumber,
Birth: time.Now(),
CreateTime: time.Now(),
UserID: userId,
Nickname: name,
UserID: userId,
Nickname: name,
FaceURL: photo,
Gender: int32(_gender),
PhoneNumber: phoneNumber,
Birth: _birth,
Email: email,
Ex: "",
CreateTime: time.Now(),
CreateIp: "",
LastLoginTime: time.Now(),
LastLoginIp: "",
LoginTimes: 0,
LoginLimit: 0,
InvitationCode: "",
}
result := db.DB.MysqlDB.DefaultGormDB().Table("users").Create(&user)
return result.Error
@ -202,8 +227,12 @@ func GetBlockUserById(userId string) (BlockUserInfo, error) {
return blockUserInfo, err
}
blockUserInfo.User.UserID = user.UserID
blockUserInfo.User.FaceURL = user.UserID
blockUserInfo.User.FaceURL = user.FaceURL
blockUserInfo.User.Nickname = user.Nickname
blockUserInfo.User.Birth = user.Birth
blockUserInfo.User.PhoneNumber = user.PhoneNumber
blockUserInfo.User.Email = user.Email
blockUserInfo.User.Gender = user.Gender
blockUserInfo.BeginDisableTime = blockUser.BeginDisableTime
blockUserInfo.EndDisableTime = blockUser.EndDisableTime
return blockUserInfo, nil
@ -220,9 +249,13 @@ func GetBlockUsers(showNumber, pageNumber int32) ([]BlockUserInfo, error) {
if err := db.DB.MysqlDB.DefaultGormDB().Table("users").Where("user_id=?", blockUser.UserId).First(&user).Error; err == nil {
blockUserInfos = append(blockUserInfos, BlockUserInfo{
User: db.User{
UserID: user.UserID,
Nickname: user.Nickname,
FaceURL: user.FaceURL,
UserID: user.UserID,
Nickname: user.Nickname,
FaceURL: user.FaceURL,
Birth: user.Birth,
PhoneNumber: user.PhoneNumber,
Email: user.Email,
Gender: user.Gender,
},
BeginDisableTime: blockUser.BeginDisableTime,
EndDisableTime: blockUser.EndDisableTime,
@ -253,30 +286,3 @@ func GetBlockUsersNumCount() (int32, error) {
}
return int32(count), nil
}
func IsLimitRegisterIp(RegisterIp string) (bool, error) {
//如果已经存在则限制
var count int64
if err := db.DB.MysqlDB.DefaultGormDB().Table("ip_limits").Where("ip=? and limit_register=? and limit_time>now()", RegisterIp, 1).Count(&count).Error; err != nil {
return false, err
}
return count > 0, nil
}
func IsLimitLoginIp(LoginIp string) (bool, error) {
//如果已经存在则限制
var count int64
if err := db.DB.MysqlDB.DefaultGormDB().Table("ip_limits").Where("ip=? and limit_login=? and limit_time>now()", LoginIp, 1).Count(&count).Error; err != nil {
return false, err
}
return count > 0, nil
}
func IsLimitUserLoginIp(userID string, LoginIp string) (bool, error) {
//如果已经存在则放行
var count int64
if err := db.DB.MysqlDB.DefaultGormDB().Table("user_ip_limits").Where("ip=? and user_id=?", LoginIp, userID).Count(&count).Error; err != nil {
return false, err
}
return count == 0, nil
}

@ -1,284 +1,452 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.15.5
// source: admin_cms/admin_cms.proto
package admin_cms
package admin_cms // import "./admin_cms"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import sdk_ws "Open_IM/pkg/proto/sdk_ws"
import (
context "context"
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
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)
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type AdminLoginReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"`
AdminID string `protobuf:"bytes,2,opt,name=AdminID" json:"AdminID,omitempty"`
Secret string `protobuf:"bytes,3,opt,name=Secret" json:"Secret,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
OperationID string `protobuf:"bytes,1,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
AdminID string `protobuf:"bytes,2,opt,name=AdminID,proto3" json:"AdminID,omitempty"`
Secret string `protobuf:"bytes,3,opt,name=Secret,proto3" json:"Secret,omitempty"`
func (m *AdminLoginReq) Reset() { *m = AdminLoginReq{} }
func (m *AdminLoginReq) String() string { return proto.CompactTextString(m) }
func (*AdminLoginReq) ProtoMessage() {}
func (*AdminLoginReq) Descriptor() ([]byte, []int) {
return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{0}
}
func (m *AdminLoginReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AdminLoginReq.Unmarshal(m, b)
}
func (m *AdminLoginReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AdminLoginReq.Marshal(b, m, deterministic)
}
func (dst *AdminLoginReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_AdminLoginReq.Merge(dst, src)
}
func (m *AdminLoginReq) XXX_Size() int {
return xxx_messageInfo_AdminLoginReq.Size(m)
}
func (m *AdminLoginReq) XXX_DiscardUnknown() {
xxx_messageInfo_AdminLoginReq.DiscardUnknown(m)
}
var xxx_messageInfo_AdminLoginReq proto.InternalMessageInfo
func (x *AdminLoginReq) Reset() {
*x = AdminLoginReq{}
if protoimpl.UnsafeEnabled {
mi := &file_admin_cms_admin_cms_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
func (m *AdminLoginReq) GetOperationID() string {
if m != nil {
return m.OperationID
}
return ""
}
func (x *AdminLoginReq) String() string {
return protoimpl.X.MessageStringOf(x)
func (m *AdminLoginReq) GetAdminID() string {
if m != nil {
return m.AdminID
}
return ""
}
func (*AdminLoginReq) ProtoMessage() {}
func (x *AdminLoginReq) ProtoReflect() protoreflect.Message {
mi := &file_admin_cms_admin_cms_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
func (m *AdminLoginReq) GetSecret() string {
if m != nil {
return m.Secret
}
return mi.MessageOf(x)
return ""
}
// Deprecated: Use AdminLoginReq.ProtoReflect.Descriptor instead.
func (*AdminLoginReq) Descriptor() ([]byte, []int) {
return file_admin_cms_admin_cms_proto_rawDescGZIP(), []int{0}
type AdminLoginResp struct {
Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *AdminLoginReq) GetOperationID() string {
if x != nil {
return x.OperationID
func (m *AdminLoginResp) Reset() { *m = AdminLoginResp{} }
func (m *AdminLoginResp) String() string { return proto.CompactTextString(m) }
func (*AdminLoginResp) ProtoMessage() {}
func (*AdminLoginResp) Descriptor() ([]byte, []int) {
return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{1}
}
func (m *AdminLoginResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AdminLoginResp.Unmarshal(m, b)
}
func (m *AdminLoginResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AdminLoginResp.Marshal(b, m, deterministic)
}
func (dst *AdminLoginResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_AdminLoginResp.Merge(dst, src)
}
func (m *AdminLoginResp) XXX_Size() int {
return xxx_messageInfo_AdminLoginResp.Size(m)
}
func (m *AdminLoginResp) XXX_DiscardUnknown() {
xxx_messageInfo_AdminLoginResp.DiscardUnknown(m)
}
var xxx_messageInfo_AdminLoginResp proto.InternalMessageInfo
func (m *AdminLoginResp) GetToken() string {
if m != nil {
return m.Token
}
return ""
}
func (x *AdminLoginReq) GetAdminID() string {
if x != nil {
return x.AdminID
type AddUserRegisterAddFriendIDListReq struct {
OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"`
UserIDList []string `protobuf:"bytes,2,rep,name=userIDList" json:"userIDList,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AddUserRegisterAddFriendIDListReq) Reset() { *m = AddUserRegisterAddFriendIDListReq{} }
func (m *AddUserRegisterAddFriendIDListReq) String() string { return proto.CompactTextString(m) }
func (*AddUserRegisterAddFriendIDListReq) ProtoMessage() {}
func (*AddUserRegisterAddFriendIDListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{2}
}
func (m *AddUserRegisterAddFriendIDListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddUserRegisterAddFriendIDListReq.Unmarshal(m, b)
}
func (m *AddUserRegisterAddFriendIDListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AddUserRegisterAddFriendIDListReq.Marshal(b, m, deterministic)
}
func (dst *AddUserRegisterAddFriendIDListReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_AddUserRegisterAddFriendIDListReq.Merge(dst, src)
}
func (m *AddUserRegisterAddFriendIDListReq) XXX_Size() int {
return xxx_messageInfo_AddUserRegisterAddFriendIDListReq.Size(m)
}
func (m *AddUserRegisterAddFriendIDListReq) XXX_DiscardUnknown() {
xxx_messageInfo_AddUserRegisterAddFriendIDListReq.DiscardUnknown(m)
}
var xxx_messageInfo_AddUserRegisterAddFriendIDListReq proto.InternalMessageInfo
func (m *AddUserRegisterAddFriendIDListReq) GetOperationID() string {
if m != nil {
return m.OperationID
}
return ""
}
func (x *AdminLoginReq) GetSecret() string {
if x != nil {
return x.Secret
func (m *AddUserRegisterAddFriendIDListReq) GetUserIDList() []string {
if m != nil {
return m.UserIDList
}
return ""
return nil
}
type AdminLoginResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
type AddUserRegisterAddFriendIDListResp struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
func (m *AddUserRegisterAddFriendIDListResp) Reset() { *m = AddUserRegisterAddFriendIDListResp{} }
func (m *AddUserRegisterAddFriendIDListResp) String() string { return proto.CompactTextString(m) }
func (*AddUserRegisterAddFriendIDListResp) ProtoMessage() {}
func (*AddUserRegisterAddFriendIDListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{3}
}
func (m *AddUserRegisterAddFriendIDListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddUserRegisterAddFriendIDListResp.Unmarshal(m, b)
}
func (m *AddUserRegisterAddFriendIDListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AddUserRegisterAddFriendIDListResp.Marshal(b, m, deterministic)
}
func (dst *AddUserRegisterAddFriendIDListResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_AddUserRegisterAddFriendIDListResp.Merge(dst, src)
}
func (m *AddUserRegisterAddFriendIDListResp) XXX_Size() int {
return xxx_messageInfo_AddUserRegisterAddFriendIDListResp.Size(m)
}
func (m *AddUserRegisterAddFriendIDListResp) XXX_DiscardUnknown() {
xxx_messageInfo_AddUserRegisterAddFriendIDListResp.DiscardUnknown(m)
}
func (x *AdminLoginResp) Reset() {
*x = AdminLoginResp{}
if protoimpl.UnsafeEnabled {
mi := &file_admin_cms_admin_cms_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
var xxx_messageInfo_AddUserRegisterAddFriendIDListResp proto.InternalMessageInfo
type ReduceUserRegisterAddFriendIDListReq struct {
OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"`
Operation int32 `protobuf:"varint,2,opt,name=operation" json:"operation,omitempty"`
UserIDList []string `protobuf:"bytes,3,rep,name=userIDList" json:"userIDList,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *AdminLoginResp) String() string {
return protoimpl.X.MessageStringOf(x)
func (m *ReduceUserRegisterAddFriendIDListReq) Reset() { *m = ReduceUserRegisterAddFriendIDListReq{} }
func (m *ReduceUserRegisterAddFriendIDListReq) String() string { return proto.CompactTextString(m) }
func (*ReduceUserRegisterAddFriendIDListReq) ProtoMessage() {}
func (*ReduceUserRegisterAddFriendIDListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{4}
}
func (m *ReduceUserRegisterAddFriendIDListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReduceUserRegisterAddFriendIDListReq.Unmarshal(m, b)
}
func (m *ReduceUserRegisterAddFriendIDListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReduceUserRegisterAddFriendIDListReq.Marshal(b, m, deterministic)
}
func (dst *ReduceUserRegisterAddFriendIDListReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReduceUserRegisterAddFriendIDListReq.Merge(dst, src)
}
func (m *ReduceUserRegisterAddFriendIDListReq) XXX_Size() int {
return xxx_messageInfo_ReduceUserRegisterAddFriendIDListReq.Size(m)
}
func (m *ReduceUserRegisterAddFriendIDListReq) XXX_DiscardUnknown() {
xxx_messageInfo_ReduceUserRegisterAddFriendIDListReq.DiscardUnknown(m)
}
func (*AdminLoginResp) ProtoMessage() {}
var xxx_messageInfo_ReduceUserRegisterAddFriendIDListReq proto.InternalMessageInfo
func (x *AdminLoginResp) ProtoReflect() protoreflect.Message {
mi := &file_admin_cms_admin_cms_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
func (m *ReduceUserRegisterAddFriendIDListReq) GetOperationID() string {
if m != nil {
return m.OperationID
}
return mi.MessageOf(x)
return ""
}
// Deprecated: Use AdminLoginResp.ProtoReflect.Descriptor instead.
func (*AdminLoginResp) Descriptor() ([]byte, []int) {
return file_admin_cms_admin_cms_proto_rawDescGZIP(), []int{1}
func (m *ReduceUserRegisterAddFriendIDListReq) GetOperation() int32 {
if m != nil {
return m.Operation
}
return 0
}
func (m *ReduceUserRegisterAddFriendIDListReq) GetUserIDList() []string {
if m != nil {
return m.UserIDList
}
return nil
}
type ReduceUserRegisterAddFriendIDListResp struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReduceUserRegisterAddFriendIDListResp) Reset() { *m = ReduceUserRegisterAddFriendIDListResp{} }
func (m *ReduceUserRegisterAddFriendIDListResp) String() string { return proto.CompactTextString(m) }
func (*ReduceUserRegisterAddFriendIDListResp) ProtoMessage() {}
func (*ReduceUserRegisterAddFriendIDListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{5}
}
func (m *ReduceUserRegisterAddFriendIDListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReduceUserRegisterAddFriendIDListResp.Unmarshal(m, b)
}
func (m *ReduceUserRegisterAddFriendIDListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReduceUserRegisterAddFriendIDListResp.Marshal(b, m, deterministic)
}
func (dst *ReduceUserRegisterAddFriendIDListResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReduceUserRegisterAddFriendIDListResp.Merge(dst, src)
}
func (m *ReduceUserRegisterAddFriendIDListResp) XXX_Size() int {
return xxx_messageInfo_ReduceUserRegisterAddFriendIDListResp.Size(m)
}
func (m *ReduceUserRegisterAddFriendIDListResp) XXX_DiscardUnknown() {
xxx_messageInfo_ReduceUserRegisterAddFriendIDListResp.DiscardUnknown(m)
}
var xxx_messageInfo_ReduceUserRegisterAddFriendIDListResp proto.InternalMessageInfo
func (x *AdminLoginResp) GetToken() string {
if x != nil {
return x.Token
type GetUserRegisterAddFriendIDListReq struct {
OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"`
Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=Pagination" json:"Pagination,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetUserRegisterAddFriendIDListReq) Reset() { *m = GetUserRegisterAddFriendIDListReq{} }
func (m *GetUserRegisterAddFriendIDListReq) String() string { return proto.CompactTextString(m) }
func (*GetUserRegisterAddFriendIDListReq) ProtoMessage() {}
func (*GetUserRegisterAddFriendIDListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{6}
}
func (m *GetUserRegisterAddFriendIDListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserRegisterAddFriendIDListReq.Unmarshal(m, b)
}
func (m *GetUserRegisterAddFriendIDListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetUserRegisterAddFriendIDListReq.Marshal(b, m, deterministic)
}
func (dst *GetUserRegisterAddFriendIDListReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetUserRegisterAddFriendIDListReq.Merge(dst, src)
}
func (m *GetUserRegisterAddFriendIDListReq) XXX_Size() int {
return xxx_messageInfo_GetUserRegisterAddFriendIDListReq.Size(m)
}
func (m *GetUserRegisterAddFriendIDListReq) XXX_DiscardUnknown() {
xxx_messageInfo_GetUserRegisterAddFriendIDListReq.DiscardUnknown(m)
}
var xxx_messageInfo_GetUserRegisterAddFriendIDListReq proto.InternalMessageInfo
func (m *GetUserRegisterAddFriendIDListReq) GetOperationID() string {
if m != nil {
return m.OperationID
}
return ""
}
var File_admin_cms_admin_cms_proto protoreflect.FileDescriptor
var file_admin_cms_admin_cms_proto_rawDesc = []byte{
0x0a, 0x19, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6d, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69,
0x6e, 0x5f, 0x63, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x61, 0x64, 0x6d,
0x69, 0x6e, 0x5f, 0x63, 0x6d, 0x73, 0x22, 0x63, 0x0a, 0x0d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c,
0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x64, 0x6d,
0x69, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x64, 0x6d, 0x69,
0x6e, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x26, 0x0a, 0x0e, 0x41,
0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a,
0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
0x6b, 0x65, 0x6e, 0x32, 0x4d, 0x0a, 0x08, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x43, 0x4d, 0x53, 0x12,
0x41, 0x0a, 0x0a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x2e,
0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6d, 0x73, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c,
0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f,
0x63, 0x6d, 0x73, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x42, 0x17, 0x5a, 0x15, 0x2e, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6d,
0x73, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_admin_cms_admin_cms_proto_rawDescOnce sync.Once
file_admin_cms_admin_cms_proto_rawDescData = file_admin_cms_admin_cms_proto_rawDesc
)
func (m *GetUserRegisterAddFriendIDListReq) GetPagination() *sdk_ws.RequestPagination {
if m != nil {
return m.Pagination
}
return nil
}
func file_admin_cms_admin_cms_proto_rawDescGZIP() []byte {
file_admin_cms_admin_cms_proto_rawDescOnce.Do(func() {
file_admin_cms_admin_cms_proto_rawDescData = protoimpl.X.CompressGZIP(file_admin_cms_admin_cms_proto_rawDescData)
})
return file_admin_cms_admin_cms_proto_rawDescData
}
var file_admin_cms_admin_cms_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_admin_cms_admin_cms_proto_goTypes = []interface{}{
(*AdminLoginReq)(nil), // 0: admin_cms.AdminLoginReq
(*AdminLoginResp)(nil), // 1: admin_cms.AdminLoginResp
}
var file_admin_cms_admin_cms_proto_depIdxs = []int32{
0, // 0: admin_cms.adminCMS.AdminLogin:input_type -> admin_cms.AdminLoginReq
1, // 1: admin_cms.adminCMS.AdminLogin:output_type -> admin_cms.AdminLoginResp
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_admin_cms_admin_cms_proto_init() }
func file_admin_cms_admin_cms_proto_init() {
if File_admin_cms_admin_cms_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_admin_cms_admin_cms_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AdminLoginReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_admin_cms_admin_cms_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AdminLoginResp); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_admin_cms_admin_cms_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_admin_cms_admin_cms_proto_goTypes,
DependencyIndexes: file_admin_cms_admin_cms_proto_depIdxs,
MessageInfos: file_admin_cms_admin_cms_proto_msgTypes,
}.Build()
File_admin_cms_admin_cms_proto = out.File
file_admin_cms_admin_cms_proto_rawDesc = nil
file_admin_cms_admin_cms_proto_goTypes = nil
file_admin_cms_admin_cms_proto_depIdxs = nil
type GetUserRegisterAddFriendIDListResp struct {
UserInfoList []*sdk_ws.UserInfo `protobuf:"bytes,1,rep,name=UserInfoList" json:"UserInfoList,omitempty"`
Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,2,opt,name=Pagination" json:"Pagination,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetUserRegisterAddFriendIDListResp) Reset() { *m = GetUserRegisterAddFriendIDListResp{} }
func (m *GetUserRegisterAddFriendIDListResp) String() string { return proto.CompactTextString(m) }
func (*GetUserRegisterAddFriendIDListResp) ProtoMessage() {}
func (*GetUserRegisterAddFriendIDListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_admin_cms_e0cc6ee28c5c634b, []int{7}
}
func (m *GetUserRegisterAddFriendIDListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserRegisterAddFriendIDListResp.Unmarshal(m, b)
}
func (m *GetUserRegisterAddFriendIDListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetUserRegisterAddFriendIDListResp.Marshal(b, m, deterministic)
}
func (dst *GetUserRegisterAddFriendIDListResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetUserRegisterAddFriendIDListResp.Merge(dst, src)
}
func (m *GetUserRegisterAddFriendIDListResp) XXX_Size() int {
return xxx_messageInfo_GetUserRegisterAddFriendIDListResp.Size(m)
}
func (m *GetUserRegisterAddFriendIDListResp) XXX_DiscardUnknown() {
xxx_messageInfo_GetUserRegisterAddFriendIDListResp.DiscardUnknown(m)
}
var xxx_messageInfo_GetUserRegisterAddFriendIDListResp proto.InternalMessageInfo
func (m *GetUserRegisterAddFriendIDListResp) GetUserInfoList() []*sdk_ws.UserInfo {
if m != nil {
return m.UserInfoList
}
return nil
}
func (m *GetUserRegisterAddFriendIDListResp) GetPagination() *sdk_ws.ResponsePagination {
if m != nil {
return m.Pagination
}
return nil
}
func init() {
proto.RegisterType((*AdminLoginReq)(nil), "admin_cms.AdminLoginReq")
proto.RegisterType((*AdminLoginResp)(nil), "admin_cms.AdminLoginResp")
proto.RegisterType((*AddUserRegisterAddFriendIDListReq)(nil), "admin_cms.AddUserRegisterAddFriendIDListReq")
proto.RegisterType((*AddUserRegisterAddFriendIDListResp)(nil), "admin_cms.AddUserRegisterAddFriendIDListResp")
proto.RegisterType((*ReduceUserRegisterAddFriendIDListReq)(nil), "admin_cms.ReduceUserRegisterAddFriendIDListReq")
proto.RegisterType((*ReduceUserRegisterAddFriendIDListResp)(nil), "admin_cms.ReduceUserRegisterAddFriendIDListResp")
proto.RegisterType((*GetUserRegisterAddFriendIDListReq)(nil), "admin_cms.GetUserRegisterAddFriendIDListReq")
proto.RegisterType((*GetUserRegisterAddFriendIDListResp)(nil), "admin_cms.GetUserRegisterAddFriendIDListResp")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
const _ = grpc.SupportPackageIsVersion4
// Client API for AdminCMS service
// AdminCMSClient is the client API for AdminCMS service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AdminCMSClient interface {
AdminLogin(ctx context.Context, in *AdminLoginReq, opts ...grpc.CallOption) (*AdminLoginResp, error)
AddUserRegisterAddFriendIDList(ctx context.Context, in *AddUserRegisterAddFriendIDListReq, opts ...grpc.CallOption) (*AddUserRegisterAddFriendIDListResp, error)
ReduceUserRegisterAddFriendIDList(ctx context.Context, in *ReduceUserRegisterAddFriendIDListReq, opts ...grpc.CallOption) (*ReduceUserRegisterAddFriendIDListResp, error)
GetUserRegisterAddFriendIDList(ctx context.Context, in *GetUserRegisterAddFriendIDListReq, opts ...grpc.CallOption) (*GetUserRegisterAddFriendIDListResp, error)
}
type adminCMSClient struct {
cc grpc.ClientConnInterface
cc *grpc.ClientConn
}
func NewAdminCMSClient(cc grpc.ClientConnInterface) AdminCMSClient {
func NewAdminCMSClient(cc *grpc.ClientConn) AdminCMSClient {
return &adminCMSClient{cc}
}
func (c *adminCMSClient) AdminLogin(ctx context.Context, in *AdminLoginReq, opts ...grpc.CallOption) (*AdminLoginResp, error) {
out := new(AdminLoginResp)
err := c.cc.Invoke(ctx, "/admin_cms.adminCMS/AdminLogin", in, out, opts...)
err := grpc.Invoke(ctx, "/admin_cms.adminCMS/AdminLogin", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AdminCMSServer is the server API for AdminCMS service.
type AdminCMSServer interface {
AdminLogin(context.Context, *AdminLoginReq) (*AdminLoginResp, error)
func (c *adminCMSClient) AddUserRegisterAddFriendIDList(ctx context.Context, in *AddUserRegisterAddFriendIDListReq, opts ...grpc.CallOption) (*AddUserRegisterAddFriendIDListResp, error) {
out := new(AddUserRegisterAddFriendIDListResp)
err := grpc.Invoke(ctx, "/admin_cms.adminCMS/AddUserRegisterAddFriendIDList", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UnimplementedAdminCMSServer can be embedded to have forward compatible implementations.
type UnimplementedAdminCMSServer struct {
func (c *adminCMSClient) ReduceUserRegisterAddFriendIDList(ctx context.Context, in *ReduceUserRegisterAddFriendIDListReq, opts ...grpc.CallOption) (*ReduceUserRegisterAddFriendIDListResp, error) {
out := new(ReduceUserRegisterAddFriendIDListResp)
err := grpc.Invoke(ctx, "/admin_cms.adminCMS/ReduceUserRegisterAddFriendIDList", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (*UnimplementedAdminCMSServer) AdminLogin(context.Context, *AdminLoginReq) (*AdminLoginResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method AdminLogin not implemented")
func (c *adminCMSClient) GetUserRegisterAddFriendIDList(ctx context.Context, in *GetUserRegisterAddFriendIDListReq, opts ...grpc.CallOption) (*GetUserRegisterAddFriendIDListResp, error) {
out := new(GetUserRegisterAddFriendIDListResp)
err := grpc.Invoke(ctx, "/admin_cms.adminCMS/GetUserRegisterAddFriendIDList", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for AdminCMS service
type AdminCMSServer interface {
AdminLogin(context.Context, *AdminLoginReq) (*AdminLoginResp, error)
AddUserRegisterAddFriendIDList(context.Context, *AddUserRegisterAddFriendIDListReq) (*AddUserRegisterAddFriendIDListResp, error)
ReduceUserRegisterAddFriendIDList(context.Context, *ReduceUserRegisterAddFriendIDListReq) (*ReduceUserRegisterAddFriendIDListResp, error)
GetUserRegisterAddFriendIDList(context.Context, *GetUserRegisterAddFriendIDListReq) (*GetUserRegisterAddFriendIDListResp, error)
}
func RegisterAdminCMSServer(s *grpc.Server, srv AdminCMSServer) {
@ -303,6 +471,60 @@ func _AdminCMS_AdminLogin_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler)
}
func _AdminCMS_AddUserRegisterAddFriendIDList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddUserRegisterAddFriendIDListReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AdminCMSServer).AddUserRegisterAddFriendIDList(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/admin_cms.adminCMS/AddUserRegisterAddFriendIDList",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AdminCMSServer).AddUserRegisterAddFriendIDList(ctx, req.(*AddUserRegisterAddFriendIDListReq))
}
return interceptor(ctx, in, info, handler)
}
func _AdminCMS_ReduceUserRegisterAddFriendIDList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReduceUserRegisterAddFriendIDListReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AdminCMSServer).ReduceUserRegisterAddFriendIDList(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/admin_cms.adminCMS/ReduceUserRegisterAddFriendIDList",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AdminCMSServer).ReduceUserRegisterAddFriendIDList(ctx, req.(*ReduceUserRegisterAddFriendIDListReq))
}
return interceptor(ctx, in, info, handler)
}
func _AdminCMS_GetUserRegisterAddFriendIDList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserRegisterAddFriendIDListReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AdminCMSServer).GetUserRegisterAddFriendIDList(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/admin_cms.adminCMS/GetUserRegisterAddFriendIDList",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AdminCMSServer).GetUserRegisterAddFriendIDList(ctx, req.(*GetUserRegisterAddFriendIDListReq))
}
return interceptor(ctx, in, info, handler)
}
var _AdminCMS_serviceDesc = grpc.ServiceDesc{
ServiceName: "admin_cms.adminCMS",
HandlerType: (*AdminCMSServer)(nil),
@ -311,7 +533,56 @@ var _AdminCMS_serviceDesc = grpc.ServiceDesc{
MethodName: "AdminLogin",
Handler: _AdminCMS_AdminLogin_Handler,
},
{
MethodName: "AddUserRegisterAddFriendIDList",
Handler: _AdminCMS_AddUserRegisterAddFriendIDList_Handler,
},
{
MethodName: "ReduceUserRegisterAddFriendIDList",
Handler: _AdminCMS_ReduceUserRegisterAddFriendIDList_Handler,
},
{
MethodName: "GetUserRegisterAddFriendIDList",
Handler: _AdminCMS_GetUserRegisterAddFriendIDList_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "admin_cms/admin_cms.proto",
}
func init() {
proto.RegisterFile("admin_cms/admin_cms.proto", fileDescriptor_admin_cms_e0cc6ee28c5c634b)
}
var fileDescriptor_admin_cms_e0cc6ee28c5c634b = []byte{
// 460 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0xc7, 0xe5, 0x5a, 0x2d, 0x64, 0x02, 0x1c, 0x56, 0x7c, 0xb8, 0x01, 0x55, 0xc9, 0x2a, 0x85,
0x1c, 0xc0, 0x46, 0xe1, 0xc8, 0x01, 0x05, 0x02, 0xc8, 0x52, 0xab, 0xa2, 0xad, 0xb8, 0x70, 0xb1,
0x4c, 0x3c, 0x44, 0x56, 0x94, 0xdd, 0xed, 0xce, 0x86, 0x9e, 0xb8, 0xf6, 0xc2, 0xab, 0xf0, 0x38,
0x3c, 0x10, 0xea, 0x26, 0x8d, 0x6d, 0xea, 0xd6, 0xad, 0x72, 0xf3, 0x7c, 0xfc, 0x77, 0x7f, 0x1e,
0xfd, 0x67, 0x61, 0x37, 0xcd, 0xe6, 0xb9, 0x4c, 0x26, 0x73, 0x8a, 0xd6, 0x5f, 0xa1, 0x36, 0xca,
0x2a, 0xd6, 0x5a, 0x27, 0x3a, 0xbd, 0x23, 0x8d, 0x32, 0x89, 0x0f, 0x23, 0x3d, 0x9b, 0x46, 0xae,
0x1a, 0x51, 0x36, 0x4b, 0x4e, 0x29, 0x3a, 0x5d, 0x75, 0xf3, 0x09, 0xdc, 0x1f, 0x9d, 0xf7, 0x1f,
0xa8, 0x69, 0x2e, 0x05, 0x9e, 0xb0, 0x2e, 0xb4, 0x8f, 0x34, 0x9a, 0xd4, 0xe6, 0x4a, 0xc6, 0xe3,
0xc0, 0xeb, 0x7a, 0x83, 0x96, 0x28, 0xa7, 0x58, 0x00, 0x77, 0x9c, 0x24, 0x1e, 0x07, 0x5b, 0xae,
0x7a, 0x11, 0xb2, 0xc7, 0xb0, 0x73, 0x8c, 0x13, 0x83, 0x36, 0xf0, 0x5d, 0x61, 0x15, 0xf1, 0xe7,
0xf0, 0xa0, 0x7c, 0x09, 0x69, 0xf6, 0x10, 0xb6, 0xad, 0x9a, 0xa1, 0x5c, 0x9d, 0xbf, 0x0c, 0x38,
0x42, 0x6f, 0x94, 0x65, 0x5f, 0x09, 0x8d, 0xc0, 0x69, 0x4e, 0x16, 0xcd, 0x28, 0xcb, 0x3e, 0x99,
0x1c, 0x65, 0x16, 0x8f, 0x0f, 0x72, 0xb2, 0x2b, 0x40, 0x75, 0x19, 0xb0, 0x94, 0x62, 0x7b, 0x00,
0x0b, 0x42, 0xb3, 0x94, 0x04, 0x5b, 0x5d, 0x7f, 0xd0, 0x12, 0xa5, 0x0c, 0xef, 0x03, 0x6f, 0xba,
0x86, 0x34, 0x3f, 0xf3, 0xa0, 0x2f, 0x30, 0x5b, 0x4c, 0x70, 0x63, 0xa0, 0x67, 0xd0, 0x5a, 0x87,
0x6e, 0x66, 0xdb, 0xa2, 0x48, 0xfc, 0x87, 0xeb, 0x5f, 0xc2, 0x7d, 0x01, 0xfb, 0x37, 0xe0, 0x20,
0xcd, 0x7f, 0x7b, 0xd0, 0xfb, 0x8c, 0x76, 0x63, 0xdc, 0x31, 0xc0, 0x97, 0x74, 0x9a, 0xcb, 0x82,
0xb7, 0x3d, 0xec, 0x87, 0x84, 0xe6, 0x27, 0x9a, 0x24, 0xd5, 0x79, 0xa2, 0x53, 0x93, 0xce, 0x29,
0x14, 0x78, 0xb2, 0x40, 0xb2, 0x45, 0xaf, 0x28, 0xe9, 0xf8, 0x1f, 0x0f, 0x78, 0x13, 0x0d, 0x69,
0xf6, 0x0e, 0xee, 0x9d, 0xb7, 0xc4, 0xf2, 0x87, 0x72, 0xff, 0xef, 0x75, 0xfd, 0x41, 0x7b, 0xf8,
0xb4, 0xe6, 0xba, 0x8b, 0x36, 0x51, 0x11, 0xb0, 0x8f, 0x35, 0xb4, 0xfb, 0xb5, 0xb4, 0xa4, 0x95,
0x24, 0xac, 0xc7, 0x1d, 0xfe, 0xf5, 0xe1, 0xae, 0xdb, 0x9c, 0x0f, 0x87, 0xc7, 0x6c, 0x04, 0x50,
0x18, 0x96, 0x05, 0x61, 0xb1, 0x63, 0x95, 0x65, 0xe9, 0xec, 0x5e, 0x51, 0x21, 0xcd, 0x7e, 0xc1,
0xde, 0xf5, 0x26, 0x63, 0x2f, 0x2b, 0xe2, 0x06, 0xdb, 0x77, 0x5e, 0xdd, 0xa2, 0x9b, 0x34, 0x3b,
0xf3, 0xa0, 0xd7, 0xe8, 0x1a, 0x16, 0x95, 0x0e, 0xbd, 0x89, 0xd7, 0x3b, 0xaf, 0x6f, 0x27, 0x58,
0xce, 0xe1, 0x7a, 0x17, 0x54, 0xe6, 0xd0, 0x68, 0xdf, 0xca, 0x1c, 0x9a, 0xed, 0xf5, 0xfe, 0xc9,
0xb7, 0x47, 0x61, 0xf1, 0x44, 0xbe, 0x5d, 0x7f, 0x7d, 0xdf, 0x71, 0xef, 0xdf, 0x9b, 0x7f, 0x01,
0x00, 0x00, 0xff, 0xff, 0x99, 0xbe, 0x8e, 0x2a, 0x4a, 0x05, 0x00, 0x00,
}

@ -1,5 +1,6 @@
syntax = "proto3";
option go_package = "./admin_cms;admin_cms";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
package admin_cms;
message AdminLoginReq {
@ -13,6 +14,38 @@ message AdminLoginResp {
string token = 1;
}
message AddUserRegisterAddFriendIDListReq {
string operationID = 1;
repeated string userIDList = 2;
}
message AddUserRegisterAddFriendIDListResp {
}
message ReduceUserRegisterAddFriendIDListReq {
string operationID = 1;
int32 operation = 2;
repeated string userIDList = 3;
}
message ReduceUserRegisterAddFriendIDListResp {
}
message GetUserRegisterAddFriendIDListReq {
string operationID = 1;
server_api_params.RequestPagination Pagination = 2;
}
message GetUserRegisterAddFriendIDListResp {
repeated server_api_params.UserInfo UserInfoList = 1;
server_api_params.ResponsePagination Pagination = 2;
}
service adminCMS {
rpc AdminLogin(AdminLoginReq) returns(AdminLoginResp);
rpc AddUserRegisterAddFriendIDList(AddUserRegisterAddFriendIDListReq) returns(AddUserRegisterAddFriendIDListResp);
rpc ReduceUserRegisterAddFriendIDList(ReduceUserRegisterAddFriendIDListReq) returns(ReduceUserRegisterAddFriendIDListResp);
rpc GetUserRegisterAddFriendIDList(GetUserRegisterAddFriendIDListReq) returns(GetUserRegisterAddFriendIDListResp);
}

File diff suppressed because it is too large Load Diff

@ -80,6 +80,7 @@ message UserInfo{
int32 LoginLimit = 14;
int32 appMangerLevel = 15;
int32 globalRecvMsgOpt = 16;
string invitationCode = 17;
}
message FriendInfo{

@ -2127,10 +2127,13 @@ type AlterUserReq struct {
UserId string `protobuf:"bytes,1,opt,name=UserId,proto3" json:"UserId,omitempty"`
OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
PhoneNumber int64 `protobuf:"varint,3,opt,name=PhoneNumber,proto3" json:"PhoneNumber,omitempty"`
PhoneNumber string `protobuf:"bytes,3,opt,name=PhoneNumber,proto3" json:"PhoneNumber,omitempty"`
Nickname string `protobuf:"bytes,4,opt,name=Nickname,proto3" json:"Nickname,omitempty"`
Email string `protobuf:"bytes,5,opt,name=Email,proto3" json:"Email,omitempty"`
OpUserId string `protobuf:"bytes,6,opt,name=OpUserId,proto3" json:"OpUserId,omitempty"`
Gender string `protobuf:"bytes,6,opt,name=Gender,proto3" json:"Gender,omitempty"`
Birth string `protobuf:"bytes,7,opt,name=Birth,proto3" json:"Birth,omitempty"`
Photo string `protobuf:"bytes,8,opt,name=Photo,proto3" json:"Photo,omitempty"`
OpUserId string `protobuf:"bytes,9,opt,name=OpUserId,proto3" json:"OpUserId,omitempty"`
}
func (x *AlterUserReq) Reset() {
@ -2179,11 +2182,11 @@ func (x *AlterUserReq) GetOperationID() string {
return ""
}
func (x *AlterUserReq) GetPhoneNumber() int64 {
func (x *AlterUserReq) GetPhoneNumber() string {
if x != nil {
return x.PhoneNumber
}
return 0
return ""
}
func (x *AlterUserReq) GetNickname() string {
@ -2200,6 +2203,27 @@ func (x *AlterUserReq) GetEmail() string {
return ""
}
func (x *AlterUserReq) GetGender() string {
if x != nil {
return x.Gender
}
return ""
}
func (x *AlterUserReq) GetBirth() string {
if x != nil {
return x.Birth
}
return ""
}
func (x *AlterUserReq) GetPhoto() string {
if x != nil {
return x.Photo
}
return ""
}
func (x *AlterUserReq) GetOpUserId() string {
if x != nil {
return x.OpUserId
@ -2397,7 +2421,11 @@ type AddUserReq struct {
PhoneNumber string `protobuf:"bytes,2,opt,name=PhoneNumber,proto3" json:"PhoneNumber,omitempty"`
UserId string `protobuf:"bytes,3,opt,name=UserId,proto3" json:"UserId,omitempty"`
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
OpUserId string `protobuf:"bytes,5,opt,name=OpUserId,proto3" json:"OpUserId,omitempty"`
Email string `protobuf:"bytes,5,opt,name=Email,proto3" json:"Email,omitempty"`
Gender string `protobuf:"bytes,6,opt,name=Gender,proto3" json:"Gender,omitempty"`
Birth string `protobuf:"bytes,7,opt,name=Birth,proto3" json:"Birth,omitempty"`
Photo string `protobuf:"bytes,8,opt,name=Photo,proto3" json:"Photo,omitempty"`
OpUserId string `protobuf:"bytes,9,opt,name=OpUserId,proto3" json:"OpUserId,omitempty"`
}
func (x *AddUserReq) Reset() {
@ -2460,6 +2488,34 @@ func (x *AddUserReq) GetName() string {
return ""
}
func (x *AddUserReq) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *AddUserReq) GetGender() string {
if x != nil {
return x.Gender
}
return ""
}
func (x *AddUserReq) GetBirth() string {
if x != nil {
return x.Birth
}
return ""
}
func (x *AddUserReq) GetPhoto() string {
if x != nil {
return x.Photo
}
return ""
}
func (x *AddUserReq) GetOpUserId() string {
if x != nil {
return x.OpUserId
@ -3501,232 +3557,242 @@ var file_user_user_proto_rawDesc = []byte{
0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x1a, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x73, 0x22, 0xb8, 0x01, 0x0a,
0x28, 0x05, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x73, 0x22, 0xfc, 0x01, 0x0a,
0x0c, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a,
0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55,
0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x68, 0x6f, 0x6e, 0x65,
0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x50, 0x68,
0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50, 0x68,
0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63,
0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, 0x63,
0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x4f,
0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4f,
0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x41, 0x0a, 0x0d, 0x41, 0x6c, 0x74, 0x65, 0x72,
0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75,
0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a,
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x91, 0x01, 0x0a, 0x0b, 0x47,
0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x44, 0x0a, 0x0a,
0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x24, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61,
0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69,
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc3,
0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12,
0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73,
0x70, 0x12, 0x1e, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65,
0x72, 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61,
0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61,
0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72,
0x4e, 0x75, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72,
0x4e, 0x75, 0x6d, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72,
0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75,
0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50, 0x68, 0x6f, 0x6e,
0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22,
0x3f, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x47,
0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x47, 0x65, 0x6e,
0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x42, 0x69, 0x72, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x42, 0x69, 0x72, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x68, 0x6f,
0x74, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12,
0x1a, 0x0a, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x41, 0x0a, 0x0d, 0x41,
0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a,
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x91,
0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20,
0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44,
0x12, 0x44, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70,
0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69,
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61,
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61,
0x6d, 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52,
0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73,
0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52,
0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08,
0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x73, 0x22, 0xf2, 0x01, 0x0a, 0x0a, 0x41, 0x64, 0x64,
0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x68, 0x6f,
0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x55,
0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65,
0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x16, 0x0a,
0x06, 0x47, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x47,
0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x42, 0x69, 0x72, 0x74, 0x68, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x42, 0x69, 0x72, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x50,
0x68, 0x6f, 0x74, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x50, 0x68, 0x6f, 0x74,
0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x09, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x3f, 0x0a,
0x0b, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a,
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x8c,
0x01, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12,
0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x44, 0x69,
0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0e, 0x45, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
0x44, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x41, 0x0a,
0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30,
0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
0x22, 0x8c, 0x01, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
0x71, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x45, 0x6e, 0x64,
0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0e, 0x45, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22,
0x41, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x22, 0x66, 0x0a, 0x0e, 0x55, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65,
0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b,
0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1a,
0x0a, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x0f, 0x55, 0x6e,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a,
0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52,
0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22,
0x9e, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72,
0x73, 0x52, 0x65, 0x71, 0x12, 0x44, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a,
0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70,
0x22, 0x66, 0x0a, 0x0e, 0x55, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52,
0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01,
0x28, 0x05, 0x52, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d,
0x22, 0x7f, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a,
0x04, 0x55, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x2a, 0x0a,
0x10, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x44, 0x69,
0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x45, 0x6e, 0x64,
0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0e, 0x45, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d,
0x65, 0x22, 0xd9, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73,
0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x0a, 0x42, 0x6c, 0x6f,
0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x0a,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61,
0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25,
0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61,
0x6d, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x73, 0x18, 0x04, 0x20,
0x01, 0x28, 0x05, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x73, 0x22, 0x50, 0x0a,
0x13, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49,
0x64, 0x52, 0x65, 0x71, 0x12, 0x17, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a,
0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22,
0x45, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42,
0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x73, 0x65,
0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x09, 0x42, 0x6c, 0x6f,
0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x22, 0x66, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x17, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x5f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x42,
0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x32, 0xf7, 0x0b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0b, 0x47,
0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x2e, 0x75, 0x73, 0x65,
0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71,
0x1a, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x43, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52,
0x65, 0x71, 0x1a, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5e, 0x0a, 0x17,
0x53, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x12, 0x20, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x53,
0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08,
0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x0f, 0x55, 0x6e, 0x42, 0x6c,
0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73,
0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x9e, 0x01,
0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52,
0x65, 0x71, 0x12, 0x44, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f,
0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61,
0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f,
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x42, 0x6c,
0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x22, 0x7f,
0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x55,
0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x42,
0x65, 0x67, 0x69, 0x6e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x44, 0x69, 0x73, 0x61,
0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x44, 0x69,
0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0e, 0x45, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22,
0xd9, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72,
0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52,
0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
0x55, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x0a, 0x42, 0x6c,
0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69,
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73,
0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x1a, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
0x05, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x73, 0x22, 0x50, 0x0a, 0x13, 0x47,
0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x52,
0x65, 0x71, 0x12, 0x17, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4f,
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x45, 0x0a,
0x14, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49,
0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73,
0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
0x55, 0x73, 0x65, 0x72, 0x22, 0x66, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73,
0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x17, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20,
0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44,
0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x0e,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30,
0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
0x32, 0xf7, 0x0b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0b, 0x47, 0x65, 0x74,
0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e,
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x15,
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x43, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55,
0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71,
0x1a, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73,
0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5e, 0x0a, 0x17, 0x53, 0x65,
0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x4f, 0x70, 0x74, 0x12, 0x20, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74,
0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x53,
0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x53, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0b,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x14, 0x2e, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65,
0x71, 0x1a, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55,
0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41,
0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e,
0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a,
0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65,
0x72, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x16,
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x68, 0x65,
0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e,
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f,
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x52,
0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74,
0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c,
0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0b, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a,
0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65,
0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c,
0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65,
0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e,
0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49,
0x44, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x75,
0x73, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b,
0x52, 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65,
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47,
0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
0x71, 0x1a, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76,
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x52, 0x0a, 0x13,
0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c,
0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
0x73, 0x70, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65,
0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
0x71, 0x1a, 0x1a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76,
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x58, 0x0a,
0x15, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x61,
0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x61,
0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x43, 0x6f,
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x75, 0x73, 0x65,
0x72, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x43,
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
0x40, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74,
0x12, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d,
0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e,
0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73,
0x70, 0x12, 0x3a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64,
0x12, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42,
0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65,
0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x43, 0x0a,
0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42,
0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e,
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65,
0x73, 0x70, 0x12, 0x37, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x55, 0x73, 0x65, 0x72,
0x12, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x55, 0x73,
0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73,
0x69, 0x67, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x09, 0x41,
0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e,
0x41, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x75,
0x73, 0x65, 0x72, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73,
0x70, 0x12, 0x31, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x11, 0x2e,
0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71,
0x1a, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73,
0x52, 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x12,
0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
0x71, 0x1a, 0x11, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72,
0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65,
0x72, 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73,
0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f,
0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0b, 0x55, 0x6e,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x55, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a,
0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73,
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f,
0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47,
0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a,
0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55,
0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42,
0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x12, 0x19, 0x2e, 0x75,
0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72,
0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47,
0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x52,
0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65,
0x72, 0x12, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55,
0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0d, 0x5a, 0x0b,
0x2e, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x71, 0x1a, 0x1d, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43,
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70,
0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x43,
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a,
0x1a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x58, 0x0a, 0x15, 0x42,
0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x61, 0x74, 0x63,
0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x61, 0x74, 0x63,
0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76,
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e,
0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x65, 0x71, 0x1a, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e,
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a,
0x0d, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x12, 0x16,
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67,
0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x53, 0x65,
0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
0x3a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x12, 0x14,
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49,
0x64, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55,
0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x43, 0x0a, 0x0e, 0x47,
0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x2e,
0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42, 0x79, 0x4e,
0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65,
0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70,
0x12, 0x37, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x13,
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x55, 0x73, 0x65, 0x72,
0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x69, 0x67,
0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x09, 0x41, 0x6c, 0x74,
0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x6c,
0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x75, 0x73, 0x65,
0x72, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12,
0x31, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x11, 0x2e, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x12,
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65,
0x73, 0x70, 0x12, 0x2e, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, 0x2e,
0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a,
0x11, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
0x73, 0x70, 0x12, 0x34, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12,
0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72,
0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0b, 0x55, 0x6e, 0x42, 0x6c,
0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55,
0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e,
0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72,
0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e,
0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65,
0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f,
0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x12, 0x19, 0x2e, 0x75, 0x73, 0x65,
0x72, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79,
0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73,
0x70, 0x12, 0x37, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12,
0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65,
0x72, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f,
0x75, 0x73, 0x65, 0x72, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (

@ -210,10 +210,13 @@ message GetUsersByNameResp {
message AlterUserReq{
string UserId = 1;
string OperationID = 2;
int64 PhoneNumber = 3;
string PhoneNumber = 3;
string Nickname = 4;
string Email = 5;
string OpUserId = 6;
string Gender = 6;
string Birth =7;
string Photo = 8;
string OpUserId = 9;
}
message AlterUserResp{
@ -238,7 +241,11 @@ message AddUserReq{
string PhoneNumber = 2;
string UserId = 3;
string name = 4;
string OpUserId = 5;
string Email = 5;
string Gender = 6;
string Birth =7;
string Photo = 8;
string OpUserId = 9;
}
message AddUserResp{

@ -58,11 +58,11 @@ fi
#check=$(ps aux | grep -w ./${cron_task_name} | grep -v grep | wc -l)
#if [ $check -ge 1 ]; then
# echo -e ${GREEN_PREFIX}"none port has been listening,belongs service is cron_task_name"${COLOR_SUFFIX}
# echo -e ${GREEN_PREFIX}"none port has been listening,belongs service is openImCronTask"${COLOR_SUFFIX}
#else
# echo -e ${RED_PREFIX}"cron_task_name service does not start normally"${COLOR_SUFFIX}
# echo -e ${RED_PREFIX}"please check ../logs/openIM.log "${COLOR_SUFFIX}
# exit -1
#fi
echo -e ${YELLOW_PREFIX}"all services launch success"${COLOR_SUFFIX}
#
#echo -e ${YELLOW_PREFIX}"all services launch success"${COLOR_SUFFIX}

Loading…
Cancel
Save