{
  "name": "protobuf",
  "title": "Protobuf解析器",
  "description": "解析 Protobuf 二进制数据为对象（需安装 protobufjs）。适用场景：对接 protobuf 序列化的服务、解析其二进制消息时。工作流提示：message_type 填消息类型名，proto_file 填 .proto 路径，二进制数据经工作流输入传入，结果在 parsed 中。",
  "type": "core",
  "params": {
    "type": "object",
    "properties": {
      "message_type": {
        "type": "string",
        "description": "消息类型名称"
      },
      "proto_file": {
        "type": "string",
        "description": "proto文件路径"
      }
    }
  },
  "returns": {
    "type": "object",
    "description": "解析结果，正常时包含 result 业务数据，异常时包含 error",
    "properties": {
      "type": "object",
      "description": "解析结果",
      "properties": {
        "parsed": {
          "type": "object",
          "description": "解析后的Protobuf数据"
        },
        "error": {
          "type": "object",
          "description": "错误信息，仅调用出错时返回",
          "properties": {
            "code": {
              "type": "string",
              "description": "错误码"
            },
            "message": {
              "type": "string",
              "description": "错误描述"
            }
          }
        }
      }
    }
  },
  "options": {},
  "group": "struct"
}
