// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: comment.proto

package service

import (
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	math "math"
)

import (
	context "context"
	api "github.com/micro/go-micro/v2/api"
	client "github.com/micro/go-micro/v2/client"
	server "github.com/micro/go-micro/v2/server"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package

// Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context
var _ client.Option
var _ server.Option

// Api Endpoints for CommentService service

func NewCommentServiceEndpoints() []*api.Endpoint {
	return []*api.Endpoint{}
}

// Client API for CommentService service

type CommentService interface {
	CommentAction(ctx context.Context, in *DouyinCommentActionRequest, opts ...client.CallOption) (*DouyinCommentActionResponse, error)
	CommentList(ctx context.Context, in *DouyinCommentListRequest, opts ...client.CallOption) (*DouyinCommentListResponse, error)
}

type commentService struct {
	c    client.Client
	name string
}

func NewCommentService(name string, c client.Client) CommentService {
	return &commentService{
		c:    c,
		name: name,
	}
}

func (c *commentService) CommentAction(ctx context.Context, in *DouyinCommentActionRequest, opts ...client.CallOption) (*DouyinCommentActionResponse, error) {
	req := c.c.NewRequest(c.name, "CommentService.CommentAction", in)
	out := new(DouyinCommentActionResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *commentService) CommentList(ctx context.Context, in *DouyinCommentListRequest, opts ...client.CallOption) (*DouyinCommentListResponse, error) {
	req := c.c.NewRequest(c.name, "CommentService.CommentList", in)
	out := new(DouyinCommentListResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for CommentService service

type CommentServiceHandler interface {
	CommentAction(context.Context, *DouyinCommentActionRequest, *DouyinCommentActionResponse) error
	CommentList(context.Context, *DouyinCommentListRequest, *DouyinCommentListResponse) error
}

func RegisterCommentServiceHandler(s server.Server, hdlr CommentServiceHandler, opts ...server.HandlerOption) error {
	type commentService interface {
		CommentAction(ctx context.Context, in *DouyinCommentActionRequest, out *DouyinCommentActionResponse) error
		CommentList(ctx context.Context, in *DouyinCommentListRequest, out *DouyinCommentListResponse) error
	}
	type CommentService struct {
		commentService
	}
	h := &commentServiceHandler{hdlr}
	return s.Handle(s.NewHandler(&CommentService{h}, opts...))
}

type commentServiceHandler struct {
	CommentServiceHandler
}

func (h *commentServiceHandler) CommentAction(ctx context.Context, in *DouyinCommentActionRequest, out *DouyinCommentActionResponse) error {
	return h.CommentServiceHandler.CommentAction(ctx, in, out)
}

func (h *commentServiceHandler) CommentList(ctx context.Context, in *DouyinCommentListRequest, out *DouyinCommentListResponse) error {
	return h.CommentServiceHandler.CommentList(ctx, in, out)
}
