settings

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: May 13, 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 control-plane managed fields (including some secrets like E2EE PSK) - secrets.json contains user-provided secrets (like AI provider API 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) 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) Path

func (s *SecretsStore) Path() string

func (*SecretsStore) SetAIProviderAPIKey

func (s *SecretsStore) SetAIProviderAPIKey(providerID string, apiKey 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