Documentation
¶
Index ¶
- Constants
- Variables
- type AppTheme
- type AuthKey
- type AuthKeyMeta
- type AuthKeyName
- type AuthKeyType
- type AuthKeysSchema
- 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 SettingsSchema
- type ThemeType
Constants ¶
View Source
const ( SchemaVersion = "2025-07-01" SettingsFile = "settings.json" )
View Source
const ( ThemeNameSystem = "system" ThemeNameLight = "applight" ThemeNameDark = "appdark" )
Variables ¶
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"
type AuthKeysSchema ¶
type AuthKeysSchema map[AuthKeyType]map[AuthKeyName]AuthKey
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 + 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"`
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 SettingsSchema ¶
type SettingsSchema struct {
SchemaVersion string `json:"schemaVersion"`
AppTheme AppTheme `json:"appTheme"`
AuthKeys AuthKeysSchema `json:"authKeys"`
}
Click to show internal directories.
Click to hide internal directories.