encrypted

package
v0.0.0-...-0b0e567 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package encrypted provides an encrypted configuration source wrapper that automatically encrypts and decrypts data using the secrets interface.

Package encrypted provides an encrypted configuration source wrapper that automatically encrypts and decrypts data using the secrets interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSource

func NewSource(opts ...Option) source.Source

NewSource creates a new encrypted source that wraps an underlying source. The encrypted source automatically decrypts data on Read and encrypts data on Write.

Required options:

  • WithSecret: sets the encryption/decryption provider
  • WithSource: sets the underlying data source

Types

type Option

type Option func(*Options)

Option is a function that configures Options.

func WithSecret

func WithSecret(s secrets.Secrets) Option

WithSecret sets the secrets provider for encryption/decryption.

func WithSource

func WithSource(s source.Source) Option

WithSource sets the underlying data source to wrap.

type Options

type Options struct {
	// Secret is the encryption/decryption provider (required).
	Secret secrets.Secrets
	// Source is the underlying data source to wrap.
	Source source.Source
}

Options contains configuration for the encrypted source.

Source Files

  • encrypted.go
  • options.go

Jump to

Keyboard shortcuts

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