Documentation
¶
Index ¶
- Constants
- Variables
- type AppTheme
- type AuthKey
- type AuthKeyMeta
- type AuthKeyName
- type AuthKeyType
- type AuthKeysSchema
- type DebugLogLevel
- type DebugSettings
- type DeleteAuthKeyRequest
- type DeleteAuthKeyResponse
- type GetAuthKeyRequest
- type GetAuthKeyResponse
- type GetAuthKeyResponseBody
- type GetSettingsRequest
- type GetSettingsResponse
- type GetSettingsResponseBody
- type SetAppThemeRequest
- type SetAppThemeRequestBody
- type SetAppThemeResponse
- type SetAuthKeyRequest
- type SetAuthKeyRequestBody
- type SetAuthKeyResponse
- type SetDebugSettingsRequest
- type SetDebugSettingsRequestBody
- type SetDebugSettingsResponse
- type SettingsSchema
- type ThemeType
Constants ¶
View Source
const ( SchemaVersion = "2026-03-27" SettingsFile = "settings.json" )
View Source
const ( ThemeNameSystem = "system" ThemeNameLight = "applight" ThemeNameDark = "appdark" )
Variables ¶
View Source
var ( ErrInvalidArgument = errors.New("invalid argument") ErrInvalidTheme = errors.New("invalid app theme") ErrInvalidAuthKey = errors.New("invalid auth key") ErrInvalidDebugSettings = errors.New("invalid debug settings") ErrAuthKeyNotFound = errors.New("auth key not found") ErrBuiltInAuthKeyReadOnly = errors.New("built-in auth key is read-only") )
Functions ¶
This section is empty.
Types ¶
type AuthKey ¶
type AuthKey struct {
Secret string `json:"secret"` // encrypted on disk
SHA256 string `json:"sha256"` // plain text
NonEmpty bool `json:"nonEmpty"`
}
AuthKey holds an encrypted secret plus its SHA-256 hash.
type AuthKeyMeta ¶
type AuthKeyMeta struct {
Type AuthKeyType `json:"type"`
KeyName AuthKeyName `json:"keyName"`
SHA256 string `json:"sha256"`
NonEmpty bool `json:"nonEmpty"`
}
AuthKeyMeta is the public view of one stored key (no secret, only SHA).
type AuthKeyType ¶
type AuthKeyType string
AuthKeyType groups keys (e.g. "provider", "github").
const ( AuthKeyTypeProvider AuthKeyType = "provider" // AuthKeyTypeMCP is the dedicated namespace for MCP-related secrets. // Use this for MCP transport auth tokens, headers, and env wiring. AuthKeyTypeMCP AuthKeyType = "mcp" )
type AuthKeysSchema ¶
type AuthKeysSchema map[AuthKeyType]map[AuthKeyName]AuthKey
type DebugLogLevel ¶ added in v0.0.91
type DebugLogLevel string
const ( DebugLogLevelDebug DebugLogLevel = "debug" DebugLogLevelInfo DebugLogLevel = "info" DebugLogLevelWarn DebugLogLevel = "warn" DebugLogLevelError DebugLogLevel = "error" )
type DebugSettings ¶ added in v0.0.91
type DebugSettings struct {
LogLLMReqResp bool `json:"logLLMReqResp"`
DisableContentStripping bool `json:"disableContentStripping"`
LogLevel DebugLogLevel `json:"logLevel"`
}
type DeleteAuthKeyRequest ¶
type DeleteAuthKeyRequest struct {
Type AuthKeyType `path:"type"`
KeyName AuthKeyName `path:"keyName"`
}
DeleteAuthKeyRequest removes a key (if not built-in).
type DeleteAuthKeyResponse ¶
type DeleteAuthKeyResponse struct{}
type GetAuthKeyRequest ¶
type GetAuthKeyRequest struct {
Type AuthKeyType `path:"type"`
KeyName AuthKeyName `path:"keyName"`
}
GetAuthKeyRequest fetches one decrypted secret.
type GetAuthKeyResponse ¶
type GetAuthKeyResponse struct {
Body *GetAuthKeyResponseBody
}
type GetAuthKeyResponseBody ¶
type GetSettingsRequest ¶
type GetSettingsRequest struct {
ForceFetch bool `query:"forceFetch" doc:"Refresh from disk before reading." required:"false"`
}
GetSettingsRequest fetches everything (theme + debug + keys). Secrets are omitted.
type GetSettingsResponse ¶
type GetSettingsResponse struct {
Body *GetSettingsResponseBody
}
GetSettingsResponse returns the current settings without secrets.
type GetSettingsResponseBody ¶
type GetSettingsResponseBody struct {
AppTheme AppTheme `json:"appTheme"`
Debug DebugSettings `json:"debug"`
AuthKeys []AuthKeyMeta `json:"authKeys"`
}
type SetAppThemeRequest ¶
type SetAppThemeRequest struct {
Body *SetAppThemeRequestBody
}
type SetAppThemeRequestBody ¶
type SetAppThemeResponse ¶
type SetAppThemeResponse struct{}
type SetAuthKeyRequest ¶
type SetAuthKeyRequest struct {
Type AuthKeyType `path:"type"`
KeyName AuthKeyName `path:"keyName"`
Body *SetAuthKeyRequestBody
}
SetAuthKeyRequest creates or updates a key (idempotent).
type SetAuthKeyRequestBody ¶
type SetAuthKeyRequestBody struct {
Secret string `json:"secret" required:"true"`
}
type SetAuthKeyResponse ¶
type SetAuthKeyResponse struct{}
type SetDebugSettingsRequest ¶ added in v0.0.91
type SetDebugSettingsRequest struct {
Body *SetDebugSettingsRequestBody
}
type SetDebugSettingsRequestBody ¶ added in v0.0.91
type SetDebugSettingsRequestBody struct {
LogLLMReqResp bool `json:"logLLMReqResp" required:"true"`
DisableContentStripping bool `json:"disableContentStripping" required:"true"`
LogLevel DebugLogLevel `json:"logLevel" required:"true"`
}
type SetDebugSettingsResponse ¶ added in v0.0.91
type SetDebugSettingsResponse struct{}
type SettingsSchema ¶
type SettingsSchema struct {
SchemaVersion string `json:"schemaVersion"`
AppTheme AppTheme `json:"appTheme"`
Debug DebugSettings `json:"debug"`
AuthKeys AuthKeysSchema `json:"authKeys"`
}
Click to show internal directories.
Click to hide internal directories.