Documentation
¶
Overview ¶
Package cmdutil provides shared helpers for CLI command implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrAlreadyWritten = errors.New("error already written to output")
ErrAlreadyWritten signals that a JSON error envelope was already written.
Functions ¶
func LoadRegistry ¶
LoadRegistry loads only the type registry from a vault's .vaultmind/config.yaml without opening the index database. Use this when you need schema information (e.g., for live validation) but not the index itself.
Types ¶
type VaultDB ¶
type VaultDB struct {
DB *index.DB
Config *vault.Config
Reg *schema.Registry
// contains filtered or unexported fields
}
VaultDB bundles the commonly needed vault resources.
func OpenVaultDB ¶
OpenVaultDB loads config, opens the index DB, and creates the type registry.
func OpenVaultDBOrWriteErr ¶
OpenVaultDBOrWriteErr opens the vault DB. On failure with --json set, writes a JSON error envelope and returns ErrAlreadyWritten.
func (*VaultDB) GetIndexHash ¶
GetIndexHash returns the cached SHA-256 hash of the SQLite database file.