encryption

package
v0.1.0-dev.20260223223859 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package encryption provides encryption and decryption actions for the operation graph.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(reg *op.ActionRegistry)

Register registers all encryption actions with the given registry.

Types

type Decrypt

type Decrypt struct{ Impl *Provider }

Decrypt — Decrypt decrypts content using the provided decryptor function. The source path enables format detection (e.g., .sops.yaml vs .sops.json). Returns the decrypted bytes.

func (*Decrypt) Do

func (o *Decrypt) Do(ctx *op.Context, slots map[string]any) (op.Result, op.UndoState, error)

func (*Decrypt) Name

func (o *Decrypt) Name() string

type Provider

type Provider struct{}

Provider provides encryption and decryption actions. The actual crypto backend (SOPS, age, etc.) is injected via function parameters, keeping this provider independent of specific libraries.

func (*Provider) Decrypt

func (p *Provider) Decrypt(decryptor func(string, []byte) ([]byte, error), source string, content []byte) ([]byte, error)

Decrypt decrypts content using the provided decryptor function. The source path enables format detection (e.g., .sops.yaml vs .sops.json). Returns the decrypted bytes.

Parameters:

  • source: Path to the encrypted file (enables format detection)

+devlore:access=planned

Jump to

Keyboard shortcuts

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