diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index bef9cd8..7ea6a31 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,14 +4,13 @@
-
-
+
-
-
-
-
-
+
+
+
+
+
@@ -34,6 +33,10 @@
+
+
@@ -159,7 +162,6 @@
-
@@ -184,7 +186,8 @@
-
+
+
diff --git a/pkg/authkit/notify.go b/pkg/authkit/notify.go
index 3610923..3ff5dc0 100644
--- a/pkg/authkit/notify.go
+++ b/pkg/authkit/notify.go
@@ -19,7 +19,7 @@ func NotifyUser(nx *nex.Conn, userId uint64, notify pushkit.Notification, unsave
}
_, err = proto.NewNotifyServiceClient(conn).NotifyUser(nil, &proto.NotifyUserRequest{
UserId: userId,
- Notify: &proto.NotifyInfo{
+ Notify: &proto.NotifyInfoPayload{
Unsaved: unsaved[0],
Data: raw,
},
@@ -38,7 +38,7 @@ func NotifyUserBatch(nx *nex.Conn, userId []uint64, notify pushkit.Notification,
}
_, err = proto.NewNotifyServiceClient(conn).NotifyUserBatch(nil, &proto.NotifyUserBatchRequest{
UserId: userId,
- Notify: &proto.NotifyInfo{
+ Notify: &proto.NotifyInfoPayload{
Unsaved: unsaved[0],
Data: raw,
},
diff --git a/pkg/internal/grpc/notify.go b/pkg/internal/grpc/notify.go
index b98c678..4191700 100644
--- a/pkg/internal/grpc/notify.go
+++ b/pkg/internal/grpc/notify.go
@@ -92,7 +92,7 @@ func (v *App) NotifyUserBatch(_ context.Context, in *proto.NotifyUserBatchReques
}, nil
}
-func (v *App) NotifyAllUser(_ context.Context, in *proto.NotifyInfo) (*proto.NotifyResponse, error) {
+func (v *App) NotifyAllUser(_ context.Context, in *proto.NotifyInfoPayload) (*proto.NotifyResponse, error) {
var users []models.Account
if err := database.C.Find(&users).Error; err != nil {
return nil, fmt.Errorf("unable to get account: %v", err)
diff --git a/pkg/proto/notify.pb.go b/pkg/proto/notify.pb.go
index d107cdc..780275a 100644
--- a/pkg/proto/notify.pb.go
+++ b/pkg/proto/notify.pb.go
@@ -20,7 +20,7 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
-type NotifyInfo struct {
+type NotifyInfoPayload struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -31,20 +31,20 @@ type NotifyInfo struct {
Unsaved bool `protobuf:"varint,2,opt,name=unsaved,proto3" json:"unsaved,omitempty"`
}
-func (x *NotifyInfo) Reset() {
- *x = NotifyInfo{}
+func (x *NotifyInfoPayload) Reset() {
+ *x = NotifyInfoPayload{}
mi := &file_notify_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
-func (x *NotifyInfo) String() string {
+func (x *NotifyInfoPayload) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*NotifyInfo) ProtoMessage() {}
+func (*NotifyInfoPayload) ProtoMessage() {}
-func (x *NotifyInfo) ProtoReflect() protoreflect.Message {
+func (x *NotifyInfoPayload) ProtoReflect() protoreflect.Message {
mi := &file_notify_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -56,19 +56,19 @@ func (x *NotifyInfo) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use NotifyInfo.ProtoReflect.Descriptor instead.
-func (*NotifyInfo) Descriptor() ([]byte, []int) {
+// Deprecated: Use NotifyInfoPayload.ProtoReflect.Descriptor instead.
+func (*NotifyInfoPayload) Descriptor() ([]byte, []int) {
return file_notify_proto_rawDescGZIP(), []int{0}
}
-func (x *NotifyInfo) GetData() []byte {
+func (x *NotifyInfoPayload) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
-func (x *NotifyInfo) GetUnsaved() bool {
+func (x *NotifyInfoPayload) GetUnsaved() bool {
if x != nil {
return x.Unsaved
}
@@ -80,8 +80,8 @@ type NotifyUserRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
- Notify *NotifyInfo `protobuf:"bytes,2,opt,name=notify,proto3" json:"notify,omitempty"`
+ UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ Notify *NotifyInfoPayload `protobuf:"bytes,2,opt,name=notify,proto3" json:"notify,omitempty"`
}
func (x *NotifyUserRequest) Reset() {
@@ -121,7 +121,7 @@ func (x *NotifyUserRequest) GetUserId() uint64 {
return 0
}
-func (x *NotifyUserRequest) GetNotify() *NotifyInfo {
+func (x *NotifyUserRequest) GetNotify() *NotifyInfoPayload {
if x != nil {
return x.Notify
}
@@ -133,8 +133,8 @@ type NotifyUserBatchRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- UserId []uint64 `protobuf:"varint,1,rep,packed,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
- Notify *NotifyInfo `protobuf:"bytes,2,opt,name=notify,proto3" json:"notify,omitempty"`
+ UserId []uint64 `protobuf:"varint,1,rep,packed,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ Notify *NotifyInfoPayload `protobuf:"bytes,2,opt,name=notify,proto3" json:"notify,omitempty"`
}
func (x *NotifyUserBatchRequest) Reset() {
@@ -174,7 +174,7 @@ func (x *NotifyUserBatchRequest) GetUserId() []uint64 {
return nil
}
-func (x *NotifyUserBatchRequest) GetNotify() *NotifyInfo {
+func (x *NotifyUserBatchRequest) GetNotify() *NotifyInfoPayload {
if x != nil {
return x.Notify
}
@@ -230,40 +230,42 @@ var File_notify_proto protoreflect.FileDescriptor
var file_notify_proto_rawDesc = []byte{
0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, 0x0a, 0x0a, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x49,
- 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x73, 0x61, 0x76,
- 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x75, 0x6e, 0x73, 0x61, 0x76, 0x65,
- 0x64, 0x22, 0x57, 0x0a, 0x11, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69,
- 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
- 0x29, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x49, 0x6e,
- 0x66, 0x6f, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x22, 0x5c, 0x0a, 0x16, 0x4e, 0x6f,
- 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
- 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x29, 0x0a,
- 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x66, 0x6f,
- 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x22, 0x2f, 0x0a, 0x0e, 0x4e, 0x6f, 0x74, 0x69,
- 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73,
- 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
- 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x32, 0xd8, 0x01, 0x0a, 0x0d, 0x4e, 0x6f,
- 0x74, 0x69, 0x66, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x4e,
- 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x11, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x49,
+ 0x6e, 0x66, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61,
+ 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18,
+ 0x0a, 0x07, 0x75, 0x6e, 0x73, 0x61, 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x07, 0x75, 0x6e, 0x73, 0x61, 0x76, 0x65, 0x64, 0x22, 0x5e, 0x0a, 0x11, 0x4e, 0x6f, 0x74, 0x69,
+ 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a,
+ 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06,
+ 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e,
+ 0x6f, 0x74, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
+ 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x22, 0x63, 0x0a, 0x16, 0x4e, 0x6f, 0x74, 0x69,
+ 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x04, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x6e,
+ 0x6f, 0x74, 0x69, 0x66, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x61,
+ 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x22, 0x2f, 0x0a,
+ 0x0e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x32, 0xdf,
+ 0x01, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x12, 0x3f, 0x0a, 0x0a, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x12, 0x18,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65,
+ 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x00, 0x12, 0x49, 0x0a, 0x0f, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x42,
+ 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74,
+ 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69,
- 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0f,
- 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12,
- 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73,
- 0x65, 0x72, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x69, 0x66,
- 0x79, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x12, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x15, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x22, 0x00, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0d,
+ 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x12, 0x18, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x66, 0x6f,
+ 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
+ 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
+ 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33,
}
var (
@@ -280,17 +282,17 @@ func file_notify_proto_rawDescGZIP() []byte {
var file_notify_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_notify_proto_goTypes = []any{
- (*NotifyInfo)(nil), // 0: proto.NotifyInfo
+ (*NotifyInfoPayload)(nil), // 0: proto.NotifyInfoPayload
(*NotifyUserRequest)(nil), // 1: proto.NotifyUserRequest
(*NotifyUserBatchRequest)(nil), // 2: proto.NotifyUserBatchRequest
(*NotifyResponse)(nil), // 3: proto.NotifyResponse
}
var file_notify_proto_depIdxs = []int32{
- 0, // 0: proto.NotifyUserRequest.notify:type_name -> proto.NotifyInfo
- 0, // 1: proto.NotifyUserBatchRequest.notify:type_name -> proto.NotifyInfo
+ 0, // 0: proto.NotifyUserRequest.notify:type_name -> proto.NotifyInfoPayload
+ 0, // 1: proto.NotifyUserBatchRequest.notify:type_name -> proto.NotifyInfoPayload
1, // 2: proto.NotifyService.NotifyUser:input_type -> proto.NotifyUserRequest
2, // 3: proto.NotifyService.NotifyUserBatch:input_type -> proto.NotifyUserBatchRequest
- 0, // 4: proto.NotifyService.NotifyAllUser:input_type -> proto.NotifyInfo
+ 0, // 4: proto.NotifyService.NotifyAllUser:input_type -> proto.NotifyInfoPayload
3, // 5: proto.NotifyService.NotifyUser:output_type -> proto.NotifyResponse
3, // 6: proto.NotifyService.NotifyUserBatch:output_type -> proto.NotifyResponse
3, // 7: proto.NotifyService.NotifyAllUser:output_type -> proto.NotifyResponse
diff --git a/pkg/proto/notify.proto b/pkg/proto/notify.proto
index 86614aa..692c7fe 100644
--- a/pkg/proto/notify.proto
+++ b/pkg/proto/notify.proto
@@ -7,10 +7,10 @@ package proto;
service NotifyService {
rpc NotifyUser(NotifyUserRequest) returns (NotifyResponse) {}
rpc NotifyUserBatch(NotifyUserBatchRequest) returns (NotifyResponse) {}
- rpc NotifyAllUser(NotifyInfo) returns(NotifyResponse) {}
+ rpc NotifyAllUser(NotifyInfoPayload) returns(NotifyResponse) {}
}
-message NotifyInfo {
+message NotifyInfoPayload {
// This bytes is directly encoded from pushkit.Notification
// Which is passed to the pusher service, we don't need to care about the content
bytes data = 1;
@@ -19,12 +19,12 @@ message NotifyInfo {
message NotifyUserRequest {
uint64 user_id = 1;
- NotifyInfo notify = 2;
+ NotifyInfoPayload notify = 2;
}
message NotifyUserBatchRequest {
repeated uint64 user_id = 1;
- NotifyInfo notify = 2;
+ NotifyInfoPayload notify = 2;
}
message NotifyResponse {
diff --git a/pkg/proto/notify_grpc.pb.go b/pkg/proto/notify_grpc.pb.go
index 216f128..556f60e 100644
--- a/pkg/proto/notify_grpc.pb.go
+++ b/pkg/proto/notify_grpc.pb.go
@@ -30,7 +30,7 @@ const (
type NotifyServiceClient interface {
NotifyUser(ctx context.Context, in *NotifyUserRequest, opts ...grpc.CallOption) (*NotifyResponse, error)
NotifyUserBatch(ctx context.Context, in *NotifyUserBatchRequest, opts ...grpc.CallOption) (*NotifyResponse, error)
- NotifyAllUser(ctx context.Context, in *NotifyInfo, opts ...grpc.CallOption) (*NotifyResponse, error)
+ NotifyAllUser(ctx context.Context, in *NotifyInfoPayload, opts ...grpc.CallOption) (*NotifyResponse, error)
}
type notifyServiceClient struct {
@@ -61,7 +61,7 @@ func (c *notifyServiceClient) NotifyUserBatch(ctx context.Context, in *NotifyUse
return out, nil
}
-func (c *notifyServiceClient) NotifyAllUser(ctx context.Context, in *NotifyInfo, opts ...grpc.CallOption) (*NotifyResponse, error) {
+func (c *notifyServiceClient) NotifyAllUser(ctx context.Context, in *NotifyInfoPayload, opts ...grpc.CallOption) (*NotifyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NotifyResponse)
err := c.cc.Invoke(ctx, NotifyService_NotifyAllUser_FullMethodName, in, out, cOpts...)
@@ -77,7 +77,7 @@ func (c *notifyServiceClient) NotifyAllUser(ctx context.Context, in *NotifyInfo,
type NotifyServiceServer interface {
NotifyUser(context.Context, *NotifyUserRequest) (*NotifyResponse, error)
NotifyUserBatch(context.Context, *NotifyUserBatchRequest) (*NotifyResponse, error)
- NotifyAllUser(context.Context, *NotifyInfo) (*NotifyResponse, error)
+ NotifyAllUser(context.Context, *NotifyInfoPayload) (*NotifyResponse, error)
mustEmbedUnimplementedNotifyServiceServer()
}
@@ -94,7 +94,7 @@ func (UnimplementedNotifyServiceServer) NotifyUser(context.Context, *NotifyUserR
func (UnimplementedNotifyServiceServer) NotifyUserBatch(context.Context, *NotifyUserBatchRequest) (*NotifyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NotifyUserBatch not implemented")
}
-func (UnimplementedNotifyServiceServer) NotifyAllUser(context.Context, *NotifyInfo) (*NotifyResponse, error) {
+func (UnimplementedNotifyServiceServer) NotifyAllUser(context.Context, *NotifyInfoPayload) (*NotifyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NotifyAllUser not implemented")
}
func (UnimplementedNotifyServiceServer) mustEmbedUnimplementedNotifyServiceServer() {}
@@ -155,7 +155,7 @@ func _NotifyService_NotifyUserBatch_Handler(srv interface{}, ctx context.Context
}
func _NotifyService_NotifyAllUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(NotifyInfo)
+ in := new(NotifyInfoPayload)
if err := dec(in); err != nil {
return nil, err
}
@@ -167,7 +167,7 @@ func _NotifyService_NotifyAllUser_Handler(srv interface{}, ctx context.Context,
FullMethod: NotifyService_NotifyAllUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(NotifyServiceServer).NotifyAllUser(ctx, req.(*NotifyInfo))
+ return srv.(NotifyServiceServer).NotifyAllUser(ctx, req.(*NotifyInfoPayload))
}
return interceptor(ctx, in, info, handler)
}