generate pb.go on the fly
This commit is contained in:
parent
56cc4cb993
commit
20d7dc2a17
@ -15,6 +15,11 @@
|
||||
protoc-gen-go-grpc
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
go generate -v ./...
|
||||
'';
|
||||
|
||||
|
||||
src = ./.;
|
||||
|
||||
CGO_ENABLED = "0";
|
||||
|
3
gen.go
Normal file
3
gen.go
Normal file
@ -0,0 +1,3 @@
|
||||
package chatsignalingserver
|
||||
|
||||
//go:generate protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative pkg/proto/signaling/signaling.proto
|
1
pkg/proto/signaling/.gitignore
vendored
Normal file
1
pkg/proto/signaling/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.pb.go
|
@ -1,438 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.29.0
|
||||
// protoc v3.21.8
|
||||
// source: pkg/proto/signaling/signaling.proto
|
||||
|
||||
package signaling
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type SDPMessageType int32
|
||||
|
||||
const (
|
||||
SDPMessageType_Video SDPMessageType = 0
|
||||
SDPMessageType_Audio SDPMessageType = 1
|
||||
SDPMessageType_VideoAudio SDPMessageType = 2
|
||||
SDPMessageType_Data SDPMessageType = 3
|
||||
)
|
||||
|
||||
// Enum value maps for SDPMessageType.
|
||||
var (
|
||||
SDPMessageType_name = map[int32]string{
|
||||
0: "Video",
|
||||
1: "Audio",
|
||||
2: "VideoAudio",
|
||||
3: "Data",
|
||||
}
|
||||
SDPMessageType_value = map[string]int32{
|
||||
"Video": 0,
|
||||
"Audio": 1,
|
||||
"VideoAudio": 2,
|
||||
"Data": 3,
|
||||
}
|
||||
)
|
||||
|
||||
func (x SDPMessageType) Enum() *SDPMessageType {
|
||||
p := new(SDPMessageType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x SDPMessageType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (SDPMessageType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_pkg_proto_signaling_signaling_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (SDPMessageType) Type() protoreflect.EnumType {
|
||||
return &file_pkg_proto_signaling_signaling_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x SDPMessageType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SDPMessageType.Descriptor instead.
|
||||
func (SDPMessageType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_pkg_proto_signaling_signaling_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type SDPMessage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SDP string `protobuf:"bytes,1,opt,name=SDP,proto3" json:"SDP,omitempty"`
|
||||
Type SDPMessageType `protobuf:"varint,2,opt,name=Type,proto3,enum=signaling.SDPMessageType" json:"Type,omitempty"`
|
||||
Sender string `protobuf:"bytes,3,opt,name=Sender,proto3" json:"Sender,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SDPMessage) Reset() {
|
||||
*x = SDPMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_proto_signaling_signaling_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SDPMessage) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SDPMessage) ProtoMessage() {}
|
||||
|
||||
func (x *SDPMessage) ProtoReflect() protoreflect.Message {
|
||||
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 {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SDPMessage.ProtoReflect.Descriptor instead.
|
||||
func (*SDPMessage) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_proto_signaling_signaling_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *SDPMessage) GetSDP() string {
|
||||
if x != nil {
|
||||
return x.SDP
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SDPMessage) GetType() SDPMessageType {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return SDPMessageType_Video
|
||||
}
|
||||
|
||||
func (x *SDPMessage) GetSender() string {
|
||||
if x != nil {
|
||||
return x.Sender
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SignalingMessage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Room string `protobuf:"bytes,1,opt,name=Room,proto3" json:"Room,omitempty"`
|
||||
Sender string `protobuf:"bytes,2,opt,name=Sender,proto3" json:"Sender,omitempty"`
|
||||
Receiver *string `protobuf:"bytes,3,opt,name=Receiver,proto3,oneof" json:"Receiver,omitempty"`
|
||||
// Types that are assignable to Message:
|
||||
//
|
||||
// *SignalingMessage_Bootstrap
|
||||
// *SignalingMessage_DiscoverRequest
|
||||
// *SignalingMessage_DiscoverResponse
|
||||
// *SignalingMessage_SessionOffer
|
||||
// *SignalingMessage_SessionAnswer
|
||||
Message isSignalingMessage_Message `protobuf_oneof:"Message"`
|
||||
}
|
||||
|
||||
func (x *SignalingMessage) Reset() {
|
||||
*x = SignalingMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_proto_signaling_signaling_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SignalingMessage) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SignalingMessage) ProtoMessage() {}
|
||||
|
||||
func (x *SignalingMessage) ProtoReflect() protoreflect.Message {
|
||||
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 {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SignalingMessage.ProtoReflect.Descriptor instead.
|
||||
func (*SignalingMessage) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_proto_signaling_signaling_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *SignalingMessage) GetRoom() string {
|
||||
if x != nil {
|
||||
return x.Room
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SignalingMessage) GetSender() string {
|
||||
if x != nil {
|
||||
return x.Sender
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SignalingMessage) GetReceiver() string {
|
||||
if x != nil && x.Receiver != nil {
|
||||
return *x.Receiver
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *SignalingMessage) GetMessage() isSignalingMessage_Message {
|
||||
if m != nil {
|
||||
return m.Message
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SignalingMessage) GetBootstrap() *emptypb.Empty {
|
||||
if x, ok := x.GetMessage().(*SignalingMessage_Bootstrap); ok {
|
||||
return x.Bootstrap
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SignalingMessage) GetDiscoverRequest() *emptypb.Empty {
|
||||
if x, ok := x.GetMessage().(*SignalingMessage_DiscoverRequest); ok {
|
||||
return x.DiscoverRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SignalingMessage) GetDiscoverResponse() *emptypb.Empty {
|
||||
if x, ok := x.GetMessage().(*SignalingMessage_DiscoverResponse); ok {
|
||||
return x.DiscoverResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SignalingMessage) GetSessionOffer() *SDPMessage {
|
||||
if x, ok := x.GetMessage().(*SignalingMessage_SessionOffer); ok {
|
||||
return x.SessionOffer
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SignalingMessage) GetSessionAnswer() *SDPMessage {
|
||||
if x, ok := x.GetMessage().(*SignalingMessage_SessionAnswer); ok {
|
||||
return x.SessionAnswer
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type isSignalingMessage_Message interface {
|
||||
isSignalingMessage_Message()
|
||||
}
|
||||
|
||||
type SignalingMessage_Bootstrap struct {
|
||||
Bootstrap *emptypb.Empty `protobuf:"bytes,10,opt,name=Bootstrap,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SignalingMessage_DiscoverRequest struct {
|
||||
DiscoverRequest *emptypb.Empty `protobuf:"bytes,11,opt,name=DiscoverRequest,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SignalingMessage_DiscoverResponse struct {
|
||||
DiscoverResponse *emptypb.Empty `protobuf:"bytes,12,opt,name=DiscoverResponse,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SignalingMessage_SessionOffer struct {
|
||||
SessionOffer *SDPMessage `protobuf:"bytes,13,opt,name=SessionOffer,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SignalingMessage_SessionAnswer struct {
|
||||
SessionAnswer *SDPMessage `protobuf:"bytes,14,opt,name=SessionAnswer,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*SignalingMessage_Bootstrap) isSignalingMessage_Message() {}
|
||||
|
||||
func (*SignalingMessage_DiscoverRequest) isSignalingMessage_Message() {}
|
||||
|
||||
func (*SignalingMessage_DiscoverResponse) isSignalingMessage_Message() {}
|
||||
|
||||
func (*SignalingMessage_SessionOffer) isSignalingMessage_Message() {}
|
||||
|
||||
func (*SignalingMessage_SessionAnswer) isSignalingMessage_Message() {}
|
||||
|
||||
var File_pkg_proto_signaling_signaling_proto protoreflect.FileDescriptor
|
||||
|
||||
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, 0x12, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67,
|
||||
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, 0x65, 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, 0x2d, 0x0a,
|
||||
0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x73, 0x69,
|
||||
0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 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, 0xb5, 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, 0x3b, 0x0a, 0x0c, 0x53, 0x65, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15,
|
||||
0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 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, 0x3d, 0x0a, 0x0d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 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, 0x50,
|
||||
0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x43, 0x0a, 0x03, 0x42,
|
||||
0x69, 0x75, 0x12, 0x1b, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x53,
|
||||
0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a,
|
||||
0x1b, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 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_pkg_proto_signaling_signaling_proto_rawDescOnce sync.Once
|
||||
file_pkg_proto_signaling_signaling_proto_rawDescData = file_pkg_proto_signaling_signaling_proto_rawDesc
|
||||
)
|
||||
|
||||
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_pkg_proto_signaling_signaling_proto_rawDescData
|
||||
}
|
||||
|
||||
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: signaling.SDPMessageType
|
||||
(*SDPMessage)(nil), // 1: signaling.SDPMessage
|
||||
(*SignalingMessage)(nil), // 2: signaling.SignalingMessage
|
||||
(*emptypb.Empty)(nil), // 3: google.protobuf.Empty
|
||||
}
|
||||
var file_pkg_proto_signaling_signaling_proto_depIdxs = []int32{
|
||||
0, // 0: signaling.SDPMessage.Type:type_name -> signaling.SDPMessageType
|
||||
3, // 1: signaling.SignalingMessage.Bootstrap:type_name -> google.protobuf.Empty
|
||||
3, // 2: signaling.SignalingMessage.DiscoverRequest:type_name -> google.protobuf.Empty
|
||||
3, // 3: signaling.SignalingMessage.DiscoverResponse:type_name -> google.protobuf.Empty
|
||||
1, // 4: signaling.SignalingMessage.SessionOffer:type_name -> signaling.SDPMessage
|
||||
1, // 5: signaling.SignalingMessage.SessionAnswer:type_name -> signaling.SDPMessage
|
||||
2, // 6: signaling.Signaling.Biu:input_type -> signaling.SignalingMessage
|
||||
2, // 7: signaling.Signaling.Biu:output_type -> signaling.SignalingMessage
|
||||
7, // [7:8] is the sub-list for method output_type
|
||||
6, // [6:7] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
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_pkg_proto_signaling_signaling_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SDPMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
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
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_pkg_proto_signaling_signaling_proto_msgTypes[1].OneofWrappers = []interface{}{
|
||||
(*SignalingMessage_Bootstrap)(nil),
|
||||
(*SignalingMessage_DiscoverRequest)(nil),
|
||||
(*SignalingMessage_DiscoverResponse)(nil),
|
||||
(*SignalingMessage_SessionOffer)(nil),
|
||||
(*SignalingMessage_SessionAnswer)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_pkg_proto_signaling_signaling_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
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_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
|
||||
}
|
@ -1,141 +0,0 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v3.21.8
|
||||
// source: pkg/proto/signaling/signaling.proto
|
||||
|
||||
package signaling
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// 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
|
||||
|
||||
const (
|
||||
Signaling_Biu_FullMethodName = "/signaling.Signaling/Biu"
|
||||
)
|
||||
|
||||
// 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.
|
||||
type SignalingClient interface {
|
||||
Biu(ctx context.Context, opts ...grpc.CallOption) (Signaling_BiuClient, error)
|
||||
}
|
||||
|
||||
type signalingClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSignalingClient(cc grpc.ClientConnInterface) SignalingClient {
|
||||
return &signalingClient{cc}
|
||||
}
|
||||
|
||||
func (c *signalingClient) Biu(ctx context.Context, opts ...grpc.CallOption) (Signaling_BiuClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Signaling_ServiceDesc.Streams[0], Signaling_Biu_FullMethodName, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &signalingBiuClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Signaling_BiuClient interface {
|
||||
Send(*SignalingMessage) error
|
||||
Recv() (*SignalingMessage, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type signalingBiuClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *signalingBiuClient) Send(m *SignalingMessage) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *signalingBiuClient) Recv() (*SignalingMessage, error) {
|
||||
m := new(SignalingMessage)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// SignalingServer is the server API for Signaling service.
|
||||
// All implementations must embed UnimplementedSignalingServer
|
||||
// for forward compatibility
|
||||
type SignalingServer interface {
|
||||
Biu(Signaling_BiuServer) error
|
||||
mustEmbedUnimplementedSignalingServer()
|
||||
}
|
||||
|
||||
// UnimplementedSignalingServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedSignalingServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedSignalingServer) Biu(Signaling_BiuServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Biu not implemented")
|
||||
}
|
||||
func (UnimplementedSignalingServer) mustEmbedUnimplementedSignalingServer() {}
|
||||
|
||||
// UnsafeSignalingServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SignalingServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeSignalingServer interface {
|
||||
mustEmbedUnimplementedSignalingServer()
|
||||
}
|
||||
|
||||
func RegisterSignalingServer(s grpc.ServiceRegistrar, srv SignalingServer) {
|
||||
s.RegisterService(&Signaling_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Signaling_Biu_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(SignalingServer).Biu(&signalingBiuServer{stream})
|
||||
}
|
||||
|
||||
type Signaling_BiuServer interface {
|
||||
Send(*SignalingMessage) error
|
||||
Recv() (*SignalingMessage, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type signalingBiuServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *signalingBiuServer) Send(m *SignalingMessage) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *signalingBiuServer) Recv() (*SignalingMessage, error) {
|
||||
m := new(SignalingMessage)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// Signaling_ServiceDesc is the grpc.ServiceDesc for Signaling service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Signaling_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "signaling.Signaling",
|
||||
HandlerType: (*SignalingServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Biu",
|
||||
Handler: _Signaling_Biu_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "pkg/proto/signaling/signaling.proto",
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user