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

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