package render import ( "go-admin/render/report" ) // NodeSummaryGroup is a topology-typed group of children for a Node. type NodeSummaryGroup struct { ID string `json:"id"` Label string `json:"label"` Nodes []NodeSummary `json:"nodes"` TopologyID string `json:"topologyId"` Columns []Column `json:"columns"` } // Column provides special json serialization for column ids, so they include // their label for the frontend. type Column struct { ID string `json:"id"` Label string `json:"label"` DefaultSort bool `json:"defaultSort"` Datatype string `json:"dataType"` } // BasicNodeSummary is basic summary information about a Node, // sufficient for rendering links to the node. type BasicNodeSummary struct { ID string `json:"id"` Label string `json:"label"` LabelMinor string `json:"labelMinor"` Rank string `json:"rank"` Shape string `json:"shape,omitempty"` Color string `json:"color,omitempty"` Tag string `json:"tag,omitempty"` Stack bool `json:"stack,omitempty"` Pseudo bool `json:"pseudo,omitempty"` } // Parent is the information needed to build a link to the parent of a Node. type Parent struct { ID string `json:"id"` Label string `json:"label"` TopologyID string `json:"topologyId"` } // NodeSummary is summary information about a Node. type NodeSummary struct { BasicNodeSummary Metadata []report.MetadataRow `json:"metadata,omitempty"` Parents []Parent `json:"parents,omitempty"` Metrics []report.MetricRow `json:"metrics,omitempty"` Tables []report.Table `json:"tables,omitempty"` Adjacency report.IDList `json:"adjacency,omitempty"` }