secrets

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Obfuscator

type Obfuscator struct {
	// contains filtered or unexported fields
}

func NewObfuscator

func NewObfuscator() *Obfuscator

func (*Obfuscator) ReplaceAll

func (o *Obfuscator) ReplaceAll(ctx context.Context, obj any, jsonPaths []string) (any, error)

func (*Obfuscator) ReplaceAllFromBytes

func (o *Obfuscator) ReplaceAllFromBytes(ctx context.Context, b []byte, jsonPaths []string) ([]byte, error)

func (*Obfuscator) ReplaceAllFromMap

func (o *Obfuscator) ReplaceAllFromMap(ctx context.Context, m map[string]any, jsonPaths []string) (map[string]any, error)

type Replacer

type Replacer interface {
	ReplaceAll(ctx context.Context, obj any, jsonPaths []string) (any, error)
}

Replacer is an interface for replacing secret values in different types of objects.

type SecretManagerResolver

type SecretManagerResolver struct {
	M secrets.SecretsApi
}

func NewDefaultSecretManagerResolver

func NewDefaultSecretManagerResolver() *SecretManagerResolver

func NewSecretManagerResolver

func NewSecretManagerResolver(api secrets.SecretsApi) *SecretManagerResolver

func (*SecretManagerResolver) ReplaceAll

func (s *SecretManagerResolver) ReplaceAll(ctx context.Context, obj any, jsonPaths []string) (any, error)

func (*SecretManagerResolver) ReplaceAllFromBytes

func (s *SecretManagerResolver) ReplaceAllFromBytes(ctx context.Context, b []byte, jsonPaths []string) ([]byte, error)

func (*SecretManagerResolver) ReplaceAllFromMap

func (s *SecretManagerResolver) ReplaceAllFromMap(ctx context.Context, m map[string]any, jsonPaths []string) (map[string]any, error)

type SecretStore

type SecretStore[T store.Object] struct {
	store.ObjectStore[T]
	// contains filtered or unexported fields
}

func WrapStore

func WrapStore[T store.Object](s store.ObjectStore[T], secretJsonPaths []string, secretsResolver Replacer) *SecretStore[T]

func (*SecretStore[T]) Get

func (s *SecretStore[T]) Get(ctx context.Context, namespace, name string) (res T, err error)

func (*SecretStore[T]) List

func (s *SecretStore[T]) List(ctx context.Context, opts store.ListOpts) (*store.ListResponse[T], error)

Jump to

Keyboard shortcuts

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