interface

PreferenceStore

Persist opaque per-user application/admin settings.

Properties

PropertyTypeDescription
GetPreferencefunc(context.Context, schema.StableID, string, string) (Preference, error)The GetPreference value.
SetPreferencefunc(context.Context, Preference) (Preference, error)The SetPreference value.
DeletePreferencefunc(context.Context, schema.StableID, string, string) errorThe DeletePreference value.
DeletePreferencesfunc(context.Context, schema.StableID, string) errorThe DeletePreferences value.

How it works

The contract supports both key-scoped deletion and resetting one identity.

Full signature

type PreferenceStore interface { GetPreference(context.Context, schema.StableID, string, string) (Preference, error) SetPreference(context.Context, Preference) (Preference, error) DeletePreference(context.Context, schema.StableID, string, string) error DeletePreferences(context.Context, schema.StableID, string) error }

Source store/store.go:562