1.4.5.2
This commit is contained in:
125
EdgeCommon/pkg/rpc/pb/service_price_grpc.pb.go
Normal file
125
EdgeCommon/pkg/rpc/pb/service_price_grpc.pb.go
Normal file
@@ -0,0 +1,125 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v6.33.2
|
||||
// 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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
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) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CalculatePriceResponse)
|
||||
err := c.cc.Invoke(ctx, PriceService_CalculatePrice_FullMethodName, in, out, cOpts...)
|
||||
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.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedPriceServiceServer struct{}
|
||||
|
||||
func (UnimplementedPriceServiceServer) CalculatePrice(context.Context, *CalculatePriceRequest) (*CalculatePriceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CalculatePrice not implemented")
|
||||
}
|
||||
func (UnimplementedPriceServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// 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) {
|
||||
// If the following call pancis, it indicates UnimplementedPriceServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
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",
|
||||
}
|
||||
Reference in New Issue
Block a user