Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kind ¶
TODO standard generated docs
func (*Kind) ConvergentLineage ¶
func (k *Kind) ConvergentLineage() thema.ConvergentLineage[*Preferences]
ConvergentLineage returns the same thema.Lineage as Lineage, but bound (see thema.BindType) to the the Preferences type generated from the current schema, v0.0.
func (*Kind) JSONValueMux ¶
func (k *Kind) JSONValueMux(b []byte) (*Preferences, thema.TranslationLacunas, error)
JSONValueMux is a version multiplexer that maps a []byte containing JSON data at any schematized dashboard version to an instance of Preferences.
Validation and translation errors emitted from this func will identify the input bytes as "dashboard.json".
This is a thin wrapper around Thema's vmux.ValueMux.
type Preferences ¶
type Preferences struct {
// UID for the home dashboard
HomeDashboardUID *string `json:"homeDashboardUID,omitempty"`
// Selected language (beta)
Language *string `json:"language,omitempty"`
QueryHistory *QueryHistoryPreference `json:"queryHistory,omitempty"`
// Theme light, dark, empty is default
Theme *string `json:"theme,omitempty"`
// The timezone selection
// TODO: this should use the timezone defined in common
Timezone *string `json:"timezone,omitempty"`
// WeekStart day of the week (sunday, monday, etc)
WeekStart *string `json:"weekStart,omitempty"`
}
Preferences defines model for Preferences.
type QueryHistoryPreference ¶
type QueryHistoryPreference struct {
// HomeTab one of: ” | 'query' | 'starred';
HomeTab *string `json:"homeTab,omitempty"`
}
QueryHistoryPreference defines model for QueryHistoryPreference.
Click to show internal directories.
Click to hide internal directories.