mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 13:10:24 +08:00 
			
		
		
		
	
		
			
	
	
		
			110 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			110 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
							 | 
						||
| 
								 | 
							
								// versions:
							 | 
						||
| 
								 | 
							
								// - protoc-gen-go-grpc v1.3.0
							 | 
						||
| 
								 | 
							
								// - protoc             v3.19.4
							 | 
						||
| 
								 | 
							
								// source: service_price.proto
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								package pb
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import (
							 | 
						||
| 
								 | 
							
									context "context"
							 | 
						||
| 
								 | 
							
									grpc "google.golang.org/grpc"
							 | 
						||
| 
								 | 
							
									codes "google.golang.org/grpc/codes"
							 | 
						||
| 
								 | 
							
									status "google.golang.org/grpc/status"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// This is a compile-time assertion to ensure that this generated file
							 | 
						||
| 
								 | 
							
								// is compatible with the grpc package it is being compiled against.
							 | 
						||
| 
								 | 
							
								// Requires gRPC-Go v1.32.0 or later.
							 | 
						||
| 
								 | 
							
								const _ = grpc.SupportPackageIsVersion7
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								const (
							 | 
						||
| 
								 | 
							
									PriceService_CalculatePrice_FullMethodName = "/pb.PriceService/calculatePrice"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// PriceServiceClient is the client API for PriceService 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 PriceServiceClient interface {
							 | 
						||
| 
								 | 
							
									// 计算费用
							 | 
						||
| 
								 | 
							
									CalculatePrice(ctx context.Context, in *CalculatePriceRequest, opts ...grpc.CallOption) (*CalculatePriceResponse, error)
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								type priceServiceClient struct {
							 | 
						||
| 
								 | 
							
									cc grpc.ClientConnInterface
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func NewPriceServiceClient(cc grpc.ClientConnInterface) PriceServiceClient {
							 | 
						||
| 
								 | 
							
									return &priceServiceClient{cc}
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func (c *priceServiceClient) CalculatePrice(ctx context.Context, in *CalculatePriceRequest, opts ...grpc.CallOption) (*CalculatePriceResponse, error) {
							 | 
						||
| 
								 | 
							
									out := new(CalculatePriceResponse)
							 | 
						||
| 
								 | 
							
									err := c.cc.Invoke(ctx, PriceService_CalculatePrice_FullMethodName, in, out, opts...)
							 | 
						||
| 
								 | 
							
									if err != nil {
							 | 
						||
| 
								 | 
							
										return nil, err
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
									return out, nil
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// PriceServiceServer is the server API for PriceService service.
							 | 
						||
| 
								 | 
							
								// All implementations should embed UnimplementedPriceServiceServer
							 | 
						||
| 
								 | 
							
								// for forward compatibility
							 | 
						||
| 
								 | 
							
								type PriceServiceServer interface {
							 | 
						||
| 
								 | 
							
									// 计算费用
							 | 
						||
| 
								 | 
							
									CalculatePrice(context.Context, *CalculatePriceRequest) (*CalculatePriceResponse, error)
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// UnimplementedPriceServiceServer should be embedded to have forward compatible implementations.
							 | 
						||
| 
								 | 
							
								type UnimplementedPriceServiceServer struct {
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func (UnimplementedPriceServiceServer) CalculatePrice(context.Context, *CalculatePriceRequest) (*CalculatePriceResponse, error) {
							 | 
						||
| 
								 | 
							
									return nil, status.Errorf(codes.Unimplemented, "method CalculatePrice not implemented")
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// UnsafePriceServiceServer may be embedded to opt out of forward compatibility for this service.
							 | 
						||
| 
								 | 
							
								// Use of this interface is not recommended, as added methods to PriceServiceServer will
							 | 
						||
| 
								 | 
							
								// result in compilation errors.
							 | 
						||
| 
								 | 
							
								type UnsafePriceServiceServer interface {
							 | 
						||
| 
								 | 
							
									mustEmbedUnimplementedPriceServiceServer()
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func RegisterPriceServiceServer(s grpc.ServiceRegistrar, srv PriceServiceServer) {
							 | 
						||
| 
								 | 
							
									s.RegisterService(&PriceService_ServiceDesc, srv)
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func _PriceService_CalculatePrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
							 | 
						||
| 
								 | 
							
									in := new(CalculatePriceRequest)
							 | 
						||
| 
								 | 
							
									if err := dec(in); err != nil {
							 | 
						||
| 
								 | 
							
										return nil, err
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
									if interceptor == nil {
							 | 
						||
| 
								 | 
							
										return srv.(PriceServiceServer).CalculatePrice(ctx, in)
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
									info := &grpc.UnaryServerInfo{
							 | 
						||
| 
								 | 
							
										Server:     srv,
							 | 
						||
| 
								 | 
							
										FullMethod: PriceService_CalculatePrice_FullMethodName,
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
									handler := func(ctx context.Context, req interface{}) (interface{}, error) {
							 | 
						||
| 
								 | 
							
										return srv.(PriceServiceServer).CalculatePrice(ctx, req.(*CalculatePriceRequest))
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
									return interceptor(ctx, in, info, handler)
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// PriceService_ServiceDesc is the grpc.ServiceDesc for PriceService service.
							 | 
						||
| 
								 | 
							
								// It's only intended for direct use with grpc.RegisterService,
							 | 
						||
| 
								 | 
							
								// and not to be introspected or modified (even as a copy)
							 | 
						||
| 
								 | 
							
								var PriceService_ServiceDesc = grpc.ServiceDesc{
							 | 
						||
| 
								 | 
							
									ServiceName: "pb.PriceService",
							 | 
						||
| 
								 | 
							
									HandlerType: (*PriceServiceServer)(nil),
							 | 
						||
| 
								 | 
							
									Methods: []grpc.MethodDesc{
							 | 
						||
| 
								 | 
							
										{
							 | 
						||
| 
								 | 
							
											MethodName: "calculatePrice",
							 | 
						||
| 
								 | 
							
											Handler:    _PriceService_CalculatePrice_Handler,
							 | 
						||
| 
								 | 
							
										},
							 | 
						||
| 
								 | 
							
									},
							 | 
						||
| 
								 | 
							
									Streams:  []grpc.StreamDesc{},
							 | 
						||
| 
								 | 
							
									Metadata: "service_price.proto",
							 | 
						||
| 
								 | 
							
								}
							 |