secrets

package
v0.0.0-...-089051e Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 12 Imported by: 0

README

Secret Manager

The Secret Manager implements the IExtSecretProvider interface and is part of the EvaluationContext, which is used in expression parsing. It only has one function, which is reading the secret object, field field with a local evaluation context if provided.

The Secret Manager decides which secret provider to use when processing the parsing request. It has three options:

  1. Secret Provider Name Specified: If the secret provider name is specified like Get("k8s::sampleobject", "samplefield", nil), then that specific secret provider is used.

  2. Single Secret Provider: If the secret provider name is not specified but the Secret Manager only has one secret provider, then that secret provider is used by default.

  3. Multiple Secret Providers: If the secret provider name is not specified and the Secret Manager has multiple secret providers, then the manager tries to parse the expression in the order of precedence. The first successful result is returned.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecretsManager

type SecretsManager struct {
	managers.Manager
	SecretProviders map[string]secret.ISecretProvider
	Precedence      []string
}

func (*SecretsManager) Get

func (s *SecretsManager) Get(ctx context.Context, object string, field string, localContext interface{}) (string, error)

func (*SecretsManager) Init

Jump to

Keyboard shortcuts

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