26 lines
1.0 KiB
Go
26 lines
1.0 KiB
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
|
|
"google.golang.org/grpc"
|
|
activityv1 "hyapp.local/api/proto/activity/v1"
|
|
)
|
|
|
|
// CumulativeRechargeRewardClient abstracts gateway reads from activity-service cumulative recharge reward APIs.
|
|
type CumulativeRechargeRewardClient interface {
|
|
GetCumulativeRechargeRewardStatus(ctx context.Context, req *activityv1.GetCumulativeRechargeRewardStatusRequest) (*activityv1.GetCumulativeRechargeRewardStatusResponse, error)
|
|
}
|
|
|
|
type grpcCumulativeRechargeRewardClient struct {
|
|
client activityv1.CumulativeRechargeRewardServiceClient
|
|
}
|
|
|
|
func NewGRPCCumulativeRechargeRewardClient(conn *grpc.ClientConn) CumulativeRechargeRewardClient {
|
|
return &grpcCumulativeRechargeRewardClient{client: activityv1.NewCumulativeRechargeRewardServiceClient(conn)}
|
|
}
|
|
|
|
func (c *grpcCumulativeRechargeRewardClient) GetCumulativeRechargeRewardStatus(ctx context.Context, req *activityv1.GetCumulativeRechargeRewardStatusRequest) (*activityv1.GetCumulativeRechargeRewardStatusResponse, error) {
|
|
return c.client.GetCumulativeRechargeRewardStatus(ctx, req)
|
|
}
|