// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc (unknown) // source: shop/v1/shop.proto package shopv1 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 // ShopServiceClient is the client API for ShopService 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 ShopServiceClient interface { List(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) Add(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) Update(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) Delete(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) } type shopServiceClient struct { cc grpc.ClientConnInterface } func NewShopServiceClient(cc grpc.ClientConnInterface) ShopServiceClient { return &shopServiceClient{cc} } func (c *shopServiceClient) List(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) { out := new(Shop) err := c.cc.Invoke(ctx, "/shop.v1.ShopService/List", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shopServiceClient) Add(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) { out := new(Shop) err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Add", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shopServiceClient) Update(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) { out := new(Shop) err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Update", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shopServiceClient) Delete(ctx context.Context, in *Shop, opts ...grpc.CallOption) (*Shop, error) { out := new(Shop) err := c.cc.Invoke(ctx, "/shop.v1.ShopService/Delete", in, out, opts...) if err != nil { return nil, err } return out, nil } // ShopServiceServer is the server API for ShopService service. // All implementations should embed UnimplementedShopServiceServer // for forward compatibility type ShopServiceServer interface { List(context.Context, *Shop) (*Shop, error) Add(context.Context, *Shop) (*Shop, error) Update(context.Context, *Shop) (*Shop, error) Delete(context.Context, *Shop) (*Shop, error) } // UnimplementedShopServiceServer should be embedded to have forward compatible implementations. type UnimplementedShopServiceServer struct { } func (UnimplementedShopServiceServer) List(context.Context, *Shop) (*Shop, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } func (UnimplementedShopServiceServer) Add(context.Context, *Shop) (*Shop, error) { return nil, status.Errorf(codes.Unimplemented, "method Add not implemented") } func (UnimplementedShopServiceServer) Update(context.Context, *Shop) (*Shop, error) { return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") } func (UnimplementedShopServiceServer) Delete(context.Context, *Shop) (*Shop, error) { return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") } // UnsafeShopServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ShopServiceServer will // result in compilation errors. type UnsafeShopServiceServer interface { mustEmbedUnimplementedShopServiceServer() } func RegisterShopServiceServer(s grpc.ServiceRegistrar, srv ShopServiceServer) { s.RegisterService(&ShopService_ServiceDesc, srv) } func _ShopService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Shop) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ShopServiceServer).List(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/shop.v1.ShopService/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopServiceServer).List(ctx, req.(*Shop)) } return interceptor(ctx, in, info, handler) } func _ShopService_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Shop) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ShopServiceServer).Add(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/shop.v1.ShopService/Add", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopServiceServer).Add(ctx, req.(*Shop)) } return interceptor(ctx, in, info, handler) } func _ShopService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Shop) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ShopServiceServer).Update(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/shop.v1.ShopService/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopServiceServer).Update(ctx, req.(*Shop)) } return interceptor(ctx, in, info, handler) } func _ShopService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Shop) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ShopServiceServer).Delete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/shop.v1.ShopService/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopServiceServer).Delete(ctx, req.(*Shop)) } return interceptor(ctx, in, info, handler) } // ShopService_ServiceDesc is the grpc.ServiceDesc for ShopService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ShopService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "shop.v1.ShopService", HandlerType: (*ShopServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _ShopService_List_Handler, }, { MethodName: "Add", Handler: _ShopService_Add_Handler, }, { MethodName: "Update", Handler: _ShopService_Update_Handler, }, { MethodName: "Delete", Handler: _ShopService_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "shop/v1/shop.proto", }