// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.6
// Source: ecpm.proto

package ecpm_client

import (
	"context"
	douyin_ecpm_calculation_service2 "gitea.youtukeji.com.cn/youtu/youtu_grpc/app/ecpm/ecpm"

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

type (
	GetEcpmRequest  = douyin_ecpm_calculation_service2.GetEcpmRequest
	GetEcpmResponse = douyin_ecpm_calculation_service2.GetEcpmResponse
	Request         = douyin_ecpm_calculation_service2.Request
	Response        = douyin_ecpm_calculation_service2.Response

	DouyinEcpmCalculationService interface {
		Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
		GetEcpm(ctx context.Context, in *GetEcpmRequest, opts ...grpc.CallOption) (*GetEcpmResponse, error)
	}

	defaultDouyinEcpmCalculationService struct {
		cli zrpc.Client
	}
)

func NewDouyinEcpmCalculationService(cli zrpc.Client) DouyinEcpmCalculationService {
	return &defaultDouyinEcpmCalculationService{
		cli: cli,
	}
}

func (m *defaultDouyinEcpmCalculationService) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
	client := douyin_ecpm_calculation_service2.NewDouyinEcpmCalculationServiceClient(m.cli.Conn())
	return client.Ping(ctx, in, opts...)
}

func (m *defaultDouyinEcpmCalculationService) GetEcpm(ctx context.Context, in *GetEcpmRequest, opts ...grpc.CallOption) (*GetEcpmResponse, error) {
	client := douyin_ecpm_calculation_service2.NewDouyinEcpmCalculationServiceClient(m.cli.Conn())
	return client.GetEcpm(ctx, in, opts...)
}