Documentation
¶
Index ¶
- type EdgeEditData
- type NodeEditData
- type Server
- type Session
- func (sess *Session) AddEdge(from, to string, attrs map[string]string) error
- func (sess *Session) AddNode(id string, attrs map[string]string) error
- func (sess *Session) RLock()
- func (sess *Session) RUnlock()
- func (sess *Session) Redo() error
- func (sess *Session) RemoveEdge(edgeID string) error
- func (sess *Session) RemoveNode(nodeID string) error
- func (sess *Session) Undo() error
- func (sess *Session) UpdateDOT(rawDOT string) error
- func (sess *Session) UpdateEdge(edgeID string, attrs map[string]string) error
- func (sess *Session) UpdateGraphAttrs(attrs map[string]string) error
- func (sess *Session) UpdateNode(nodeID string, attrs map[string]string) error
- func (sess *Session) Validate()
- type Store
- type TemplateData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EdgeEditData ¶
EdgeEditData holds the data passed to the edge_edit_form template partial.
type NodeEditData ¶
NodeEditData holds the data passed to the node_edit_form template partial.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds the chi router, session store, and parsed templates. The templates field holds the shared partials. The landingTmpl and editorTmpl fields hold page-specific template sets that each define their own "content" block.
type Session ¶
type Session struct {
ID string
Graph *dot.Graph
RawDOT string
Diagnostics []dot.Diagnostic
UndoStack []string
RedoStack []string
CreatedAt time.Time
LastAccess time.Time
// contains filtered or unexported fields
}
func (*Session) RLock ¶
func (sess *Session) RLock()
RLock acquires a read lock for safe concurrent reads of session data.
func (*Session) RemoveEdge ¶
RemoveEdge removes an edge by its stable ID
func (*Session) RemoveNode ¶
RemoveNode removes a node and its associated edges
func (*Session) UpdateEdge ¶
UpdateEdge updates attributes of an existing edge
func (*Session) UpdateGraphAttrs ¶
UpdateGraphAttrs updates graph-level attributes
func (*Session) UpdateNode ¶
UpdateNode updates attributes of an existing node
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) StartCleanup ¶
StartCleanup starts a background cleanup goroutine and returns a stop function