From df51451e478f5e167b596773998b730526086ec9 Mon Sep 17 00:00:00 2001 From: guochao Date: Fri, 7 Apr 2023 11:12:06 +0800 Subject: [PATCH] rename signaling package --- cmd/demo-signal-client/main.go | 2 +- cmd/signal-server/main.go | 2 +- pkg/impl/signal-server/signaling.go | 2 +- .../{signal-server => signaling}/codegen.go | 2 +- .../signaling.pb.go | 177 +++++++++--------- .../signaling.proto | 2 +- .../signaling_grpc.pb.go | 16 +- 7 files changed, 104 insertions(+), 99 deletions(-) rename pkg/proto/{signal-server => signaling}/codegen.go (84%) rename pkg/proto/{signal-server => signaling}/signaling.pb.go (54%) rename pkg/proto/{signal-server => signaling}/signaling.proto (94%) rename pkg/proto/{signal-server => signaling}/signaling_grpc.pb.go (92%) diff --git a/cmd/demo-signal-client/main.go b/cmd/demo-signal-client/main.go index 5130078..be77326 100644 --- a/cmd/demo-signal-client/main.go +++ b/cmd/demo-signal-client/main.go @@ -10,7 +10,7 @@ import ( "strings" "sync" - proto "git.jeffthecoder.xyz/guochao/meow-signaling.jeffthecoder.xyz/pkg/proto/signal-server" + proto "git.jeffthecoder.xyz/guochao/meow-signaling.jeffthecoder.xyz/pkg/proto/signaling" "github.com/charmbracelet/bubbles/textarea" "github.com/charmbracelet/bubbles/viewport" tea "github.com/charmbracelet/bubbletea" diff --git a/cmd/signal-server/main.go b/cmd/signal-server/main.go index 07fad39..70150d5 100644 --- a/cmd/signal-server/main.go +++ b/cmd/signal-server/main.go @@ -5,7 +5,7 @@ import ( "net" signal_server "git.jeffthecoder.xyz/guochao/meow-signaling.jeffthecoder.xyz/pkg/impl/signal-server" - proto "git.jeffthecoder.xyz/guochao/meow-signaling.jeffthecoder.xyz/pkg/proto/signal-server" + proto "git.jeffthecoder.xyz/guochao/meow-signaling.jeffthecoder.xyz/pkg/proto/signaling" "google.golang.org/grpc" ) diff --git a/pkg/impl/signal-server/signaling.go b/pkg/impl/signal-server/signaling.go index 66623c8..b3b3208 100644 --- a/pkg/impl/signal-server/signaling.go +++ b/pkg/impl/signal-server/signaling.go @@ -8,7 +8,7 @@ import ( "log" "strings" - proto "git.jeffthecoder.xyz/guochao/meow-signaling.jeffthecoder.xyz/pkg/proto/signal-server" + proto "git.jeffthecoder.xyz/guochao/meow-signaling.jeffthecoder.xyz/pkg/proto/signaling" "github.com/redis/go-redis/v9" "golang.org/x/sync/errgroup" diff --git a/pkg/proto/signal-server/codegen.go b/pkg/proto/signaling/codegen.go similarity index 84% rename from pkg/proto/signal-server/codegen.go rename to pkg/proto/signaling/codegen.go index e656cb5..9345dcb 100644 --- a/pkg/proto/signal-server/codegen.go +++ b/pkg/proto/signaling/codegen.go @@ -1,3 +1,3 @@ -package signal_server +package signaling //go:generate protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative *.proto diff --git a/pkg/proto/signal-server/signaling.pb.go b/pkg/proto/signaling/signaling.pb.go similarity index 54% rename from pkg/proto/signal-server/signaling.pb.go rename to pkg/proto/signaling/signaling.pb.go index d191719..33f5c5f 100644 --- a/pkg/proto/signal-server/signaling.pb.go +++ b/pkg/proto/signaling/signaling.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v4.22.0 -// source: signaling.proto +// protoc-gen-go v1.29.0 +// protoc v3.21.8 +// source: pkg/proto/signaling/signaling.proto -package signal_server +package signaling import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -57,11 +57,11 @@ func (x SDPMessageType) String() string { } func (SDPMessageType) Descriptor() protoreflect.EnumDescriptor { - return file_signaling_proto_enumTypes[0].Descriptor() + return file_pkg_proto_signaling_signaling_proto_enumTypes[0].Descriptor() } func (SDPMessageType) Type() protoreflect.EnumType { - return &file_signaling_proto_enumTypes[0] + return &file_pkg_proto_signaling_signaling_proto_enumTypes[0] } func (x SDPMessageType) Number() protoreflect.EnumNumber { @@ -70,7 +70,7 @@ func (x SDPMessageType) Number() protoreflect.EnumNumber { // Deprecated: Use SDPMessageType.Descriptor instead. func (SDPMessageType) EnumDescriptor() ([]byte, []int) { - return file_signaling_proto_rawDescGZIP(), []int{0} + return file_pkg_proto_signaling_signaling_proto_rawDescGZIP(), []int{0} } type SDPMessage struct { @@ -86,7 +86,7 @@ type SDPMessage struct { func (x *SDPMessage) Reset() { *x = SDPMessage{} if protoimpl.UnsafeEnabled { - mi := &file_signaling_proto_msgTypes[0] + mi := &file_pkg_proto_signaling_signaling_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -99,7 +99,7 @@ func (x *SDPMessage) String() string { func (*SDPMessage) ProtoMessage() {} func (x *SDPMessage) ProtoReflect() protoreflect.Message { - mi := &file_signaling_proto_msgTypes[0] + mi := &file_pkg_proto_signaling_signaling_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112,7 +112,7 @@ func (x *SDPMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use SDPMessage.ProtoReflect.Descriptor instead. func (*SDPMessage) Descriptor() ([]byte, []int) { - return file_signaling_proto_rawDescGZIP(), []int{0} + return file_pkg_proto_signaling_signaling_proto_rawDescGZIP(), []int{0} } func (x *SDPMessage) GetSDP() string { @@ -157,7 +157,7 @@ type SignalingMessage struct { func (x *SignalingMessage) Reset() { *x = SignalingMessage{} if protoimpl.UnsafeEnabled { - mi := &file_signaling_proto_msgTypes[1] + mi := &file_pkg_proto_signaling_signaling_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -170,7 +170,7 @@ func (x *SignalingMessage) String() string { func (*SignalingMessage) ProtoMessage() {} func (x *SignalingMessage) ProtoReflect() protoreflect.Message { - mi := &file_signaling_proto_msgTypes[1] + mi := &file_pkg_proto_signaling_signaling_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -183,7 +183,7 @@ func (x *SignalingMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use SignalingMessage.ProtoReflect.Descriptor instead. func (*SignalingMessage) Descriptor() ([]byte, []int) { - return file_signaling_proto_rawDescGZIP(), []int{1} + return file_pkg_proto_signaling_signaling_proto_rawDescGZIP(), []int{1} } func (x *SignalingMessage) GetRoom() string { @@ -283,82 +283,83 @@ func (*SignalingMessage_SessionOffer) isSignalingMessage_Message() {} func (*SignalingMessage_SessionAnswer) isSignalingMessage_Message() {} -var File_signaling_proto protoreflect.FileDescriptor +var File_pkg_proto_signaling_signaling_proto protoreflect.FileDescriptor -var file_signaling_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b, - 0x0a, 0x0a, 0x53, 0x44, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x53, 0x44, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x53, 0x44, 0x50, 0x12, 0x23, - 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x53, - 0x44, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0xa1, 0x03, 0x0a, 0x10, +var file_pkg_proto_signaling_signaling_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x5b, 0x0a, 0x0a, 0x53, 0x44, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x53, 0x44, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x53, + 0x44, 0x50, 0x12, 0x23, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0f, 0x2e, 0x53, 0x44, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, + 0xa1, 0x03, 0x0a, 0x10, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x52, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x12, 0x1f, 0x0a, 0x08, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x88, 0x01, + 0x01, 0x12, 0x36, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x09, + 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x42, 0x0a, 0x0f, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0f, 0x44, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, + 0x10, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, + 0x00, 0x52, 0x10, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x66, + 0x66, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x53, 0x44, 0x50, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x0d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x53, 0x44, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x42, 0x09, 0x0a, 0x07, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x72, 0x2a, 0x40, 0x0a, 0x0e, 0x53, 0x44, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x44, + 0x61, 0x74, 0x61, 0x10, 0x03, 0x32, 0x40, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, + 0x6e, 0x67, 0x12, 0x33, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x11, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x52, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x08, - 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x08, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, - 0x09, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x09, 0x42, 0x6f, 0x6f, 0x74, - 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x42, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0f, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x10, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x10, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x31, 0x0a, 0x0c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x53, 0x44, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x66, 0x66, - 0x65, 0x72, 0x12, 0x33, 0x0a, 0x0d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x73, - 0x77, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x53, 0x44, 0x50, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x42, 0x09, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x2a, - 0x40, 0x0a, 0x0e, 0x53, 0x44, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, - 0x41, 0x75, 0x64, 0x69, 0x6f, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x56, 0x69, 0x64, 0x65, 0x6f, - 0x41, 0x75, 0x64, 0x69, 0x6f, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x10, - 0x03, 0x32, 0x40, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x33, - 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x11, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x11, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, - 0x01, 0x30, 0x01, 0x42, 0x56, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x2e, 0x6a, 0x65, 0x66, 0x66, 0x74, - 0x68, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x78, 0x79, 0x7a, 0x2f, 0x67, 0x75, 0x6f, 0x63, - 0x68, 0x61, 0x6f, 0x2f, 0x6d, 0x65, 0x6f, 0x77, 0x2d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, - 0x6e, 0x67, 0x2e, 0x6a, 0x65, 0x66, 0x66, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, - 0x78, 0x79, 0x7a, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x1a, 0x11, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x52, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x2e, 0x6a, + 0x65, 0x66, 0x66, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x78, 0x79, 0x7a, 0x2f, + 0x67, 0x75, 0x6f, 0x63, 0x68, 0x61, 0x6f, 0x2f, 0x6d, 0x65, 0x6f, 0x77, 0x2d, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x6a, 0x65, 0x66, 0x66, 0x74, 0x68, 0x65, 0x63, 0x6f, + 0x64, 0x65, 0x72, 0x2e, 0x78, 0x79, 0x7a, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_signaling_proto_rawDescOnce sync.Once - file_signaling_proto_rawDescData = file_signaling_proto_rawDesc + file_pkg_proto_signaling_signaling_proto_rawDescOnce sync.Once + file_pkg_proto_signaling_signaling_proto_rawDescData = file_pkg_proto_signaling_signaling_proto_rawDesc ) -func file_signaling_proto_rawDescGZIP() []byte { - file_signaling_proto_rawDescOnce.Do(func() { - file_signaling_proto_rawDescData = protoimpl.X.CompressGZIP(file_signaling_proto_rawDescData) +func file_pkg_proto_signaling_signaling_proto_rawDescGZIP() []byte { + file_pkg_proto_signaling_signaling_proto_rawDescOnce.Do(func() { + file_pkg_proto_signaling_signaling_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_proto_signaling_signaling_proto_rawDescData) }) - return file_signaling_proto_rawDescData + return file_pkg_proto_signaling_signaling_proto_rawDescData } -var file_signaling_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_signaling_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_signaling_proto_goTypes = []interface{}{ +var file_pkg_proto_signaling_signaling_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_pkg_proto_signaling_signaling_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_pkg_proto_signaling_signaling_proto_goTypes = []interface{}{ (SDPMessageType)(0), // 0: SDPMessageType (*SDPMessage)(nil), // 1: SDPMessage (*SignalingMessage)(nil), // 2: SignalingMessage (*emptypb.Empty)(nil), // 3: google.protobuf.Empty } -var file_signaling_proto_depIdxs = []int32{ +var file_pkg_proto_signaling_signaling_proto_depIdxs = []int32{ 0, // 0: SDPMessage.Type:type_name -> SDPMessageType 3, // 1: SignalingMessage.Bootstrap:type_name -> google.protobuf.Empty 3, // 2: SignalingMessage.DiscoverRequest:type_name -> google.protobuf.Empty @@ -374,13 +375,13 @@ var file_signaling_proto_depIdxs = []int32{ 0, // [0:6] is the sub-list for field type_name } -func init() { file_signaling_proto_init() } -func file_signaling_proto_init() { - if File_signaling_proto != nil { +func init() { file_pkg_proto_signaling_signaling_proto_init() } +func file_pkg_proto_signaling_signaling_proto_init() { + if File_pkg_proto_signaling_signaling_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_signaling_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_pkg_proto_signaling_signaling_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SDPMessage); i { case 0: return &v.state @@ -392,7 +393,7 @@ func file_signaling_proto_init() { return nil } } - file_signaling_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_pkg_proto_signaling_signaling_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignalingMessage); i { case 0: return &v.state @@ -405,7 +406,7 @@ func file_signaling_proto_init() { } } } - file_signaling_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_pkg_proto_signaling_signaling_proto_msgTypes[1].OneofWrappers = []interface{}{ (*SignalingMessage_Bootstrap)(nil), (*SignalingMessage_DiscoverRequest)(nil), (*SignalingMessage_DiscoverResponse)(nil), @@ -416,19 +417,19 @@ func file_signaling_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_signaling_proto_rawDesc, + RawDescriptor: file_pkg_proto_signaling_signaling_proto_rawDesc, NumEnums: 1, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_signaling_proto_goTypes, - DependencyIndexes: file_signaling_proto_depIdxs, - EnumInfos: file_signaling_proto_enumTypes, - MessageInfos: file_signaling_proto_msgTypes, + GoTypes: file_pkg_proto_signaling_signaling_proto_goTypes, + DependencyIndexes: file_pkg_proto_signaling_signaling_proto_depIdxs, + EnumInfos: file_pkg_proto_signaling_signaling_proto_enumTypes, + MessageInfos: file_pkg_proto_signaling_signaling_proto_msgTypes, }.Build() - File_signaling_proto = out.File - file_signaling_proto_rawDesc = nil - file_signaling_proto_goTypes = nil - file_signaling_proto_depIdxs = nil + File_pkg_proto_signaling_signaling_proto = out.File + file_pkg_proto_signaling_signaling_proto_rawDesc = nil + file_pkg_proto_signaling_signaling_proto_goTypes = nil + file_pkg_proto_signaling_signaling_proto_depIdxs = nil } diff --git a/pkg/proto/signal-server/signaling.proto b/pkg/proto/signaling/signaling.proto similarity index 94% rename from pkg/proto/signal-server/signaling.proto rename to pkg/proto/signaling/signaling.proto index 16669b4..12ebbba 100644 --- a/pkg/proto/signal-server/signaling.proto +++ b/pkg/proto/signaling/signaling.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "git.jeffthecoder.xyz/guochao/meow-signaling.jeffthecoder.xyz/pkg/proto/signal-server"; +option go_package = "git.jeffthecoder.xyz/guochao/meow-signaling.jeffthecoder.xyz/pkg/proto/signaling"; import "google/protobuf/empty.proto"; diff --git a/pkg/proto/signal-server/signaling_grpc.pb.go b/pkg/proto/signaling/signaling_grpc.pb.go similarity index 92% rename from pkg/proto/signal-server/signaling_grpc.pb.go rename to pkg/proto/signaling/signaling_grpc.pb.go index b089984..bff1b08 100644 --- a/pkg/proto/signal-server/signaling_grpc.pb.go +++ b/pkg/proto/signaling/signaling_grpc.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v4.22.0 -// source: signaling.proto +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.21.8 +// source: pkg/proto/signaling/signaling.proto -package signal_server +package signaling import ( context "context" @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Signaling_Connect_FullMethodName = "/Signaling/Connect" +) + // SignalingClient is the client API for Signaling service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -34,7 +38,7 @@ func NewSignalingClient(cc grpc.ClientConnInterface) SignalingClient { } func (c *signalingClient) Connect(ctx context.Context, opts ...grpc.CallOption) (Signaling_ConnectClient, error) { - stream, err := c.cc.NewStream(ctx, &Signaling_ServiceDesc.Streams[0], "/Signaling/Connect", opts...) + stream, err := c.cc.NewStream(ctx, &Signaling_ServiceDesc.Streams[0], Signaling_Connect_FullMethodName, opts...) if err != nil { return nil, err } @@ -133,5 +137,5 @@ var Signaling_ServiceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: "signaling.proto", + Metadata: "pkg/proto/signaling/signaling.proto", }