Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgeRecipientsFromKeyFile ¶
AgeRecipientsFromKeyFile reads an age identity file and returns the corresponding recipient(s). It supports resolving ~/ in the path similarly to DecryptAndParse.
func DecryptAndParse ¶
DecryptAndParse returns key=value pairs from a SOPS-encrypted dotenv file. Only dotenv format is supported. If no SOPS backends are configured, the file is treated as plaintext. This function is safe for concurrent use across multiple goroutines.
func EncryptDotenvFileWithSops ¶
func EncryptDotenvFileWithSops(ctx context.Context, path string, ageRecipients []string, ageKeyFile string, pgpRecipients []string, pgpKeyringDir string, pgpUseAgent bool, pgpPinentryMode string, pgpPassphrase string) error
EncryptDotenvFileWithSops encrypts a plaintext dotenv file in-place using the system SOPS binary with provided recipients. Age recipients are passed with --age, PGP recipients are passed with --pgp. This function is safe for concurrent use across multiple goroutines.
Types ¶
type SopsOptions ¶ added in v0.5.0
type SopsOptions struct {
// Age
AgeKeyFile string
AgeRecipients []string
// PGP (GnuPG)
PgpKeyringDir string
PgpUseAgent bool
PgpPinentryMode string // "default" | "loopback"
PgpPassphrase string // interpolated already; not logged
PgpRecipients []string
}
SopsOptions provides decryption/encryption settings for SOPS (age + pgp)