Files
wwweww 19cc7a778c Refactor: Remove deprecated gRPC service files and implement new API structure
- Deleted old gRPC service definitions in `game_grpc.pb.go` and `public.go`.
- Added new API server implementations for objectstory, player, and shop services.
- Introduced configuration files for new APIs in `etc/*.yaml`.
- Created main entry points for each service in `objectstory.go`, `player.go`, and `shop.go`.
- Removed unused user update handler and user API files.
- Added utility functions for context management and HTTP header parsing.
- Introduced PostgreSQL backup configuration in `backup/postgreSql.yaml`.
2026-02-28 18:35:56 +08:00

117 lines
5.7 KiB
Go

// Code generated by goctl. DO NOT EDIT.
// goctl 1.9.2
// Source: wallet.proto
package walletservice
import (
"context"
"juwan-backend/app/wallet/rpc/pb"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"
)
type (
AddWalletTransactionsReq = pb.AddWalletTransactionsReq
AddWalletTransactionsResp = pb.AddWalletTransactionsResp
AddWalletsReq = pb.AddWalletsReq
AddWalletsResp = pb.AddWalletsResp
DelWalletTransactionsReq = pb.DelWalletTransactionsReq
DelWalletTransactionsResp = pb.DelWalletTransactionsResp
DelWalletsReq = pb.DelWalletsReq
DelWalletsResp = pb.DelWalletsResp
GetWalletTransactionsByIdReq = pb.GetWalletTransactionsByIdReq
GetWalletTransactionsByIdResp = pb.GetWalletTransactionsByIdResp
GetWalletsByIdReq = pb.GetWalletsByIdReq
GetWalletsByIdResp = pb.GetWalletsByIdResp
SearchWalletTransactionsReq = pb.SearchWalletTransactionsReq
SearchWalletTransactionsResp = pb.SearchWalletTransactionsResp
SearchWalletsReq = pb.SearchWalletsReq
SearchWalletsResp = pb.SearchWalletsResp
UpdateWalletTransactionsReq = pb.UpdateWalletTransactionsReq
UpdateWalletTransactionsResp = pb.UpdateWalletTransactionsResp
UpdateWalletsReq = pb.UpdateWalletsReq
UpdateWalletsResp = pb.UpdateWalletsResp
WalletTransactions = pb.WalletTransactions
Wallets = pb.Wallets
WalletService interface {
// -----------------------walletTransactions-----------------------
AddWalletTransactions(ctx context.Context, in *AddWalletTransactionsReq, opts ...grpc.CallOption) (*AddWalletTransactionsResp, error)
UpdateWalletTransactions(ctx context.Context, in *UpdateWalletTransactionsReq, opts ...grpc.CallOption) (*UpdateWalletTransactionsResp, error)
DelWalletTransactions(ctx context.Context, in *DelWalletTransactionsReq, opts ...grpc.CallOption) (*DelWalletTransactionsResp, error)
GetWalletTransactionsById(ctx context.Context, in *GetWalletTransactionsByIdReq, opts ...grpc.CallOption) (*GetWalletTransactionsByIdResp, error)
SearchWalletTransactions(ctx context.Context, in *SearchWalletTransactionsReq, opts ...grpc.CallOption) (*SearchWalletTransactionsResp, error)
// -----------------------wallets-----------------------
AddWallets(ctx context.Context, in *AddWalletsReq, opts ...grpc.CallOption) (*AddWalletsResp, error)
UpdateWallets(ctx context.Context, in *UpdateWalletsReq, opts ...grpc.CallOption) (*UpdateWalletsResp, error)
DelWallets(ctx context.Context, in *DelWalletsReq, opts ...grpc.CallOption) (*DelWalletsResp, error)
GetWalletsById(ctx context.Context, in *GetWalletsByIdReq, opts ...grpc.CallOption) (*GetWalletsByIdResp, error)
SearchWallets(ctx context.Context, in *SearchWalletsReq, opts ...grpc.CallOption) (*SearchWalletsResp, error)
}
defaultWalletService struct {
cli zrpc.Client
}
)
func NewWalletService(cli zrpc.Client) WalletService {
return &defaultWalletService{
cli: cli,
}
}
// -----------------------walletTransactions-----------------------
func (m *defaultWalletService) AddWalletTransactions(ctx context.Context, in *AddWalletTransactionsReq, opts ...grpc.CallOption) (*AddWalletTransactionsResp, error) {
client := pb.NewWalletServiceClient(m.cli.Conn())
return client.AddWalletTransactions(ctx, in, opts...)
}
func (m *defaultWalletService) UpdateWalletTransactions(ctx context.Context, in *UpdateWalletTransactionsReq, opts ...grpc.CallOption) (*UpdateWalletTransactionsResp, error) {
client := pb.NewWalletServiceClient(m.cli.Conn())
return client.UpdateWalletTransactions(ctx, in, opts...)
}
func (m *defaultWalletService) DelWalletTransactions(ctx context.Context, in *DelWalletTransactionsReq, opts ...grpc.CallOption) (*DelWalletTransactionsResp, error) {
client := pb.NewWalletServiceClient(m.cli.Conn())
return client.DelWalletTransactions(ctx, in, opts...)
}
func (m *defaultWalletService) GetWalletTransactionsById(ctx context.Context, in *GetWalletTransactionsByIdReq, opts ...grpc.CallOption) (*GetWalletTransactionsByIdResp, error) {
client := pb.NewWalletServiceClient(m.cli.Conn())
return client.GetWalletTransactionsById(ctx, in, opts...)
}
func (m *defaultWalletService) SearchWalletTransactions(ctx context.Context, in *SearchWalletTransactionsReq, opts ...grpc.CallOption) (*SearchWalletTransactionsResp, error) {
client := pb.NewWalletServiceClient(m.cli.Conn())
return client.SearchWalletTransactions(ctx, in, opts...)
}
// -----------------------wallets-----------------------
func (m *defaultWalletService) AddWallets(ctx context.Context, in *AddWalletsReq, opts ...grpc.CallOption) (*AddWalletsResp, error) {
client := pb.NewWalletServiceClient(m.cli.Conn())
return client.AddWallets(ctx, in, opts...)
}
func (m *defaultWalletService) UpdateWallets(ctx context.Context, in *UpdateWalletsReq, opts ...grpc.CallOption) (*UpdateWalletsResp, error) {
client := pb.NewWalletServiceClient(m.cli.Conn())
return client.UpdateWallets(ctx, in, opts...)
}
func (m *defaultWalletService) DelWallets(ctx context.Context, in *DelWalletsReq, opts ...grpc.CallOption) (*DelWalletsResp, error) {
client := pb.NewWalletServiceClient(m.cli.Conn())
return client.DelWallets(ctx, in, opts...)
}
func (m *defaultWalletService) GetWalletsById(ctx context.Context, in *GetWalletsByIdReq, opts ...grpc.CallOption) (*GetWalletsByIdResp, error) {
client := pb.NewWalletServiceClient(m.cli.Conn())
return client.GetWalletsById(ctx, in, opts...)
}
func (m *defaultWalletService) SearchWallets(ctx context.Context, in *SearchWalletsReq, opts ...grpc.CallOption) (*SearchWalletsResp, error) {
client := pb.NewWalletServiceClient(m.cli.Conn())
return client.SearchWallets(ctx, in, opts...)
}