dubbo.apache.org/dubbo-go/v3@v3.1.1/protocol/grpc/internal/multiprotos/first.pb.go (about)

     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one or more
     3   * contributor license agreements.  See the NOTICE file distributed with
     4   * this work for additional information regarding copyright ownership.
     5   * The ASF licenses this file to You under the Apache License, Version 2.0
     6   * (the "License"); you may not use this file except in compliance with
     7   * the License.  You may obtain a copy of the License at
     8   *
     9   *     http://www.apache.org/licenses/LICENSE-2.0
    10   *
    11   * Unless required by applicable law or agreed to in writing, software
    12   * distributed under the License is distributed on an "AS IS" BASIS,
    13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14   * See the License for the specific language governing permissions and
    15   * limitations under the License.
    16   */
    17  
    18  // Code generated by protoc-gen-go. DO NOT EDIT.
    19  // source: first.proto
    20  
    21  package multiprotos
    22  
    23  import (
    24  	context "context"
    25  	fmt "fmt"
    26  	math "math"
    27  )
    28  
    29  import (
    30  	proto "github.com/golang/protobuf/proto"
    31  
    32  	grpc "google.golang.org/grpc"
    33  	codes "google.golang.org/grpc/codes"
    34  	status "google.golang.org/grpc/status"
    35  )
    36  
    37  import (
    38  	"dubbo.apache.org/dubbo-go/v3/protocol"
    39  	"dubbo.apache.org/dubbo-go/v3/protocol/invocation"
    40  )
    41  
    42  // Reference imports to suppress errors if they are not otherwise used.
    43  var _ = proto.Marshal
    44  var _ = fmt.Errorf
    45  var _ = math.Inf
    46  
    47  // This is a compile-time assertion to ensure that this generated file
    48  // is compatible with the proto package it is being compiled against.
    49  // A compilation error at this line likely means your copy of the
    50  // proto package needs to be updated.
    51  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    52  
    53  type FirstRequest struct {
    54  	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
    55  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    56  	XXX_unrecognized     []byte   `json:"-"`
    57  	XXX_sizecache        int32    `json:"-"`
    58  }
    59  
    60  func (m *FirstRequest) Reset()         { *m = FirstRequest{} }
    61  func (m *FirstRequest) String() string { return proto.CompactTextString(m) }
    62  func (*FirstRequest) ProtoMessage()    {}
    63  func (*FirstRequest) Descriptor() ([]byte, []int) {
    64  	return fileDescriptor_55120e8023d656fd, []int{0}
    65  }
    66  
    67  func (m *FirstRequest) XXX_Unmarshal(b []byte) error {
    68  	return xxx_messageInfo_FirstRequest.Unmarshal(m, b)
    69  }
    70  func (m *FirstRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    71  	return xxx_messageInfo_FirstRequest.Marshal(b, m, deterministic)
    72  }
    73  func (m *FirstRequest) XXX_Merge(src proto.Message) {
    74  	xxx_messageInfo_FirstRequest.Merge(m, src)
    75  }
    76  func (m *FirstRequest) XXX_Size() int {
    77  	return xxx_messageInfo_FirstRequest.Size(m)
    78  }
    79  func (m *FirstRequest) XXX_DiscardUnknown() {
    80  	xxx_messageInfo_FirstRequest.DiscardUnknown(m)
    81  }
    82  
    83  var xxx_messageInfo_FirstRequest proto.InternalMessageInfo
    84  
    85  func (m *FirstRequest) GetMessage() string {
    86  	if m != nil {
    87  		return m.Message
    88  	}
    89  	return ""
    90  }
    91  
    92  type FirstResponse struct {
    93  	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
    94  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    95  	XXX_unrecognized     []byte   `json:"-"`
    96  	XXX_sizecache        int32    `json:"-"`
    97  }
    98  
    99  func (m *FirstResponse) Reset()         { *m = FirstResponse{} }
   100  func (m *FirstResponse) String() string { return proto.CompactTextString(m) }
   101  func (*FirstResponse) ProtoMessage()    {}
   102  func (*FirstResponse) Descriptor() ([]byte, []int) {
   103  	return fileDescriptor_55120e8023d656fd, []int{1}
   104  }
   105  
   106  func (m *FirstResponse) XXX_Unmarshal(b []byte) error {
   107  	return xxx_messageInfo_FirstResponse.Unmarshal(m, b)
   108  }
   109  func (m *FirstResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   110  	return xxx_messageInfo_FirstResponse.Marshal(b, m, deterministic)
   111  }
   112  func (m *FirstResponse) XXX_Merge(src proto.Message) {
   113  	xxx_messageInfo_FirstResponse.Merge(m, src)
   114  }
   115  func (m *FirstResponse) XXX_Size() int {
   116  	return xxx_messageInfo_FirstResponse.Size(m)
   117  }
   118  func (m *FirstResponse) XXX_DiscardUnknown() {
   119  	xxx_messageInfo_FirstResponse.DiscardUnknown(m)
   120  }
   121  
   122  var xxx_messageInfo_FirstResponse proto.InternalMessageInfo
   123  
   124  func (m *FirstResponse) GetMessage() string {
   125  	if m != nil {
   126  		return m.Message
   127  	}
   128  	return ""
   129  }
   130  
   131  func init() {
   132  	proto.RegisterType((*FirstRequest)(nil), "multiprotos.FirstRequest")
   133  	proto.RegisterType((*FirstResponse)(nil), "multiprotos.FirstResponse")
   134  }
   135  
   136  func init() { proto.RegisterFile("first.proto", fileDescriptor_55120e8023d656fd) }
   137  
   138  var fileDescriptor_55120e8023d656fd = []byte{
   139  	// 137 bytes of a gzipped FileDescriptorProto
   140  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0xcb, 0x2c, 0x2a,
   141  	0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xce, 0x2d, 0xcd, 0x29, 0xc9, 0x04, 0xb3,
   142  	0x8b, 0x95, 0x34, 0xb8, 0x78, 0xdc, 0x40, 0x72, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x42,
   143  	0x12, 0x5c, 0xec, 0xb9, 0xa9, 0xc5, 0xc5, 0x89, 0xe9, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c,
   144  	0x41, 0x30, 0xae, 0x92, 0x26, 0x17, 0x2f, 0x54, 0x65, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0x2a, 0x6e,
   145  	0xa5, 0x46, 0x41, 0x5c, 0x3c, 0x6e, 0x45, 0x99, 0xc5, 0x25, 0xc1, 0xa9, 0x45, 0x65, 0x99, 0xc9,
   146  	0xa9, 0x42, 0x4e, 0x5c, 0xec, 0x30, 0xa6, 0xa4, 0x1e, 0x92, 0xed, 0x7a, 0xc8, 0x56, 0x4b, 0x49,
   147  	0x61, 0x93, 0x82, 0xd8, 0xa5, 0xc4, 0x90, 0xc4, 0x06, 0x16, 0x37, 0x06, 0x04, 0x00, 0x00, 0xff,
   148  	0xff, 0x83, 0xb7, 0xe6, 0xc5, 0xcb, 0x00, 0x00, 0x00,
   149  }
   150  
   151  // Reference imports to suppress errors if they are not otherwise used.
   152  var _ context.Context
   153  var _ grpc.ClientConnInterface
   154  
   155  // This is a compile-time assertion to ensure that this generated file
   156  // is compatible with the grpc package it is being compiled against.
   157  const _ = grpc.SupportPackageIsVersion6
   158  
   159  // FristServiceClient is the client API for FristService service.
   160  //
   161  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   162  type FristServiceClient interface {
   163  	Service(ctx context.Context, in *FirstRequest, opts ...grpc.CallOption) (*FirstResponse, error)
   164  }
   165  
   166  type fristServiceClient struct {
   167  	cc grpc.ClientConnInterface
   168  }
   169  
   170  func NewFristServiceClient(cc grpc.ClientConnInterface) FristServiceClient {
   171  	return &fristServiceClient{cc}
   172  }
   173  
   174  func (c *fristServiceClient) Service(ctx context.Context, in *FirstRequest, opts ...grpc.CallOption) (*FirstResponse, error) {
   175  	out := new(FirstResponse)
   176  	err := c.cc.Invoke(ctx, "/multiprotos.FristService/Service", in, out, opts...)
   177  	if err != nil {
   178  		return nil, err
   179  	}
   180  	return out, nil
   181  }
   182  
   183  // FristServiceServer is the server API for FristService service.
   184  type FristServiceServer interface {
   185  	Service(context.Context, *FirstRequest) (*FirstResponse, error)
   186  }
   187  
   188  // UnimplementedFristServiceServer can be embedded to have forward compatible implementations.
   189  type UnimplementedFristServiceServer struct {
   190  }
   191  
   192  func (*UnimplementedFristServiceServer) Service(ctx context.Context, req *FirstRequest) (*FirstResponse, error) {
   193  	return nil, status.Errorf(codes.Unimplemented, "method Service not implemented")
   194  }
   195  
   196  func RegisterFristServiceServer(s *grpc.Server, srv FristServiceServer) {
   197  	s.RegisterService(&_FristService_serviceDesc, srv)
   198  }
   199  
   200  func _FristService_Service_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   201  	in := new(FirstRequest)
   202  	if err := dec(in); err != nil {
   203  		return nil, err
   204  	}
   205  	if interceptor == nil {
   206  		return srv.(FristServiceServer).Service(ctx, in)
   207  	}
   208  	info := &grpc.UnaryServerInfo{
   209  		Server:     srv,
   210  		FullMethod: "/multiprotos.FristService/Service",
   211  	}
   212  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   213  		return srv.(FristServiceServer).Service(ctx, req.(*FirstRequest))
   214  	}
   215  	return interceptor(ctx, in, info, handler)
   216  }
   217  
   218  var _FristService_serviceDesc = grpc.ServiceDesc{
   219  	ServiceName: "multiprotos.FristService",
   220  	HandlerType: (*FristServiceServer)(nil),
   221  	Methods: []grpc.MethodDesc{
   222  		{
   223  			MethodName: "Service",
   224  			Handler:    _FristService_Service_Handler,
   225  		},
   226  	},
   227  	Streams:  []grpc.StreamDesc{},
   228  	Metadata: "first.proto",
   229  }
   230  
   231  // FristServiceClientImpl is the client API for FristService service.
   232  //
   233  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   234  type FristServiceClientImpl struct {
   235  	Service func(ctx context.Context, in *FirstRequest, out *FirstResponse) error
   236  }
   237  
   238  func (c *FristServiceClientImpl) Reference() string {
   239  	return "fristServiceImpl"
   240  }
   241  
   242  func (c *FristServiceClientImpl) GetDubboStub(cc *grpc.ClientConn) FristServiceClient {
   243  	return NewFristServiceClient(cc)
   244  }
   245  
   246  type FristServiceProviderBase struct {
   247  	proxyImpl protocol.Invoker
   248  }
   249  
   250  func (s *FristServiceProviderBase) SetProxyImpl(impl protocol.Invoker) {
   251  	s.proxyImpl = impl
   252  }
   253  
   254  func (s *FristServiceProviderBase) GetProxyImpl() protocol.Invoker {
   255  	return s.proxyImpl
   256  }
   257  
   258  func (c *FristServiceProviderBase) Reference() string {
   259  	return "fristServiceImpl"
   260  }
   261  
   262  func _DUBBO_FristService_Service_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   263  	in := new(FirstRequest)
   264  	if err := dec(in); err != nil {
   265  		return nil, err
   266  	}
   267  	// DubboGrpcService is gRPC service
   268  	type DubboGrpcService interface {
   269  		// SetProxyImpl sets proxy.
   270  		SetProxyImpl(impl protocol.Invoker)
   271  		// GetProxyImpl gets proxy.
   272  		GetProxyImpl() protocol.Invoker
   273  		// ServiceDesc gets an RPC service's specification.
   274  		ServiceDesc() *grpc.ServiceDesc
   275  	}
   276  	base := srv.(DubboGrpcService)
   277  	args := []interface{}{}
   278  	args = append(args, in)
   279  	invo := invocation.NewRPCInvocation("Service", args, nil)
   280  	if interceptor == nil {
   281  		result := base.GetProxyImpl().Invoke(ctx, invo)
   282  		return result.Result(), result.Error()
   283  	}
   284  	info := &grpc.UnaryServerInfo{
   285  		Server:     srv,
   286  		FullMethod: "/multiprotos.FristService/Service",
   287  	}
   288  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   289  		result := base.GetProxyImpl().Invoke(ctx, invo)
   290  		return result.Result(), result.Error()
   291  	}
   292  	return interceptor(ctx, in, info, handler)
   293  }
   294  
   295  func (s *FristServiceProviderBase) ServiceDesc() *grpc.ServiceDesc {
   296  	return &grpc.ServiceDesc{
   297  		ServiceName: "multiprotos.FristService",
   298  		HandlerType: (*FristServiceServer)(nil),
   299  		Methods: []grpc.MethodDesc{
   300  			{
   301  				MethodName: "Service",
   302  				Handler:    _DUBBO_FristService_Service_Handler,
   303  			},
   304  		},
   305  		Streams:  []grpc.StreamDesc{},
   306  		Metadata: "first.proto",
   307  	}
   308  }