Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheDir ¶
func CacheDir() string
CacheDir returns the OS-appropriate cache directory for dotvault.
func DefaultAgentSocket ¶ added in v0.19.0
func DefaultAgentSocket() string
DefaultAgentSocket returns the per-user Unix domain socket path for the SSH agent when agent.unix.path is unset. It prefers the runtime dir ($XDG_RUNTIME_DIR/dotvault/agent.sock), which is owner-only and cleared on logout, and falls back to the cache dir dotvault already resolves when XDG_RUNTIME_DIR is empty (typical on macOS).
func ExpandHome ¶
ExpandHome expands a leading ~ in a path to the user's home directory.
func SystemConfigPath ¶
func SystemConfigPath() string
SystemConfigPath returns the OS-appropriate path for the system config file.
func ValidateLoopback ¶
ValidateLoopback checks that addr (host:port) resolves to a loopback address.
func VaultTokenPath ¶
func VaultTokenPath() string
VaultTokenPath returns the path to the Vault token file.
dotvault uses its own ~/.dotvault-token rather than Vault's default ~/.vault-token so a user running the upstream `vault` CLI in another context cannot clobber (or be clobbered by) the daemon's cached token.
The home directory is resolved via os.UserHomeDir (mustHomeDir), using the OS's home-directory convention, and panics if it cannot be determined. Resolving an unset home as a panic — rather than joining onto an empty string and silently yielding a CWD-relative ".dotvault-token" — keeps a token from ever landing in the working directory. The panic is part of this function's documented contract; the client facade's DefaultTokenFile recovers it.
Types ¶
This section is empty.