Skip to content

Preferences🔗

Spec defines user, team or org Grafana preferences

swagger:model Preferences

Definition🔗

type Preferences struct {
    // UID for the home dashboard
    HomeDashboardUID *string `json:"homeDashboardUID,omitempty"`
    // The timezone selection
    // TODO: this should use the timezone defined in common
    Timezone *string `json:"timezone,omitempty"`
    // day of the week (sunday, monday, etc)
    WeekStart *string `json:"weekStart,omitempty"`
    // light, dark, empty is default
    Theme *string `json:"theme,omitempty"`
    // Selected language (beta)
    Language *string `json:"language,omitempty"`
    // Explore query history preferences
    QueryHistory *preferences.QueryHistoryPreference `json:"queryHistory,omitempty"`
    // Cookie preferences
    CookiePreferences *preferences.CookiePreferences `json:"cookiePreferences,omitempty"`
    // Navigation preferences
    Navbar *preferences.NavbarPreference `json:"navbar,omitempty"`
}

Methods🔗

UnmarshalJSONStrict🔗

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode Preferences from JSON.

Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (preferences *Preferences) UnmarshalJSONStrict(raw []byte) error

Equals🔗

Equals tests the equality of two Preferences objects.

func (preferences *Preferences) Equals(other Preferences) bool

Validate🔗

Validate checks all the validation constraints that may be defined on Preferences fields for violations and returns them.

func (preferences *Preferences) Validate() error

See also🔗