Documentation
¶
Overview ¶
Package vault provides helpers for creating and inspecting vaults.
Index ¶
- func Create(path string) error
- func InitOrImport(path string) error
- func RequireFile(dir, name, label string, cfg *config.Config) (string, error)
- func RequireNoFile(dir, name, label string, cfg *config.Config) error
- func ResolveFile(pathPrefix string, cfg *config.Config) (string, error)
- func Stat(cfg *config.Config) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create sets up a new Fern Vault at the given path. Returns an error if the directory already exists.
func InitOrImport ¶
InitOrImport sets up the vault structure at path, creating directories and seed files as needed. Unlike Create, it succeeds if the directory already exists, making it safe for importing an existing vault.
func RequireFile ¶
RequireFile resolves a file or returns a user-friendly error with the label.
func RequireNoFile ¶
RequireNoFile ensures no file exists with this base name (any extension).
func ResolveFile ¶
ResolveFile finds an existing file by path prefix (without extension). Returns the full path or an error if not found.
Types ¶
This section is empty.