settings

package
v0.25.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: AGPL-3.0 Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL