229 lines
6.8 KiB
Go
229 lines
6.8 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: ws/ws.proto
|
|
|
|
/*
|
|
Package echoserver is a generated protocol buffer package.
|
|
|
|
It is generated from these files:
|
|
ws/ws.proto
|
|
|
|
It has these top-level messages:
|
|
WSRequest
|
|
WSResponse
|
|
*/
|
|
package echoserver
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import _ "google.golang.org/genproto/googleapis/api/annotations"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type WSRequest struct {
|
|
MsgType string `protobuf:"bytes,1,opt,name=msgType" json:"msgType,omitempty"`
|
|
UserId string `protobuf:"bytes,2,opt,name=userId" json:"userId,omitempty"`
|
|
Msg string `protobuf:"bytes,3,opt,name=msg" json:"msg,omitempty"`
|
|
}
|
|
|
|
func (m *WSRequest) Reset() { *m = WSRequest{} }
|
|
func (m *WSRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*WSRequest) ProtoMessage() {}
|
|
func (*WSRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
func (m *WSRequest) GetMsgType() string {
|
|
if m != nil {
|
|
return m.MsgType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *WSRequest) GetUserId() string {
|
|
if m != nil {
|
|
return m.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *WSRequest) GetMsg() string {
|
|
if m != nil {
|
|
return m.Msg
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type WSResponse struct {
|
|
MsgType string `protobuf:"bytes,1,opt,name=msgType" json:"msgType,omitempty"`
|
|
UserId string `protobuf:"bytes,2,opt,name=userId" json:"userId,omitempty"`
|
|
Msg string `protobuf:"bytes,3,opt,name=msg" json:"msg,omitempty"`
|
|
}
|
|
|
|
func (m *WSResponse) Reset() { *m = WSResponse{} }
|
|
func (m *WSResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*WSResponse) ProtoMessage() {}
|
|
func (*WSResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
|
|
|
func (m *WSResponse) GetMsgType() string {
|
|
if m != nil {
|
|
return m.MsgType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *WSResponse) GetUserId() string {
|
|
if m != nil {
|
|
return m.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *WSResponse) GetMsg() string {
|
|
if m != nil {
|
|
return m.Msg
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*WSRequest)(nil), "echoserver.WSRequest")
|
|
proto.RegisterType((*WSResponse)(nil), "echoserver.WSResponse")
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// Client API for WebSocketService service
|
|
|
|
type WebSocketServiceClient interface {
|
|
Test(ctx context.Context, opts ...grpc.CallOption) (WebSocketService_TestClient, error)
|
|
}
|
|
|
|
type webSocketServiceClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewWebSocketServiceClient(cc *grpc.ClientConn) WebSocketServiceClient {
|
|
return &webSocketServiceClient{cc}
|
|
}
|
|
|
|
func (c *webSocketServiceClient) Test(ctx context.Context, opts ...grpc.CallOption) (WebSocketService_TestClient, error) {
|
|
stream, err := grpc.NewClientStream(ctx, &_WebSocketService_serviceDesc.Streams[0], c.cc, "/echoserver.WebSocketService/Test", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &webSocketServiceTestClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type WebSocketService_TestClient interface {
|
|
Send(*WSRequest) error
|
|
Recv() (*WSResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type webSocketServiceTestClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *webSocketServiceTestClient) Send(m *WSRequest) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *webSocketServiceTestClient) Recv() (*WSResponse, error) {
|
|
m := new(WSResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// Server API for WebSocketService service
|
|
|
|
type WebSocketServiceServer interface {
|
|
Test(WebSocketService_TestServer) error
|
|
}
|
|
|
|
func RegisterWebSocketServiceServer(s *grpc.Server, srv WebSocketServiceServer) {
|
|
s.RegisterService(&_WebSocketService_serviceDesc, srv)
|
|
}
|
|
|
|
func _WebSocketService_Test_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(WebSocketServiceServer).Test(&webSocketServiceTestServer{stream})
|
|
}
|
|
|
|
type WebSocketService_TestServer interface {
|
|
Send(*WSResponse) error
|
|
Recv() (*WSRequest, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type webSocketServiceTestServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *webSocketServiceTestServer) Send(m *WSResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *webSocketServiceTestServer) Recv() (*WSRequest, error) {
|
|
m := new(WSRequest)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
var _WebSocketService_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "echoserver.WebSocketService",
|
|
HandlerType: (*WebSocketServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "Test",
|
|
Handler: _WebSocketService_Test_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: "ws/ws.proto",
|
|
}
|
|
|
|
func init() { proto.RegisterFile("ws/ws.proto", fileDescriptor0) }
|
|
|
|
var fileDescriptor0 = []byte{
|
|
// 214 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x2f, 0xd6, 0x2f,
|
|
0x2f, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4a, 0x4d, 0xce, 0xc8, 0x2f, 0x4e, 0x2d,
|
|
0x2a, 0x4b, 0x2d, 0x92, 0x92, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4,
|
|
0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x83, 0xaa, 0x54, 0xf2, 0xe7, 0xe2,
|
|
0x0c, 0x0f, 0x0e, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x92, 0xe0, 0x62, 0xcf, 0x2d, 0x4e,
|
|
0x0f, 0xa9, 0x2c, 0x48, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x82, 0x71, 0x85, 0xc4, 0xb8,
|
|
0xd8, 0x4a, 0x8b, 0x53, 0x8b, 0x3c, 0x53, 0x24, 0x98, 0xc0, 0x12, 0x50, 0x9e, 0x90, 0x00, 0x17,
|
|
0x73, 0x6e, 0x71, 0xba, 0x04, 0x33, 0x58, 0x10, 0xc4, 0x54, 0x0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