// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package mand

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

// ManServiceClient is the client API for ManService 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 ManServiceClient interface {
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error)
	Article(ctx context.Context, in *ArticleRequest, opts ...grpc.CallOption) (*ArticleReply, error)
}

type manServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewManServiceClient(cc grpc.ClientConnInterface) ManServiceClient {
	return &manServiceClient{cc}
}

func (c *manServiceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error) {
	out := new(ListReply)
	err := c.cc.Invoke(ctx, "/pttbbs.man.ManService/List", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *manServiceClient) Article(ctx context.Context, in *ArticleRequest, opts ...grpc.CallOption) (*ArticleReply, error) {
	out := new(ArticleReply)
	err := c.cc.Invoke(ctx, "/pttbbs.man.ManService/Article", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ManServiceServer is the server API for ManService service.
// All implementations must embed UnimplementedManServiceServer
// for forward compatibility
type ManServiceServer interface {
	List(context.Context, *ListRequest) (*ListReply, error)
	Article(context.Context, *ArticleRequest) (*ArticleReply, error)
	mustEmbedUnimplementedManServiceServer()
}

// UnimplementedManServiceServer must be embedded to have forward compatible implementations.
type UnimplementedManServiceServer struct{}

func (UnimplementedManServiceServer) List(context.Context, *ListRequest) (*ListReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}

func (UnimplementedManServiceServer) Article(context.Context, *ArticleRequest) (*ArticleReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Article not implemented")
}
func (UnimplementedManServiceServer) mustEmbedUnimplementedManServiceServer() {}

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

func RegisterManServiceServer(s grpc.ServiceRegistrar, srv ManServiceServer) {
	s.RegisterService(&ManService_ServiceDesc, srv)
}

func _ManService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ManServiceServer).List(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pttbbs.man.ManService/List",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ManServiceServer).List(ctx, req.(*ListRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ManService_Article_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ArticleRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ManServiceServer).Article(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pttbbs.man.ManService/Article",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ManServiceServer).Article(ctx, req.(*ArticleRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ManService_ServiceDesc is the grpc.ServiceDesc for ManService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ManService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pttbbs.man.ManService",
	HandlerType: (*ManServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "List",
			Handler:    _ManService_List_Handler,
		},
		{
			MethodName: "Article",
			Handler:    _ManService_Article_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "man.proto",
}
