settings

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AIProviderAPIKeyPatch

type AIProviderAPIKeyPatch struct {
	ProviderID string
	// APIKey is the new key to set. If nil, the key is cleared.
	APIKey *string
}

type SecretsStore

type SecretsStore struct {
	// contains filtered or unexported fields
}

SecretsStore persists user-managed secrets to a local file.

It is intentionally separate from config.json: - config.json contains non-secret runtime and control-plane metadata - secrets.json contains runtime credentials and user-provided provider keys

Secrets must never be returned back to the UI in plaintext. The UI should only see derived status fields such as "api_key_set".

func NewSecretsStore

func NewSecretsStore(path string) *SecretsStore

func (*SecretsStore) ApplyAIProviderAPIKeyPatches

func (s *SecretsStore) ApplyAIProviderAPIKeyPatches(patches []AIProviderAPIKeyPatch) error

func (*SecretsStore) ApplyWebSearchProviderAPIKeyPatches

func (s *SecretsStore) ApplyWebSearchProviderAPIKeyPatches(patches []WebSearchProviderAPIKeyPatch) error

func (*SecretsStore) ClearAIProviderAPIKey

func (s *SecretsStore) ClearAIProviderAPIKey(providerID string) error

func (*SecretsStore) GetAIProviderAPIKey

func (s *SecretsStore) GetAIProviderAPIKey(providerID string) (string, bool, error)

func (*SecretsStore) GetAIProviderAPIKeySet

func (s *SecretsStore) GetAIProviderAPIKeySet(providerIDs []string) (map[string]bool, error)

func (*SecretsStore) GetRuntimeDirectPSK added in v0.7.2

func (s *SecretsStore) GetRuntimeDirectPSK(channelID string) (string, bool, error)

func (*SecretsStore) GetWebSearchProviderAPIKey

func (s *SecretsStore) GetWebSearchProviderAPIKey(providerID string) (string, bool, error)

func (*SecretsStore) GetWebSearchProviderAPIKeySet

func (s *SecretsStore) GetWebSearchProviderAPIKeySet(providerIDs []string) (map[string]bool, error)

func (*SecretsStore) HasAIProviderAPIKey

func (s *SecretsStore) HasAIProviderAPIKey(providerID string) (bool, error)

func (*SecretsStore) HasWebSearchProviderAPIKey

func (s *SecretsStore) HasWebSearchProviderAPIKey(providerID string) (bool, error)

func (*SecretsStore) ListAIProviderAPIKeyIDs added in v0.7.1

func (s *SecretsStore) ListAIProviderAPIKeyIDs() ([]string, error)

func (*SecretsStore) ListWebSearchProviderAPIKeyIDs added in v0.7.1

func (s *SecretsStore) ListWebSearchProviderAPIKeyIDs() ([]string, error)

func (*SecretsStore) Path

func (s *SecretsStore) Path() string

func (*SecretsStore) RetainRuntimeDirectPSK added in v0.7.2

func (s *SecretsStore) RetainRuntimeDirectPSK(channelID string) error

RetainRuntimeDirectPSK removes direct PSKs that are no longer referenced by config.json. An empty channel id clears every persisted direct PSK.

func (*SecretsStore) SetAIProviderAPIKey

func (s *SecretsStore) SetAIProviderAPIKey(providerID string, apiKey string) error

func (*SecretsStore) SetRuntimeDirectPSK added in v0.7.2

func (s *SecretsStore) SetRuntimeDirectPSK(channelID string, psk string) error

type WebSearchProviderAPIKeyPatch

type WebSearchProviderAPIKeyPatch struct {
	ProviderID string
	// APIKey is the new key to set. If nil, the key is cleared.
	APIKey *string
}

Jump to

Keyboard shortcuts

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