2026-06-12 12:08:01 +08:00

29 lines
875 B
Go

package client
import (
"context"
"google.golang.org/grpc"
walletv1 "hyapp.local/api/proto/wallet/v1"
)
type WalletClient struct {
client walletv1.WalletServiceClient
}
func NewWalletClient(conn *grpc.ClientConn) *WalletClient {
return &WalletClient{client: walletv1.NewWalletServiceClient(conn)}
}
func (c *WalletClient) ApplyGameCoinChange(ctx context.Context, req *walletv1.ApplyGameCoinChangeRequest) (*walletv1.ApplyGameCoinChangeResponse, error) {
return c.client.ApplyGameCoinChange(ctx, req)
}
func (c *WalletClient) GetBalances(ctx context.Context, req *walletv1.GetBalancesRequest) (*walletv1.GetBalancesResponse, error) {
return c.client.GetBalances(ctx, req)
}
func (c *WalletClient) ListGiftConfigs(ctx context.Context, req *walletv1.ListGiftConfigsRequest) (*walletv1.ListGiftConfigsResponse, error) {
return c.client.ListGiftConfigs(ctx, req)
}