credentials

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvGraphSource added in v0.1.19

func EnvGraphSource(raw map[string]any) (config.EnvLookup, error)

EnvGraphSource exposes credentials/env config.env entries to ${env:NAME} / ${var:NAME} gate probes and interpolation. It does not read config.files or build a Store.

func New

func New(cfg Config, deps EnvDeps) (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 config.env for inline secrets in YAML; process environment still takes precedence.
  • Use files for local development .env files; config env takes precedence over files.
  • Dotenv files are loaded once into memory; run "env -u" to reload config.files after editing them.

Types

type Config

type Config struct {
	// Prefix is prepended to every lookup key.
	Prefix string `json:"prefix"`
	// Env holds in-memory KEY=VALUE pairs from config, used after process environment misses.
	Env map[string]string `json:"env"`
	// Files are dotenv-style KEY=VALUE files used after context, process environment, and config env misses.
	Files []string `json:"files"`
}

type EnvDeps added in v0.1.8

type EnvDeps struct {
	Workspace workspace.Service `json:"workspace,omitempty"`
}

type Store

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

func (*Store) Commands added in v0.1.8

func (s *Store) Commands() []agentkit.Command

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