mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Split preference store * Chore: Add tests to pref * Fix preference in wire * Rename and adjust * Add pref service test * Rename methods, add tests * Rename Preferences to Preference, names IDs correctly * Fix lint * Refactor Save * Refactor upsert Add new logic for QueryHistory Rename some fields according to go naming conventions Refactore tests * Roll back ID that breaks tests * Rename Id to ID in UpdatePreferenceQuery * Use preference as a model to modify store * Move pref store fakes to pref test file * Add integration tag for store tests * Adjust test Co-authored-by: yangkb09 <yangkb09@gmail.com>
14 lines
359 B
Go
14 lines
359 B
Go
package pref
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Service interface {
|
|
GetWithDefaults(context.Context, *GetPreferenceWithDefaultsQuery) (*Preference, error)
|
|
Get(context.Context, *GetPreferenceQuery) (*Preference, error)
|
|
Save(context.Context, *SavePreferenceCommand) error
|
|
Patch(ctx context.Context, cmd *PatchPreferenceCommand) error
|
|
GetDefaults() *Preference
|
|
}
|