pb

package
v0.0.0-...-68aaea9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SDPType_name = map[int32]string{
		0: "SDPTypeUnkown",
		1: "SDPTypeOffer",
		2: "SDPTypePranswer",
		3: "SDPTypeAnswer",
		4: "SDPTypeRollback",
	}
	SDPType_value = map[string]int32{
		"SDPTypeUnkown":   0,
		"SDPTypeOffer":    1,
		"SDPTypePranswer": 2,
		"SDPTypeAnswer":   3,
		"SDPTypeRollback": 4,
	}
)

Enum value maps for SDPType.

View Source
var (
	WebsocketCustomCloseCode_name = map[int32]string{
		0:    "CloseCodeZero",
		4001: "CloseCodeAuthenticationFailed",
		4002: "CloseCodeDuplicateConnection",
		4003: "CloseCodeServerInternalError",
		4004: "CloseCodeHeartbeatTimeout",
	}
	WebsocketCustomCloseCode_value = map[string]int32{
		"CloseCodeZero":                 0,
		"CloseCodeAuthenticationFailed": 4001,
		"CloseCodeDuplicateConnection":  4002,
		"CloseCodeServerInternalError":  4003,
		"CloseCodeHeartbeatTimeout":     4004,
	}
)

Enum value maps for WebsocketCustomCloseCode.

View Source
var (
	WsReceiveMessageBinaryType_name = map[int32]string{
		0: "ReceiveRequest",
		1: "ReceiveResponse",
	}
	WsReceiveMessageBinaryType_value = map[string]int32{
		"ReceiveRequest":  0,
		"ReceiveResponse": 1,
	}
)

Enum value maps for WsReceiveMessageBinaryType.

View Source
var AppService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.appService",
	HandlerType: (*AppServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "VerifyClient",
			Handler:    _AppService_VerifyClient_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "app.proto",
}

AppService_ServiceDesc is the grpc.ServiceDesc for AppService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_common_proto protoreflect.FileDescriptor
View Source
var File_gateway_proto protoreflect.FileDescriptor
View Source
var GatewayService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.gatewayService",
	HandlerType: (*GatewayServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetSessionDescription",
			Handler:    _GatewayService_GetSessionDescription_Handler,
		},
		{
			MethodName: "Node",
			Handler:    _GatewayService_Node_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gateway.proto",
}

GatewayService_ServiceDesc is the grpc.ServiceDesc for GatewayService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterAppServiceServer

func RegisterAppServiceServer(s grpc.ServiceRegistrar, srv AppServiceServer)

func RegisterGatewayServiceServer

func RegisterGatewayServiceServer(s grpc.ServiceRegistrar, srv GatewayServiceServer)

Types

type AppServiceClient

type AppServiceClient interface {
	VerifyClient(ctx context.Context, in *VerifyClientReq, opts ...grpc.CallOption) (*VerifyClientResp, error)
}

AppServiceClient is the client API for AppService 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.

func NewAppServiceClient

func NewAppServiceClient(cc grpc.ClientConnInterface) AppServiceClient

type AppServiceServer

type AppServiceServer interface {
	VerifyClient(context.Context, *VerifyClientReq) (*VerifyClientResp, error)
	// contains filtered or unexported methods
}

AppServiceServer is the server API for AppService service. All implementations must embed UnimplementedAppServiceServer for forward compatibility

type GatewayServiceClient

type GatewayServiceClient interface {
	GetSessionDescription(ctx context.Context, in *GetSessionDescriptionReq, opts ...grpc.CallOption) (*GetSessionDescriptionResp, error)
	Node(ctx context.Context, in *NodeReq, opts ...grpc.CallOption) (*NodeResp, error)
}

GatewayServiceClient is the client API for GatewayService 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 GatewayServiceServer

type GatewayServiceServer interface {
	GetSessionDescription(context.Context, *GetSessionDescriptionReq) (*GetSessionDescriptionResp, error)
	Node(context.Context, *NodeReq) (*NodeResp, error)
	// contains filtered or unexported methods
}

GatewayServiceServer is the server API for GatewayService service. All implementations must embed UnimplementedGatewayServiceServer for forward compatibility

type GetSessionDescriptionReq

type GetSessionDescriptionReq struct {
	AppId string `protobuf:"bytes,1,opt,name=appId,proto3" json:"appId"`
	// contains filtered or unexported fields
}

func (*GetSessionDescriptionReq) Descriptor deprecated

func (*GetSessionDescriptionReq) Descriptor() ([]byte, []int)

Deprecated: Use GetSessionDescriptionReq.ProtoReflect.Descriptor instead.

func (*GetSessionDescriptionReq) GetAppId

func (x *GetSessionDescriptionReq) GetAppId() string

func (*GetSessionDescriptionReq) ProtoMessage

func (*GetSessionDescriptionReq) ProtoMessage()

func (*GetSessionDescriptionReq) ProtoReflect

func (x *GetSessionDescriptionReq) ProtoReflect() protoreflect.Message

func (*GetSessionDescriptionReq) Reset

func (x *GetSessionDescriptionReq) Reset()

func (*GetSessionDescriptionReq) String

func (x *GetSessionDescriptionReq) String() string

type GetSessionDescriptionResp

type GetSessionDescriptionResp struct {
	AppId string              `protobuf:"bytes,1,opt,name=appId,proto3" json:"appId"`
	Sdp   *SessionDescription `protobuf:"bytes,2,opt,name=sdp,proto3" json:"sdp"`
	// contains filtered or unexported fields
}

func (*GetSessionDescriptionResp) Descriptor deprecated

func (*GetSessionDescriptionResp) Descriptor() ([]byte, []int)

Deprecated: Use GetSessionDescriptionResp.ProtoReflect.Descriptor instead.

func (*GetSessionDescriptionResp) GetAppId

func (x *GetSessionDescriptionResp) GetAppId() string

func (*GetSessionDescriptionResp) GetSdp

func (*GetSessionDescriptionResp) ProtoMessage

func (*GetSessionDescriptionResp) ProtoMessage()

func (*GetSessionDescriptionResp) ProtoReflect

func (*GetSessionDescriptionResp) Reset

func (x *GetSessionDescriptionResp) Reset()

func (*GetSessionDescriptionResp) String

func (x *GetSessionDescriptionResp) String() string

type NodeReq

type NodeReq struct {
	AppId     string            `protobuf:"bytes,1,opt,name=appId,proto3" json:"appId"`
	RequestId string            `protobuf:"bytes,2,opt,name=requestId,proto3" json:"requestId"`
	Headers   map[string]string `` /* 145-byte string literal not displayed */
	Method    string            `protobuf:"bytes,4,opt,name=method,proto3" json:"method"`
	Body      []byte            `protobuf:"bytes,5,opt,name=body,proto3" json:"body"`
	// contains filtered or unexported fields
}

NodeReq 向node发起请求

func (*NodeReq) Descriptor deprecated

func (*NodeReq) Descriptor() ([]byte, []int)

Deprecated: Use NodeReq.ProtoReflect.Descriptor instead.

func (*NodeReq) GetAppId

func (x *NodeReq) GetAppId() string

func (*NodeReq) GetBody

func (x *NodeReq) GetBody() []byte

func (*NodeReq) GetHeaders

func (x *NodeReq) GetHeaders() map[string]string

func (*NodeReq) GetMethod

func (x *NodeReq) GetMethod() string

func (*NodeReq) GetRequestId

func (x *NodeReq) GetRequestId() string

func (*NodeReq) ProtoMessage

func (*NodeReq) ProtoMessage()

func (*NodeReq) ProtoReflect

func (x *NodeReq) ProtoReflect() protoreflect.Message

func (*NodeReq) Reset

func (x *NodeReq) Reset()

func (*NodeReq) String

func (x *NodeReq) String() string

type NodeResp

type NodeResp struct {
	AppId     string            `protobuf:"bytes,1,opt,name=appId,proto3" json:"appId"`
	RequestId string            `protobuf:"bytes,2,opt,name=requestId,proto3" json:"requestId"`
	Headers   map[string]string `` /* 145-byte string literal not displayed */
	Status    int32             `protobuf:"varint,4,opt,name=status,proto3" json:"status"`
	Body      []byte            `protobuf:"bytes,5,opt,name=body,proto3" json:"body"`
	ErrMsg    string            `protobuf:"bytes,6,opt,name=errMsg,proto3" json:"errMsg"`
	// contains filtered or unexported fields
}

NodeResp node返回的响应

func (*NodeResp) Descriptor deprecated

func (*NodeResp) Descriptor() ([]byte, []int)

Deprecated: Use NodeResp.ProtoReflect.Descriptor instead.

func (*NodeResp) GetAppId

func (x *NodeResp) GetAppId() string

func (*NodeResp) GetBody

func (x *NodeResp) GetBody() []byte

func (*NodeResp) GetErrMsg

func (x *NodeResp) GetErrMsg() string

func (*NodeResp) GetHeaders

func (x *NodeResp) GetHeaders() map[string]string

func (*NodeResp) GetRequestId

func (x *NodeResp) GetRequestId() string

func (*NodeResp) GetStatus

func (x *NodeResp) GetStatus() int32

func (*NodeResp) ProtoMessage

func (*NodeResp) ProtoMessage()

func (*NodeResp) ProtoReflect

func (x *NodeResp) ProtoReflect() protoreflect.Message

func (*NodeResp) Reset

func (x *NodeResp) Reset()

func (*NodeResp) String

func (x *NodeResp) String() string

type SDPType

type SDPType int32

SDPType describes the type of an SessionDescription.

const (
	SDPType_SDPTypeUnkown SDPType = 0
	// SDPTypeOffer indicates that a description MUST be treated as an SDP
	// offer.
	SDPType_SDPTypeOffer SDPType = 1
	// SDPTypePranswer indicates that a description MUST be treated as an
	// SDP answer, but not a final answer. A description used as an SDP
	// pranswer may be applied as a response to an SDP offer, or an update to
	// a previously sent SDP pranswer.
	SDPType_SDPTypePranswer SDPType = 2
	// SDPTypeAnswer indicates that a description MUST be treated as an SDP
	// final answer, and the offer-answer exchange MUST be considered complete.
	// A description used as an SDP answer may be applied as a response to an
	// SDP offer or as an update to a previously sent SDP pranswer.
	SDPType_SDPTypeAnswer SDPType = 3
	// SDPTypeRollback indicates that a description MUST be treated as
	// canceling the current SDP negotiation and moving the SDP offer and
	// answer back to what it was in the previous stable state. Note the
	// local or remote SDP descriptions in the previous stable state could be
	// null if there has not yet been a successful offer-answer negotiation.
	SDPType_SDPTypeRollback SDPType = 4
)

func (SDPType) Descriptor

func (SDPType) Descriptor() protoreflect.EnumDescriptor

func (SDPType) Enum

func (x SDPType) Enum() *SDPType

func (SDPType) EnumDescriptor deprecated

func (SDPType) EnumDescriptor() ([]byte, []int)

Deprecated: Use SDPType.Descriptor instead.

func (SDPType) MarshalJSON

func (t SDPType) MarshalJSON() ([]byte, error)

MarshalJSON enables JSON marshaling of a SDPType

func (SDPType) Number

func (x SDPType) Number() protoreflect.EnumNumber

func (SDPType) String

func (x SDPType) String() string

func (SDPType) ToString

func (t SDPType) ToString() string

func (SDPType) Type

func (SDPType) Type() protoreflect.EnumType

func (*SDPType) UnmarshalJSON

func (t *SDPType) UnmarshalJSON(b []byte) error

UnmarshalJSON enables JSON unmarshaling of a SDPType

type SessionDescription

type SessionDescription struct {
	Sdp  string  `protobuf:"bytes,1,opt,name=sdp,proto3" json:"sdp"`
	Type SDPType `protobuf:"varint,2,opt,name=type,proto3,enum=pb.SDPType" json:"type"`
	// contains filtered or unexported fields
}

func (*SessionDescription) Descriptor deprecated

func (*SessionDescription) Descriptor() ([]byte, []int)

Deprecated: Use SessionDescription.ProtoReflect.Descriptor instead.

func (*SessionDescription) GetSdp

func (x *SessionDescription) GetSdp() string

func (*SessionDescription) GetType

func (x *SessionDescription) GetType() SDPType

func (*SessionDescription) ProtoMessage

func (*SessionDescription) ProtoMessage()

func (*SessionDescription) ProtoReflect

func (x *SessionDescription) ProtoReflect() protoreflect.Message

func (*SessionDescription) Reset

func (x *SessionDescription) Reset()

func (*SessionDescription) String

func (x *SessionDescription) String() string

type UnimplementedAppServiceServer

type UnimplementedAppServiceServer struct {
}

UnimplementedAppServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAppServiceServer) VerifyClient

type UnimplementedGatewayServiceServer

type UnimplementedGatewayServiceServer struct {
}

UnimplementedGatewayServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedGatewayServiceServer) GetSessionDescription

func (UnimplementedGatewayServiceServer) Node

type UnsafeAppServiceServer

type UnsafeAppServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAppServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AppServiceServer will result in compilation errors.

type UnsafeGatewayServiceServer

type UnsafeGatewayServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeGatewayServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GatewayServiceServer will result in compilation errors.

type VerifyClientReq

type VerifyClientReq struct {
	ClientId     string `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId"`
	ClientSecret string `protobuf:"bytes,2,opt,name=clientSecret,proto3" json:"clientSecret"`
	// contains filtered or unexported fields
}

func (*VerifyClientReq) Descriptor deprecated

func (*VerifyClientReq) Descriptor() ([]byte, []int)

Deprecated: Use VerifyClientReq.ProtoReflect.Descriptor instead.

func (*VerifyClientReq) GetClientId

func (x *VerifyClientReq) GetClientId() string

func (*VerifyClientReq) GetClientSecret

func (x *VerifyClientReq) GetClientSecret() string

func (*VerifyClientReq) ProtoMessage

func (*VerifyClientReq) ProtoMessage()

func (*VerifyClientReq) ProtoReflect

func (x *VerifyClientReq) ProtoReflect() protoreflect.Message

func (*VerifyClientReq) Reset

func (x *VerifyClientReq) Reset()

func (*VerifyClientReq) String

func (x *VerifyClientReq) String() string

type VerifyClientResp

type VerifyClientResp struct {
	Ok    bool   `protobuf:"varint,1,opt,name=ok,proto3" json:"ok"`
	Tip   string `protobuf:"bytes,2,opt,name=tip,proto3" json:"tip"`
	AppId string `protobuf:"bytes,3,opt,name=appId,proto3" json:"appId"`
	// contains filtered or unexported fields
}

func (*VerifyClientResp) Descriptor deprecated

func (*VerifyClientResp) Descriptor() ([]byte, []int)

Deprecated: Use VerifyClientResp.ProtoReflect.Descriptor instead.

func (*VerifyClientResp) GetAppId

func (x *VerifyClientResp) GetAppId() string

func (*VerifyClientResp) GetOk

func (x *VerifyClientResp) GetOk() bool

func (*VerifyClientResp) GetTip

func (x *VerifyClientResp) GetTip() string

func (*VerifyClientResp) ProtoMessage

func (*VerifyClientResp) ProtoMessage()

func (*VerifyClientResp) ProtoReflect

func (x *VerifyClientResp) ProtoReflect() protoreflect.Message

func (*VerifyClientResp) Reset

func (x *VerifyClientResp) Reset()

func (*VerifyClientResp) String

func (x *VerifyClientResp) String() string

type WebsocketCustomCloseCode

type WebsocketCustomCloseCode int32

WebsocketCustomCloseCode websocket关闭码 You can define custom codes in the 3000-4999 range. The 3000-3999 range is reserved for use by libraries, frameworks and applications. The 4000-4999 range is reserved for private use.

const (
	WebsocketCustomCloseCode_CloseCodeZero                 WebsocketCustomCloseCode = 0    // pb必须有一个默认值
	WebsocketCustomCloseCode_CloseCodeAuthenticationFailed WebsocketCustomCloseCode = 4001 // 认证失败
	WebsocketCustomCloseCode_CloseCodeDuplicateConnection  WebsocketCustomCloseCode = 4002 // 重复连接
	WebsocketCustomCloseCode_CloseCodeServerInternalError  WebsocketCustomCloseCode = 4003 // 服务器内部错误
	WebsocketCustomCloseCode_CloseCodeHeartbeatTimeout     WebsocketCustomCloseCode = 4004 // 心跳超时
)

func (WebsocketCustomCloseCode) Descriptor

func (WebsocketCustomCloseCode) Enum

func (WebsocketCustomCloseCode) EnumDescriptor deprecated

func (WebsocketCustomCloseCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use WebsocketCustomCloseCode.Descriptor instead.

func (WebsocketCustomCloseCode) Number

func (WebsocketCustomCloseCode) String

func (x WebsocketCustomCloseCode) String() string

func (WebsocketCustomCloseCode) Type

type WsReceiveMessageBinary

type WsReceiveMessageBinary struct {
	Type WsReceiveMessageBinaryType `protobuf:"varint,1,opt,name=type,proto3,enum=pb.WsReceiveMessageBinaryType" json:"type"`
	Data []byte                     `protobuf:"bytes,2,opt,name=data,proto3" json:"data"`
	// contains filtered or unexported fields
}

func (*WsReceiveMessageBinary) Descriptor deprecated

func (*WsReceiveMessageBinary) Descriptor() ([]byte, []int)

Deprecated: Use WsReceiveMessageBinary.ProtoReflect.Descriptor instead.

func (*WsReceiveMessageBinary) GetData

func (x *WsReceiveMessageBinary) GetData() []byte

func (*WsReceiveMessageBinary) GetType

func (*WsReceiveMessageBinary) ProtoMessage

func (*WsReceiveMessageBinary) ProtoMessage()

func (*WsReceiveMessageBinary) ProtoReflect

func (x *WsReceiveMessageBinary) ProtoReflect() protoreflect.Message

func (*WsReceiveMessageBinary) Reset

func (x *WsReceiveMessageBinary) Reset()

func (*WsReceiveMessageBinary) String

func (x *WsReceiveMessageBinary) String() string

type WsReceiveMessageBinaryType

type WsReceiveMessageBinaryType int32
const (
	WsReceiveMessageBinaryType_ReceiveRequest  WsReceiveMessageBinaryType = 0
	WsReceiveMessageBinaryType_ReceiveResponse WsReceiveMessageBinaryType = 1
)

func (WsReceiveMessageBinaryType) Descriptor

func (WsReceiveMessageBinaryType) Enum

func (WsReceiveMessageBinaryType) EnumDescriptor deprecated

func (WsReceiveMessageBinaryType) EnumDescriptor() ([]byte, []int)

Deprecated: Use WsReceiveMessageBinaryType.Descriptor instead.

func (WsReceiveMessageBinaryType) Number

func (WsReceiveMessageBinaryType) String

func (WsReceiveMessageBinaryType) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL