Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Host string
Port int
DashboardDir string
TemplateName string
ConfigFile string
Environment string
AdminPassword string
Frontend fs.FS // embedded frontend files, nil for dev mode
}
Config holds server configuration.
type DashboardSummary ¶
type DashboardSummary struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Connection string `json:"connection,omitempty"`
WidgetCount int `json:"widget_count"`
FilterCount int `json:"filter_count"`
RowCount int `json:"row_count"`
}
DashboardSummary is a lightweight representation of a dashboard for listing.
func MakeDashboardSummary ¶
func MakeDashboardSummary(d *dashboard.Dashboard) DashboardSummary
MakeDashboardSummary creates a DashboardSummary from a Dashboard.
type Invalidator ¶
type Invalidator interface {
Invalidate()
}
Invalidator is called when dashboard files change to clear stale data.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the dac HTTP server.
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher monitors dashboard files for changes and broadcasts SSE events.
func NewWatcher ¶
NewWatcher creates file watchers for the given directories.
type WidgetQueryResult ¶
type WidgetQueryResult struct {
Columns []struct {
Name string `json:"name"`
Type string `json:"type,omitempty"`
} `json:"columns"`
Rows [][]any `json:"rows"`
Query string `json:"query,omitempty"`
Error string `json:"error,omitempty"`
}
WidgetQueryResult holds the result of executing a widget's SQL query.
func ExecuteWidgetQuery ¶
ExecuteWidgetQuery runs a single widget SQL query against the given backend.
Click to show internal directories.
Click to hide internal directories.