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

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: client/client.proto
     3  
     4  package client
     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 Request struct {
    26  	Service              string   `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
    27  	Endpoint             string   `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
    28  	ContentType          string   `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
    29  	Body                 []byte   `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
    30  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    31  	XXX_unrecognized     []byte   `json:"-"`
    32  	XXX_sizecache        int32    `json:"-"`
    33  }
    34  
    35  func (m *Request) Reset()         { *m = Request{} }
    36  func (m *Request) String() string { return proto.CompactTextString(m) }
    37  func (*Request) ProtoMessage()    {}
    38  func (*Request) Descriptor() ([]byte, []int) {
    39  	return fileDescriptor_4d3551c163a1d198, []int{0}
    40  }
    41  
    42  func (m *Request) XXX_Unmarshal(b []byte) error {
    43  	return xxx_messageInfo_Request.Unmarshal(m, b)
    44  }
    45  func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    46  	return xxx_messageInfo_Request.Marshal(b, m, deterministic)
    47  }
    48  func (m *Request) XXX_Merge(src proto.Message) {
    49  	xxx_messageInfo_Request.Merge(m, src)
    50  }
    51  func (m *Request) XXX_Size() int {
    52  	return xxx_messageInfo_Request.Size(m)
    53  }
    54  func (m *Request) XXX_DiscardUnknown() {
    55  	xxx_messageInfo_Request.DiscardUnknown(m)
    56  }
    57  
    58  var xxx_messageInfo_Request proto.InternalMessageInfo
    59  
    60  func (m *Request) GetService() string {
    61  	if m != nil {
    62  		return m.Service
    63  	}
    64  	return ""
    65  }
    66  
    67  func (m *Request) GetEndpoint() string {
    68  	if m != nil {
    69  		return m.Endpoint
    70  	}
    71  	return ""
    72  }
    73  
    74  func (m *Request) GetContentType() string {
    75  	if m != nil {
    76  		return m.ContentType
    77  	}
    78  	return ""
    79  }
    80  
    81  func (m *Request) GetBody() []byte {
    82  	if m != nil {
    83  		return m.Body
    84  	}
    85  	return nil
    86  }
    87  
    88  type Response struct {
    89  	Body                 []byte   `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
    90  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    91  	XXX_unrecognized     []byte   `json:"-"`
    92  	XXX_sizecache        int32    `json:"-"`
    93  }
    94  
    95  func (m *Response) Reset()         { *m = Response{} }
    96  func (m *Response) String() string { return proto.CompactTextString(m) }
    97  func (*Response) ProtoMessage()    {}
    98  func (*Response) Descriptor() ([]byte, []int) {
    99  	return fileDescriptor_4d3551c163a1d198, []int{1}
   100  }
   101  
   102  func (m *Response) XXX_Unmarshal(b []byte) error {
   103  	return xxx_messageInfo_Response.Unmarshal(m, b)
   104  }
   105  func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   106  	return xxx_messageInfo_Response.Marshal(b, m, deterministic)
   107  }
   108  func (m *Response) XXX_Merge(src proto.Message) {
   109  	xxx_messageInfo_Response.Merge(m, src)
   110  }
   111  func (m *Response) XXX_Size() int {
   112  	return xxx_messageInfo_Response.Size(m)
   113  }
   114  func (m *Response) XXX_DiscardUnknown() {
   115  	xxx_messageInfo_Response.DiscardUnknown(m)
   116  }
   117  
   118  var xxx_messageInfo_Response proto.InternalMessageInfo
   119  
   120  func (m *Response) GetBody() []byte {
   121  	if m != nil {
   122  		return m.Body
   123  	}
   124  	return nil
   125  }
   126  
   127  type Message struct {
   128  	Topic                string   `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
   129  	ContentType          string   `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
   130  	Body                 []byte   `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
   131  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   132  	XXX_unrecognized     []byte   `json:"-"`
   133  	XXX_sizecache        int32    `json:"-"`
   134  }
   135  
   136  func (m *Message) Reset()         { *m = Message{} }
   137  func (m *Message) String() string { return proto.CompactTextString(m) }
   138  func (*Message) ProtoMessage()    {}
   139  func (*Message) Descriptor() ([]byte, []int) {
   140  	return fileDescriptor_4d3551c163a1d198, []int{2}
   141  }
   142  
   143  func (m *Message) XXX_Unmarshal(b []byte) error {
   144  	return xxx_messageInfo_Message.Unmarshal(m, b)
   145  }
   146  func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   147  	return xxx_messageInfo_Message.Marshal(b, m, deterministic)
   148  }
   149  func (m *Message) XXX_Merge(src proto.Message) {
   150  	xxx_messageInfo_Message.Merge(m, src)
   151  }
   152  func (m *Message) XXX_Size() int {
   153  	return xxx_messageInfo_Message.Size(m)
   154  }
   155  func (m *Message) XXX_DiscardUnknown() {
   156  	xxx_messageInfo_Message.DiscardUnknown(m)
   157  }
   158  
   159  var xxx_messageInfo_Message proto.InternalMessageInfo
   160  
   161  func (m *Message) GetTopic() string {
   162  	if m != nil {
   163  		return m.Topic
   164  	}
   165  	return ""
   166  }
   167  
   168  func (m *Message) GetContentType() string {
   169  	if m != nil {
   170  		return m.ContentType
   171  	}
   172  	return ""
   173  }
   174  
   175  func (m *Message) GetBody() []byte {
   176  	if m != nil {
   177  		return m.Body
   178  	}
   179  	return nil
   180  }
   181  
   182  func init() {
   183  	proto.RegisterType((*Request)(nil), "client.Request")
   184  	proto.RegisterType((*Response)(nil), "client.Response")
   185  	proto.RegisterType((*Message)(nil), "client.Message")
   186  }
   187  
   188  func init() { proto.RegisterFile("client/client.proto", fileDescriptor_4d3551c163a1d198) }
   189  
   190  var fileDescriptor_4d3551c163a1d198 = []byte{
   191  	// 280 bytes of a gzipped FileDescriptorProto
   192  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0xcf, 0x4b, 0xc3, 0x30,
   193  	0x14, 0x5e, 0xb6, 0xda, 0xce, 0xe7, 0x40, 0x89, 0x1e, 0x4a, 0x0f, 0x32, 0x7b, 0x2a, 0xc8, 0x5a,
   194  	0x75, 0x47, 0x6f, 0xee, 0x2c, 0x48, 0x15, 0x0f, 0x5e, 0xa4, 0xcd, 0x1e, 0x5b, 0xa0, 0x4d, 0x62,
   195  	0x93, 0x16, 0xfa, 0x97, 0xf8, 0xef, 0x0a, 0x69, 0xb4, 0xa2, 0x08, 0x5e, 0xf2, 0xf2, 0x7d, 0x5f,
   196  	0xf2, 0x7e, 0x7d, 0x70, 0xca, 0x2a, 0x8e, 0xc2, 0x64, 0x43, 0x48, 0x55, 0x23, 0x8d, 0xa4, 0xfe,
   197  	0x80, 0xe2, 0x0e, 0x82, 0x1c, 0xdf, 0x5a, 0xd4, 0x86, 0x86, 0x10, 0x68, 0x6c, 0x3a, 0xce, 0x30,
   198  	0x24, 0x4b, 0x92, 0x1c, 0xe6, 0x9f, 0x90, 0x46, 0x30, 0x47, 0xb1, 0x55, 0x92, 0x0b, 0x13, 0x4e,
   199  	0xad, 0xf4, 0x85, 0xe9, 0x05, 0x2c, 0x98, 0x14, 0x06, 0x85, 0x79, 0x35, 0xbd, 0xc2, 0x70, 0x66,
   200  	0xf5, 0x23, 0xc7, 0x3d, 0xf5, 0x0a, 0x29, 0x05, 0xaf, 0x94, 0xdb, 0x3e, 0xf4, 0x96, 0x24, 0x59,
   201  	0xe4, 0xf6, 0x1e, 0x9f, 0xc3, 0x3c, 0x47, 0xad, 0xa4, 0xd0, 0xa3, 0x4e, 0xbe, 0xe9, 0xcf, 0x10,
   202  	0xdc, 0xa3, 0xd6, 0xc5, 0x0e, 0xe9, 0x19, 0x1c, 0x18, 0xa9, 0x38, 0x73, 0x5d, 0x0d, 0xe0, 0x57,
   203  	0xdd, 0xe9, 0xdf, 0x75, 0x67, 0x63, 0xde, 0x9b, 0x77, 0x02, 0xfe, 0xc6, 0x8e, 0x4e, 0x2f, 0xc1,
   204  	0xdb, 0x14, 0x55, 0x45, 0x8f, 0x53, 0xb7, 0x19, 0xb7, 0x88, 0xe8, 0x64, 0x24, 0x86, 0x0e, 0xe3,
   205  	0x09, 0xbd, 0x06, 0xff, 0xd1, 0x34, 0x58, 0xd4, 0xff, 0x7a, 0x9e, 0x90, 0x2b, 0x42, 0x57, 0x10,
   206  	0x3c, 0xb4, 0x65, 0xc5, 0xf5, 0x7e, 0xfc, 0xe3, 0x66, 0x8a, 0x7e, 0x12, 0xf1, 0xe4, 0x2e, 0x7b,
   207  	0x59, 0xed, 0xb8, 0xd9, 0xb7, 0x65, 0xca, 0x64, 0x9d, 0xd5, 0x9c, 0x35, 0xd2, 0x9d, 0xdd, 0x3a,
   208  	0xb3, 0xa6, 0x39, 0x07, 0x6f, 0x87, 0x50, 0xfa, 0x96, 0x5c, 0x7f, 0x04, 0x00, 0x00, 0xff, 0xff,
   209  	0x59, 0x18, 0xc2, 0x4e, 0xe0, 0x01, 0x00, 0x00,
   210  }
   211  
   212  // Reference imports to suppress errors if they are not otherwise used.
   213  var _ context.Context
   214  var _ grpc.ClientConn
   215  
   216  // This is a compile-time assertion to ensure that this generated file
   217  // is compatible with the grpc package it is being compiled against.
   218  const _ = grpc.SupportPackageIsVersion4
   219  
   220  // ClientClient is the client API for Client service.
   221  //
   222  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   223  type ClientClient interface {
   224  	// Call allows a single request to be made
   225  	Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
   226  	// Stream is a bidirectional stream
   227  	Stream(ctx context.Context, opts ...grpc.CallOption) (Client_StreamClient, error)
   228  	// Publish publishes a message and returns an empty Message
   229  	Publish(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
   230  }
   231  
   232  type clientClient struct {
   233  	cc *grpc.ClientConn
   234  }
   235  
   236  func NewClientClient(cc *grpc.ClientConn) ClientClient {
   237  	return &clientClient{cc}
   238  }
   239  
   240  func (c *clientClient) Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
   241  	out := new(Response)
   242  	err := c.cc.Invoke(ctx, "/client.Client/Call", in, out, opts...)
   243  	if err != nil {
   244  		return nil, err
   245  	}
   246  	return out, nil
   247  }
   248  
   249  func (c *clientClient) Stream(ctx context.Context, opts ...grpc.CallOption) (Client_StreamClient, error) {
   250  	stream, err := c.cc.NewStream(ctx, &_Client_serviceDesc.Streams[0], "/client.Client/Stream", opts...)
   251  	if err != nil {
   252  		return nil, err
   253  	}
   254  	x := &clientStreamClient{stream}
   255  	return x, nil
   256  }
   257  
   258  type Client_StreamClient interface {
   259  	Send(*Request) error
   260  	Recv() (*Response, error)
   261  	grpc.ClientStream
   262  }
   263  
   264  type clientStreamClient struct {
   265  	grpc.ClientStream
   266  }
   267  
   268  func (x *clientStreamClient) Send(m *Request) error {
   269  	return x.ClientStream.SendMsg(m)
   270  }
   271  
   272  func (x *clientStreamClient) Recv() (*Response, error) {
   273  	m := new(Response)
   274  	if err := x.ClientStream.RecvMsg(m); err != nil {
   275  		return nil, err
   276  	}
   277  	return m, nil
   278  }
   279  
   280  func (c *clientClient) Publish(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) {
   281  	out := new(Message)
   282  	err := c.cc.Invoke(ctx, "/client.Client/Publish", in, out, opts...)
   283  	if err != nil {
   284  		return nil, err
   285  	}
   286  	return out, nil
   287  }
   288  
   289  // ClientServer is the server API for Client service.
   290  type ClientServer interface {
   291  	// Call allows a single request to be made
   292  	Call(context.Context, *Request) (*Response, error)
   293  	// Stream is a bidirectional stream
   294  	Stream(Client_StreamServer) error
   295  	// Publish publishes a message and returns an empty Message
   296  	Publish(context.Context, *Message) (*Message, error)
   297  }
   298  
   299  func RegisterClientServer(s *grpc.Server, srv ClientServer) {
   300  	s.RegisterService(&_Client_serviceDesc, srv)
   301  }
   302  
   303  func _Client_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   304  	in := new(Request)
   305  	if err := dec(in); err != nil {
   306  		return nil, err
   307  	}
   308  	if interceptor == nil {
   309  		return srv.(ClientServer).Call(ctx, in)
   310  	}
   311  	info := &grpc.UnaryServerInfo{
   312  		Server:     srv,
   313  		FullMethod: "/client.Client/Call",
   314  	}
   315  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   316  		return srv.(ClientServer).Call(ctx, req.(*Request))
   317  	}
   318  	return interceptor(ctx, in, info, handler)
   319  }
   320  
   321  func _Client_Stream_Handler(srv interface{}, stream grpc.ServerStream) error {
   322  	return srv.(ClientServer).Stream(&clientStreamServer{stream})
   323  }
   324  
   325  type Client_StreamServer interface {
   326  	Send(*Response) error
   327  	Recv() (*Request, error)
   328  	grpc.ServerStream
   329  }
   330  
   331  type clientStreamServer struct {
   332  	grpc.ServerStream
   333  }
   334  
   335  func (x *clientStreamServer) Send(m *Response) error {
   336  	return x.ServerStream.SendMsg(m)
   337  }
   338  
   339  func (x *clientStreamServer) Recv() (*Request, error) {
   340  	m := new(Request)
   341  	if err := x.ServerStream.RecvMsg(m); err != nil {
   342  		return nil, err
   343  	}
   344  	return m, nil
   345  }
   346  
   347  func _Client_Publish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   348  	in := new(Message)
   349  	if err := dec(in); err != nil {
   350  		return nil, err
   351  	}
   352  	if interceptor == nil {
   353  		return srv.(ClientServer).Publish(ctx, in)
   354  	}
   355  	info := &grpc.UnaryServerInfo{
   356  		Server:     srv,
   357  		FullMethod: "/client.Client/Publish",
   358  	}
   359  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   360  		return srv.(ClientServer).Publish(ctx, req.(*Message))
   361  	}
   362  	return interceptor(ctx, in, info, handler)
   363  }
   364  
   365  var _Client_serviceDesc = grpc.ServiceDesc{
   366  	ServiceName: "client.Client",
   367  	HandlerType: (*ClientServer)(nil),
   368  	Methods: []grpc.MethodDesc{
   369  		{
   370  			MethodName: "Call",
   371  			Handler:    _Client_Call_Handler,
   372  		},
   373  		{
   374  			MethodName: "Publish",
   375  			Handler:    _Client_Publish_Handler,
   376  		},
   377  	},
   378  	Streams: []grpc.StreamDesc{
   379  		{
   380  			StreamName:    "Stream",
   381  			Handler:       _Client_Stream_Handler,
   382  			ServerStreams: true,
   383  			ClientStreams: true,
   384  		},
   385  	},
   386  	Metadata: "client/client.proto",
   387  }