resolve

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package resolve turns a config.Entry into its concrete string value by reading from value, env, or file as the entry directs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolve

func Resolve(e *config.Entry) (string, error)

Resolve returns the concrete string value for the entry.

`env:` resolution is intentionally lazy — callers invoke Resolve only when the entry is about to be used, so missing env vars surface only for entries that matter to the current run.

Types

type EnvError

type EnvError struct {
	Name string
	Var  string
}

EnvError reports an env-sourced entry whose env var is unset at the point the resolver was asked for the value.

Name is the entry's name (e.g., the secret/var name from YAML); Var is the env var name the entry pointed at. Both are included so callers can produce actionable error messages without re-wrapping.

func (*EnvError) Error

func (e *EnvError) Error() string

type FileError

type FileError struct {
	Path string
	Err  error
}

FileError reports a failure to read a file-sourced value.

func (*FileError) Error

func (e *FileError) Error() string

func (*FileError) Unwrap

func (e *FileError) Unwrap() error

Jump to

Keyboard shortcuts

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