From 4cea915abfbcb8b63dbcfb4f339a7d8c6dcbfa0e Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 30 Jul 2024 18:31:26 +0800 Subject: [PATCH] :sparkles: New list user friends & blocklist calls --- pkg/proto/auth.pb.go | 330 ++++++++++++++++++++++++++++------ pkg/proto/auth.proto | 18 +- pkg/proto/auth_grpc.pb.go | 103 ++++++++++- pkg/proto/notify.pb.go | 14 +- pkg/proto/notify_grpc.pb.go | 27 ++- pkg/proto/postman.pb.go | 18 +- pkg/proto/postman_grpc.pb.go | 33 ++-- pkg/proto/realm.pb.go | 28 +-- pkg/proto/realm_grpc.pb.go | 51 ++++-- pkg/proto/record.pb.go | 8 +- pkg/proto/record_grpc.pb.go | 15 +- pkg/proto/services.pb.go | 26 +-- pkg/proto/services_grpc.pb.go | 33 ++-- pkg/proto/stream.pb.go | 18 +- pkg/proto/stream_grpc.pb.go | 33 ++-- 15 files changed, 572 insertions(+), 183 deletions(-) diff --git a/pkg/proto/auth.pb.go b/pkg/proto/auth.pb.go index 49e4f76..5299e92 100644 --- a/pkg/proto/auth.pb.go +++ b/pkg/proto/auth.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.34.2 // protoc v5.27.1 // source: auth.proto @@ -532,6 +532,163 @@ func (x *CheckUserPermResponse) GetIsValid() bool { return false } +type SimpleUserInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Nick string `protobuf:"bytes,3,opt,name=nick,proto3" json:"nick,omitempty"` +} + +func (x *SimpleUserInfo) Reset() { + *x = SimpleUserInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_auth_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SimpleUserInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SimpleUserInfo) ProtoMessage() {} + +func (x *SimpleUserInfo) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SimpleUserInfo.ProtoReflect.Descriptor instead. +func (*SimpleUserInfo) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{8} +} + +func (x *SimpleUserInfo) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *SimpleUserInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SimpleUserInfo) GetNick() string { + if x != nil { + return x.Nick + } + return "" +} + +type ListUserRelativeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` +} + +func (x *ListUserRelativeRequest) Reset() { + *x = ListUserRelativeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_auth_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListUserRelativeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListUserRelativeRequest) ProtoMessage() {} + +func (x *ListUserRelativeRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListUserRelativeRequest.ProtoReflect.Descriptor instead. +func (*ListUserRelativeRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{9} +} + +func (x *ListUserRelativeRequest) GetUserId() uint64 { + if x != nil { + return x.UserId + } + return 0 +} + +type ListUserRelativeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []*SimpleUserInfo `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` +} + +func (x *ListUserRelativeResponse) Reset() { + *x = ListUserRelativeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_auth_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListUserRelativeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListUserRelativeResponse) ProtoMessage() {} + +func (x *ListUserRelativeResponse) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListUserRelativeResponse.ProtoReflect.Descriptor instead. +func (*ListUserRelativeResponse) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{10} +} + +func (x *ListUserRelativeResponse) GetData() []*SimpleUserInfo { + if x != nil { + return x.Data + } + return nil +} + var File_auth_proto protoreflect.FileDescriptor var file_auth_proto_rawDesc = []byte{ @@ -595,22 +752,45 @@ var file_auth_proto_rawDesc = []byte{ 0x22, 0x32, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x32, 0xde, 0x01, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x36, 0x0a, - 0x0c, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x12, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x11, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x50, - 0x65, 0x72, 0x6d, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x54, 0x0a, 0x15, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, - 0x6d, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 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, + 0x61, 0x6c, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x0e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x69, + 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x6b, 0x22, 0x32, + 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x76, 0x65, 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, 0x22, 0x45, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0x8c, 0x03, 0x0a, 0x04, 0x41, 0x75, + 0x74, 0x68, 0x12, 0x36, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, + 0x75, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x11, 0x45, 0x6e, + 0x73, 0x75, 0x72, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, + 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, + 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x15, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, + 0x65, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, + 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x12, 0x1e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x56, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 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 ( @@ -625,31 +805,39 @@ func file_auth_proto_rawDescGZIP() []byte { return file_auth_proto_rawDescData } -var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_auth_proto_goTypes = []interface{}{ - (*UserInfo)(nil), // 0: proto.UserInfo - (*AuthInfo)(nil), // 1: proto.AuthInfo - (*AuthRequest)(nil), // 2: proto.AuthRequest - (*AuthReply)(nil), // 3: proto.AuthReply - (*CheckPermRequest)(nil), // 4: proto.CheckPermRequest - (*CheckPermResponse)(nil), // 5: proto.CheckPermResponse - (*CheckUserPermRequest)(nil), // 6: proto.CheckUserPermRequest - (*CheckUserPermResponse)(nil), // 7: proto.CheckUserPermResponse +var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_auth_proto_goTypes = []any{ + (*UserInfo)(nil), // 0: proto.UserInfo + (*AuthInfo)(nil), // 1: proto.AuthInfo + (*AuthRequest)(nil), // 2: proto.AuthRequest + (*AuthReply)(nil), // 3: proto.AuthReply + (*CheckPermRequest)(nil), // 4: proto.CheckPermRequest + (*CheckPermResponse)(nil), // 5: proto.CheckPermResponse + (*CheckUserPermRequest)(nil), // 6: proto.CheckUserPermRequest + (*CheckUserPermResponse)(nil), // 7: proto.CheckUserPermResponse + (*SimpleUserInfo)(nil), // 8: proto.SimpleUserInfo + (*ListUserRelativeRequest)(nil), // 9: proto.ListUserRelativeRequest + (*ListUserRelativeResponse)(nil), // 10: proto.ListUserRelativeResponse } var file_auth_proto_depIdxs = []int32{ - 0, // 0: proto.AuthInfo.info:type_name -> proto.UserInfo - 1, // 1: proto.AuthReply.info:type_name -> proto.AuthInfo - 2, // 2: proto.Auth.Authenticate:input_type -> proto.AuthRequest - 4, // 3: proto.Auth.EnsurePermGranted:input_type -> proto.CheckPermRequest - 6, // 4: proto.Auth.EnsureUserPermGranted:input_type -> proto.CheckUserPermRequest - 3, // 5: proto.Auth.Authenticate:output_type -> proto.AuthReply - 5, // 6: proto.Auth.EnsurePermGranted:output_type -> proto.CheckPermResponse - 7, // 7: proto.Auth.EnsureUserPermGranted:output_type -> proto.CheckUserPermResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 0, // 0: proto.AuthInfo.info:type_name -> proto.UserInfo + 1, // 1: proto.AuthReply.info:type_name -> proto.AuthInfo + 8, // 2: proto.ListUserRelativeResponse.data:type_name -> proto.SimpleUserInfo + 2, // 3: proto.Auth.Authenticate:input_type -> proto.AuthRequest + 4, // 4: proto.Auth.EnsurePermGranted:input_type -> proto.CheckPermRequest + 6, // 5: proto.Auth.EnsureUserPermGranted:input_type -> proto.CheckUserPermRequest + 9, // 6: proto.Auth.ListUserFriends:input_type -> proto.ListUserRelativeRequest + 9, // 7: proto.Auth.ListUserBlocklist:input_type -> proto.ListUserRelativeRequest + 3, // 8: proto.Auth.Authenticate:output_type -> proto.AuthReply + 5, // 9: proto.Auth.EnsurePermGranted:output_type -> proto.CheckPermResponse + 7, // 10: proto.Auth.EnsureUserPermGranted:output_type -> proto.CheckUserPermResponse + 10, // 11: proto.Auth.ListUserFriends:output_type -> proto.ListUserRelativeResponse + 10, // 12: proto.Auth.ListUserBlocklist:output_type -> proto.ListUserRelativeResponse + 8, // [8:13] is the sub-list for method output_type + 3, // [3:8] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_auth_proto_init() } @@ -658,7 +846,7 @@ func file_auth_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*UserInfo); i { case 0: return &v.state @@ -670,7 +858,7 @@ func file_auth_proto_init() { return nil } } - file_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*AuthInfo); i { case 0: return &v.state @@ -682,7 +870,7 @@ func file_auth_proto_init() { return nil } } - file_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*AuthRequest); i { case 0: return &v.state @@ -694,7 +882,7 @@ func file_auth_proto_init() { return nil } } - file_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*AuthReply); i { case 0: return &v.state @@ -706,7 +894,7 @@ func file_auth_proto_init() { return nil } } - file_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*CheckPermRequest); i { case 0: return &v.state @@ -718,7 +906,7 @@ func file_auth_proto_init() { return nil } } - file_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*CheckPermResponse); i { case 0: return &v.state @@ -730,7 +918,7 @@ func file_auth_proto_init() { return nil } } - file_auth_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*CheckUserPermRequest); i { case 0: return &v.state @@ -742,7 +930,7 @@ func file_auth_proto_init() { return nil } } - file_auth_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*CheckUserPermResponse); i { case 0: return &v.state @@ -754,18 +942,54 @@ func file_auth_proto_init() { return nil } } + file_auth_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*SimpleUserInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_auth_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*ListUserRelativeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_auth_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*ListUserRelativeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } - file_auth_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_auth_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_auth_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_auth_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_auth_proto_msgTypes[0].OneofWrappers = []any{} + file_auth_proto_msgTypes[1].OneofWrappers = []any{} + file_auth_proto_msgTypes[2].OneofWrappers = []any{} + file_auth_proto_msgTypes[3].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_auth_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 11, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/proto/auth.proto b/pkg/proto/auth.proto index 3edb9a5..edbeb9f 100644 --- a/pkg/proto/auth.proto +++ b/pkg/proto/auth.proto @@ -8,6 +8,8 @@ service Auth { rpc Authenticate(AuthRequest) returns (AuthReply) {} rpc EnsurePermGranted(CheckPermRequest) returns (CheckPermResponse) {} rpc EnsureUserPermGranted(CheckUserPermRequest) returns (CheckUserPermResponse) {} + rpc ListUserFriends(ListUserRelativeRequest) returns (ListUserRelativeResponse) {} + rpc ListUserBlocklist(ListUserRelativeRequest) returns (ListUserRelativeResponse) {} } message UserInfo { @@ -57,4 +59,18 @@ message CheckUserPermRequest { message CheckUserPermResponse { bool is_valid = 1; -} \ No newline at end of file +} + +message SimpleUserInfo { + uint64 id = 1; + string name = 2; + string nick = 3; +} + +message ListUserRelativeRequest { + uint64 user_id = 1; +} + +message ListUserRelativeResponse { + repeated SimpleUserInfo data = 1; +} diff --git a/pkg/proto/auth_grpc.pb.go b/pkg/proto/auth_grpc.pb.go index 1d0497f..b295c61 100644 --- a/pkg/proto/auth_grpc.pb.go +++ b/pkg/proto/auth_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.4.0 // - protoc v5.27.1 // source: auth.proto @@ -15,8 +15,16 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Auth_Authenticate_FullMethodName = "/proto.Auth/Authenticate" + Auth_EnsurePermGranted_FullMethodName = "/proto.Auth/EnsurePermGranted" + Auth_EnsureUserPermGranted_FullMethodName = "/proto.Auth/EnsureUserPermGranted" + Auth_ListUserFriends_FullMethodName = "/proto.Auth/ListUserFriends" + Auth_ListUserBlocklist_FullMethodName = "/proto.Auth/ListUserBlocklist" +) // AuthClient is the client API for Auth service. // @@ -25,6 +33,8 @@ type AuthClient interface { Authenticate(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthReply, error) EnsurePermGranted(ctx context.Context, in *CheckPermRequest, opts ...grpc.CallOption) (*CheckPermResponse, error) EnsureUserPermGranted(ctx context.Context, in *CheckUserPermRequest, opts ...grpc.CallOption) (*CheckUserPermResponse, error) + ListUserFriends(ctx context.Context, in *ListUserRelativeRequest, opts ...grpc.CallOption) (*ListUserRelativeResponse, error) + ListUserBlocklist(ctx context.Context, in *ListUserRelativeRequest, opts ...grpc.CallOption) (*ListUserRelativeResponse, error) } type authClient struct { @@ -36,8 +46,9 @@ func NewAuthClient(cc grpc.ClientConnInterface) AuthClient { } func (c *authClient) Authenticate(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AuthReply) - err := c.cc.Invoke(ctx, "/proto.Auth/Authenticate", in, out, opts...) + err := c.cc.Invoke(ctx, Auth_Authenticate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -45,8 +56,9 @@ func (c *authClient) Authenticate(ctx context.Context, in *AuthRequest, opts ... } func (c *authClient) EnsurePermGranted(ctx context.Context, in *CheckPermRequest, opts ...grpc.CallOption) (*CheckPermResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CheckPermResponse) - err := c.cc.Invoke(ctx, "/proto.Auth/EnsurePermGranted", in, out, opts...) + err := c.cc.Invoke(ctx, Auth_EnsurePermGranted_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -54,8 +66,29 @@ func (c *authClient) EnsurePermGranted(ctx context.Context, in *CheckPermRequest } func (c *authClient) EnsureUserPermGranted(ctx context.Context, in *CheckUserPermRequest, opts ...grpc.CallOption) (*CheckUserPermResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CheckUserPermResponse) - err := c.cc.Invoke(ctx, "/proto.Auth/EnsureUserPermGranted", in, out, opts...) + err := c.cc.Invoke(ctx, Auth_EnsureUserPermGranted_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authClient) ListUserFriends(ctx context.Context, in *ListUserRelativeRequest, opts ...grpc.CallOption) (*ListUserRelativeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListUserRelativeResponse) + err := c.cc.Invoke(ctx, Auth_ListUserFriends_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authClient) ListUserBlocklist(ctx context.Context, in *ListUserRelativeRequest, opts ...grpc.CallOption) (*ListUserRelativeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListUserRelativeResponse) + err := c.cc.Invoke(ctx, Auth_ListUserBlocklist_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -69,6 +102,8 @@ type AuthServer interface { Authenticate(context.Context, *AuthRequest) (*AuthReply, error) EnsurePermGranted(context.Context, *CheckPermRequest) (*CheckPermResponse, error) EnsureUserPermGranted(context.Context, *CheckUserPermRequest) (*CheckUserPermResponse, error) + ListUserFriends(context.Context, *ListUserRelativeRequest) (*ListUserRelativeResponse, error) + ListUserBlocklist(context.Context, *ListUserRelativeRequest) (*ListUserRelativeResponse, error) mustEmbedUnimplementedAuthServer() } @@ -85,6 +120,12 @@ func (UnimplementedAuthServer) EnsurePermGranted(context.Context, *CheckPermRequ func (UnimplementedAuthServer) EnsureUserPermGranted(context.Context, *CheckUserPermRequest) (*CheckUserPermResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EnsureUserPermGranted not implemented") } +func (UnimplementedAuthServer) ListUserFriends(context.Context, *ListUserRelativeRequest) (*ListUserRelativeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListUserFriends not implemented") +} +func (UnimplementedAuthServer) ListUserBlocklist(context.Context, *ListUserRelativeRequest) (*ListUserRelativeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListUserBlocklist not implemented") +} func (UnimplementedAuthServer) mustEmbedUnimplementedAuthServer() {} // UnsafeAuthServer may be embedded to opt out of forward compatibility for this service. @@ -108,7 +149,7 @@ func _Auth_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Auth/Authenticate", + FullMethod: Auth_Authenticate_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AuthServer).Authenticate(ctx, req.(*AuthRequest)) @@ -126,7 +167,7 @@ func _Auth_EnsurePermGranted_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Auth/EnsurePermGranted", + FullMethod: Auth_EnsurePermGranted_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AuthServer).EnsurePermGranted(ctx, req.(*CheckPermRequest)) @@ -144,7 +185,7 @@ func _Auth_EnsureUserPermGranted_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Auth/EnsureUserPermGranted", + FullMethod: Auth_EnsureUserPermGranted_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AuthServer).EnsureUserPermGranted(ctx, req.(*CheckUserPermRequest)) @@ -152,6 +193,42 @@ func _Auth_EnsureUserPermGranted_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _Auth_ListUserFriends_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListUserRelativeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServer).ListUserFriends(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Auth_ListUserFriends_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServer).ListUserFriends(ctx, req.(*ListUserRelativeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Auth_ListUserBlocklist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListUserRelativeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServer).ListUserBlocklist(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Auth_ListUserBlocklist_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServer).ListUserBlocklist(ctx, req.(*ListUserRelativeRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Auth_ServiceDesc is the grpc.ServiceDesc for Auth service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -171,6 +248,14 @@ var Auth_ServiceDesc = grpc.ServiceDesc{ MethodName: "EnsureUserPermGranted", Handler: _Auth_EnsureUserPermGranted_Handler, }, + { + MethodName: "ListUserFriends", + Handler: _Auth_ListUserFriends_Handler, + }, + { + MethodName: "ListUserBlocklist", + Handler: _Auth_ListUserBlocklist_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth.proto", diff --git a/pkg/proto/notify.pb.go b/pkg/proto/notify.pb.go index 84bcba4..a8baf26 100644 --- a/pkg/proto/notify.pb.go +++ b/pkg/proto/notify.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.34.2 // protoc v5.27.1 // source: notify.proto @@ -367,7 +367,7 @@ func file_notify_proto_rawDescGZIP() []byte { } var file_notify_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_notify_proto_goTypes = []interface{}{ +var file_notify_proto_goTypes = []any{ (*NotifyUserRequest)(nil), // 0: proto.NotifyUserRequest (*NotifyUserBatchRequest)(nil), // 1: proto.NotifyUserBatchRequest (*NotifyRequest)(nil), // 2: proto.NotifyRequest @@ -395,7 +395,7 @@ func file_notify_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_notify_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_notify_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*NotifyUserRequest); i { case 0: return &v.state @@ -407,7 +407,7 @@ func file_notify_proto_init() { return nil } } - file_notify_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_notify_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*NotifyUserBatchRequest); i { case 0: return &v.state @@ -419,7 +419,7 @@ func file_notify_proto_init() { return nil } } - file_notify_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_notify_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*NotifyRequest); i { case 0: return &v.state @@ -431,7 +431,7 @@ func file_notify_proto_init() { return nil } } - file_notify_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_notify_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*NotifyResponse); i { case 0: return &v.state @@ -444,7 +444,7 @@ func file_notify_proto_init() { } } } - file_notify_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_notify_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/pkg/proto/notify_grpc.pb.go b/pkg/proto/notify_grpc.pb.go index 7ae01e7..5434787 100644 --- a/pkg/proto/notify_grpc.pb.go +++ b/pkg/proto/notify_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.4.0 // - protoc v5.27.1 // source: notify.proto @@ -15,8 +15,14 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Notifier_NotifyUser_FullMethodName = "/proto.Notifier/NotifyUser" + Notifier_NotifyUserBatch_FullMethodName = "/proto.Notifier/NotifyUserBatch" + Notifier_NotifyAllUser_FullMethodName = "/proto.Notifier/NotifyAllUser" +) // NotifierClient is the client API for Notifier service. // @@ -36,8 +42,9 @@ func NewNotifierClient(cc grpc.ClientConnInterface) NotifierClient { } func (c *notifierClient) NotifyUser(ctx context.Context, in *NotifyUserRequest, opts ...grpc.CallOption) (*NotifyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(NotifyResponse) - err := c.cc.Invoke(ctx, "/proto.Notifier/NotifyUser", in, out, opts...) + err := c.cc.Invoke(ctx, Notifier_NotifyUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -45,8 +52,9 @@ func (c *notifierClient) NotifyUser(ctx context.Context, in *NotifyUserRequest, } func (c *notifierClient) NotifyUserBatch(ctx context.Context, in *NotifyUserBatchRequest, opts ...grpc.CallOption) (*NotifyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(NotifyResponse) - err := c.cc.Invoke(ctx, "/proto.Notifier/NotifyUserBatch", in, out, opts...) + err := c.cc.Invoke(ctx, Notifier_NotifyUserBatch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -54,8 +62,9 @@ func (c *notifierClient) NotifyUserBatch(ctx context.Context, in *NotifyUserBatc } func (c *notifierClient) NotifyAllUser(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(NotifyResponse) - err := c.cc.Invoke(ctx, "/proto.Notifier/NotifyAllUser", in, out, opts...) + err := c.cc.Invoke(ctx, Notifier_NotifyAllUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -108,7 +117,7 @@ func _Notifier_NotifyUser_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Notifier/NotifyUser", + FullMethod: Notifier_NotifyUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NotifierServer).NotifyUser(ctx, req.(*NotifyUserRequest)) @@ -126,7 +135,7 @@ func _Notifier_NotifyUserBatch_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Notifier/NotifyUserBatch", + FullMethod: Notifier_NotifyUserBatch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NotifierServer).NotifyUserBatch(ctx, req.(*NotifyUserBatchRequest)) @@ -144,7 +153,7 @@ func _Notifier_NotifyAllUser_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Notifier/NotifyAllUser", + FullMethod: Notifier_NotifyAllUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NotifierServer).NotifyAllUser(ctx, req.(*NotifyRequest)) diff --git a/pkg/proto/postman.pb.go b/pkg/proto/postman.pb.go index 8496eec..cae0272 100644 --- a/pkg/proto/postman.pb.go +++ b/pkg/proto/postman.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.34.2 // protoc v5.27.1 // source: postman.proto @@ -439,7 +439,7 @@ func file_postman_proto_rawDescGZIP() []byte { } var file_postman_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_postman_proto_goTypes = []interface{}{ +var file_postman_proto_goTypes = []any{ (*DeliverNotificationRequest)(nil), // 0: proto.DeliverNotificationRequest (*DeliverNotificationBatchRequest)(nil), // 1: proto.DeliverNotificationBatchRequest (*DeliverEmailRequest)(nil), // 2: proto.DeliverEmailRequest @@ -475,7 +475,7 @@ func file_postman_proto_init() { } file_notify_proto_init() if !protoimpl.UnsafeEnabled { - file_postman_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_postman_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*DeliverNotificationRequest); i { case 0: return &v.state @@ -487,7 +487,7 @@ func file_postman_proto_init() { return nil } } - file_postman_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_postman_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*DeliverNotificationBatchRequest); i { case 0: return &v.state @@ -499,7 +499,7 @@ func file_postman_proto_init() { return nil } } - file_postman_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_postman_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*DeliverEmailRequest); i { case 0: return &v.state @@ -511,7 +511,7 @@ func file_postman_proto_init() { return nil } } - file_postman_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_postman_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*DeliverEmailBatchRequest); i { case 0: return &v.state @@ -523,7 +523,7 @@ func file_postman_proto_init() { return nil } } - file_postman_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_postman_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*EmailRequest); i { case 0: return &v.state @@ -535,7 +535,7 @@ func file_postman_proto_init() { return nil } } - file_postman_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_postman_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*DeliverResponse); i { case 0: return &v.state @@ -548,7 +548,7 @@ func file_postman_proto_init() { } } } - file_postman_proto_msgTypes[4].OneofWrappers = []interface{}{} + file_postman_proto_msgTypes[4].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/pkg/proto/postman_grpc.pb.go b/pkg/proto/postman_grpc.pb.go index 6a7944b..9464141 100644 --- a/pkg/proto/postman_grpc.pb.go +++ b/pkg/proto/postman_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.4.0 // - protoc v5.27.1 // source: postman.proto @@ -15,8 +15,15 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Postman_DeliverNotification_FullMethodName = "/proto.Postman/DeliverNotification" + Postman_DeliverNotificationBatch_FullMethodName = "/proto.Postman/DeliverNotificationBatch" + Postman_DeliverEmail_FullMethodName = "/proto.Postman/DeliverEmail" + Postman_DeliverEmailBatch_FullMethodName = "/proto.Postman/DeliverEmailBatch" +) // PostmanClient is the client API for Postman service. // @@ -37,8 +44,9 @@ func NewPostmanClient(cc grpc.ClientConnInterface) PostmanClient { } func (c *postmanClient) DeliverNotification(ctx context.Context, in *DeliverNotificationRequest, opts ...grpc.CallOption) (*DeliverResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeliverResponse) - err := c.cc.Invoke(ctx, "/proto.Postman/DeliverNotification", in, out, opts...) + err := c.cc.Invoke(ctx, Postman_DeliverNotification_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -46,8 +54,9 @@ func (c *postmanClient) DeliverNotification(ctx context.Context, in *DeliverNoti } func (c *postmanClient) DeliverNotificationBatch(ctx context.Context, in *DeliverNotificationBatchRequest, opts ...grpc.CallOption) (*DeliverResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeliverResponse) - err := c.cc.Invoke(ctx, "/proto.Postman/DeliverNotificationBatch", in, out, opts...) + err := c.cc.Invoke(ctx, Postman_DeliverNotificationBatch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -55,8 +64,9 @@ func (c *postmanClient) DeliverNotificationBatch(ctx context.Context, in *Delive } func (c *postmanClient) DeliverEmail(ctx context.Context, in *DeliverEmailRequest, opts ...grpc.CallOption) (*DeliverResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeliverResponse) - err := c.cc.Invoke(ctx, "/proto.Postman/DeliverEmail", in, out, opts...) + err := c.cc.Invoke(ctx, Postman_DeliverEmail_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -64,8 +74,9 @@ func (c *postmanClient) DeliverEmail(ctx context.Context, in *DeliverEmailReques } func (c *postmanClient) DeliverEmailBatch(ctx context.Context, in *DeliverEmailBatchRequest, opts ...grpc.CallOption) (*DeliverResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeliverResponse) - err := c.cc.Invoke(ctx, "/proto.Postman/DeliverEmailBatch", in, out, opts...) + err := c.cc.Invoke(ctx, Postman_DeliverEmailBatch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -122,7 +133,7 @@ func _Postman_DeliverNotification_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Postman/DeliverNotification", + FullMethod: Postman_DeliverNotification_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PostmanServer).DeliverNotification(ctx, req.(*DeliverNotificationRequest)) @@ -140,7 +151,7 @@ func _Postman_DeliverNotificationBatch_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Postman/DeliverNotificationBatch", + FullMethod: Postman_DeliverNotificationBatch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PostmanServer).DeliverNotificationBatch(ctx, req.(*DeliverNotificationBatchRequest)) @@ -158,7 +169,7 @@ func _Postman_DeliverEmail_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Postman/DeliverEmail", + FullMethod: Postman_DeliverEmail_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PostmanServer).DeliverEmail(ctx, req.(*DeliverEmailRequest)) @@ -176,7 +187,7 @@ func _Postman_DeliverEmailBatch_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Postman/DeliverEmailBatch", + FullMethod: Postman_DeliverEmailBatch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PostmanServer).DeliverEmailBatch(ctx, req.(*DeliverEmailBatchRequest)) diff --git a/pkg/proto/realm.pb.go b/pkg/proto/realm.pb.go index 79d2ae3..8246d85 100644 --- a/pkg/proto/realm.pb.go +++ b/pkg/proto/realm.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.34.2 // protoc v5.27.1 // source: realm.proto @@ -699,7 +699,7 @@ func file_realm_proto_rawDescGZIP() []byte { } var file_realm_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_realm_proto_goTypes = []interface{}{ +var file_realm_proto_goTypes = []any{ (*RealmInfo)(nil), // 0: proto.RealmInfo (*ListRealmRequest)(nil), // 1: proto.ListRealmRequest (*LookupUserRealmRequest)(nil), // 2: proto.LookupUserRealmRequest @@ -741,7 +741,7 @@ func file_realm_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_realm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_realm_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*RealmInfo); i { case 0: return &v.state @@ -753,7 +753,7 @@ func file_realm_proto_init() { return nil } } - file_realm_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_realm_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListRealmRequest); i { case 0: return &v.state @@ -765,7 +765,7 @@ func file_realm_proto_init() { return nil } } - file_realm_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_realm_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*LookupUserRealmRequest); i { case 0: return &v.state @@ -777,7 +777,7 @@ func file_realm_proto_init() { return nil } } - file_realm_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_realm_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*LookupRealmRequest); i { case 0: return &v.state @@ -789,7 +789,7 @@ func file_realm_proto_init() { return nil } } - file_realm_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_realm_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ListRealmResponse); i { case 0: return &v.state @@ -801,7 +801,7 @@ func file_realm_proto_init() { return nil } } - file_realm_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_realm_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*RealmMemberLookupRequest); i { case 0: return &v.state @@ -813,7 +813,7 @@ func file_realm_proto_init() { return nil } } - file_realm_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_realm_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*RealmMemberInfo); i { case 0: return &v.state @@ -825,7 +825,7 @@ func file_realm_proto_init() { return nil } } - file_realm_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_realm_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ListRealmMemberResponse); i { case 0: return &v.state @@ -837,7 +837,7 @@ func file_realm_proto_init() { return nil } } - file_realm_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_realm_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*CheckRealmPermRequest); i { case 0: return &v.state @@ -849,7 +849,7 @@ func file_realm_proto_init() { return nil } } - file_realm_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_realm_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*CheckRealmPermResponse); i { case 0: return &v.state @@ -862,8 +862,8 @@ func file_realm_proto_init() { } } } - file_realm_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_realm_proto_msgTypes[5].OneofWrappers = []interface{}{} + file_realm_proto_msgTypes[3].OneofWrappers = []any{} + file_realm_proto_msgTypes[5].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/pkg/proto/realm_grpc.pb.go b/pkg/proto/realm_grpc.pb.go index 56c9df9..c35b4c8 100644 --- a/pkg/proto/realm_grpc.pb.go +++ b/pkg/proto/realm_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.4.0 // - protoc v5.27.1 // source: realm.proto @@ -15,8 +15,18 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Realm_ListCommunityRealm_FullMethodName = "/proto.Realm/ListCommunityRealm" + Realm_ListAvailableRealm_FullMethodName = "/proto.Realm/ListAvailableRealm" + Realm_ListOwnedRealm_FullMethodName = "/proto.Realm/ListOwnedRealm" + Realm_GetRealm_FullMethodName = "/proto.Realm/GetRealm" + Realm_ListRealmMember_FullMethodName = "/proto.Realm/ListRealmMember" + Realm_GetRealmMember_FullMethodName = "/proto.Realm/GetRealmMember" + Realm_CheckRealmMemberPerm_FullMethodName = "/proto.Realm/CheckRealmMemberPerm" +) // RealmClient is the client API for Realm service. // @@ -40,8 +50,9 @@ func NewRealmClient(cc grpc.ClientConnInterface) RealmClient { } func (c *realmClient) ListCommunityRealm(ctx context.Context, in *ListRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListRealmResponse) - err := c.cc.Invoke(ctx, "/proto.Realm/ListCommunityRealm", in, out, opts...) + err := c.cc.Invoke(ctx, Realm_ListCommunityRealm_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -49,8 +60,9 @@ func (c *realmClient) ListCommunityRealm(ctx context.Context, in *ListRealmReque } func (c *realmClient) ListAvailableRealm(ctx context.Context, in *LookupUserRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListRealmResponse) - err := c.cc.Invoke(ctx, "/proto.Realm/ListAvailableRealm", in, out, opts...) + err := c.cc.Invoke(ctx, Realm_ListAvailableRealm_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -58,8 +70,9 @@ func (c *realmClient) ListAvailableRealm(ctx context.Context, in *LookupUserReal } func (c *realmClient) ListOwnedRealm(ctx context.Context, in *LookupUserRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListRealmResponse) - err := c.cc.Invoke(ctx, "/proto.Realm/ListOwnedRealm", in, out, opts...) + err := c.cc.Invoke(ctx, Realm_ListOwnedRealm_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -67,8 +80,9 @@ func (c *realmClient) ListOwnedRealm(ctx context.Context, in *LookupUserRealmReq } func (c *realmClient) GetRealm(ctx context.Context, in *LookupRealmRequest, opts ...grpc.CallOption) (*RealmInfo, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RealmInfo) - err := c.cc.Invoke(ctx, "/proto.Realm/GetRealm", in, out, opts...) + err := c.cc.Invoke(ctx, Realm_GetRealm_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -76,8 +90,9 @@ func (c *realmClient) GetRealm(ctx context.Context, in *LookupRealmRequest, opts } func (c *realmClient) ListRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*ListRealmMemberResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListRealmMemberResponse) - err := c.cc.Invoke(ctx, "/proto.Realm/ListRealmMember", in, out, opts...) + err := c.cc.Invoke(ctx, Realm_ListRealmMember_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -85,8 +100,9 @@ func (c *realmClient) ListRealmMember(ctx context.Context, in *RealmMemberLookup } func (c *realmClient) GetRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*RealmMemberInfo, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RealmMemberInfo) - err := c.cc.Invoke(ctx, "/proto.Realm/GetRealmMember", in, out, opts...) + err := c.cc.Invoke(ctx, Realm_GetRealmMember_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -94,8 +110,9 @@ func (c *realmClient) GetRealmMember(ctx context.Context, in *RealmMemberLookupR } func (c *realmClient) CheckRealmMemberPerm(ctx context.Context, in *CheckRealmPermRequest, opts ...grpc.CallOption) (*CheckRealmPermResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CheckRealmPermResponse) - err := c.cc.Invoke(ctx, "/proto.Realm/CheckRealmMemberPerm", in, out, opts...) + err := c.cc.Invoke(ctx, Realm_CheckRealmMemberPerm_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -164,7 +181,7 @@ func _Realm_ListCommunityRealm_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Realm/ListCommunityRealm", + FullMethod: Realm_ListCommunityRealm_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RealmServer).ListCommunityRealm(ctx, req.(*ListRealmRequest)) @@ -182,7 +199,7 @@ func _Realm_ListAvailableRealm_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Realm/ListAvailableRealm", + FullMethod: Realm_ListAvailableRealm_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RealmServer).ListAvailableRealm(ctx, req.(*LookupUserRealmRequest)) @@ -200,7 +217,7 @@ func _Realm_ListOwnedRealm_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Realm/ListOwnedRealm", + FullMethod: Realm_ListOwnedRealm_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RealmServer).ListOwnedRealm(ctx, req.(*LookupUserRealmRequest)) @@ -218,7 +235,7 @@ func _Realm_GetRealm_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Realm/GetRealm", + FullMethod: Realm_GetRealm_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RealmServer).GetRealm(ctx, req.(*LookupRealmRequest)) @@ -236,7 +253,7 @@ func _Realm_ListRealmMember_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Realm/ListRealmMember", + FullMethod: Realm_ListRealmMember_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RealmServer).ListRealmMember(ctx, req.(*RealmMemberLookupRequest)) @@ -254,7 +271,7 @@ func _Realm_GetRealmMember_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Realm/GetRealmMember", + FullMethod: Realm_GetRealmMember_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RealmServer).GetRealmMember(ctx, req.(*RealmMemberLookupRequest)) @@ -272,7 +289,7 @@ func _Realm_CheckRealmMemberPerm_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Realm/CheckRealmMemberPerm", + FullMethod: Realm_CheckRealmMemberPerm_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RealmServer).CheckRealmMemberPerm(ctx, req.(*CheckRealmPermRequest)) diff --git a/pkg/proto/record.pb.go b/pkg/proto/record.pb.go index de609b0..f411abb 100644 --- a/pkg/proto/record.pb.go +++ b/pkg/proto/record.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.34.2 // protoc v5.27.1 // source: record.proto @@ -185,7 +185,7 @@ func file_record_proto_rawDescGZIP() []byte { } var file_record_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_record_proto_goTypes = []interface{}{ +var file_record_proto_goTypes = []any{ (*RecordEventRequest)(nil), // 0: proto.RecordEventRequest (*RecordEventResponse)(nil), // 1: proto.RecordEventResponse } @@ -205,7 +205,7 @@ func file_record_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_record_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_record_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*RecordEventRequest); i { case 0: return &v.state @@ -217,7 +217,7 @@ func file_record_proto_init() { return nil } } - file_record_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_record_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*RecordEventResponse); i { case 0: return &v.state diff --git a/pkg/proto/record_grpc.pb.go b/pkg/proto/record_grpc.pb.go index 17be0b6..28ed4ba 100644 --- a/pkg/proto/record_grpc.pb.go +++ b/pkg/proto/record_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.4.0 // - protoc v5.27.1 // source: record.proto @@ -15,8 +15,12 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + EventRecorder_RecordEvent_FullMethodName = "/proto.EventRecorder/RecordEvent" +) // EventRecorderClient is the client API for EventRecorder service. // @@ -34,8 +38,9 @@ func NewEventRecorderClient(cc grpc.ClientConnInterface) EventRecorderClient { } func (c *eventRecorderClient) RecordEvent(ctx context.Context, in *RecordEventRequest, opts ...grpc.CallOption) (*RecordEventResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RecordEventResponse) - err := c.cc.Invoke(ctx, "/proto.EventRecorder/RecordEvent", in, out, opts...) + err := c.cc.Invoke(ctx, EventRecorder_RecordEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -80,7 +85,7 @@ func _EventRecorder_RecordEvent_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.EventRecorder/RecordEvent", + FullMethod: EventRecorder_RecordEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EventRecorderServer).RecordEvent(ctx, req.(*RecordEventRequest)) diff --git a/pkg/proto/services.pb.go b/pkg/proto/services.pb.go index 80494f7..b198ccb 100644 --- a/pkg/proto/services.pb.go +++ b/pkg/proto/services.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.34.2 // protoc v5.27.1 // source: services.proto @@ -511,7 +511,7 @@ func file_services_proto_rawDescGZIP() []byte { } var file_services_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_services_proto_goTypes = []interface{}{ +var file_services_proto_goTypes = []any{ (*ServiceInfo)(nil), // 0: proto.ServiceInfo (*GetServiceRequest)(nil), // 1: proto.GetServiceRequest (*GetServiceResponse)(nil), // 2: proto.GetServiceResponse @@ -545,7 +545,7 @@ func file_services_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_services_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_services_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ServiceInfo); i { case 0: return &v.state @@ -557,7 +557,7 @@ func file_services_proto_init() { return nil } } - file_services_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_services_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*GetServiceRequest); i { case 0: return &v.state @@ -569,7 +569,7 @@ func file_services_proto_init() { return nil } } - file_services_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_services_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GetServiceResponse); i { case 0: return &v.state @@ -581,7 +581,7 @@ func file_services_proto_init() { return nil } } - file_services_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_services_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ListServiceRequest); i { case 0: return &v.state @@ -593,7 +593,7 @@ func file_services_proto_init() { return nil } } - file_services_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_services_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ListServiceResponse); i { case 0: return &v.state @@ -605,7 +605,7 @@ func file_services_proto_init() { return nil } } - file_services_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_services_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*AddServiceResponse); i { case 0: return &v.state @@ -617,7 +617,7 @@ func file_services_proto_init() { return nil } } - file_services_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_services_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*RemoveServiceRequest); i { case 0: return &v.state @@ -629,7 +629,7 @@ func file_services_proto_init() { return nil } } - file_services_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_services_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*RemoveServiceResponse); i { case 0: return &v.state @@ -642,9 +642,9 @@ func file_services_proto_init() { } } } - file_services_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_services_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_services_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_services_proto_msgTypes[0].OneofWrappers = []any{} + file_services_proto_msgTypes[1].OneofWrappers = []any{} + file_services_proto_msgTypes[3].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/pkg/proto/services_grpc.pb.go b/pkg/proto/services_grpc.pb.go index 49b7e8c..ffcef89 100644 --- a/pkg/proto/services_grpc.pb.go +++ b/pkg/proto/services_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.4.0 // - protoc v5.27.1 // source: services.proto @@ -15,8 +15,15 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + ServiceDirectory_GetService_FullMethodName = "/proto.ServiceDirectory/GetService" + ServiceDirectory_ListService_FullMethodName = "/proto.ServiceDirectory/ListService" + ServiceDirectory_AddService_FullMethodName = "/proto.ServiceDirectory/AddService" + ServiceDirectory_RemoveService_FullMethodName = "/proto.ServiceDirectory/RemoveService" +) // ServiceDirectoryClient is the client API for ServiceDirectory service. // @@ -37,8 +44,9 @@ func NewServiceDirectoryClient(cc grpc.ClientConnInterface) ServiceDirectoryClie } func (c *serviceDirectoryClient) GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*GetServiceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetServiceResponse) - err := c.cc.Invoke(ctx, "/proto.ServiceDirectory/GetService", in, out, opts...) + err := c.cc.Invoke(ctx, ServiceDirectory_GetService_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -46,8 +54,9 @@ func (c *serviceDirectoryClient) GetService(ctx context.Context, in *GetServiceR } func (c *serviceDirectoryClient) ListService(ctx context.Context, in *ListServiceRequest, opts ...grpc.CallOption) (*ListServiceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListServiceResponse) - err := c.cc.Invoke(ctx, "/proto.ServiceDirectory/ListService", in, out, opts...) + err := c.cc.Invoke(ctx, ServiceDirectory_ListService_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -55,8 +64,9 @@ func (c *serviceDirectoryClient) ListService(ctx context.Context, in *ListServic } func (c *serviceDirectoryClient) AddService(ctx context.Context, in *ServiceInfo, opts ...grpc.CallOption) (*AddServiceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddServiceResponse) - err := c.cc.Invoke(ctx, "/proto.ServiceDirectory/AddService", in, out, opts...) + err := c.cc.Invoke(ctx, ServiceDirectory_AddService_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -64,8 +74,9 @@ func (c *serviceDirectoryClient) AddService(ctx context.Context, in *ServiceInfo } func (c *serviceDirectoryClient) RemoveService(ctx context.Context, in *RemoveServiceRequest, opts ...grpc.CallOption) (*RemoveServiceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveServiceResponse) - err := c.cc.Invoke(ctx, "/proto.ServiceDirectory/RemoveService", in, out, opts...) + err := c.cc.Invoke(ctx, ServiceDirectory_RemoveService_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -122,7 +133,7 @@ func _ServiceDirectory_GetService_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.ServiceDirectory/GetService", + FullMethod: ServiceDirectory_GetService_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ServiceDirectoryServer).GetService(ctx, req.(*GetServiceRequest)) @@ -140,7 +151,7 @@ func _ServiceDirectory_ListService_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.ServiceDirectory/ListService", + FullMethod: ServiceDirectory_ListService_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ServiceDirectoryServer).ListService(ctx, req.(*ListServiceRequest)) @@ -158,7 +169,7 @@ func _ServiceDirectory_AddService_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.ServiceDirectory/AddService", + FullMethod: ServiceDirectory_AddService_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ServiceDirectoryServer).AddService(ctx, req.(*ServiceInfo)) @@ -176,7 +187,7 @@ func _ServiceDirectory_RemoveService_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.ServiceDirectory/RemoveService", + FullMethod: ServiceDirectory_RemoveService_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ServiceDirectoryServer).RemoveService(ctx, req.(*RemoveServiceRequest)) diff --git a/pkg/proto/stream.pb.go b/pkg/proto/stream.pb.go index 4a4a013..95afa84 100644 --- a/pkg/proto/stream.pb.go +++ b/pkg/proto/stream.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.34.2 // protoc v5.27.1 // source: stream.proto @@ -451,7 +451,7 @@ func file_stream_proto_rawDescGZIP() []byte { } var file_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_stream_proto_goTypes = []interface{}{ +var file_stream_proto_goTypes = []any{ (*CountConnectionRequest)(nil), // 0: proto.CountConnectionRequest (*CountConnectionResponse)(nil), // 1: proto.CountConnectionResponse (*PushStreamRequest)(nil), // 2: proto.PushStreamRequest @@ -482,7 +482,7 @@ func file_stream_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_stream_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_stream_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CountConnectionRequest); i { case 0: return &v.state @@ -494,7 +494,7 @@ func file_stream_proto_init() { return nil } } - file_stream_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_stream_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CountConnectionResponse); i { case 0: return &v.state @@ -506,7 +506,7 @@ func file_stream_proto_init() { return nil } } - file_stream_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_stream_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*PushStreamRequest); i { case 0: return &v.state @@ -518,7 +518,7 @@ func file_stream_proto_init() { return nil } } - file_stream_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_stream_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*PushStreamBatchRequest); i { case 0: return &v.state @@ -530,7 +530,7 @@ func file_stream_proto_init() { return nil } } - file_stream_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_stream_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*PushStreamResponse); i { case 0: return &v.state @@ -542,7 +542,7 @@ func file_stream_proto_init() { return nil } } - file_stream_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_stream_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*StreamEventRequest); i { case 0: return &v.state @@ -554,7 +554,7 @@ func file_stream_proto_init() { return nil } } - file_stream_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_stream_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*StreamEventResponse); i { case 0: return &v.state diff --git a/pkg/proto/stream_grpc.pb.go b/pkg/proto/stream_grpc.pb.go index 2f9c071..ef641bd 100644 --- a/pkg/proto/stream_grpc.pb.go +++ b/pkg/proto/stream_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.4.0 // - protoc v5.27.1 // source: stream.proto @@ -15,8 +15,15 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + StreamController_CountStreamConnection_FullMethodName = "/proto.StreamController/CountStreamConnection" + StreamController_PushStream_FullMethodName = "/proto.StreamController/PushStream" + StreamController_PushStreamBatch_FullMethodName = "/proto.StreamController/PushStreamBatch" + StreamController_EmitStreamEvent_FullMethodName = "/proto.StreamController/EmitStreamEvent" +) // StreamControllerClient is the client API for StreamController service. // @@ -37,8 +44,9 @@ func NewStreamControllerClient(cc grpc.ClientConnInterface) StreamControllerClie } func (c *streamControllerClient) CountStreamConnection(ctx context.Context, in *CountConnectionRequest, opts ...grpc.CallOption) (*CountConnectionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CountConnectionResponse) - err := c.cc.Invoke(ctx, "/proto.StreamController/CountStreamConnection", in, out, opts...) + err := c.cc.Invoke(ctx, StreamController_CountStreamConnection_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -46,8 +54,9 @@ func (c *streamControllerClient) CountStreamConnection(ctx context.Context, in * } func (c *streamControllerClient) PushStream(ctx context.Context, in *PushStreamRequest, opts ...grpc.CallOption) (*PushStreamResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PushStreamResponse) - err := c.cc.Invoke(ctx, "/proto.StreamController/PushStream", in, out, opts...) + err := c.cc.Invoke(ctx, StreamController_PushStream_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -55,8 +64,9 @@ func (c *streamControllerClient) PushStream(ctx context.Context, in *PushStreamR } func (c *streamControllerClient) PushStreamBatch(ctx context.Context, in *PushStreamBatchRequest, opts ...grpc.CallOption) (*PushStreamResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PushStreamResponse) - err := c.cc.Invoke(ctx, "/proto.StreamController/PushStreamBatch", in, out, opts...) + err := c.cc.Invoke(ctx, StreamController_PushStreamBatch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -64,8 +74,9 @@ func (c *streamControllerClient) PushStreamBatch(ctx context.Context, in *PushSt } func (c *streamControllerClient) EmitStreamEvent(ctx context.Context, in *StreamEventRequest, opts ...grpc.CallOption) (*StreamEventResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StreamEventResponse) - err := c.cc.Invoke(ctx, "/proto.StreamController/EmitStreamEvent", in, out, opts...) + err := c.cc.Invoke(ctx, StreamController_EmitStreamEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -122,7 +133,7 @@ func _StreamController_CountStreamConnection_Handler(srv interface{}, ctx contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.StreamController/CountStreamConnection", + FullMethod: StreamController_CountStreamConnection_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(StreamControllerServer).CountStreamConnection(ctx, req.(*CountConnectionRequest)) @@ -140,7 +151,7 @@ func _StreamController_PushStream_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.StreamController/PushStream", + FullMethod: StreamController_PushStream_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(StreamControllerServer).PushStream(ctx, req.(*PushStreamRequest)) @@ -158,7 +169,7 @@ func _StreamController_PushStreamBatch_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.StreamController/PushStreamBatch", + FullMethod: StreamController_PushStreamBatch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(StreamControllerServer).PushStreamBatch(ctx, req.(*PushStreamBatchRequest)) @@ -176,7 +187,7 @@ func _StreamController_EmitStreamEvent_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.StreamController/EmitStreamEvent", + FullMethod: StreamController_EmitStreamEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(StreamControllerServer).EmitStreamEvent(ctx, req.(*StreamEventRequest))