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`.
This commit is contained in:
wwweww
2026-02-28 18:35:56 +08:00
parent d2f33b4b96
commit 19cc7a778c
349 changed files with 42548 additions and 1453 deletions
@@ -0,0 +1,76 @@
// Code generated by goctl. DO NOT EDIT.
// goctl 1.9.2
// Source: order.proto
package server
import (
"context"
"juwan-backend/app/order/rpc/internal/logic"
"juwan-backend/app/order/rpc/internal/svc"
"juwan-backend/app/order/rpc/pb"
)
type OrderServiceServer struct {
svcCtx *svc.ServiceContext
pb.UnimplementedOrderServiceServer
}
func NewOrderServiceServer(svcCtx *svc.ServiceContext) *OrderServiceServer {
return &OrderServiceServer{
svcCtx: svcCtx,
}
}
// -----------------------orders-----------------------
func (s *OrderServiceServer) AddOrders(ctx context.Context, in *pb.AddOrdersReq) (*pb.AddOrdersResp, error) {
l := logic.NewAddOrdersLogic(ctx, s.svcCtx)
return l.AddOrders(in)
}
func (s *OrderServiceServer) UpdateOrders(ctx context.Context, in *pb.UpdateOrdersReq) (*pb.UpdateOrdersResp, error) {
l := logic.NewUpdateOrdersLogic(ctx, s.svcCtx)
return l.UpdateOrders(in)
}
func (s *OrderServiceServer) DelOrders(ctx context.Context, in *pb.DelOrdersReq) (*pb.DelOrdersResp, error) {
l := logic.NewDelOrdersLogic(ctx, s.svcCtx)
return l.DelOrders(in)
}
func (s *OrderServiceServer) GetOrdersById(ctx context.Context, in *pb.GetOrdersByIdReq) (*pb.GetOrdersByIdResp, error) {
l := logic.NewGetOrdersByIdLogic(ctx, s.svcCtx)
return l.GetOrdersById(in)
}
func (s *OrderServiceServer) SearchOrders(ctx context.Context, in *pb.SearchOrdersReq) (*pb.SearchOrdersResp, error) {
l := logic.NewSearchOrdersLogic(ctx, s.svcCtx)
return l.SearchOrders(in)
}
// -----------------------orderStateLogs-----------------------
func (s *OrderServiceServer) AddOrderStateLogs(ctx context.Context, in *pb.AddOrderStateLogsReq) (*pb.AddOrderStateLogsResp, error) {
l := logic.NewAddOrderStateLogsLogic(ctx, s.svcCtx)
return l.AddOrderStateLogs(in)
}
func (s *OrderServiceServer) UpdateOrderStateLogs(ctx context.Context, in *pb.UpdateOrderStateLogsReq) (*pb.UpdateOrderStateLogsResp, error) {
l := logic.NewUpdateOrderStateLogsLogic(ctx, s.svcCtx)
return l.UpdateOrderStateLogs(in)
}
func (s *OrderServiceServer) DelOrderStateLogs(ctx context.Context, in *pb.DelOrderStateLogsReq) (*pb.DelOrderStateLogsResp, error) {
l := logic.NewDelOrderStateLogsLogic(ctx, s.svcCtx)
return l.DelOrderStateLogs(in)
}
func (s *OrderServiceServer) GetOrderStateLogsById(ctx context.Context, in *pb.GetOrderStateLogsByIdReq) (*pb.GetOrderStateLogsByIdResp, error) {
l := logic.NewGetOrderStateLogsByIdLogic(ctx, s.svcCtx)
return l.GetOrderStateLogsById(in)
}
func (s *OrderServiceServer) SearchOrderStateLogs(ctx context.Context, in *pb.SearchOrderStateLogsReq) (*pb.SearchOrderStateLogsResp, error) {
l := logic.NewSearchOrderStateLogsLogic(ctx, s.svcCtx)
return l.SearchOrderStateLogs(in)
}