// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: follow.proto package relation 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 ( Follow_Doing_FullMethodName = "/relation.Follow/Doing" Follow_Undo_FullMethodName = "/relation.Follow/Undo" Follow_State_FullMethodName = "/relation.Follow/State" Follow_Fetch_FullMethodName = "/relation.Follow/Fetch" ) // FollowClient is the client API for Follow 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. // // relation-关系管理:关注 type FollowClient interface { // 执行关注 Doing(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) // 撤销关注 Undo(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) // 关注状态 State(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) // 获取关注列表 Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchRelationItemReply, error) } type followClient struct { cc grpc.ClientConnInterface } func NewFollowClient(cc grpc.ClientConnInterface) FollowClient { return &followClient{cc} } func (c *followClient) Doing(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StatusReply) err := c.cc.Invoke(ctx, Follow_Doing_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *followClient) Undo(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StatusReply) err := c.cc.Invoke(ctx, Follow_Undo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *followClient) State(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StatusReply) err := c.cc.Invoke(ctx, Follow_State_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *followClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchRelationItemReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(FetchRelationItemReply) err := c.cc.Invoke(ctx, Follow_Fetch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // FollowServer is the server API for Follow service. // All implementations must embed UnimplementedFollowServer // for forward compatibility. // // relation-关系管理:关注 type FollowServer interface { // 执行关注 Doing(context.Context, *IdentRequest) (*StatusReply, error) // 撤销关注 Undo(context.Context, *IdentRequest) (*StatusReply, error) // 关注状态 State(context.Context, *IdentRequest) (*StatusReply, error) // 获取关注列表 Fetch(context.Context, *FetchRequest) (*FetchRelationItemReply, error) mustEmbedUnimplementedFollowServer() } // UnimplementedFollowServer must 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 UnimplementedFollowServer struct{} func (UnimplementedFollowServer) Doing(context.Context, *IdentRequest) (*StatusReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Doing not implemented") } func (UnimplementedFollowServer) Undo(context.Context, *IdentRequest) (*StatusReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Undo not implemented") } func (UnimplementedFollowServer) State(context.Context, *IdentRequest) (*StatusReply, error) { return nil, status.Errorf(codes.Unimplemented, "method State not implemented") } func (UnimplementedFollowServer) Fetch(context.Context, *FetchRequest) (*FetchRelationItemReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") } func (UnimplementedFollowServer) mustEmbedUnimplementedFollowServer() {} func (UnimplementedFollowServer) testEmbeddedByValue() {} // UnsafeFollowServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to FollowServer will // result in compilation errors. type UnsafeFollowServer interface { mustEmbedUnimplementedFollowServer() } func RegisterFollowServer(s grpc.ServiceRegistrar, srv FollowServer) { // If the following call pancis, it indicates UnimplementedFollowServer 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(&Follow_ServiceDesc, srv) } func _Follow_Doing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(IdentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FollowServer).Doing(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Follow_Doing_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FollowServer).Doing(ctx, req.(*IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Follow_Undo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(IdentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FollowServer).Undo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Follow_Undo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FollowServer).Undo(ctx, req.(*IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Follow_State_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(IdentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FollowServer).State(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Follow_State_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FollowServer).State(ctx, req.(*IdentRequest)) } return interceptor(ctx, in, info, handler) } func _Follow_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FetchRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FollowServer).Fetch(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Follow_Fetch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FollowServer).Fetch(ctx, req.(*FetchRequest)) } return interceptor(ctx, in, info, handler) } // Follow_ServiceDesc is the grpc.ServiceDesc for Follow service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Follow_ServiceDesc = grpc.ServiceDesc{ ServiceName: "relation.Follow", HandlerType: (*FollowServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Doing", Handler: _Follow_Doing_Handler, }, { MethodName: "Undo", Handler: _Follow_Undo_Handler, }, { MethodName: "State", Handler: _Follow_State_Handler, }, { MethodName: "Fetch", Handler: _Follow_Fetch_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "follow.proto", }