Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPrefNotFound = errors.New("preference not found")
Functions ¶
This section is empty.
Types ¶
type GetPreferenceQuery ¶
type NavbarPreference ¶
type NavbarPreference struct {
}type PatchPreferenceCommand ¶
type PatchPreferenceCommand struct { UserID int64 OrgID int64 TeamID int64 HomeDashboardID *int64 `json:"homeDashboardId,omitempty"` HomeDashboardUID *string `json:"homeDashboardUID,omitempty"` Timezone *string `json:"timezone,omitempty"` WeekStart *string `json:"weekStart,omitempty"` Theme *string `json:"theme,omitempty"` Locale *string `json:"locale,omitempty"` QueryHistory *QueryHistoryPreference `json:"queryHistory,omitempty"` }
type Preference ¶
type Preference struct { ID int64 `xorm:"pk autoincr 'id'" db:"id"` OrgID int64 `xorm:"org_id" db:"org_id"` UserID int64 `xorm:"user_id" db:"user_id"` TeamID int64 `xorm:"team_id" db:"team_id"` Teams []int64 `xorm:"extends"` Version int `db:"version"` HomeDashboardID int64 `xorm:"home_dashboard_id" db:"home_dashboard_id"` Timezone string `db:"timezone"` WeekStart string `db:"week_start"` Theme string `db:"theme"` Created time.Time `db:"created"` Updated time.Time `db:"updated"` JSONData *PreferenceJSONData `xorm:"json_data" db:"json_data"` }
func (Preference) TableName ¶
func (p Preference) TableName() string
type PreferenceJSONData ¶
type PreferenceJSONData struct { Locale string `json:"locale"` QueryHistory QueryHistoryPreference `json:"queryHistory"` }
func (*PreferenceJSONData) FromDB ¶
func (j *PreferenceJSONData) FromDB(data []byte) error
func (*PreferenceJSONData) Scan ¶
func (j *PreferenceJSONData) Scan(val interface{}) error
func (*PreferenceJSONData) ToDB ¶
func (j *PreferenceJSONData) ToDB() ([]byte, error)
type QueryHistoryPreference ¶
type QueryHistoryPreference struct {
HomeTab string `json:"homeTab"`
}
type SavePreferenceCommand ¶
type SavePreferenceCommand struct { UserID int64 OrgID int64 TeamID int64 HomeDashboardID int64 `json:"homeDashboardId,omitempty"` HomeDashboardUID *string `json:"homeDashboardUID,omitempty"` Timezone string `json:"timezone,omitempty"` WeekStart string `json:"weekStart,omitempty"` Theme string `json:"theme,omitempty"` Locale string `json:"locale,omitempty"` QueryHistory *QueryHistoryPreference `json:"queryHistory,omitempty"` }
type Service ¶
type Service interface { GetWithDefaults(context.Context, *GetPreferenceWithDefaultsQuery) (*Preference, error) Get(context.Context, *GetPreferenceQuery) (*Preference, error) Save(context.Context, *SavePreferenceCommand) error Patch(context.Context, *PatchPreferenceCommand) error GetDefaults() *Preference DeleteByUser(context.Context, int64) error }
Click to show internal directories.
Click to hide internal directories.