Files
X-Agents/server/internal/model/neo4j_info.go
DESKTOP-72TV0V4\caoxiaozhu c917d6b04c feat: 添加Neo4j图数据库支持及前端代码重构
- 新增 Neo4j 图数据库 handler、service、model
- 后端添加 SaveGraph API 接口
- 前端 Database.vue 重构,拆分为独立组件
- 新增 web/src/views/database/ 组件目录
- 删除临时文件 (temp_*.go)
- 添加 Neo4j 相关 API 需求文档

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 09:11:08 +08:00

40 lines
1.6 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package model
// Neo4jCheckRequest Neo4j 连接测试请求
type Neo4jCheckRequest struct {
Name string `json:"name"` // 数据库名称
Host string `json:"host" binding:"required"`
Port int `json:"port" binding:"required"`
Username string `json:"username" binding:"required"`
Password string `json:"password" binding:"required"`
Database string `json:"database"` // 可选,默认 neo4j
URI string `json:"uri"` // 可选Neo4j 连接地址 (bolt://host:7687)
Description string `json:"description"` // 可选,数据库描述
}
// Neo4jCheckResponse Neo4j 连接测试响应
type Neo4jCheckResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
Version string `json:"version,omitempty"`
Databases []string `json:"databases,omitempty"`
DatabaseID string `json:"databaseId,omitempty"` // 数据库记录 ID
Name string `json:"name,omitempty"` // 数据库名称
Description string `json:"description,omitempty"` // 数据库描述
}
// Neo4jGraphRequest 获取图谱概览请求
type Neo4jGraphRequest struct {
URI string `json:"uri" binding:"required"`
Username string `json:"username" binding:"required"`
Password string `json:"password" binding:"required"`
Database string `json:"database"` // 可选,默认 neo4j
}
// Neo4jGraphResponse 获取图谱概览响应
type Neo4jGraphResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
Graphs *GraphOverview `json:"graphs,omitempty"`
}