removeAppInfoLogic.go 919 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package dtgateway
  2. import (
  3. "GtDataStore/app/cmd/organization/pb"
  4. "GtDataStore/common/xerr"
  5. "context"
  6. "GtDataStore/app/cmd/dtgateway/internal/svc"
  7. "GtDataStore/app/cmd/dtgateway/internal/types"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type RemoveAppInfoLogic struct {
  11. logx.Logger
  12. ctx context.Context
  13. svcCtx *svc.ServiceContext
  14. }
  15. func NewRemoveAppInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RemoveAppInfoLogic {
  16. return &RemoveAppInfoLogic{
  17. Logger: logx.WithContext(ctx),
  18. ctx: ctx,
  19. svcCtx: svcCtx,
  20. }
  21. }
  22. func (l *RemoveAppInfoLogic) RemoveAppInfo(req *types.RemoveAppInfoReq) (resp *types.CommonResponse, err error) {
  23. rpcData, err := l.svcCtx.OrganizationRpc.RemoveAppInfo(l.ctx, &pb.RemoveAppInfoReq{
  24. AppName: req.AppName,
  25. })
  26. if err != nil {
  27. return nil, err
  28. }
  29. return &types.CommonResponse{
  30. Code: xerr.OK,
  31. Msg: xerr.MapErrMsg(xerr.OK),
  32. Data: rpcData,
  33. }, nil
  34. }