Files
X-Agents/server/internal/model/neo4j_info.go

40 lines
1.6 KiB
Go
Raw Normal View History

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"`
}