// Code generated by goctl. DO NOT EDIT.
// goctl 1.10.1
// Source: review.proto

package reviewservice

import (
	"context"

	"juwan-backend/app/review/rpc/pb"

	"github.com/zeromicro/go-zero/zrpc"
	"google.golang.org/grpc"
)

type (
	AddReviewsReq      = pb.AddReviewsReq
	AddReviewsResp     = pb.AddReviewsResp
	DelReviewsReq      = pb.DelReviewsReq
	DelReviewsResp     = pb.DelReviewsResp
	GetReviewsByIdReq  = pb.GetReviewsByIdReq
	GetReviewsByIdResp = pb.GetReviewsByIdResp
	Reviews            = pb.Reviews
	SearchReviewsReq   = pb.SearchReviewsReq
	SearchReviewsResp  = pb.SearchReviewsResp
	UpdateReviewsReq   = pb.UpdateReviewsReq
	UpdateReviewsResp  = pb.UpdateReviewsResp

	ReviewService interface {
		// -----------------------reviews-----------------------
		AddReviews(ctx context.Context, in *AddReviewsReq, opts ...grpc.CallOption) (*AddReviewsResp, error)
		UpdateReviews(ctx context.Context, in *UpdateReviewsReq, opts ...grpc.CallOption) (*UpdateReviewsResp, error)
		DelReviews(ctx context.Context, in *DelReviewsReq, opts ...grpc.CallOption) (*DelReviewsResp, error)
		GetReviewsById(ctx context.Context, in *GetReviewsByIdReq, opts ...grpc.CallOption) (*GetReviewsByIdResp, error)
		SearchReviews(ctx context.Context, in *SearchReviewsReq, opts ...grpc.CallOption) (*SearchReviewsResp, error)
	}

	defaultReviewService struct {
		cli zrpc.Client
	}
)

func NewReviewService(cli zrpc.Client) ReviewService {
	return &defaultReviewService{
		cli: cli,
	}
}

// -----------------------reviews-----------------------
func (m *defaultReviewService) AddReviews(ctx context.Context, in *AddReviewsReq, opts ...grpc.CallOption) (*AddReviewsResp, error) {
	client := pb.NewReviewServiceClient(m.cli.Conn())
	return client.AddReviews(ctx, in, opts...)
}

func (m *defaultReviewService) UpdateReviews(ctx context.Context, in *UpdateReviewsReq, opts ...grpc.CallOption) (*UpdateReviewsResp, error) {
	client := pb.NewReviewServiceClient(m.cli.Conn())
	return client.UpdateReviews(ctx, in, opts...)
}

func (m *defaultReviewService) DelReviews(ctx context.Context, in *DelReviewsReq, opts ...grpc.CallOption) (*DelReviewsResp, error) {
	client := pb.NewReviewServiceClient(m.cli.Conn())
	return client.DelReviews(ctx, in, opts...)
}

func (m *defaultReviewService) GetReviewsById(ctx context.Context, in *GetReviewsByIdReq, opts ...grpc.CallOption) (*GetReviewsByIdResp, error) {
	client := pb.NewReviewServiceClient(m.cli.Conn())
	return client.GetReviewsById(ctx, in, opts...)
}

func (m *defaultReviewService) SearchReviews(ctx context.Context, in *SearchReviewsReq, opts ...grpc.CallOption) (*SearchReviewsResp, error) {
	client := pb.NewReviewServiceClient(m.cli.Conn())
	return client.SearchReviews(ctx, in, opts...)
}
