sops

package
v0.1.68 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decryptor

type Decryptor interface {
	Decrypt(path string) ([]byte, error)
}

Decryptor decrypts a .ward file and returns its raw YAML bytes.

type MockDecryptor

type MockDecryptor struct{}

MockDecryptor reads the file as plain YAML without any decryption. Used in tests to avoid requiring a real age key.

func (MockDecryptor) Decrypt

func (MockDecryptor) Decrypt(path string) ([]byte, error)

type SopsDecryptor

type SopsDecryptor struct {
	KeyFile string
}

SopsDecryptor decrypts and re-encrypts sops+age .ward files using the sops Go library.

func (SopsDecryptor) Decrypt

func (d SopsDecryptor) Decrypt(path string) ([]byte, error)

Decrypt decrypts a sops+age YAML file and returns the plaintext YAML bytes.

func (SopsDecryptor) Encrypt

func (d SopsDecryptor) Encrypt(path string, plaintext []byte) error

Encrypt encrypts plaintext YAML and writes the sops+age file to path.

Jump to

Keyboard shortcuts

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