Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GaugeWidget ¶
type GaugeWidget interface { Widget Sync(isPercent bool, value float64) error SetColor(hexColor string) error }
GaugeWidget knows how to render a Gauge kind widget that can be in percent or not and supports color changes.
type GraphWidget ¶
type GraphWidget interface { Widget // GetGraphPointQuantity will return the number of points the graph can display // on the X axis at this given moment (is a best effort, when updating the graph // could have changed the size). GetGraphPointQuantity() int // Sync will sync the different series on the graph. Sync(series []Series) error }
GraphWidget knows how to render a Graph kind widget that renders lines in a two axis space using lines, dots... depending on the render implementation.
type Renderer ¶
type Renderer interface { LoadDashboard(ctx context.Context, grid *grid.Grid) ([]Widget, error) SetTemplater(vs map[string]variable.Variabler, override map[string]string) Close() }
Renderer is the interface that knows how to load a dashboard to be rendered in some target of UI.
type Series ¶
type Series struct { Label string Color string // XLabels are the labels that will be displayed on the X axis // the position of the label is the index of the slice. XLabels []string // Value slice, if there is no value we will use a nil value // we could use NaN floats but nil is more idiomatic and easy // to understand. Values []*Value }
Series are the series that can be rendered.
type SinglestatWidget ¶
SinglestatWidget knows how to render a Singlestat kind widget that can render text and supports changing color.
Click to show internal directories.
Click to hide internal directories.