config

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2026 License: Unlicense Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir added in v0.1.1

func ConfigDir() string

ConfigDir returns the vaultenv configuration directory (e.g. ~/.config/vaultenv, or VAULTENV_CONFIG_DIR when set).

func SaveGlobal

func SaveGlobal(cfg *GlobalConfig) error

SaveGlobal persists the global config.

func SaveLocal

func SaveLocal(cfg *LocalConfig) error

SaveLocal persists the per-repo .vaultenv config.

Types

type GlobalConfig

type GlobalConfig struct {
	AccessToken string `json:"access_token"`
	Username    string `json:"username"`
}

GlobalConfig stores auth tokens and user identity.

func LoadGlobal

func LoadGlobal() (*GlobalConfig, error)

LoadGlobal loads the global config from ~/.config/vaultenv/config.json

type LocalConfig

type LocalConfig struct {
	Namespace string `json:"namespace"`
	Repo      string `json:"repo"`
	VaultRepo string `json:"vault_repo"`
}

LocalConfig stores per-repo link configuration.

func LoadLocal

func LoadLocal() (*LocalConfig, error)

LoadLocal loads the per-repo .vaultenv config from the current directory.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL