Documentation
¶
Overview ¶
Package secret provides a file-permission-protected secret store for klausctl. Secrets are stored as a flat YAML map in ~/.config/klausctl/secrets.yaml with owner-only (0600) file permissions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateName ¶
ValidateName checks that a secret name is safe for use as both a map key and a filename. Names must start with an alphanumeric character and contain only alphanumerics, dots, hyphens, or underscores.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages named secrets persisted as a YAML file with restricted file permissions.
func Load ¶
Load reads secrets from the given file path. If the file does not exist, an empty store is returned. An error is returned when the file exists but cannot be read or parsed, or when file permissions are too open.