Refactor persistNode struct for improved readability and consistency in driver.go
- Adjusted the formatting of the persistNode struct fields to enhance code clarity by aligning the field definitions. - Maintained the existing functionality while improving the overall structure for better maintainability.
This commit is contained in:
parent
19b4c7354f
commit
396a37d32f
1 changed files with 14 additions and 14 deletions
|
|
@ -14,20 +14,20 @@ import (
|
||||||
// persistNode is a lightweight version of TraceNode for storage
|
// persistNode is a lightweight version of TraceNode for storage
|
||||||
// Only stores IDs of children instead of full child nodes
|
// Only stores IDs of children instead of full child nodes
|
||||||
type persistNode struct {
|
type persistNode struct {
|
||||||
ID string `json:"ID"`
|
ID string `json:"ID"`
|
||||||
ParentID string `json:"ParentID"`
|
ParentID string `json:"ParentID"`
|
||||||
ChildrenIDs []string `json:"ChildrenIDs,omitempty"`
|
ChildrenIDs []string `json:"ChildrenIDs,omitempty"`
|
||||||
Label string `json:"Label,omitempty"`
|
Label string `json:"Label,omitempty"`
|
||||||
Icon string `json:"Icon,omitempty"`
|
Icon string `json:"Icon,omitempty"`
|
||||||
Description string `json:"Description,omitempty"`
|
Description string `json:"Description,omitempty"`
|
||||||
Metadata map[string]any `json:"Metadata,omitempty"`
|
Metadata map[string]any `json:"Metadata,omitempty"`
|
||||||
Status types.NodeStatus `json:"Status"`
|
Status types.NodeStatus `json:"Status"`
|
||||||
Input types.TraceInput `json:"Input,omitempty"`
|
Input types.TraceInput `json:"Input,omitempty"`
|
||||||
Output types.TraceOutput `json:"Output,omitempty"`
|
Output types.TraceOutput `json:"Output,omitempty"`
|
||||||
CreatedAt int64 `json:"CreatedAt"`
|
CreatedAt int64 `json:"CreatedAt"`
|
||||||
StartTime int64 `json:"StartTime"`
|
StartTime int64 `json:"StartTime"`
|
||||||
EndTime int64 `json:"EndTime,omitempty"`
|
EndTime int64 `json:"EndTime,omitempty"`
|
||||||
UpdatedAt int64 `json:"UpdatedAt"`
|
UpdatedAt int64 `json:"UpdatedAt"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// toPersistNode converts TraceNode to persistNode for storage
|
// toPersistNode converts TraceNode to persistNode for storage
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue