Documentation
¶
Index ¶
Constants ¶
const (
PluginName = "settings"
)
Variables ¶
This section is empty.
Functions ¶
func RedactSettingValues ¶ added in v0.5.0
func RedactSettingValues(values map[string]any, schema map[string]pkgsettings.Setting) map[string]any
RedactSettingValues projects provider values for control/inspect output. A value is public only when its schema explicitly identifies it as nonsecret. Unknown or unavailable plugin schemas therefore fail closed. Provider-owned maps and values are not modified; the projection is for read-only encoding.
func RedactSettingsSchema ¶ added in v0.5.0
func RedactSettingsSchema(schema map[string]pkgsettings.Setting) map[string]pkgsettings.Setting
RedactSettingsSchema keeps schema metadata while excluding every value-bearing field of sensitive settings. Do not serialize an unredacted schema alongside RedactSettingValues: defaults and select options can also contain credentials.
Types ¶
type Controller ¶
type Controller interface {
internaltypes.Controller
settingsservice.Plugins
}
Controller owns settings capability discovery, connections, and hydration. Scoped operations implement the canonical settings service's plugin contract.
func NewController ¶
func NewController(logger logging.Logger, store *settingsstore.Store) Controller
NewController returns a new Controller instance.
type Provider ¶ added in v0.4.0
type Provider interface {
ListSettings() map[string]pkgsettings.Setting
ValidateSetting(id string, value any) (pkgsettings.ValidationResult, error)
CommitSettings(
ctx context.Context,
values map[string]any,
persist pkgsettings.PersistFunc,
) (pkgsettings.CommitResult, error)
}
Provider is the narrow settings transport consumed by the controller.