Documentation
¶
Overview ¶
Package graphviewer exposes a local, read-only HTTP API for navigating a Comanda knowledge graph. Both the browser visualizer and future native clients (such as Canvas) consume this contract.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VisualizationHandler ¶
func VisualizationHandler(open OpenQuerier) (http.Handler, error)
VisualizationHandler serves the interactive browser UI and its API from one localhost origin. The API remains usable independently through NewAPI.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API provides the graph navigation contract. Annotation writes are limited to durable human guidance on existing graph nodes; it never exposes files.
func NewAPI ¶
func NewAPI(open OpenQuerier) *API
NewAPI creates a graph navigation API with these endpoints:
GET /api/v1/overview?namespace=<name> GET /api/v1/graph?namespace=<name> GET /api/v1/search?q=<text>&limit=<n>&namespace=<name> GET /api/v1/query?question=<text>&namespace=<name> GET /api/v1/neighbors?focus=<node-id-or-name>&limit=<n>&offset=<n>&namespace=<name> GET /api/v1/subgraph?focus=<node-id-or-name>&depth=1..3&namespace=<name>
type OpenQuerier ¶
OpenQuerier opens a read-only graph query session for namespace. A blank namespace asks the caller to select its default graph.