Files
aperture/pricesrpc/prices_grpc.pb.go
Olaoluwa Osuntokun c396ca51b7 prices: rename proto file to prices.proto
This fixes a registration conflict with the set of etcd protos.
2023-06-13 20:43:18 -05:00

102 lines
3.3 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package pricesrpc
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
// PricesClient is the client API for Prices 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 PricesClient interface {
GetPrice(ctx context.Context, in *GetPriceRequest, opts ...grpc.CallOption) (*GetPriceResponse, error)
}
type pricesClient struct {
cc grpc.ClientConnInterface
}
func NewPricesClient(cc grpc.ClientConnInterface) PricesClient {
return &pricesClient{cc}
}
func (c *pricesClient) GetPrice(ctx context.Context, in *GetPriceRequest, opts ...grpc.CallOption) (*GetPriceResponse, error) {
out := new(GetPriceResponse)
err := c.cc.Invoke(ctx, "/pricesrpc.Prices/GetPrice", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PricesServer is the server API for Prices service.
// All implementations must embed UnimplementedPricesServer
// for forward compatibility
type PricesServer interface {
GetPrice(context.Context, *GetPriceRequest) (*GetPriceResponse, error)
mustEmbedUnimplementedPricesServer()
}
// UnimplementedPricesServer must be embedded to have forward compatible implementations.
type UnimplementedPricesServer struct {
}
func (UnimplementedPricesServer) GetPrice(context.Context, *GetPriceRequest) (*GetPriceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPrice not implemented")
}
func (UnimplementedPricesServer) mustEmbedUnimplementedPricesServer() {}
// UnsafePricesServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PricesServer will
// result in compilation errors.
type UnsafePricesServer interface {
mustEmbedUnimplementedPricesServer()
}
func RegisterPricesServer(s grpc.ServiceRegistrar, srv PricesServer) {
s.RegisterService(&Prices_ServiceDesc, srv)
}
func _Prices_GetPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPriceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PricesServer).GetPrice(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pricesrpc.Prices/GetPrice",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PricesServer).GetPrice(ctx, req.(*GetPriceRequest))
}
return interceptor(ctx, in, info, handler)
}
// Prices_ServiceDesc is the grpc.ServiceDesc for Prices service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Prices_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pricesrpc.Prices",
HandlerType: (*PricesServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPrice",
Handler: _Prices_GetPrice_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "prices.proto",
}