// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v3.6.1 // source: demo.proto package oteldemo 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 ( CartService_AddItem_FullMethodName = "/oteldemo.CartService/AddItem" CartService_GetCart_FullMethodName = "/oteldemo.CartService/GetCart" CartService_EmptyCart_FullMethodName = "/oteldemo.CartService/EmptyCart" ) // CartServiceClient is the client API for CartService 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 CartServiceClient interface { AddItem(ctx context.Context, in *AddItemRequest, opts ...grpc.CallOption) (*Empty, error) GetCart(ctx context.Context, in *GetCartRequest, opts ...grpc.CallOption) (*Cart, error) EmptyCart(ctx context.Context, in *EmptyCartRequest, opts ...grpc.CallOption) (*Empty, error) } type cartServiceClient struct { cc grpc.ClientConnInterface } func NewCartServiceClient(cc grpc.ClientConnInterface) CartServiceClient { return &cartServiceClient{cc} } func (c *cartServiceClient) AddItem(ctx context.Context, in *AddItemRequest, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, CartService_AddItem_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *cartServiceClient) GetCart(ctx context.Context, in *GetCartRequest, opts ...grpc.CallOption) (*Cart, error) { out := new(Cart) err := c.cc.Invoke(ctx, CartService_GetCart_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *cartServiceClient) EmptyCart(ctx context.Context, in *EmptyCartRequest, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, CartService_EmptyCart_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // CartServiceServer is the server API for CartService service. // All implementations must embed UnimplementedCartServiceServer // for forward compatibility type CartServiceServer interface { AddItem(context.Context, *AddItemRequest) (*Empty, error) GetCart(context.Context, *GetCartRequest) (*Cart, error) EmptyCart(context.Context, *EmptyCartRequest) (*Empty, error) mustEmbedUnimplementedCartServiceServer() } // UnimplementedCartServiceServer must be embedded to have forward compatible implementations. type UnimplementedCartServiceServer struct { } func (UnimplementedCartServiceServer) AddItem(context.Context, *AddItemRequest) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method AddItem not implemented") } func (UnimplementedCartServiceServer) GetCart(context.Context, *GetCartRequest) (*Cart, error) { return nil, status.Errorf(codes.Unimplemented, "method GetCart not implemented") } func (UnimplementedCartServiceServer) EmptyCart(context.Context, *EmptyCartRequest) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method EmptyCart not implemented") } func (UnimplementedCartServiceServer) mustEmbedUnimplementedCartServiceServer() {} // UnsafeCartServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CartServiceServer will // result in compilation errors. type UnsafeCartServiceServer interface { mustEmbedUnimplementedCartServiceServer() } func RegisterCartServiceServer(s grpc.ServiceRegistrar, srv CartServiceServer) { s.RegisterService(&CartService_ServiceDesc, srv) } func _CartService_AddItem_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AddItemRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CartServiceServer).AddItem(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CartService_AddItem_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CartServiceServer).AddItem(ctx, req.(*AddItemRequest)) } return interceptor(ctx, in, info, handler) } func _CartService_GetCart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetCartRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CartServiceServer).GetCart(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CartService_GetCart_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CartServiceServer).GetCart(ctx, req.(*GetCartRequest)) } return interceptor(ctx, in, info, handler) } func _CartService_EmptyCart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(EmptyCartRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CartServiceServer).EmptyCart(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CartService_EmptyCart_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CartServiceServer).EmptyCart(ctx, req.(*EmptyCartRequest)) } return interceptor(ctx, in, info, handler) } // CartService_ServiceDesc is the grpc.ServiceDesc for CartService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var CartService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "oteldemo.CartService", HandlerType: (*CartServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddItem", Handler: _CartService_AddItem_Handler, }, { MethodName: "GetCart", Handler: _CartService_GetCart_Handler, }, { MethodName: "EmptyCart", Handler: _CartService_EmptyCart_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", } const ( RecommendationService_ListRecommendations_FullMethodName = "/oteldemo.RecommendationService/ListRecommendations" ) // RecommendationServiceClient is the client API for RecommendationService 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 RecommendationServiceClient interface { ListRecommendations(ctx context.Context, in *ListRecommendationsRequest, opts ...grpc.CallOption) (*ListRecommendationsResponse, error) } type recommendationServiceClient struct { cc grpc.ClientConnInterface } func NewRecommendationServiceClient(cc grpc.ClientConnInterface) RecommendationServiceClient { return &recommendationServiceClient{cc} } func (c *recommendationServiceClient) ListRecommendations(ctx context.Context, in *ListRecommendationsRequest, opts ...grpc.CallOption) (*ListRecommendationsResponse, error) { out := new(ListRecommendationsResponse) err := c.cc.Invoke(ctx, RecommendationService_ListRecommendations_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // RecommendationServiceServer is the server API for RecommendationService service. // All implementations must embed UnimplementedRecommendationServiceServer // for forward compatibility type RecommendationServiceServer interface { ListRecommendations(context.Context, *ListRecommendationsRequest) (*ListRecommendationsResponse, error) mustEmbedUnimplementedRecommendationServiceServer() } // UnimplementedRecommendationServiceServer must be embedded to have forward compatible implementations. type UnimplementedRecommendationServiceServer struct { } func (UnimplementedRecommendationServiceServer) ListRecommendations(context.Context, *ListRecommendationsRequest) (*ListRecommendationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRecommendations not implemented") } func (UnimplementedRecommendationServiceServer) mustEmbedUnimplementedRecommendationServiceServer() {} // UnsafeRecommendationServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RecommendationServiceServer will // result in compilation errors. type UnsafeRecommendationServiceServer interface { mustEmbedUnimplementedRecommendationServiceServer() } func RegisterRecommendationServiceServer(s grpc.ServiceRegistrar, srv RecommendationServiceServer) { s.RegisterService(&RecommendationService_ServiceDesc, srv) } func _RecommendationService_ListRecommendations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListRecommendationsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RecommendationServiceServer).ListRecommendations(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: RecommendationService_ListRecommendations_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RecommendationServiceServer).ListRecommendations(ctx, req.(*ListRecommendationsRequest)) } return interceptor(ctx, in, info, handler) } // RecommendationService_ServiceDesc is the grpc.ServiceDesc for RecommendationService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var RecommendationService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "oteldemo.RecommendationService", HandlerType: (*RecommendationServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListRecommendations", Handler: _RecommendationService_ListRecommendations_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", } const ( ProductCatalogService_ListProducts_FullMethodName = "/oteldemo.ProductCatalogService/ListProducts" ProductCatalogService_GetProduct_FullMethodName = "/oteldemo.ProductCatalogService/GetProduct" ProductCatalogService_SearchProducts_FullMethodName = "/oteldemo.ProductCatalogService/SearchProducts" ) // ProductCatalogServiceClient is the client API for ProductCatalogService 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 ProductCatalogServiceClient interface { ListProducts(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListProductsResponse, error) GetProduct(ctx context.Context, in *GetProductRequest, opts ...grpc.CallOption) (*Product, error) SearchProducts(ctx context.Context, in *SearchProductsRequest, opts ...grpc.CallOption) (*SearchProductsResponse, error) } type productCatalogServiceClient struct { cc grpc.ClientConnInterface } func NewProductCatalogServiceClient(cc grpc.ClientConnInterface) ProductCatalogServiceClient { return &productCatalogServiceClient{cc} } func (c *productCatalogServiceClient) ListProducts(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListProductsResponse, error) { out := new(ListProductsResponse) err := c.cc.Invoke(ctx, ProductCatalogService_ListProducts_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *productCatalogServiceClient) GetProduct(ctx context.Context, in *GetProductRequest, opts ...grpc.CallOption) (*Product, error) { out := new(Product) err := c.cc.Invoke(ctx, ProductCatalogService_GetProduct_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *productCatalogServiceClient) SearchProducts(ctx context.Context, in *SearchProductsRequest, opts ...grpc.CallOption) (*SearchProductsResponse, error) { out := new(SearchProductsResponse) err := c.cc.Invoke(ctx, ProductCatalogService_SearchProducts_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // ProductCatalogServiceServer is the server API for ProductCatalogService service. // All implementations must embed UnimplementedProductCatalogServiceServer // for forward compatibility type ProductCatalogServiceServer interface { ListProducts(context.Context, *Empty) (*ListProductsResponse, error) GetProduct(context.Context, *GetProductRequest) (*Product, error) SearchProducts(context.Context, *SearchProductsRequest) (*SearchProductsResponse, error) mustEmbedUnimplementedProductCatalogServiceServer() } // UnimplementedProductCatalogServiceServer must be embedded to have forward compatible implementations. type UnimplementedProductCatalogServiceServer struct { } func (UnimplementedProductCatalogServiceServer) ListProducts(context.Context, *Empty) (*ListProductsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListProducts not implemented") } func (UnimplementedProductCatalogServiceServer) GetProduct(context.Context, *GetProductRequest) (*Product, error) { return nil, status.Errorf(codes.Unimplemented, "method GetProduct not implemented") } func (UnimplementedProductCatalogServiceServer) SearchProducts(context.Context, *SearchProductsRequest) (*SearchProductsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchProducts not implemented") } func (UnimplementedProductCatalogServiceServer) mustEmbedUnimplementedProductCatalogServiceServer() {} // UnsafeProductCatalogServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ProductCatalogServiceServer will // result in compilation errors. type UnsafeProductCatalogServiceServer interface { mustEmbedUnimplementedProductCatalogServiceServer() } func RegisterProductCatalogServiceServer(s grpc.ServiceRegistrar, srv ProductCatalogServiceServer) { s.RegisterService(&ProductCatalogService_ServiceDesc, srv) } func _ProductCatalogService_ListProducts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProductCatalogServiceServer).ListProducts(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ProductCatalogService_ListProducts_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProductCatalogServiceServer).ListProducts(ctx, req.(*Empty)) } return interceptor(ctx, in, info, handler) } func _ProductCatalogService_GetProduct_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetProductRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProductCatalogServiceServer).GetProduct(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ProductCatalogService_GetProduct_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProductCatalogServiceServer).GetProduct(ctx, req.(*GetProductRequest)) } return interceptor(ctx, in, info, handler) } func _ProductCatalogService_SearchProducts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SearchProductsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProductCatalogServiceServer).SearchProducts(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ProductCatalogService_SearchProducts_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProductCatalogServiceServer).SearchProducts(ctx, req.(*SearchProductsRequest)) } return interceptor(ctx, in, info, handler) } // ProductCatalogService_ServiceDesc is the grpc.ServiceDesc for ProductCatalogService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ProductCatalogService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "oteldemo.ProductCatalogService", HandlerType: (*ProductCatalogServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListProducts", Handler: _ProductCatalogService_ListProducts_Handler, }, { MethodName: "GetProduct", Handler: _ProductCatalogService_GetProduct_Handler, }, { MethodName: "SearchProducts", Handler: _ProductCatalogService_SearchProducts_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", } const ( ShippingService_GetQuote_FullMethodName = "/oteldemo.ShippingService/GetQuote" ShippingService_ShipOrder_FullMethodName = "/oteldemo.ShippingService/ShipOrder" ) // ShippingServiceClient is the client API for ShippingService 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 ShippingServiceClient interface { GetQuote(ctx context.Context, in *GetQuoteRequest, opts ...grpc.CallOption) (*GetQuoteResponse, error) ShipOrder(ctx context.Context, in *ShipOrderRequest, opts ...grpc.CallOption) (*ShipOrderResponse, error) } type shippingServiceClient struct { cc grpc.ClientConnInterface } func NewShippingServiceClient(cc grpc.ClientConnInterface) ShippingServiceClient { return &shippingServiceClient{cc} } func (c *shippingServiceClient) GetQuote(ctx context.Context, in *GetQuoteRequest, opts ...grpc.CallOption) (*GetQuoteResponse, error) { out := new(GetQuoteResponse) err := c.cc.Invoke(ctx, ShippingService_GetQuote_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shippingServiceClient) ShipOrder(ctx context.Context, in *ShipOrderRequest, opts ...grpc.CallOption) (*ShipOrderResponse, error) { out := new(ShipOrderResponse) err := c.cc.Invoke(ctx, ShippingService_ShipOrder_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // ShippingServiceServer is the server API for ShippingService service. // All implementations must embed UnimplementedShippingServiceServer // for forward compatibility type ShippingServiceServer interface { GetQuote(context.Context, *GetQuoteRequest) (*GetQuoteResponse, error) ShipOrder(context.Context, *ShipOrderRequest) (*ShipOrderResponse, error) mustEmbedUnimplementedShippingServiceServer() } // UnimplementedShippingServiceServer must be embedded to have forward compatible implementations. type UnimplementedShippingServiceServer struct { } func (UnimplementedShippingServiceServer) GetQuote(context.Context, *GetQuoteRequest) (*GetQuoteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetQuote not implemented") } func (UnimplementedShippingServiceServer) ShipOrder(context.Context, *ShipOrderRequest) (*ShipOrderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ShipOrder not implemented") } func (UnimplementedShippingServiceServer) mustEmbedUnimplementedShippingServiceServer() {} // UnsafeShippingServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ShippingServiceServer will // result in compilation errors. type UnsafeShippingServiceServer interface { mustEmbedUnimplementedShippingServiceServer() } func RegisterShippingServiceServer(s grpc.ServiceRegistrar, srv ShippingServiceServer) { s.RegisterService(&ShippingService_ServiceDesc, srv) } func _ShippingService_GetQuote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetQuoteRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ShippingServiceServer).GetQuote(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ShippingService_GetQuote_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShippingServiceServer).GetQuote(ctx, req.(*GetQuoteRequest)) } return interceptor(ctx, in, info, handler) } func _ShippingService_ShipOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ShipOrderRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ShippingServiceServer).ShipOrder(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ShippingService_ShipOrder_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShippingServiceServer).ShipOrder(ctx, req.(*ShipOrderRequest)) } return interceptor(ctx, in, info, handler) } // ShippingService_ServiceDesc is the grpc.ServiceDesc for ShippingService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ShippingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "oteldemo.ShippingService", HandlerType: (*ShippingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetQuote", Handler: _ShippingService_GetQuote_Handler, }, { MethodName: "ShipOrder", Handler: _ShippingService_ShipOrder_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", } const ( CurrencyService_GetSupportedCurrencies_FullMethodName = "/oteldemo.CurrencyService/GetSupportedCurrencies" CurrencyService_Convert_FullMethodName = "/oteldemo.CurrencyService/Convert" ) // CurrencyServiceClient is the client API for CurrencyService 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 CurrencyServiceClient interface { GetSupportedCurrencies(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetSupportedCurrenciesResponse, error) Convert(ctx context.Context, in *CurrencyConversionRequest, opts ...grpc.CallOption) (*Money, error) } type currencyServiceClient struct { cc grpc.ClientConnInterface } func NewCurrencyServiceClient(cc grpc.ClientConnInterface) CurrencyServiceClient { return ¤cyServiceClient{cc} } func (c *currencyServiceClient) GetSupportedCurrencies(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetSupportedCurrenciesResponse, error) { out := new(GetSupportedCurrenciesResponse) err := c.cc.Invoke(ctx, CurrencyService_GetSupportedCurrencies_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *currencyServiceClient) Convert(ctx context.Context, in *CurrencyConversionRequest, opts ...grpc.CallOption) (*Money, error) { out := new(Money) err := c.cc.Invoke(ctx, CurrencyService_Convert_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // CurrencyServiceServer is the server API for CurrencyService service. // All implementations must embed UnimplementedCurrencyServiceServer // for forward compatibility type CurrencyServiceServer interface { GetSupportedCurrencies(context.Context, *Empty) (*GetSupportedCurrenciesResponse, error) Convert(context.Context, *CurrencyConversionRequest) (*Money, error) mustEmbedUnimplementedCurrencyServiceServer() } // UnimplementedCurrencyServiceServer must be embedded to have forward compatible implementations. type UnimplementedCurrencyServiceServer struct { } func (UnimplementedCurrencyServiceServer) GetSupportedCurrencies(context.Context, *Empty) (*GetSupportedCurrenciesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSupportedCurrencies not implemented") } func (UnimplementedCurrencyServiceServer) Convert(context.Context, *CurrencyConversionRequest) (*Money, error) { return nil, status.Errorf(codes.Unimplemented, "method Convert not implemented") } func (UnimplementedCurrencyServiceServer) mustEmbedUnimplementedCurrencyServiceServer() {} // UnsafeCurrencyServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CurrencyServiceServer will // result in compilation errors. type UnsafeCurrencyServiceServer interface { mustEmbedUnimplementedCurrencyServiceServer() } func RegisterCurrencyServiceServer(s grpc.ServiceRegistrar, srv CurrencyServiceServer) { s.RegisterService(&CurrencyService_ServiceDesc, srv) } func _CurrencyService_GetSupportedCurrencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CurrencyServiceServer).GetSupportedCurrencies(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CurrencyService_GetSupportedCurrencies_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CurrencyServiceServer).GetSupportedCurrencies(ctx, req.(*Empty)) } return interceptor(ctx, in, info, handler) } func _CurrencyService_Convert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CurrencyConversionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CurrencyServiceServer).Convert(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CurrencyService_Convert_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CurrencyServiceServer).Convert(ctx, req.(*CurrencyConversionRequest)) } return interceptor(ctx, in, info, handler) } // CurrencyService_ServiceDesc is the grpc.ServiceDesc for CurrencyService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var CurrencyService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "oteldemo.CurrencyService", HandlerType: (*CurrencyServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetSupportedCurrencies", Handler: _CurrencyService_GetSupportedCurrencies_Handler, }, { MethodName: "Convert", Handler: _CurrencyService_Convert_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", } const ( PaymentService_Charge_FullMethodName = "/oteldemo.PaymentService/Charge" ) // PaymentServiceClient is the client API for PaymentService 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 PaymentServiceClient interface { Charge(ctx context.Context, in *ChargeRequest, opts ...grpc.CallOption) (*ChargeResponse, error) } type paymentServiceClient struct { cc grpc.ClientConnInterface } func NewPaymentServiceClient(cc grpc.ClientConnInterface) PaymentServiceClient { return &paymentServiceClient{cc} } func (c *paymentServiceClient) Charge(ctx context.Context, in *ChargeRequest, opts ...grpc.CallOption) (*ChargeResponse, error) { out := new(ChargeResponse) err := c.cc.Invoke(ctx, PaymentService_Charge_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // PaymentServiceServer is the server API for PaymentService service. // All implementations must embed UnimplementedPaymentServiceServer // for forward compatibility type PaymentServiceServer interface { Charge(context.Context, *ChargeRequest) (*ChargeResponse, error) mustEmbedUnimplementedPaymentServiceServer() } // UnimplementedPaymentServiceServer must be embedded to have forward compatible implementations. type UnimplementedPaymentServiceServer struct { } func (UnimplementedPaymentServiceServer) Charge(context.Context, *ChargeRequest) (*ChargeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Charge not implemented") } func (UnimplementedPaymentServiceServer) mustEmbedUnimplementedPaymentServiceServer() {} // UnsafePaymentServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PaymentServiceServer will // result in compilation errors. type UnsafePaymentServiceServer interface { mustEmbedUnimplementedPaymentServiceServer() } func RegisterPaymentServiceServer(s grpc.ServiceRegistrar, srv PaymentServiceServer) { s.RegisterService(&PaymentService_ServiceDesc, srv) } func _PaymentService_Charge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ChargeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PaymentServiceServer).Charge(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PaymentService_Charge_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PaymentServiceServer).Charge(ctx, req.(*ChargeRequest)) } return interceptor(ctx, in, info, handler) } // PaymentService_ServiceDesc is the grpc.ServiceDesc for PaymentService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var PaymentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "oteldemo.PaymentService", HandlerType: (*PaymentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Charge", Handler: _PaymentService_Charge_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", } const ( EmailService_SendOrderConfirmation_FullMethodName = "/oteldemo.EmailService/SendOrderConfirmation" ) // EmailServiceClient is the client API for EmailService 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 EmailServiceClient interface { SendOrderConfirmation(ctx context.Context, in *SendOrderConfirmationRequest, opts ...grpc.CallOption) (*Empty, error) } type emailServiceClient struct { cc grpc.ClientConnInterface } func NewEmailServiceClient(cc grpc.ClientConnInterface) EmailServiceClient { return &emailServiceClient{cc} } func (c *emailServiceClient) SendOrderConfirmation(ctx context.Context, in *SendOrderConfirmationRequest, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, EmailService_SendOrderConfirmation_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // EmailServiceServer is the server API for EmailService service. // All implementations must embed UnimplementedEmailServiceServer // for forward compatibility type EmailServiceServer interface { SendOrderConfirmation(context.Context, *SendOrderConfirmationRequest) (*Empty, error) mustEmbedUnimplementedEmailServiceServer() } // UnimplementedEmailServiceServer must be embedded to have forward compatible implementations. type UnimplementedEmailServiceServer struct { } func (UnimplementedEmailServiceServer) SendOrderConfirmation(context.Context, *SendOrderConfirmationRequest) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method SendOrderConfirmation not implemented") } func (UnimplementedEmailServiceServer) mustEmbedUnimplementedEmailServiceServer() {} // UnsafeEmailServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to EmailServiceServer will // result in compilation errors. type UnsafeEmailServiceServer interface { mustEmbedUnimplementedEmailServiceServer() } func RegisterEmailServiceServer(s grpc.ServiceRegistrar, srv EmailServiceServer) { s.RegisterService(&EmailService_ServiceDesc, srv) } func _EmailService_SendOrderConfirmation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SendOrderConfirmationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(EmailServiceServer).SendOrderConfirmation(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: EmailService_SendOrderConfirmation_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EmailServiceServer).SendOrderConfirmation(ctx, req.(*SendOrderConfirmationRequest)) } return interceptor(ctx, in, info, handler) } // EmailService_ServiceDesc is the grpc.ServiceDesc for EmailService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var EmailService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "oteldemo.EmailService", HandlerType: (*EmailServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendOrderConfirmation", Handler: _EmailService_SendOrderConfirmation_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", } const ( CheckoutService_PlaceOrder_FullMethodName = "/oteldemo.CheckoutService/PlaceOrder" ) // CheckoutServiceClient is the client API for CheckoutService 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 CheckoutServiceClient interface { PlaceOrder(ctx context.Context, in *PlaceOrderRequest, opts ...grpc.CallOption) (*PlaceOrderResponse, error) } type checkoutServiceClient struct { cc grpc.ClientConnInterface } func NewCheckoutServiceClient(cc grpc.ClientConnInterface) CheckoutServiceClient { return &checkoutServiceClient{cc} } func (c *checkoutServiceClient) PlaceOrder(ctx context.Context, in *PlaceOrderRequest, opts ...grpc.CallOption) (*PlaceOrderResponse, error) { out := new(PlaceOrderResponse) err := c.cc.Invoke(ctx, CheckoutService_PlaceOrder_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // CheckoutServiceServer is the server API for CheckoutService service. // All implementations must embed UnimplementedCheckoutServiceServer // for forward compatibility type CheckoutServiceServer interface { PlaceOrder(context.Context, *PlaceOrderRequest) (*PlaceOrderResponse, error) mustEmbedUnimplementedCheckoutServiceServer() } // UnimplementedCheckoutServiceServer must be embedded to have forward compatible implementations. type UnimplementedCheckoutServiceServer struct { } func (UnimplementedCheckoutServiceServer) PlaceOrder(context.Context, *PlaceOrderRequest) (*PlaceOrderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PlaceOrder not implemented") } func (UnimplementedCheckoutServiceServer) mustEmbedUnimplementedCheckoutServiceServer() {} // UnsafeCheckoutServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CheckoutServiceServer will // result in compilation errors. type UnsafeCheckoutServiceServer interface { mustEmbedUnimplementedCheckoutServiceServer() } func RegisterCheckoutServiceServer(s grpc.ServiceRegistrar, srv CheckoutServiceServer) { s.RegisterService(&CheckoutService_ServiceDesc, srv) } func _CheckoutService_PlaceOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PlaceOrderRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CheckoutServiceServer).PlaceOrder(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CheckoutService_PlaceOrder_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CheckoutServiceServer).PlaceOrder(ctx, req.(*PlaceOrderRequest)) } return interceptor(ctx, in, info, handler) } // CheckoutService_ServiceDesc is the grpc.ServiceDesc for CheckoutService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var CheckoutService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "oteldemo.CheckoutService", HandlerType: (*CheckoutServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PlaceOrder", Handler: _CheckoutService_PlaceOrder_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", } const ( AdService_GetAds_FullMethodName = "/oteldemo.AdService/GetAds" ) // AdServiceClient is the client API for AdService 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 AdServiceClient interface { GetAds(ctx context.Context, in *AdRequest, opts ...grpc.CallOption) (*AdResponse, error) } type adServiceClient struct { cc grpc.ClientConnInterface } func NewAdServiceClient(cc grpc.ClientConnInterface) AdServiceClient { return &adServiceClient{cc} } func (c *adServiceClient) GetAds(ctx context.Context, in *AdRequest, opts ...grpc.CallOption) (*AdResponse, error) { out := new(AdResponse) err := c.cc.Invoke(ctx, AdService_GetAds_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // AdServiceServer is the server API for AdService service. // All implementations must embed UnimplementedAdServiceServer // for forward compatibility type AdServiceServer interface { GetAds(context.Context, *AdRequest) (*AdResponse, error) mustEmbedUnimplementedAdServiceServer() } // UnimplementedAdServiceServer must be embedded to have forward compatible implementations. type UnimplementedAdServiceServer struct { } func (UnimplementedAdServiceServer) GetAds(context.Context, *AdRequest) (*AdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAds not implemented") } func (UnimplementedAdServiceServer) mustEmbedUnimplementedAdServiceServer() {} // UnsafeAdServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AdServiceServer will // result in compilation errors. type UnsafeAdServiceServer interface { mustEmbedUnimplementedAdServiceServer() } func RegisterAdServiceServer(s grpc.ServiceRegistrar, srv AdServiceServer) { s.RegisterService(&AdService_ServiceDesc, srv) } func _AdService_GetAds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AdRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdServiceServer).GetAds(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdService_GetAds_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdServiceServer).GetAds(ctx, req.(*AdRequest)) } return interceptor(ctx, in, info, handler) } // AdService_ServiceDesc is the grpc.ServiceDesc for AdService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var AdService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "oteldemo.AdService", HandlerType: (*AdServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAds", Handler: _AdService_GetAds_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", } const ( FeatureFlagService_GetFlag_FullMethodName = "/oteldemo.FeatureFlagService/GetFlag" FeatureFlagService_CreateFlag_FullMethodName = "/oteldemo.FeatureFlagService/CreateFlag" FeatureFlagService_UpdateFlag_FullMethodName = "/oteldemo.FeatureFlagService/UpdateFlag" FeatureFlagService_ListFlags_FullMethodName = "/oteldemo.FeatureFlagService/ListFlags" FeatureFlagService_DeleteFlag_FullMethodName = "/oteldemo.FeatureFlagService/DeleteFlag" ) // FeatureFlagServiceClient is the client API for FeatureFlagService 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 FeatureFlagServiceClient interface { GetFlag(ctx context.Context, in *GetFlagRequest, opts ...grpc.CallOption) (*GetFlagResponse, error) CreateFlag(ctx context.Context, in *CreateFlagRequest, opts ...grpc.CallOption) (*CreateFlagResponse, error) UpdateFlag(ctx context.Context, in *UpdateFlagRequest, opts ...grpc.CallOption) (*UpdateFlagResponse, error) ListFlags(ctx context.Context, in *ListFlagsRequest, opts ...grpc.CallOption) (*ListFlagsResponse, error) DeleteFlag(ctx context.Context, in *DeleteFlagRequest, opts ...grpc.CallOption) (*DeleteFlagResponse, error) } type featureFlagServiceClient struct { cc grpc.ClientConnInterface } func NewFeatureFlagServiceClient(cc grpc.ClientConnInterface) FeatureFlagServiceClient { return &featureFlagServiceClient{cc} } func (c *featureFlagServiceClient) GetFlag(ctx context.Context, in *GetFlagRequest, opts ...grpc.CallOption) (*GetFlagResponse, error) { out := new(GetFlagResponse) err := c.cc.Invoke(ctx, FeatureFlagService_GetFlag_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *featureFlagServiceClient) CreateFlag(ctx context.Context, in *CreateFlagRequest, opts ...grpc.CallOption) (*CreateFlagResponse, error) { out := new(CreateFlagResponse) err := c.cc.Invoke(ctx, FeatureFlagService_CreateFlag_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *featureFlagServiceClient) UpdateFlag(ctx context.Context, in *UpdateFlagRequest, opts ...grpc.CallOption) (*UpdateFlagResponse, error) { out := new(UpdateFlagResponse) err := c.cc.Invoke(ctx, FeatureFlagService_UpdateFlag_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *featureFlagServiceClient) ListFlags(ctx context.Context, in *ListFlagsRequest, opts ...grpc.CallOption) (*ListFlagsResponse, error) { out := new(ListFlagsResponse) err := c.cc.Invoke(ctx, FeatureFlagService_ListFlags_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *featureFlagServiceClient) DeleteFlag(ctx context.Context, in *DeleteFlagRequest, opts ...grpc.CallOption) (*DeleteFlagResponse, error) { out := new(DeleteFlagResponse) err := c.cc.Invoke(ctx, FeatureFlagService_DeleteFlag_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // FeatureFlagServiceServer is the server API for FeatureFlagService service. // All implementations must embed UnimplementedFeatureFlagServiceServer // for forward compatibility type FeatureFlagServiceServer interface { GetFlag(context.Context, *GetFlagRequest) (*GetFlagResponse, error) CreateFlag(context.Context, *CreateFlagRequest) (*CreateFlagResponse, error) UpdateFlag(context.Context, *UpdateFlagRequest) (*UpdateFlagResponse, error) ListFlags(context.Context, *ListFlagsRequest) (*ListFlagsResponse, error) DeleteFlag(context.Context, *DeleteFlagRequest) (*DeleteFlagResponse, error) mustEmbedUnimplementedFeatureFlagServiceServer() } // UnimplementedFeatureFlagServiceServer must be embedded to have forward compatible implementations. type UnimplementedFeatureFlagServiceServer struct { } func (UnimplementedFeatureFlagServiceServer) GetFlag(context.Context, *GetFlagRequest) (*GetFlagResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFlag not implemented") } func (UnimplementedFeatureFlagServiceServer) CreateFlag(context.Context, *CreateFlagRequest) (*CreateFlagResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateFlag not implemented") } func (UnimplementedFeatureFlagServiceServer) UpdateFlag(context.Context, *UpdateFlagRequest) (*UpdateFlagResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateFlag not implemented") } func (UnimplementedFeatureFlagServiceServer) ListFlags(context.Context, *ListFlagsRequest) (*ListFlagsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListFlags not implemented") } func (UnimplementedFeatureFlagServiceServer) DeleteFlag(context.Context, *DeleteFlagRequest) (*DeleteFlagResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteFlag not implemented") } func (UnimplementedFeatureFlagServiceServer) mustEmbedUnimplementedFeatureFlagServiceServer() {} // UnsafeFeatureFlagServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to FeatureFlagServiceServer will // result in compilation errors. type UnsafeFeatureFlagServiceServer interface { mustEmbedUnimplementedFeatureFlagServiceServer() } func RegisterFeatureFlagServiceServer(s grpc.ServiceRegistrar, srv FeatureFlagServiceServer) { s.RegisterService(&FeatureFlagService_ServiceDesc, srv) } func _FeatureFlagService_GetFlag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetFlagRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FeatureFlagServiceServer).GetFlag(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: FeatureFlagService_GetFlag_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FeatureFlagServiceServer).GetFlag(ctx, req.(*GetFlagRequest)) } return interceptor(ctx, in, info, handler) } func _FeatureFlagService_CreateFlag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateFlagRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FeatureFlagServiceServer).CreateFlag(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: FeatureFlagService_CreateFlag_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FeatureFlagServiceServer).CreateFlag(ctx, req.(*CreateFlagRequest)) } return interceptor(ctx, in, info, handler) } func _FeatureFlagService_UpdateFlag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateFlagRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FeatureFlagServiceServer).UpdateFlag(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: FeatureFlagService_UpdateFlag_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FeatureFlagServiceServer).UpdateFlag(ctx, req.(*UpdateFlagRequest)) } return interceptor(ctx, in, info, handler) } func _FeatureFlagService_ListFlags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListFlagsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FeatureFlagServiceServer).ListFlags(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: FeatureFlagService_ListFlags_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FeatureFlagServiceServer).ListFlags(ctx, req.(*ListFlagsRequest)) } return interceptor(ctx, in, info, handler) } func _FeatureFlagService_DeleteFlag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteFlagRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FeatureFlagServiceServer).DeleteFlag(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: FeatureFlagService_DeleteFlag_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FeatureFlagServiceServer).DeleteFlag(ctx, req.(*DeleteFlagRequest)) } return interceptor(ctx, in, info, handler) } // FeatureFlagService_ServiceDesc is the grpc.ServiceDesc for FeatureFlagService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var FeatureFlagService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "oteldemo.FeatureFlagService", HandlerType: (*FeatureFlagServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetFlag", Handler: _FeatureFlagService_GetFlag_Handler, }, { MethodName: "CreateFlag", Handler: _FeatureFlagService_CreateFlag_Handler, }, { MethodName: "UpdateFlag", Handler: _FeatureFlagService_UpdateFlag_Handler, }, { MethodName: "ListFlags", Handler: _FeatureFlagService_ListFlags_Handler, }, { MethodName: "DeleteFlag", Handler: _FeatureFlagService_DeleteFlag_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "demo.proto", }