youtu_grpc/app/admin_service/internal/server/admin_service_server.go

60 lines
1.9 KiB
Go
Raw Normal View History

2025-02-21 18:24:39 +08:00
// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.6
// Source: admin_service.proto
package server
import (
"context"
"gitea.youtukeji.com.cn/youtu/youtu_grpc/app/admin_service/admin_service"
"gitea.youtukeji.com.cn/youtu/youtu_grpc/app/admin_service/internal/logic"
"gitea.youtukeji.com.cn/youtu/youtu_grpc/app/admin_service/internal/svc"
)
type AdminServiceServer struct {
svcCtx *svc.ServiceContext
admin_service.UnimplementedAdminServiceServer
}
func NewAdminServiceServer(svcCtx *svc.ServiceContext) *AdminServiceServer {
return &AdminServiceServer{
svcCtx: svcCtx,
}
}
func (s *AdminServiceServer) Ping(ctx context.Context, in *admin_service.Request) (*admin_service.Response, error) {
l := logic.NewPingLogic(ctx, s.svcCtx)
return l.Ping(in)
}
// 获取app列表
func (s *AdminServiceServer) GetAppList(ctx context.Context, in *admin_service.GetAppListRequest) (*admin_service.GetAppListResponse, error) {
l := logic.NewGetAppListLogic(ctx, s.svcCtx)
return l.GetAppList(in)
}
2025-02-24 18:47:27 +08:00
2025-03-04 14:43:39 +08:00
// UpdateOne 修改app数据
2025-02-24 18:47:27 +08:00
func (s *AdminServiceServer) UpdateOne(ctx context.Context, in *admin_service.AppInfo) (*admin_service.CommonResponse, error) {
l := logic.NewUpdateOneLogic(ctx, s.svcCtx)
return l.UpdateOne(in)
}
2025-03-04 14:43:39 +08:00
// DeleteApp 删除app
2025-02-24 18:47:27 +08:00
func (s *AdminServiceServer) DeleteApp(ctx context.Context, in *admin_service.DeleteAppRequest) (*admin_service.CommonResponse, error) {
l := logic.NewDeleteAppLogic(ctx, s.svcCtx)
return l.DeleteApp(in)
}
2025-03-04 14:43:39 +08:00
// AddApp 添加app
2025-02-24 18:47:27 +08:00
func (s *AdminServiceServer) AddApp(ctx context.Context, in *admin_service.AddAppRequest) (*admin_service.AddAppResponse, error) {
l := logic.NewAddAppLogic(ctx, s.svcCtx)
return l.AddApp(in)
}
2025-03-04 14:43:39 +08:00
// 覆盖app数据
func (s *AdminServiceServer) CoverApp(ctx context.Context, in *admin_service.CoverAppRequest) (*admin_service.CoverAppResponse, error) {
l := logic.NewCoverAppLogic(ctx, s.svcCtx)
return l.CoverApp(in)
}