// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc             v7.35.0
// source: module/social/relation/proto/follow.proto

package relation

import (
	protobuf "bsm/full/protobuf"
	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 *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
	// 撤销关注
	Undo(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
	// 关注状态
	State(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
	// 获取关注列表
	Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.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 *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.DataStatusReply)
	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 *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.DataStatusReply)
	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 *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.DataStatusReply)
	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 *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FetchRelationItemReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.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 should embed UnimplementedFollowServer
// for forward compatibility.
//
// relation-关系管理:关注
type FollowServer interface {
	// 执行关注
	Doing(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
	// 撤销关注
	Undo(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
	// 关注状态
	State(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
	// 获取关注列表
	Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error)
}

// UnimplementedFollowServer should 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, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Doing not implemented")
}
func (UnimplementedFollowServer) Undo(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Undo not implemented")
}
func (UnimplementedFollowServer) State(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method State not implemented")
}
func (UnimplementedFollowServer) Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
}
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 panics, 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(protobuf.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.(*protobuf.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(protobuf.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.(*protobuf.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(protobuf.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.(*protobuf.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(protobuf.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.(*protobuf.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: "module/social/relation/proto/follow.proto",
}
