credentials

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) (credentials.Store, error)

New registers credentials/env: Resolve secrets from environment variables.

Best practices:

  • Reference a secret as env:NAME from the consumer's apiKeyRef rather than inlining it in YAML.
  • Use files for local development .env files; real environment variables still take precedence.

Types

type Config

type Config struct {
	// Prefix is prepended to every lookup key.
	Prefix string `json:"prefix"`
	// Files are dotenv-style KEY=VALUE files used after context and process environment misses.
	Files []string `json:"files"`
}

type Store

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

func (*Store) Resolve

func (s *Store) Resolve(ctx context.Context, ref string) (credentials.Secret, error)

Jump to

Keyboard shortcuts

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