// 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/feed/proto/timeline.proto

package feed

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 (
	Timeline_Recommend_FullMethodName = "/feed.Timeline/Recommend"
	Timeline_Friend_FullMethodName    = "/feed.Timeline/Friend"
	Timeline_Follow_FullMethodName    = "/feed.Timeline/Follow"
	Timeline_Hot_FullMethodName       = "/feed.Timeline/Hot"
)

// TimelineClient is the client API for Timeline 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 TimelineClient interface {
	// 推荐
	Recommend(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error)
	// 好友动态
	Friend(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error)
	// 关注的动态
	Follow(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error)
	// 热门
	Hot(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error)
}

type timelineClient struct {
	cc grpc.ClientConnInterface
}

func NewTimelineClient(cc grpc.ClientConnInterface) TimelineClient {
	return &timelineClient{cc}
}

func (c *timelineClient) Recommend(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.FeedPostListReply)
	err := c.cc.Invoke(ctx, Timeline_Recommend_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *timelineClient) Friend(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.FeedPostListReply)
	err := c.cc.Invoke(ctx, Timeline_Friend_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *timelineClient) Follow(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.FeedPostListReply)
	err := c.cc.Invoke(ctx, Timeline_Follow_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *timelineClient) Hot(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.FeedPostListReply)
	err := c.cc.Invoke(ctx, Timeline_Hot_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// TimelineServer is the server API for Timeline service.
// All implementations should embed UnimplementedTimelineServer
// for forward compatibility.
//
// 实时动态
type TimelineServer interface {
	// 推荐
	Recommend(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error)
	// 好友动态
	Friend(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error)
	// 关注的动态
	Follow(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error)
	// 热门
	Hot(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error)
}

// UnimplementedTimelineServer 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 UnimplementedTimelineServer struct{}

func (UnimplementedTimelineServer) Recommend(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Recommend not implemented")
}
func (UnimplementedTimelineServer) Friend(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Friend not implemented")
}
func (UnimplementedTimelineServer) Follow(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Follow not implemented")
}
func (UnimplementedTimelineServer) Hot(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Hot not implemented")
}
func (UnimplementedTimelineServer) testEmbeddedByValue() {}

// UnsafeTimelineServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TimelineServer will
// result in compilation errors.
type UnsafeTimelineServer interface {
	mustEmbedUnimplementedTimelineServer()
}

func RegisterTimelineServer(s grpc.ServiceRegistrar, srv TimelineServer) {
	// If the following call panics, it indicates UnimplementedTimelineServer 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(&Timeline_ServiceDesc, srv)
}

func _Timeline_Recommend_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.(TimelineServer).Recommend(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Timeline_Recommend_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TimelineServer).Recommend(ctx, req.(*protobuf.FetchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Timeline_Friend_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.(TimelineServer).Friend(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Timeline_Friend_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TimelineServer).Friend(ctx, req.(*protobuf.FetchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Timeline_Follow_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.(TimelineServer).Follow(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Timeline_Follow_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TimelineServer).Follow(ctx, req.(*protobuf.FetchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Timeline_Hot_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.(TimelineServer).Hot(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Timeline_Hot_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TimelineServer).Hot(ctx, req.(*protobuf.FetchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Timeline_ServiceDesc is the grpc.ServiceDesc for Timeline service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Timeline_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "feed.Timeline",
	HandlerType: (*TimelineServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Recommend",
			Handler:    _Timeline_Recommend_Handler,
		},
		{
			MethodName: "Friend",
			Handler:    _Timeline_Friend_Handler,
		},
		{
			MethodName: "Follow",
			Handler:    _Timeline_Follow_Handler,
		},
		{
			MethodName: "Hot",
			Handler:    _Timeline_Hot_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "module/social/feed/proto/timeline.proto",
}
