diff --git a/internal/api/admin.go b/internal/api/admin.go index 15e5fa0cf..db1634225 100644 --- a/internal/api/admin.go +++ b/internal/api/admin.go @@ -304,3 +304,11 @@ func (o *AdminApi) UpdateApplet(c *gin.Context) { func (o *AdminApi) SearchApplet(c *gin.Context) { a2r.Call(admin.AdminClient.SearchApplet, o.adminClient, c) } + +func (o *AdminApi) NewUserCount(c *gin.Context) { + a2r.Call(chat.ChatClient.NewUserCount, o.chatClient, c) +} + +func (o *AdminApi) LoginUserCount(c *gin.Context) { + a2r.Call(chat.ChatClient.UserLoginCount, o.chatClient, c) +} diff --git a/internal/api/router.go b/internal/api/router.go index ba833ead4..5c549e1ee 100644 --- a/internal/api/router.go +++ b/internal/api/router.go @@ -117,4 +117,8 @@ func NewAdminRoute(router gin.IRouter, discov discoveryregistry.SvcDiscoveryRegi initGroup.POST("/get", admin.GetClientConfig) // 获取客户端初始化配置 initGroup.POST("/set", admin.SetClientConfig) // 设置客户端初始化配置 initGroup.POST("/del", admin.DelClientConfig) // 删除客户端初始化配置 + + statistic := router.Group("/statistic", mw.CheckAdmin) + statistic.POST("/new_user_count", admin.NewUserCount) + statistic.POST("/login_user_count", admin.LoginUserCount) } diff --git a/internal/rpc/chat/statistic.go b/internal/rpc/chat/statistic.go new file mode 100644 index 000000000..870e557ca --- /dev/null +++ b/internal/rpc/chat/statistic.go @@ -0,0 +1,57 @@ +package chat + +import ( + "context" + "github.com/OpenIMSDK/chat/pkg/proto/chat" + "github.com/OpenIMSDK/tools/errs" + "time" +) + +func (o *chatSvr) NewUserCount(ctx context.Context, req *chat.NewUserCountReq) (*chat.NewUserCountResp, error) { + resp := &chat.NewUserCountResp{} + if req.Start > req.End { + return nil, errs.ErrArgs.Wrap("start > end") + } + total, err := o.Database.NewUserCountTotal(ctx, nil) + if err != nil { + return nil, err + } + start := time.UnixMilli(req.Start) + before, err := o.Database.NewUserCountTotal(ctx, &start) + if err != nil { + return nil, err + } + end := time.UnixMilli(req.End) + count, err := o.Database.NewUserCountRangeEverydayTotal(ctx, &start, &end) + if err != nil { + return nil, err + } + resp.Total = total + resp.Before = before + resp.Count = count + return resp, nil +} +func (o *chatSvr) UserLoginCount(ctx context.Context, req *chat.UserLoginCountReq) (*chat.UserLoginCountResp, error) { + resp := &chat.UserLoginCountResp{} + if req.Start > req.End { + return nil, errs.ErrArgs.Wrap("start > end") + } + total, err := o.Database.UserLoginCountTotal(ctx, nil) + if err != nil { + return nil, err + } + start := time.UnixMilli(req.Start) + before, err := o.Database.UserLoginCountTotal(ctx, &start) + if err != nil { + return nil, err + } + end := time.UnixMilli(req.End) + count, err := o.Database.UserLoginCountRangeEverydayTotal(ctx, &start, &end) + if err != nil { + return nil, err + } + resp.Total = total + resp.Before = before + resp.Count = count + return resp, nil +} diff --git a/pkg/common/db/database/chat.go b/pkg/common/db/database/chat.go index 537ad4758..cbf597614 100644 --- a/pkg/common/db/database/chat.go +++ b/pkg/common/db/database/chat.go @@ -51,6 +51,10 @@ type ChatDatabaseInterface interface { LoginRecord(ctx context.Context, record *table.UserLoginRecord, verifyCodeID *uint) error UpdatePassword(ctx context.Context, userID string, password string) error UpdatePasswordAndDeleteVerifyCode(ctx context.Context, userID string, password string, code uint) error + NewUserCountTotal(ctx context.Context, before *time.Time) (int64, error) + NewUserCountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, error) + UserLoginCountTotal(ctx context.Context, before *time.Time) (int64, error) + UserLoginCountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, error) } func NewChatDatabase(db *gorm.DB) ChatDatabaseInterface { @@ -217,3 +221,19 @@ func (o *ChatDatabase) UpdatePasswordAndDeleteVerifyCode(ctx context.Context, us return nil }) } + +func (o *ChatDatabase) NewUserCountTotal(ctx context.Context, before *time.Time) (int64, error) { + return o.register.CountTotal(ctx, before) +} + +func (o *ChatDatabase) NewUserCountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, error) { + return o.register.CountRangeEverydayTotal(ctx, start, end) +} + +func (o *ChatDatabase) UserLoginCountTotal(ctx context.Context, before *time.Time) (int64, error) { + return o.userLoginRecord.CountTotal(ctx, before) +} + +func (o *ChatDatabase) UserLoginCountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, error) { + return o.userLoginRecord.CountRangeEverydayTotal(ctx, start, end) +} diff --git a/pkg/common/db/model/chat/register.go b/pkg/common/db/model/chat/register.go index 7c0b3c792..20181aa82 100644 --- a/pkg/common/db/model/chat/register.go +++ b/pkg/common/db/model/chat/register.go @@ -16,6 +16,7 @@ package chat import ( "context" + "time" "github.com/OpenIMSDK/tools/errs" "gorm.io/gorm" @@ -38,3 +39,36 @@ func (o *Register) NewTx(tx any) chat.RegisterInterface { func (o *Register) Create(ctx context.Context, registers ...*chat.Register) error { return errs.Wrap(o.db.WithContext(ctx).Create(registers).Error) } + +func (o *Register) CountTotal(ctx context.Context, before *time.Time) (count int64, err error) { + db := o.db.WithContext(ctx).Model(&chat.Register{}) + if before != nil { + db.Where("create_time < ?", before) + } + if err := db.Count(&count).Error; err != nil { + return 0, errs.Wrap(err) + } + return count, nil +} + +func (o *Register) CountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, error) { + var res []struct { + Date time.Time `gorm:"column:date"` + Count int64 `gorm:"column:count"` + } + err := o.db.WithContext(ctx). + Model(&chat.Register{}). + Select("DATE(create_time) AS date, count(1) AS count"). + Where("create_time >= ? and create_time < ?", start, end). + Group("date"). + Find(&res). + Error + if err != nil { + return nil, errs.Wrap(err) + } + v := make(map[string]int64) + for _, r := range res { + v[r.Date.Format("2006-01-02")] = r.Count + } + return v, nil +} diff --git a/pkg/common/db/model/chat/user_login_record.go b/pkg/common/db/model/chat/user_login_record.go index 1c6cbb30e..de85797ac 100644 --- a/pkg/common/db/model/chat/user_login_record.go +++ b/pkg/common/db/model/chat/user_login_record.go @@ -16,6 +16,10 @@ package chat import ( "context" + + "github.com/OpenIMSDK/tools/errs" + "time" + "gorm.io/gorm" "github.com/OpenIMSDK/chat/pkg/common/db/table/chat" @@ -38,3 +42,36 @@ func (o *UserLoginRecord) NewTx(tx any) chat.UserLoginRecordInterface { func (o *UserLoginRecord) Create(ctx context.Context, records ...*chat.UserLoginRecord) error { return o.db.WithContext(ctx).Create(&records).Error } + +func (o *UserLoginRecord) CountTotal(ctx context.Context, before *time.Time) (count int64, err error) { + db := o.db.WithContext(ctx).Model(&chat.UserLoginRecord{}) + if before != nil { + db.Where("create_time < ?", before) + } + if err := db.Count(&count).Error; err != nil { + return 0, errs.Wrap(err) + } + return count, nil +} + +func (o *UserLoginRecord) CountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, error) { + var res []struct { + Date time.Time `gorm:"column:date"` + Count int64 `gorm:"column:count"` + } + err := o.db.WithContext(ctx). + Model(&chat.UserLoginRecord{}). + Select("DATE(create_time) AS date, count(1) AS count"). + Where("create_time >= ? and create_time < ?", start, end). + Group("date"). + Find(&res). + Error + if err != nil { + return nil, errs.Wrap(err) + } + v := make(map[string]int64) + for _, r := range res { + v[r.Date.Format("2006-01-02")] = r.Count + } + return v, nil +} diff --git a/pkg/common/db/table/chat/register.go b/pkg/common/db/table/chat/register.go index af6712911..6f316317c 100644 --- a/pkg/common/db/table/chat/register.go +++ b/pkg/common/db/table/chat/register.go @@ -37,4 +37,6 @@ func (Register) TableName() string { type RegisterInterface interface { NewTx(tx any) RegisterInterface Create(ctx context.Context, registers ...*Register) error + CountTotal(ctx context.Context, before *time.Time) (int64, error) + CountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, error) } diff --git a/pkg/common/db/table/chat/user_login_record.go b/pkg/common/db/table/chat/user_login_record.go index 7cacf4163..639e6e92c 100644 --- a/pkg/common/db/table/chat/user_login_record.go +++ b/pkg/common/db/table/chat/user_login_record.go @@ -35,4 +35,6 @@ func (UserLoginRecord) TableName() string { type UserLoginRecordInterface interface { NewTx(tx any) UserLoginRecordInterface Create(ctx context.Context, records ...*UserLoginRecord) error + CountTotal(ctx context.Context, before *time.Time) (int64, error) + CountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, error) } diff --git a/pkg/proto/chat/chat.pb.go b/pkg/proto/chat/chat.pb.go index 9b0e9c0cb..cdd3507f3 100644 --- a/pkg/proto/chat/chat.pb.go +++ b/pkg/proto/chat/chat.pb.go @@ -2304,6 +2304,242 @@ func (x *SearchUserFullInfoResp) GetUsers() []*common.UserFullInfo { return nil } +type NewUserCountReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start"` + End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"` +} + +func (x *NewUserCountReq) Reset() { + *x = NewUserCountReq{} + if protoimpl.UnsafeEnabled { + mi := &file_chat_chat_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NewUserCountReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NewUserCountReq) ProtoMessage() {} + +func (x *NewUserCountReq) ProtoReflect() protoreflect.Message { + mi := &file_chat_chat_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NewUserCountReq.ProtoReflect.Descriptor instead. +func (*NewUserCountReq) Descriptor() ([]byte, []int) { + return file_chat_chat_proto_rawDescGZIP(), []int{35} +} + +func (x *NewUserCountReq) GetStart() int64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *NewUserCountReq) GetEnd() int64 { + if x != nil { + return x.End + } + return 0 +} + +type NewUserCountResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` + Before int64 `protobuf:"varint,2,opt,name=before,proto3" json:"before"` + Count map[string]int64 `protobuf:"bytes,3,rep,name=Count,proto3" json:"Count" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (x *NewUserCountResp) Reset() { + *x = NewUserCountResp{} + if protoimpl.UnsafeEnabled { + mi := &file_chat_chat_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NewUserCountResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NewUserCountResp) ProtoMessage() {} + +func (x *NewUserCountResp) ProtoReflect() protoreflect.Message { + mi := &file_chat_chat_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NewUserCountResp.ProtoReflect.Descriptor instead. +func (*NewUserCountResp) Descriptor() ([]byte, []int) { + return file_chat_chat_proto_rawDescGZIP(), []int{36} +} + +func (x *NewUserCountResp) GetTotal() int64 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *NewUserCountResp) GetBefore() int64 { + if x != nil { + return x.Before + } + return 0 +} + +func (x *NewUserCountResp) GetCount() map[string]int64 { + if x != nil { + return x.Count + } + return nil +} + +type UserLoginCountReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start"` + End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"` +} + +func (x *UserLoginCountReq) Reset() { + *x = UserLoginCountReq{} + if protoimpl.UnsafeEnabled { + mi := &file_chat_chat_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserLoginCountReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserLoginCountReq) ProtoMessage() {} + +func (x *UserLoginCountReq) ProtoReflect() protoreflect.Message { + mi := &file_chat_chat_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserLoginCountReq.ProtoReflect.Descriptor instead. +func (*UserLoginCountReq) Descriptor() ([]byte, []int) { + return file_chat_chat_proto_rawDescGZIP(), []int{37} +} + +func (x *UserLoginCountReq) GetStart() int64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *UserLoginCountReq) GetEnd() int64 { + if x != nil { + return x.End + } + return 0 +} + +type UserLoginCountResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` + Before int64 `protobuf:"varint,2,opt,name=before,proto3" json:"before"` + Count map[string]int64 `protobuf:"bytes,3,rep,name=Count,proto3" json:"Count" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (x *UserLoginCountResp) Reset() { + *x = UserLoginCountResp{} + if protoimpl.UnsafeEnabled { + mi := &file_chat_chat_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserLoginCountResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserLoginCountResp) ProtoMessage() {} + +func (x *UserLoginCountResp) ProtoReflect() protoreflect.Message { + mi := &file_chat_chat_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserLoginCountResp.ProtoReflect.Descriptor instead. +func (*UserLoginCountResp) Descriptor() ([]byte, []int) { + return file_chat_chat_proto_rawDescGZIP(), []int{38} +} + +func (x *UserLoginCountResp) GetTotal() int64 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *UserLoginCountResp) GetBefore() int64 { + if x != nil { + return x.Before + } + return 0 +} + +func (x *UserLoginCountResp) GetCount() map[string]int64 { + if x != nil { + return x.Count + } + return nil +} + var File_chat_chat_proto protoreflect.FileDescriptor var file_chat_chat_proto_rawDesc = []byte{ @@ -2631,102 +2867,145 @@ var file_chat_chat_proto_rawDesc = []byte{ 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x32, 0xc5, 0x0b, 0x0a, 0x04, 0x63, 0x68, 0x61, 0x74, 0x12, 0x59, 0x0a, 0x0e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, - 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6b, 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x28, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, - 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x65, 0x0a, 0x12, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, - 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, - 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x65, 0x0a, 0x12, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, - 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, - 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x5f, 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, - 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, - 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, - 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, - 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, - 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, - 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x53, 0x0a, - 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, - 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, - 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x6f, - 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, - 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x12, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, - 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x0e, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x22, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, + 0x65, 0x72, 0x73, 0x22, 0x39, 0x0a, 0x0f, 0x4e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xbe, + 0x01, 0x0a, 0x10, 0x4e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x65, 0x66, + 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x65, 0x66, 0x6f, 0x72, + 0x65, 0x12, 0x42, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, + 0x61, 0x74, 0x2e, 0x4e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x38, 0x0a, 0x0a, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x3b, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xc2, 0x01, 0x0a, + 0x12, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x65, 0x66, + 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x65, 0x66, 0x6f, 0x72, + 0x65, 0x12, 0x44, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, + 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x38, 0x0a, 0x0a, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x32, 0xf5, 0x0c, 0x0a, 0x04, 0x63, 0x68, 0x61, 0x74, 0x12, 0x59, 0x0a, 0x0e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, - 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, - 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x61, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6b, 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, + 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x28, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x65, 0x0a, 0x12, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, - 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, + 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x1a, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, + 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x65, 0x0a, 0x12, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, + 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x5f, 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, + 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x59, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, + 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, + 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0a, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x53, 0x0a, 0x0c, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, - 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, - 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x3e, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x56, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x12, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, + 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x23, + 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, + 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, + 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, + 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, - 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x5c, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, - 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x5f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x73, 0x12, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x59, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, - 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, - 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, - 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x42, 0x2a, 0x5a, 0x28, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x44, 0x4b, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x5c, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x5c, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, + 0x63, 0x68, 0x61, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5f, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x73, 0x12, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, + 0x68, 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, + 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, + 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, + 0x61, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, + 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x53, 0x0a, 0x0c, 0x4e, 0x65, 0x77, + 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4e, 0x65, 0x77, 0x55, + 0x73, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4e, 0x65, + 0x77, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, + 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, + 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, + 0x4b, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x63, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2741,7 +3020,7 @@ func file_chat_chat_proto_rawDescGZIP() []byte { return file_chat_chat_proto_rawDescData } -var file_chat_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_chat_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 43) var file_chat_chat_proto_goTypes = []interface{}{ (*UserIdentity)(nil), // 0: OpenIMChat.chat.UserIdentity (*UpdateUserInfoReq)(nil), // 1: OpenIMChat.chat.UpdateUserInfoReq @@ -2778,79 +3057,91 @@ var file_chat_chat_proto_goTypes = []interface{}{ (*OpenIMCallbackResp)(nil), // 32: OpenIMChat.chat.OpenIMCallbackResp (*SearchUserFullInfoReq)(nil), // 33: OpenIMChat.chat.SearchUserFullInfoReq (*SearchUserFullInfoResp)(nil), // 34: OpenIMChat.chat.SearchUserFullInfoResp - nil, // 35: OpenIMChat.chat.FindUserAccountResp.UserAccountMapEntry - nil, // 36: OpenIMChat.chat.FindAccountUserResp.AccountUserMapEntry - (*wrapperspb.StringValue)(nil), // 37: OpenIMServer.protobuf.StringValue - (*wrapperspb.Int32Value)(nil), // 38: OpenIMServer.protobuf.Int32Value - (*wrapperspb.Int64Value)(nil), // 39: OpenIMServer.protobuf.Int64Value - (*common.UserPublicInfo)(nil), // 40: OpenIMChat.common.UserPublicInfo - (*sdkws.RequestPagination)(nil), // 41: OpenIMServer.sdkws.RequestPagination - (*common.UserFullInfo)(nil), // 42: OpenIMChat.common.UserFullInfo + (*NewUserCountReq)(nil), // 35: OpenIMChat.chat.NewUserCountReq + (*NewUserCountResp)(nil), // 36: OpenIMChat.chat.NewUserCountResp + (*UserLoginCountReq)(nil), // 37: OpenIMChat.chat.UserLoginCountReq + (*UserLoginCountResp)(nil), // 38: OpenIMChat.chat.UserLoginCountResp + nil, // 39: OpenIMChat.chat.FindUserAccountResp.UserAccountMapEntry + nil, // 40: OpenIMChat.chat.FindAccountUserResp.AccountUserMapEntry + nil, // 41: OpenIMChat.chat.NewUserCountResp.CountEntry + nil, // 42: OpenIMChat.chat.UserLoginCountResp.CountEntry + (*wrapperspb.StringValue)(nil), // 43: OpenIMServer.protobuf.StringValue + (*wrapperspb.Int32Value)(nil), // 44: OpenIMServer.protobuf.Int32Value + (*wrapperspb.Int64Value)(nil), // 45: OpenIMServer.protobuf.Int64Value + (*common.UserPublicInfo)(nil), // 46: OpenIMChat.common.UserPublicInfo + (*sdkws.RequestPagination)(nil), // 47: OpenIMServer.sdkws.RequestPagination + (*common.UserFullInfo)(nil), // 48: OpenIMChat.common.UserFullInfo } var file_chat_chat_proto_depIdxs = []int32{ - 37, // 0: OpenIMChat.chat.UpdateUserInfoReq.account:type_name -> OpenIMServer.protobuf.StringValue - 37, // 1: OpenIMChat.chat.UpdateUserInfoReq.phoneNumber:type_name -> OpenIMServer.protobuf.StringValue - 37, // 2: OpenIMChat.chat.UpdateUserInfoReq.areaCode:type_name -> OpenIMServer.protobuf.StringValue - 37, // 3: OpenIMChat.chat.UpdateUserInfoReq.email:type_name -> OpenIMServer.protobuf.StringValue - 37, // 4: OpenIMChat.chat.UpdateUserInfoReq.nickname:type_name -> OpenIMServer.protobuf.StringValue - 37, // 5: OpenIMChat.chat.UpdateUserInfoReq.faceURL:type_name -> OpenIMServer.protobuf.StringValue - 38, // 6: OpenIMChat.chat.UpdateUserInfoReq.gender:type_name -> OpenIMServer.protobuf.Int32Value - 38, // 7: OpenIMChat.chat.UpdateUserInfoReq.level:type_name -> OpenIMServer.protobuf.Int32Value - 39, // 8: OpenIMChat.chat.UpdateUserInfoReq.birth:type_name -> OpenIMServer.protobuf.Int64Value - 38, // 9: OpenIMChat.chat.UpdateUserInfoReq.allowAddFriend:type_name -> OpenIMServer.protobuf.Int32Value - 38, // 10: OpenIMChat.chat.UpdateUserInfoReq.allowBeep:type_name -> OpenIMServer.protobuf.Int32Value - 38, // 11: OpenIMChat.chat.UpdateUserInfoReq.allowVibration:type_name -> OpenIMServer.protobuf.Int32Value - 38, // 12: OpenIMChat.chat.UpdateUserInfoReq.globalRecvMsgOpt:type_name -> OpenIMServer.protobuf.Int32Value - 40, // 13: OpenIMChat.chat.FindUserPublicInfoResp.users:type_name -> OpenIMChat.common.UserPublicInfo - 41, // 14: OpenIMChat.chat.SearchUserPublicInfoReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 40, // 15: OpenIMChat.chat.SearchUserPublicInfoResp.users:type_name -> OpenIMChat.common.UserPublicInfo - 42, // 16: OpenIMChat.chat.FindUserFullInfoResp.users:type_name -> OpenIMChat.common.UserFullInfo + 43, // 0: OpenIMChat.chat.UpdateUserInfoReq.account:type_name -> OpenIMServer.protobuf.StringValue + 43, // 1: OpenIMChat.chat.UpdateUserInfoReq.phoneNumber:type_name -> OpenIMServer.protobuf.StringValue + 43, // 2: OpenIMChat.chat.UpdateUserInfoReq.areaCode:type_name -> OpenIMServer.protobuf.StringValue + 43, // 3: OpenIMChat.chat.UpdateUserInfoReq.email:type_name -> OpenIMServer.protobuf.StringValue + 43, // 4: OpenIMChat.chat.UpdateUserInfoReq.nickname:type_name -> OpenIMServer.protobuf.StringValue + 43, // 5: OpenIMChat.chat.UpdateUserInfoReq.faceURL:type_name -> OpenIMServer.protobuf.StringValue + 44, // 6: OpenIMChat.chat.UpdateUserInfoReq.gender:type_name -> OpenIMServer.protobuf.Int32Value + 44, // 7: OpenIMChat.chat.UpdateUserInfoReq.level:type_name -> OpenIMServer.protobuf.Int32Value + 45, // 8: OpenIMChat.chat.UpdateUserInfoReq.birth:type_name -> OpenIMServer.protobuf.Int64Value + 44, // 9: OpenIMChat.chat.UpdateUserInfoReq.allowAddFriend:type_name -> OpenIMServer.protobuf.Int32Value + 44, // 10: OpenIMChat.chat.UpdateUserInfoReq.allowBeep:type_name -> OpenIMServer.protobuf.Int32Value + 44, // 11: OpenIMChat.chat.UpdateUserInfoReq.allowVibration:type_name -> OpenIMServer.protobuf.Int32Value + 44, // 12: OpenIMChat.chat.UpdateUserInfoReq.globalRecvMsgOpt:type_name -> OpenIMServer.protobuf.Int32Value + 46, // 13: OpenIMChat.chat.FindUserPublicInfoResp.users:type_name -> OpenIMChat.common.UserPublicInfo + 47, // 14: OpenIMChat.chat.SearchUserPublicInfoReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination + 46, // 15: OpenIMChat.chat.SearchUserPublicInfoResp.users:type_name -> OpenIMChat.common.UserPublicInfo + 48, // 16: OpenIMChat.chat.FindUserFullInfoResp.users:type_name -> OpenIMChat.common.UserFullInfo 13, // 17: OpenIMChat.chat.RegisterUserReq.user:type_name -> OpenIMChat.chat.RegisterUserInfo - 35, // 18: OpenIMChat.chat.FindUserAccountResp.userAccountMap:type_name -> OpenIMChat.chat.FindUserAccountResp.UserAccountMapEntry - 36, // 19: OpenIMChat.chat.FindAccountUserResp.accountUserMap:type_name -> OpenIMChat.chat.FindAccountUserResp.AccountUserMapEntry - 40, // 20: OpenIMChat.chat.SignalRecord.inviterUserList:type_name -> OpenIMChat.common.UserPublicInfo + 39, // 18: OpenIMChat.chat.FindUserAccountResp.userAccountMap:type_name -> OpenIMChat.chat.FindUserAccountResp.UserAccountMapEntry + 40, // 19: OpenIMChat.chat.FindAccountUserResp.accountUserMap:type_name -> OpenIMChat.chat.FindAccountUserResp.AccountUserMapEntry + 46, // 20: OpenIMChat.chat.SignalRecord.inviterUserList:type_name -> OpenIMChat.common.UserPublicInfo 26, // 21: OpenIMChat.chat.AddSignalRecordReq.signalRecord:type_name -> OpenIMChat.chat.SignalRecord - 41, // 22: OpenIMChat.chat.GetSignalRecordsReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination + 47, // 22: OpenIMChat.chat.GetSignalRecordsReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination 26, // 23: OpenIMChat.chat.GetSignalRecordsResp.signalRecords:type_name -> OpenIMChat.chat.SignalRecord - 41, // 24: OpenIMChat.chat.SearchUserFullInfoReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 42, // 25: OpenIMChat.chat.SearchUserFullInfoResp.users:type_name -> OpenIMChat.common.UserFullInfo - 1, // 26: OpenIMChat.chat.chat.UpdateUserInfo:input_type -> OpenIMChat.chat.UpdateUserInfoReq - 5, // 27: OpenIMChat.chat.chat.SearchUserPublicInfo:input_type -> OpenIMChat.chat.SearchUserPublicInfoReq - 3, // 28: OpenIMChat.chat.chat.FindUserPublicInfo:input_type -> OpenIMChat.chat.FindUserPublicInfoReq - 33, // 29: OpenIMChat.chat.chat.SearchUserFullInfo:input_type -> OpenIMChat.chat.SearchUserFullInfoReq - 7, // 30: OpenIMChat.chat.chat.FindUserFullInfo:input_type -> OpenIMChat.chat.FindUserFullInfoReq - 9, // 31: OpenIMChat.chat.chat.SendVerifyCode:input_type -> OpenIMChat.chat.SendVerifyCodeReq - 11, // 32: OpenIMChat.chat.chat.VerifyCode:input_type -> OpenIMChat.chat.VerifyCodeReq - 14, // 33: OpenIMChat.chat.chat.RegisterUser:input_type -> OpenIMChat.chat.RegisterUserReq - 16, // 34: OpenIMChat.chat.chat.Login:input_type -> OpenIMChat.chat.LoginReq - 18, // 35: OpenIMChat.chat.chat.ResetPassword:input_type -> OpenIMChat.chat.ResetPasswordReq - 20, // 36: OpenIMChat.chat.chat.ChangePassword:input_type -> OpenIMChat.chat.ChangePasswordReq - 22, // 37: OpenIMChat.chat.chat.FindUserAccount:input_type -> OpenIMChat.chat.FindUserAccountReq - 24, // 38: OpenIMChat.chat.chat.FindAccountUser:input_type -> OpenIMChat.chat.FindAccountUserReq - 27, // 39: OpenIMChat.chat.chat.AddSignalRecord:input_type -> OpenIMChat.chat.AddSignalRecordReq - 29, // 40: OpenIMChat.chat.chat.GetSignalRecords:input_type -> OpenIMChat.chat.GetSignalRecordsReq - 31, // 41: OpenIMChat.chat.chat.OpenIMCallback:input_type -> OpenIMChat.chat.OpenIMCallbackReq - 2, // 42: OpenIMChat.chat.chat.UpdateUserInfo:output_type -> OpenIMChat.chat.UpdateUserInfoResp - 6, // 43: OpenIMChat.chat.chat.SearchUserPublicInfo:output_type -> OpenIMChat.chat.SearchUserPublicInfoResp - 4, // 44: OpenIMChat.chat.chat.FindUserPublicInfo:output_type -> OpenIMChat.chat.FindUserPublicInfoResp - 34, // 45: OpenIMChat.chat.chat.SearchUserFullInfo:output_type -> OpenIMChat.chat.SearchUserFullInfoResp - 8, // 46: OpenIMChat.chat.chat.FindUserFullInfo:output_type -> OpenIMChat.chat.FindUserFullInfoResp - 10, // 47: OpenIMChat.chat.chat.SendVerifyCode:output_type -> OpenIMChat.chat.SendVerifyCodeResp - 12, // 48: OpenIMChat.chat.chat.VerifyCode:output_type -> OpenIMChat.chat.VerifyCodeResp - 15, // 49: OpenIMChat.chat.chat.RegisterUser:output_type -> OpenIMChat.chat.RegisterUserResp - 17, // 50: OpenIMChat.chat.chat.Login:output_type -> OpenIMChat.chat.LoginResp - 19, // 51: OpenIMChat.chat.chat.ResetPassword:output_type -> OpenIMChat.chat.ResetPasswordResp - 21, // 52: OpenIMChat.chat.chat.ChangePassword:output_type -> OpenIMChat.chat.ChangePasswordResp - 23, // 53: OpenIMChat.chat.chat.FindUserAccount:output_type -> OpenIMChat.chat.FindUserAccountResp - 25, // 54: OpenIMChat.chat.chat.FindAccountUser:output_type -> OpenIMChat.chat.FindAccountUserResp - 28, // 55: OpenIMChat.chat.chat.AddSignalRecord:output_type -> OpenIMChat.chat.AddSignalRecordResp - 30, // 56: OpenIMChat.chat.chat.GetSignalRecords:output_type -> OpenIMChat.chat.GetSignalRecordsResp - 32, // 57: OpenIMChat.chat.chat.OpenIMCallback:output_type -> OpenIMChat.chat.OpenIMCallbackResp - 42, // [42:58] is the sub-list for method output_type - 26, // [26:42] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 47, // 24: OpenIMChat.chat.SearchUserFullInfoReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination + 48, // 25: OpenIMChat.chat.SearchUserFullInfoResp.users:type_name -> OpenIMChat.common.UserFullInfo + 41, // 26: OpenIMChat.chat.NewUserCountResp.Count:type_name -> OpenIMChat.chat.NewUserCountResp.CountEntry + 42, // 27: OpenIMChat.chat.UserLoginCountResp.Count:type_name -> OpenIMChat.chat.UserLoginCountResp.CountEntry + 1, // 28: OpenIMChat.chat.chat.UpdateUserInfo:input_type -> OpenIMChat.chat.UpdateUserInfoReq + 5, // 29: OpenIMChat.chat.chat.SearchUserPublicInfo:input_type -> OpenIMChat.chat.SearchUserPublicInfoReq + 3, // 30: OpenIMChat.chat.chat.FindUserPublicInfo:input_type -> OpenIMChat.chat.FindUserPublicInfoReq + 33, // 31: OpenIMChat.chat.chat.SearchUserFullInfo:input_type -> OpenIMChat.chat.SearchUserFullInfoReq + 7, // 32: OpenIMChat.chat.chat.FindUserFullInfo:input_type -> OpenIMChat.chat.FindUserFullInfoReq + 9, // 33: OpenIMChat.chat.chat.SendVerifyCode:input_type -> OpenIMChat.chat.SendVerifyCodeReq + 11, // 34: OpenIMChat.chat.chat.VerifyCode:input_type -> OpenIMChat.chat.VerifyCodeReq + 14, // 35: OpenIMChat.chat.chat.RegisterUser:input_type -> OpenIMChat.chat.RegisterUserReq + 16, // 36: OpenIMChat.chat.chat.Login:input_type -> OpenIMChat.chat.LoginReq + 18, // 37: OpenIMChat.chat.chat.ResetPassword:input_type -> OpenIMChat.chat.ResetPasswordReq + 20, // 38: OpenIMChat.chat.chat.ChangePassword:input_type -> OpenIMChat.chat.ChangePasswordReq + 22, // 39: OpenIMChat.chat.chat.FindUserAccount:input_type -> OpenIMChat.chat.FindUserAccountReq + 24, // 40: OpenIMChat.chat.chat.FindAccountUser:input_type -> OpenIMChat.chat.FindAccountUserReq + 27, // 41: OpenIMChat.chat.chat.AddSignalRecord:input_type -> OpenIMChat.chat.AddSignalRecordReq + 29, // 42: OpenIMChat.chat.chat.GetSignalRecords:input_type -> OpenIMChat.chat.GetSignalRecordsReq + 31, // 43: OpenIMChat.chat.chat.OpenIMCallback:input_type -> OpenIMChat.chat.OpenIMCallbackReq + 35, // 44: OpenIMChat.chat.chat.NewUserCount:input_type -> OpenIMChat.chat.NewUserCountReq + 37, // 45: OpenIMChat.chat.chat.UserLoginCount:input_type -> OpenIMChat.chat.UserLoginCountReq + 2, // 46: OpenIMChat.chat.chat.UpdateUserInfo:output_type -> OpenIMChat.chat.UpdateUserInfoResp + 6, // 47: OpenIMChat.chat.chat.SearchUserPublicInfo:output_type -> OpenIMChat.chat.SearchUserPublicInfoResp + 4, // 48: OpenIMChat.chat.chat.FindUserPublicInfo:output_type -> OpenIMChat.chat.FindUserPublicInfoResp + 34, // 49: OpenIMChat.chat.chat.SearchUserFullInfo:output_type -> OpenIMChat.chat.SearchUserFullInfoResp + 8, // 50: OpenIMChat.chat.chat.FindUserFullInfo:output_type -> OpenIMChat.chat.FindUserFullInfoResp + 10, // 51: OpenIMChat.chat.chat.SendVerifyCode:output_type -> OpenIMChat.chat.SendVerifyCodeResp + 12, // 52: OpenIMChat.chat.chat.VerifyCode:output_type -> OpenIMChat.chat.VerifyCodeResp + 15, // 53: OpenIMChat.chat.chat.RegisterUser:output_type -> OpenIMChat.chat.RegisterUserResp + 17, // 54: OpenIMChat.chat.chat.Login:output_type -> OpenIMChat.chat.LoginResp + 19, // 55: OpenIMChat.chat.chat.ResetPassword:output_type -> OpenIMChat.chat.ResetPasswordResp + 21, // 56: OpenIMChat.chat.chat.ChangePassword:output_type -> OpenIMChat.chat.ChangePasswordResp + 23, // 57: OpenIMChat.chat.chat.FindUserAccount:output_type -> OpenIMChat.chat.FindUserAccountResp + 25, // 58: OpenIMChat.chat.chat.FindAccountUser:output_type -> OpenIMChat.chat.FindAccountUserResp + 28, // 59: OpenIMChat.chat.chat.AddSignalRecord:output_type -> OpenIMChat.chat.AddSignalRecordResp + 30, // 60: OpenIMChat.chat.chat.GetSignalRecords:output_type -> OpenIMChat.chat.GetSignalRecordsResp + 32, // 61: OpenIMChat.chat.chat.OpenIMCallback:output_type -> OpenIMChat.chat.OpenIMCallbackResp + 36, // 62: OpenIMChat.chat.chat.NewUserCount:output_type -> OpenIMChat.chat.NewUserCountResp + 38, // 63: OpenIMChat.chat.chat.UserLoginCount:output_type -> OpenIMChat.chat.UserLoginCountResp + 46, // [46:64] is the sub-list for method output_type + 28, // [28:46] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name } func init() { file_chat_chat_proto_init() } @@ -3279,6 +3570,54 @@ func file_chat_chat_proto_init() { return nil } } + file_chat_chat_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NewUserCountReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chat_chat_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NewUserCountResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chat_chat_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserLoginCountReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chat_chat_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserLoginCountResp); 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{ @@ -3286,7 +3625,7 @@ func file_chat_chat_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_chat_chat_proto_rawDesc, NumEnums: 0, - NumMessages: 37, + NumMessages: 43, NumExtensions: 0, NumServices: 1, }, @@ -3331,6 +3670,9 @@ type ChatClient interface { AddSignalRecord(ctx context.Context, in *AddSignalRecordReq, opts ...grpc.CallOption) (*AddSignalRecordResp, error) GetSignalRecords(ctx context.Context, in *GetSignalRecordsReq, opts ...grpc.CallOption) (*GetSignalRecordsResp, error) OpenIMCallback(ctx context.Context, in *OpenIMCallbackReq, opts ...grpc.CallOption) (*OpenIMCallbackResp, error) + // 统计 + NewUserCount(ctx context.Context, in *NewUserCountReq, opts ...grpc.CallOption) (*NewUserCountResp, error) + UserLoginCount(ctx context.Context, in *UserLoginCountReq, opts ...grpc.CallOption) (*UserLoginCountResp, error) } type chatClient struct { @@ -3485,6 +3827,24 @@ func (c *chatClient) OpenIMCallback(ctx context.Context, in *OpenIMCallbackReq, return out, nil } +func (c *chatClient) NewUserCount(ctx context.Context, in *NewUserCountReq, opts ...grpc.CallOption) (*NewUserCountResp, error) { + out := new(NewUserCountResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.chat.chat/NewUserCount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *chatClient) UserLoginCount(ctx context.Context, in *UserLoginCountReq, opts ...grpc.CallOption) (*UserLoginCountResp, error) { + out := new(UserLoginCountResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.chat.chat/UserLoginCount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ChatServer is the server API for Chat service. type ChatServer interface { // 编辑个人资料 自己或者管理员调用 @@ -3506,6 +3866,9 @@ type ChatServer interface { AddSignalRecord(context.Context, *AddSignalRecordReq) (*AddSignalRecordResp, error) GetSignalRecords(context.Context, *GetSignalRecordsReq) (*GetSignalRecordsResp, error) OpenIMCallback(context.Context, *OpenIMCallbackReq) (*OpenIMCallbackResp, error) + // 统计 + NewUserCount(context.Context, *NewUserCountReq) (*NewUserCountResp, error) + UserLoginCount(context.Context, *UserLoginCountReq) (*UserLoginCountResp, error) } // UnimplementedChatServer can be embedded to have forward compatible implementations. @@ -3560,6 +3923,12 @@ func (*UnimplementedChatServer) GetSignalRecords(context.Context, *GetSignalReco func (*UnimplementedChatServer) OpenIMCallback(context.Context, *OpenIMCallbackReq) (*OpenIMCallbackResp, error) { return nil, status.Errorf(codes.Unimplemented, "method OpenIMCallback not implemented") } +func (*UnimplementedChatServer) NewUserCount(context.Context, *NewUserCountReq) (*NewUserCountResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method NewUserCount not implemented") +} +func (*UnimplementedChatServer) UserLoginCount(context.Context, *UserLoginCountReq) (*UserLoginCountResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UserLoginCount not implemented") +} func RegisterChatServer(s *grpc.Server, srv ChatServer) { s.RegisterService(&_Chat_serviceDesc, srv) @@ -3853,6 +4222,42 @@ func _Chat_OpenIMCallback_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Chat_NewUserCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NewUserCountReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChatServer).NewUserCount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.chat.chat/NewUserCount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChatServer).NewUserCount(ctx, req.(*NewUserCountReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Chat_UserLoginCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserLoginCountReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChatServer).UserLoginCount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.chat.chat/UserLoginCount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChatServer).UserLoginCount(ctx, req.(*UserLoginCountReq)) + } + return interceptor(ctx, in, info, handler) +} + var _Chat_serviceDesc = grpc.ServiceDesc{ ServiceName: "OpenIMChat.chat.chat", HandlerType: (*ChatServer)(nil), @@ -3921,6 +4326,14 @@ var _Chat_serviceDesc = grpc.ServiceDesc{ MethodName: "OpenIMCallback", Handler: _Chat_OpenIMCallback_Handler, }, + { + MethodName: "NewUserCount", + Handler: _Chat_NewUserCount_Handler, + }, + { + MethodName: "UserLoginCount", + Handler: _Chat_UserLoginCount_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "chat/chat.proto", diff --git a/pkg/proto/chat/chat.proto b/pkg/proto/chat/chat.proto index 00b9e626a..f616b138d 100644 --- a/pkg/proto/chat/chat.proto +++ b/pkg/proto/chat/chat.proto @@ -240,6 +240,27 @@ message SearchUserFullInfoResp{ repeated OpenIMChat.common.UserFullInfo users = 2; } +message NewUserCountReq{ + int64 start =1; + int64 end=2; +} + +message NewUserCountResp{ + int64 total=1; + int64 before=2; + mapCount=3; +} + +message UserLoginCountReq{ + int64 start =1; + int64 end=2; +} + +message UserLoginCountResp{ + int64 total=1; + int64 before=2; + mapCount=3; +} service chat { //编辑个人资料 自己或者管理员调用 @@ -265,4 +286,8 @@ service chat { rpc GetSignalRecords(GetSignalRecordsReq) returns(GetSignalRecordsResp); rpc OpenIMCallback(OpenIMCallbackReq) returns(OpenIMCallbackResp); + + //统计 + rpc NewUserCount(NewUserCountReq) returns (NewUserCountResp); + rpc UserLoginCount(UserLoginCountReq) returns (UserLoginCountResp); } \ No newline at end of file diff --git a/scripts/start.bat b/scripts/start.bat index be4405da0..36c0ce1ed 100644 --- a/scripts/start.bat +++ b/scripts/start.bat @@ -1,5 +1,4 @@ -cd /d %~dp0 -cd ../cmd +cd /d %~dp0../cmd start admin_rpc.exe start chat_rpc.exe start chat_api.exe