{
  "repo": "pingcap/dm",
  "binary": "dm-portal",
  "binary_path": "cmd/dm-portal/main.go",
  "dependencies": {
    "PortalAPI.Check": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Open a database connection and validate connectivity",
              "trigger": "POST /check",
              "implementation": "portal.getDBConnFunc(req, p.timeout)"
            }
          ]
        }
      },
      "services": []
    },
    "PortalAPI.GetSchemaInfo": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Enumerate schemas and tables from the source database",
              "trigger": "POST /schema",
              "implementation": "dbutil.GetSchemas / dbutil.GetTables"
            }
          ]
        }
      },
      "services": []
    },
    "PortalAPI.GenerateConfig": {
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Generate and write DM task YAML files",
              "trigger": "POST /generate_config",
              "implementation": "os.Create(filepath); yaml.Marshal(taskCfg)"
            }
          ]
        }
      },
      "services": []
    },
    "PortalAPI.AnalyzeConfig": {
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "When reading uploaded config files"
          ],
          "operations": [
            {
              "operation": "Read and analyze uploaded DM task files",
              "trigger": "POST /analyze_config_file",
              "implementation": "portal.AnalyzeConfig"
            }
          ]
        }
      },
      "services": []
    },
    "PortalAPI.Download": {
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Serve generated config file content",
              "trigger": "GET /download",
              "implementation": "portal.Download"
            }
          ]
        }
      },
      "services": []
    }
  }
}
