Documentation
¶
Index ¶
- Variables
- func DecryptContent(content []byte, format string) ([]byte, error)
- func DecryptFile(path string) ([]byte, error)
- func DecryptFilesInDirectory(repoPath, dirPath string) ([]string, error)
- func GetFileFormat(path string) string
- func IsEncryptedContent(content string) bool
- func IsEncryptedFile(path string) (bool, error)
- func SetupAgeKeyEnvVar(t *testing.T)
- func SopsKeyIsSet() bool
Constants ¶
This section is empty.
Variables ¶
var ErrSopsKeyNotSet = errors.New("SOPS secret key is not set")
var IgnoreDirs = []string{
".git",
".github",
".vscode",
".idea",
"node_modules",
}
IgnoreDirs is a list of directories that will be ignored when checking for SOPS-encrypted files. These directories typically contain configuration or metadata files that are not relevant for encryption.
Functions ¶
func DecryptContent ¶ added in v0.42.0
func DecryptFile ¶
DecryptFile decrypts a SOPS-encrypted file at the given path and returns its contents as a byte slice.
func DecryptFilesInDirectory ¶ added in v0.42.0
DecryptFilesInDirectory walks through the specified directory and decrypts all SOPS-encrypted files.
func GetFileFormat ¶ added in v0.42.0
func IsEncryptedContent ¶ added in v0.42.0
IsEncryptedContent checks the given content for SOPS-specific markers to determine if it is a SOPS-encrypted file.
func IsEncryptedFile ¶
IsEncryptedFile checks if the file at the given path is a SOPS-encrypted file.
func SetupAgeKeyEnvVar ¶
SetupAgeKeyEnvVar sets the SOPS_AGE_KEY environment variable for testing purposes.
func SopsKeyIsSet ¶
func SopsKeyIsSet() bool
SopsKeyIsSet checks if an env var starting with SOPS_ is set.
Types ¶
This section is empty.