secrets

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgeRecipientsFromKeyFile

func AgeRecipientsFromKeyFile(ageKeyFile string) ([]string, error)

AgeRecipientsFromKeyFile reads an age identity file and returns the corresponding recipient(s). It supports resolving ~/ in the path similarly to DecryptAndParse.

func DecryptAndParse

func DecryptAndParse(ctx context.Context, path string, ageKeyFile string) ([]string, error)

DecryptAndParse returns key=value pairs from a SOPS-encrypted dotenv file. Only dotenv format is supported. If ageKeyFile is empty, the file is treated as plaintext.

func EncryptDotenvFileWithSops

func EncryptDotenvFileWithSops(ctx context.Context, path string, recipients []string, ageKeyFile string) error

EncryptDotenvFileWithSops encrypts a plaintext dotenv file in-place using the system SOPS binary with provided age recipients.

Types

This section is empty.

Jump to

Keyboard shortcuts

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