topfans/backend/pkg/proto/statistic/statistic.triple.go

340 lines
15 KiB
Go

// Code generated by protoc-gen-triple. DO NOT EDIT.
//
// Source: statistic.proto
package statistic
import (
"context"
)
import (
"dubbo.apache.org/dubbo-go/v3"
"dubbo.apache.org/dubbo-go/v3/client"
"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/protocol/triple/triple_protocol"
"dubbo.apache.org/dubbo-go/v3/server"
event "github.com/topfans/backend/pkg/proto/event"
)
// This is a compile-time assertion to ensure that this generated file and the Triple package
// are compatible. If you get a compiler error that this constant is not defined, this code was
// generated with a version of Triple newer than the one compiled into your binary. You can fix the
// problem by either regenerating this code with an older version of Triple or updating the Triple
// version compiled into your binary.
const _ = triple_protocol.IsAtLeastVersion0_1_0
const (
// StatisticServiceName is the fully-qualified name of the StatisticService service.
StatisticServiceName = "topfans.statistic.StatisticService"
)
// These constants are the fully-qualified names of the RPCs defined in this package. They're
// exposed at runtime as procedure and as the final two segments of the HTTP route.
//
// Note that these are different from the fully-qualified method names used by
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
// period.
const (
// StatisticServiceGetTodayOverviewProcedure is the fully-qualified name of the StatisticService's GetTodayOverview RPC.
StatisticServiceGetTodayOverviewProcedure = "/topfans.statistic.StatisticService/GetTodayOverview"
// StatisticServiceGet7DayIncomeCurveProcedure is the fully-qualified name of the StatisticService's Get7DayIncomeCurve RPC.
StatisticServiceGet7DayIncomeCurveProcedure = "/topfans.statistic.StatisticService/Get7DayIncomeCurve"
// StatisticServiceGetExhibitionIncomeSummaryProcedure is the fully-qualified name of the StatisticService's GetExhibitionIncomeSummary RPC.
StatisticServiceGetExhibitionIncomeSummaryProcedure = "/topfans.statistic.StatisticService/GetExhibitionIncomeSummary"
// StatisticServiceGetLikeIncomeByLevelProcedure is the fully-qualified name of the StatisticService's GetLikeIncomeByLevel RPC.
StatisticServiceGetLikeIncomeByLevelProcedure = "/topfans.statistic.StatisticService/GetLikeIncomeByLevel"
// StatisticServiceGetTopAssetsByEarningProcedure is the fully-qualified name of the StatisticService's GetTopAssetsByEarning RPC.
StatisticServiceGetTopAssetsByEarningProcedure = "/topfans.statistic.StatisticService/GetTopAssetsByEarning"
// StatisticServiceGetAssetLevelDistributionProcedure is the fully-qualified name of the StatisticService's GetAssetLevelDistribution RPC.
StatisticServiceGetAssetLevelDistributionProcedure = "/topfans.statistic.StatisticService/GetAssetLevelDistribution"
// StatisticServiceGetAssetUpgradeProgressProcedure is the fully-qualified name of the StatisticService's GetAssetUpgradeProgress RPC.
StatisticServiceGetAssetUpgradeProgressProcedure = "/topfans.statistic.StatisticService/GetAssetUpgradeProgress"
// StatisticServiceTrackEventProcedure is the fully-qualified name of the StatisticService's TrackEvent RPC.
StatisticServiceTrackEventProcedure = "/topfans.statistic.StatisticService/TrackEvent"
// StatisticServiceBatchTrackEventProcedure is the fully-qualified name of the StatisticService's BatchTrackEvent RPC.
StatisticServiceBatchTrackEventProcedure = "/topfans.statistic.StatisticService/BatchTrackEvent"
)
var (
_ StatisticService = (*StatisticServiceImpl)(nil)
)
// StatisticService is a client for the topfans.statistic.StatisticService service.
type StatisticService interface {
GetTodayOverview(ctx context.Context, req *GetTodayOverviewRequest, opts ...client.CallOption) (*GetTodayOverviewResponse, error)
Get7DayIncomeCurve(ctx context.Context, req *Get7DayIncomeCurveRequest, opts ...client.CallOption) (*Get7DayIncomeCurveResponse, error)
GetExhibitionIncomeSummary(ctx context.Context, req *GetExhibitionIncomeSummaryRequest, opts ...client.CallOption) (*GetExhibitionIncomeSummaryResponse, error)
GetLikeIncomeByLevel(ctx context.Context, req *GetLikeIncomeByLevelRequest, opts ...client.CallOption) (*GetLikeIncomeByLevelResponse, error)
GetTopAssetsByEarning(ctx context.Context, req *GetTopAssetsByEarningRequest, opts ...client.CallOption) (*GetTopAssetsByEarningResponse, error)
GetAssetLevelDistribution(ctx context.Context, req *GetAssetLevelDistributionRequest, opts ...client.CallOption) (*GetAssetLevelDistributionResponse, error)
GetAssetUpgradeProgress(ctx context.Context, req *GetAssetUpgradeProgressRequest, opts ...client.CallOption) (*GetAssetUpgradeProgressResponse, error)
TrackEvent(ctx context.Context, req *event.Event, opts ...client.CallOption) (*TrackEventResponse, error)
BatchTrackEvent(ctx context.Context, req *event.BatchEventRequest, opts ...client.CallOption) (*TrackEventResponse, error)
}
// NewStatisticService constructs a client for the statistic.StatisticService service.
func NewStatisticService(cli *client.Client, opts ...client.ReferenceOption) (StatisticService, error) {
conn, err := cli.DialWithInfo("topfans.statistic.StatisticService", &StatisticService_ClientInfo, opts...)
if err != nil {
return nil, err
}
return &StatisticServiceImpl{
conn: conn,
}, nil
}
func SetConsumerStatisticService(srv common.RPCService) {
dubbo.SetConsumerServiceWithInfo(srv, &StatisticService_ClientInfo)
}
// StatisticServiceImpl implements StatisticService.
type StatisticServiceImpl struct {
conn *client.Connection
}
func (c *StatisticServiceImpl) GetTodayOverview(ctx context.Context, req *GetTodayOverviewRequest, opts ...client.CallOption) (*GetTodayOverviewResponse, error) {
resp := new(GetTodayOverviewResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetTodayOverview", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *StatisticServiceImpl) Get7DayIncomeCurve(ctx context.Context, req *Get7DayIncomeCurveRequest, opts ...client.CallOption) (*Get7DayIncomeCurveResponse, error) {
resp := new(Get7DayIncomeCurveResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "Get7DayIncomeCurve", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *StatisticServiceImpl) GetExhibitionIncomeSummary(ctx context.Context, req *GetExhibitionIncomeSummaryRequest, opts ...client.CallOption) (*GetExhibitionIncomeSummaryResponse, error) {
resp := new(GetExhibitionIncomeSummaryResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetExhibitionIncomeSummary", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *StatisticServiceImpl) GetLikeIncomeByLevel(ctx context.Context, req *GetLikeIncomeByLevelRequest, opts ...client.CallOption) (*GetLikeIncomeByLevelResponse, error) {
resp := new(GetLikeIncomeByLevelResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetLikeIncomeByLevel", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *StatisticServiceImpl) GetTopAssetsByEarning(ctx context.Context, req *GetTopAssetsByEarningRequest, opts ...client.CallOption) (*GetTopAssetsByEarningResponse, error) {
resp := new(GetTopAssetsByEarningResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetTopAssetsByEarning", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *StatisticServiceImpl) GetAssetLevelDistribution(ctx context.Context, req *GetAssetLevelDistributionRequest, opts ...client.CallOption) (*GetAssetLevelDistributionResponse, error) {
resp := new(GetAssetLevelDistributionResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetAssetLevelDistribution", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *StatisticServiceImpl) GetAssetUpgradeProgress(ctx context.Context, req *GetAssetUpgradeProgressRequest, opts ...client.CallOption) (*GetAssetUpgradeProgressResponse, error) {
resp := new(GetAssetUpgradeProgressResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetAssetUpgradeProgress", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *StatisticServiceImpl) TrackEvent(ctx context.Context, req *event.Event, opts ...client.CallOption) (*TrackEventResponse, error) {
resp := new(TrackEventResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "TrackEvent", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *StatisticServiceImpl) BatchTrackEvent(ctx context.Context, req *event.BatchEventRequest, opts ...client.CallOption) (*TrackEventResponse, error) {
resp := new(TrackEventResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "BatchTrackEvent", opts...); err != nil {
return nil, err
}
return resp, nil
}
var StatisticService_ClientInfo = client.ClientInfo{
InterfaceName: "topfans.statistic.StatisticService",
MethodNames: []string{"GetTodayOverview", "Get7DayIncomeCurve", "GetExhibitionIncomeSummary", "GetLikeIncomeByLevel", "GetTopAssetsByEarning", "GetAssetLevelDistribution", "GetAssetUpgradeProgress", "TrackEvent", "BatchTrackEvent"},
ConnectionInjectFunc: func(dubboCliRaw interface{}, conn *client.Connection) {
dubboCli := dubboCliRaw.(*StatisticServiceImpl)
dubboCli.conn = conn
},
}
// StatisticServiceHandler is an implementation of the topfans.statistic.StatisticService service.
type StatisticServiceHandler interface {
GetTodayOverview(context.Context, *GetTodayOverviewRequest) (*GetTodayOverviewResponse, error)
Get7DayIncomeCurve(context.Context, *Get7DayIncomeCurveRequest) (*Get7DayIncomeCurveResponse, error)
GetExhibitionIncomeSummary(context.Context, *GetExhibitionIncomeSummaryRequest) (*GetExhibitionIncomeSummaryResponse, error)
GetLikeIncomeByLevel(context.Context, *GetLikeIncomeByLevelRequest) (*GetLikeIncomeByLevelResponse, error)
GetTopAssetsByEarning(context.Context, *GetTopAssetsByEarningRequest) (*GetTopAssetsByEarningResponse, error)
GetAssetLevelDistribution(context.Context, *GetAssetLevelDistributionRequest) (*GetAssetLevelDistributionResponse, error)
GetAssetUpgradeProgress(context.Context, *GetAssetUpgradeProgressRequest) (*GetAssetUpgradeProgressResponse, error)
TrackEvent(context.Context, *event.Event) (*TrackEventResponse, error)
BatchTrackEvent(context.Context, *event.BatchEventRequest) (*TrackEventResponse, error)
}
func RegisterStatisticServiceHandler(srv *server.Server, hdlr StatisticServiceHandler, opts ...server.ServiceOption) error {
return srv.Register(hdlr, &StatisticService_ServiceInfo, opts...)
}
func SetProviderStatisticService(srv common.RPCService) {
dubbo.SetProviderServiceWithInfo(srv, &StatisticService_ServiceInfo)
}
var StatisticService_ServiceInfo = server.ServiceInfo{
InterfaceName: "topfans.statistic.StatisticService",
ServiceType: (*StatisticServiceHandler)(nil),
Methods: []server.MethodInfo{
{
Name: "GetTodayOverview",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(GetTodayOverviewRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*GetTodayOverviewRequest)
res, err := handler.(StatisticServiceHandler).GetTodayOverview(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "Get7DayIncomeCurve",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(Get7DayIncomeCurveRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*Get7DayIncomeCurveRequest)
res, err := handler.(StatisticServiceHandler).Get7DayIncomeCurve(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "GetExhibitionIncomeSummary",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(GetExhibitionIncomeSummaryRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*GetExhibitionIncomeSummaryRequest)
res, err := handler.(StatisticServiceHandler).GetExhibitionIncomeSummary(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "GetLikeIncomeByLevel",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(GetLikeIncomeByLevelRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*GetLikeIncomeByLevelRequest)
res, err := handler.(StatisticServiceHandler).GetLikeIncomeByLevel(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "GetTopAssetsByEarning",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(GetTopAssetsByEarningRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*GetTopAssetsByEarningRequest)
res, err := handler.(StatisticServiceHandler).GetTopAssetsByEarning(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "GetAssetLevelDistribution",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(GetAssetLevelDistributionRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*GetAssetLevelDistributionRequest)
res, err := handler.(StatisticServiceHandler).GetAssetLevelDistribution(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "GetAssetUpgradeProgress",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(GetAssetUpgradeProgressRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*GetAssetUpgradeProgressRequest)
res, err := handler.(StatisticServiceHandler).GetAssetUpgradeProgress(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "TrackEvent",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(event.Event)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*event.Event)
res, err := handler.(StatisticServiceHandler).TrackEvent(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "BatchTrackEvent",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(event.BatchEventRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*event.BatchEventRequest)
res, err := handler.(StatisticServiceHandler).BatchTrackEvent(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
},
}