docs: align vault storage documentation with code
This commit is contained in:
@@ -23,12 +23,12 @@ import (
|
||||
|
||||
// StartupStatus describes the application startup state.
|
||||
type StartupStatus struct {
|
||||
Status string `json:"status"` // "first_run", "recovery", "ready"
|
||||
VaultPath string `json:"vaultPath"` // configured or default vault path
|
||||
VaultExists bool `json:"vaultExists"` // whether vault.db exists at the path
|
||||
DefaultPath string `json:"defaultPath"` // default vault path suggestion
|
||||
Error string `json:"error,omitempty"`
|
||||
AppConfig *config.AppConfig `json:"appConfig,omitempty"`
|
||||
Status string `json:"status"` // "first_run", "recovery", "ready"
|
||||
VaultPath string `json:"vaultPath"` // configured or default vault path
|
||||
VaultExists bool `json:"vaultExists"` // whether index.db exists at the path
|
||||
DefaultPath string `json:"defaultPath"` // default vault path suggestion
|
||||
Error string `json:"error,omitempty"`
|
||||
AppConfig *config.AppConfig `json:"appConfig,omitempty"`
|
||||
}
|
||||
|
||||
// GetStartupStatus checks the global config and vault state.
|
||||
@@ -336,7 +336,7 @@ func (a *App) CheckVaultPath(vaultPath string) (*CheckVaultPathResult, error) {
|
||||
}
|
||||
}
|
||||
|
||||
desc := describeVaultPath(vaultPath, exists, hasVault)
|
||||
desc := describeVaultPath(exists, hasVault)
|
||||
|
||||
return &CheckVaultPathResult{
|
||||
Exists: exists,
|
||||
@@ -355,7 +355,7 @@ func checkDirWritable(dir string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func describeVaultPath(path string, exists, hasVault bool) string {
|
||||
func describeVaultPath(exists, hasVault bool) string {
|
||||
if !exists {
|
||||
return "Путь не существует. Будет создан новый vault."
|
||||
}
|
||||
@@ -367,13 +367,13 @@ func describeVaultPath(path string, exists, hasVault bool) string {
|
||||
|
||||
// VaultInfo returns information about the currently open vault.
|
||||
type VaultInfo struct {
|
||||
Path string `json:"path"`
|
||||
DBPath string `json:"dbPath"`
|
||||
FilesPath string `json:"filesPath"`
|
||||
TrashPath string `json:"trashPath"`
|
||||
Healthy bool `json:"healthy"`
|
||||
NodeCount int `json:"nodeCount"`
|
||||
FileCount int `json:"fileCount"`
|
||||
Path string `json:"path"`
|
||||
DBPath string `json:"dbPath"`
|
||||
FilesPath string `json:"filesPath"`
|
||||
TrashPath string `json:"trashPath"`
|
||||
Healthy bool `json:"healthy"`
|
||||
NodeCount int `json:"nodeCount"`
|
||||
FileCount int `json:"fileCount"`
|
||||
}
|
||||
|
||||
func (a *App) GetVaultInfo() (*VaultInfo, error) {
|
||||
|
||||
Reference in New Issue
Block a user