github.com/litesolutions/justifay-api@v1.0.0-2.0.20220707114139-46f28a909481/proto/user/tag_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 3 package user 4 5 import ( 6 context "context" 7 grpc "google.golang.org/grpc" 8 codes "google.golang.org/grpc/codes" 9 status "google.golang.org/grpc/status" 10 ) 11 12 // This is a compile-time assertion to ensure that this generated file 13 // is compatible with the grpc package it is being compiled against. 14 const _ = grpc.SupportPackageIsVersion7 15 16 // TagServiceClient is the client API for TagService service. 17 // 18 // 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. 19 type TagServiceClient interface { 20 SearchGenres(ctx context.Context, in *Query, opts ...grpc.CallOption) (*SearchResults, error) 21 } 22 23 type tagServiceClient struct { 24 cc grpc.ClientConnInterface 25 } 26 27 func NewTagServiceClient(cc grpc.ClientConnInterface) TagServiceClient { 28 return &tagServiceClient{cc} 29 } 30 31 func (c *tagServiceClient) SearchGenres(ctx context.Context, in *Query, opts ...grpc.CallOption) (*SearchResults, error) { 32 out := new(SearchResults) 33 err := c.cc.Invoke(ctx, "/user.TagService/SearchGenres", in, out, opts...) 34 if err != nil { 35 return nil, err 36 } 37 return out, nil 38 } 39 40 // TagServiceServer is the server API for TagService service. 41 // All implementations should embed UnimplementedTagServiceServer 42 // for forward compatibility 43 type TagServiceServer interface { 44 SearchGenres(context.Context, *Query) (*SearchResults, error) 45 } 46 47 // UnimplementedTagServiceServer should be embedded to have forward compatible implementations. 48 type UnimplementedTagServiceServer struct { 49 } 50 51 func (UnimplementedTagServiceServer) SearchGenres(context.Context, *Query) (*SearchResults, error) { 52 return nil, status.Errorf(codes.Unimplemented, "method SearchGenres not implemented") 53 } 54 55 // UnsafeTagServiceServer may be embedded to opt out of forward compatibility for this service. 56 // Use of this interface is not recommended, as added methods to TagServiceServer will 57 // result in compilation errors. 58 type UnsafeTagServiceServer interface { 59 mustEmbedUnimplementedTagServiceServer() 60 } 61 62 func RegisterTagServiceServer(s grpc.ServiceRegistrar, srv TagServiceServer) { 63 s.RegisterService(&_TagService_serviceDesc, srv) 64 } 65 66 func _TagService_SearchGenres_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 67 in := new(Query) 68 if err := dec(in); err != nil { 69 return nil, err 70 } 71 if interceptor == nil { 72 return srv.(TagServiceServer).SearchGenres(ctx, in) 73 } 74 info := &grpc.UnaryServerInfo{ 75 Server: srv, 76 FullMethod: "/user.TagService/SearchGenres", 77 } 78 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 79 return srv.(TagServiceServer).SearchGenres(ctx, req.(*Query)) 80 } 81 return interceptor(ctx, in, info, handler) 82 } 83 84 var _TagService_serviceDesc = grpc.ServiceDesc{ 85 ServiceName: "user.TagService", 86 HandlerType: (*TagServiceServer)(nil), 87 Methods: []grpc.MethodDesc{ 88 { 89 MethodName: "SearchGenres", 90 Handler: _TagService_SearchGenres_Handler, 91 }, 92 }, 93 Streams: []grpc.StreamDesc{}, 94 Metadata: "user/tag.proto", 95 }