26 lines
978 B
Go
26 lines
978 B
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
|
|
"google.golang.org/grpc"
|
|
activityv1 "hyapp.local/api/proto/activity/v1"
|
|
)
|
|
|
|
// FirstRechargeRewardClient abstracts gateway reads from activity-service first recharge reward APIs.
|
|
type FirstRechargeRewardClient interface {
|
|
GetFirstRechargeRewardStatus(ctx context.Context, req *activityv1.GetFirstRechargeRewardStatusRequest) (*activityv1.GetFirstRechargeRewardStatusResponse, error)
|
|
}
|
|
|
|
type grpcFirstRechargeRewardClient struct {
|
|
client activityv1.FirstRechargeRewardServiceClient
|
|
}
|
|
|
|
func NewGRPCFirstRechargeRewardClient(conn *grpc.ClientConn) FirstRechargeRewardClient {
|
|
return &grpcFirstRechargeRewardClient{client: activityv1.NewFirstRechargeRewardServiceClient(conn)}
|
|
}
|
|
|
|
func (c *grpcFirstRechargeRewardClient) GetFirstRechargeRewardStatus(ctx context.Context, req *activityv1.GetFirstRechargeRewardStatusRequest) (*activityv1.GetFirstRechargeRewardStatusResponse, error) {
|
|
return c.client.GetFirstRechargeRewardStatus(ctx, req)
|
|
}
|