github.com/tickoalcantara12/micro/v3@v3.0.0-20221007104245-9d75b9bcbab9/proto/transport/transport.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: transport/transport.proto
     3  
     4  package transport
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	proto "github.com/golang/protobuf/proto"
    10  	grpc "google.golang.org/grpc"
    11  	math "math"
    12  )
    13  
    14  // Reference imports to suppress errors if they are not otherwise used.
    15  var _ = proto.Marshal
    16  var _ = fmt.Errorf
    17  var _ = math.Inf
    18  
    19  // This is a compile-time assertion to ensure that this generated file
    20  // is compatible with the proto package it is being compiled against.
    21  // A compilation error at this line likely means your copy of the
    22  // proto package needs to be updated.
    23  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    24  
    25  type Message struct {
    26  	Header               map[string]string `protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    27  	Body                 []byte            `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
    28  	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    29  	XXX_unrecognized     []byte            `json:"-"`
    30  	XXX_sizecache        int32             `json:"-"`
    31  }
    32  
    33  func (m *Message) Reset()         { *m = Message{} }
    34  func (m *Message) String() string { return proto.CompactTextString(m) }
    35  func (*Message) ProtoMessage()    {}
    36  func (*Message) Descriptor() ([]byte, []int) {
    37  	return fileDescriptor_6b1f04fe69cb7a2f, []int{0}
    38  }
    39  
    40  func (m *Message) XXX_Unmarshal(b []byte) error {
    41  	return xxx_messageInfo_Message.Unmarshal(m, b)
    42  }
    43  func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    44  	return xxx_messageInfo_Message.Marshal(b, m, deterministic)
    45  }
    46  func (m *Message) XXX_Merge(src proto.Message) {
    47  	xxx_messageInfo_Message.Merge(m, src)
    48  }
    49  func (m *Message) XXX_Size() int {
    50  	return xxx_messageInfo_Message.Size(m)
    51  }
    52  func (m *Message) XXX_DiscardUnknown() {
    53  	xxx_messageInfo_Message.DiscardUnknown(m)
    54  }
    55  
    56  var xxx_messageInfo_Message proto.InternalMessageInfo
    57  
    58  func (m *Message) GetHeader() map[string]string {
    59  	if m != nil {
    60  		return m.Header
    61  	}
    62  	return nil
    63  }
    64  
    65  func (m *Message) GetBody() []byte {
    66  	if m != nil {
    67  		return m.Body
    68  	}
    69  	return nil
    70  }
    71  
    72  func init() {
    73  	proto.RegisterType((*Message)(nil), "transport.Message")
    74  	proto.RegisterMapType((map[string]string)(nil), "transport.Message.HeaderEntry")
    75  }
    76  
    77  func init() { proto.RegisterFile("transport/transport.proto", fileDescriptor_6b1f04fe69cb7a2f) }
    78  
    79  var fileDescriptor_6b1f04fe69cb7a2f = []byte{
    80  	// 218 bytes of a gzipped FileDescriptorProto
    81  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0x29, 0x4a, 0xcc,
    82  	0x2b, 0x2e, 0xc8, 0x2f, 0x2a, 0xd1, 0x87, 0xb3, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x38,
    83  	0xe1, 0x02, 0x4a, 0x13, 0x18, 0xb9, 0xd8, 0x7d, 0x53, 0x8b, 0x8b, 0x13, 0xd3, 0x53, 0x85, 0xcc,
    84  	0xb8, 0xd8, 0x32, 0x52, 0x13, 0x53, 0x52, 0x8b, 0x24, 0x18, 0x15, 0x98, 0x35, 0xb8, 0x8d, 0xe4,
    85  	0xf4, 0x10, 0x1a, 0xa1, 0x6a, 0xf4, 0x3c, 0xc0, 0x0a, 0x5c, 0xf3, 0x4a, 0x8a, 0x2a, 0x83, 0xa0,
    86  	0xaa, 0x85, 0x84, 0xb8, 0x58, 0x92, 0xf2, 0x53, 0x2a, 0x25, 0x98, 0x14, 0x18, 0x35, 0x78, 0x82,
    87  	0xc0, 0x6c, 0x29, 0x4b, 0x2e, 0x6e, 0x24, 0xa5, 0x42, 0x02, 0x5c, 0xcc, 0xd9, 0xa9, 0x95, 0x12,
    88  	0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x20, 0xa6, 0x90, 0x08, 0x17, 0x6b, 0x59, 0x62, 0x4e, 0x69,
    89  	0x2a, 0x58, 0x17, 0x67, 0x10, 0x84, 0x63, 0xc5, 0x64, 0xc1, 0x68, 0xe4, 0xcc, 0xc5, 0x19, 0x02,
    90  	0xb3, 0x17, 0xe4, 0xa6, 0xe0, 0x92, 0xa2, 0xd4, 0xc4, 0x5c, 0x21, 0x21, 0x4c, 0xd7, 0x48, 0x61,
    91  	0x11, 0x53, 0x62, 0xd0, 0x60, 0x34, 0x60, 0x74, 0x32, 0x8d, 0x32, 0x4e, 0xcf, 0x2c, 0xc9, 0x28,
    92  	0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xcd, 0x4c, 0x2e, 0xca, 0x87, 0x92, 0x65, 0xc6, 0xfa,
    93  	0xe0, 0x50, 0x40, 0x84, 0x8a, 0x35, 0x9c, 0x95, 0xc4, 0x06, 0x96, 0x32, 0x06, 0x04, 0x00, 0x00,
    94  	0xff, 0xff, 0x02, 0x99, 0xd0, 0xa5, 0x3d, 0x01, 0x00, 0x00,
    95  }
    96  
    97  // Reference imports to suppress errors if they are not otherwise used.
    98  var _ context.Context
    99  var _ grpc.ClientConn
   100  
   101  // This is a compile-time assertion to ensure that this generated file
   102  // is compatible with the grpc package it is being compiled against.
   103  const _ = grpc.SupportPackageIsVersion4
   104  
   105  // TransportClient is the client API for Transport service.
   106  //
   107  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   108  type TransportClient interface {
   109  	Stream(ctx context.Context, opts ...grpc.CallOption) (Transport_StreamClient, error)
   110  }
   111  
   112  type transportClient struct {
   113  	cc *grpc.ClientConn
   114  }
   115  
   116  func NewTransportClient(cc *grpc.ClientConn) TransportClient {
   117  	return &transportClient{cc}
   118  }
   119  
   120  func (c *transportClient) Stream(ctx context.Context, opts ...grpc.CallOption) (Transport_StreamClient, error) {
   121  	stream, err := c.cc.NewStream(ctx, &_Transport_serviceDesc.Streams[0], "/transport.Transport/Stream", opts...)
   122  	if err != nil {
   123  		return nil, err
   124  	}
   125  	x := &transportStreamClient{stream}
   126  	return x, nil
   127  }
   128  
   129  type Transport_StreamClient interface {
   130  	Send(*Message) error
   131  	Recv() (*Message, error)
   132  	grpc.ClientStream
   133  }
   134  
   135  type transportStreamClient struct {
   136  	grpc.ClientStream
   137  }
   138  
   139  func (x *transportStreamClient) Send(m *Message) error {
   140  	return x.ClientStream.SendMsg(m)
   141  }
   142  
   143  func (x *transportStreamClient) Recv() (*Message, error) {
   144  	m := new(Message)
   145  	if err := x.ClientStream.RecvMsg(m); err != nil {
   146  		return nil, err
   147  	}
   148  	return m, nil
   149  }
   150  
   151  // TransportServer is the server API for Transport service.
   152  type TransportServer interface {
   153  	Stream(Transport_StreamServer) error
   154  }
   155  
   156  func RegisterTransportServer(s *grpc.Server, srv TransportServer) {
   157  	s.RegisterService(&_Transport_serviceDesc, srv)
   158  }
   159  
   160  func _Transport_Stream_Handler(srv interface{}, stream grpc.ServerStream) error {
   161  	return srv.(TransportServer).Stream(&transportStreamServer{stream})
   162  }
   163  
   164  type Transport_StreamServer interface {
   165  	Send(*Message) error
   166  	Recv() (*Message, error)
   167  	grpc.ServerStream
   168  }
   169  
   170  type transportStreamServer struct {
   171  	grpc.ServerStream
   172  }
   173  
   174  func (x *transportStreamServer) Send(m *Message) error {
   175  	return x.ServerStream.SendMsg(m)
   176  }
   177  
   178  func (x *transportStreamServer) Recv() (*Message, error) {
   179  	m := new(Message)
   180  	if err := x.ServerStream.RecvMsg(m); err != nil {
   181  		return nil, err
   182  	}
   183  	return m, nil
   184  }
   185  
   186  var _Transport_serviceDesc = grpc.ServiceDesc{
   187  	ServiceName: "transport.Transport",
   188  	HandlerType: (*TransportServer)(nil),
   189  	Methods:     []grpc.MethodDesc{},
   190  	Streams: []grpc.StreamDesc{
   191  		{
   192  			StreamName:    "Stream",
   193  			Handler:       _Transport_Stream_Handler,
   194  			ServerStreams: true,
   195  			ClientStreams: true,
   196  		},
   197  	},
   198  	Metadata: "transport/transport.proto",
   199  }