viperconfig

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrReporter = errors.New("preflight.viper.invalid")

ErrReporter indicates the Viper reporter is invalid.

Functions

This section is empty.

Types

type EnvBinding

type EnvBinding struct {
	Key string
	Env string
}

EnvBinding binds a config key to an environment variable name.

type Redactor

type Redactor interface {
	Redact(settings map[string]interface{}, mode preflight.RedactionMode) (json.RawMessage, error)
}

Redactor transforms the effective config into a redacted payload.

type Reporter

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

Reporter builds effective-config reports from Viper settings.

func NewReporter

func NewReporter(configPath string, envBindings []EnvBinding, redactor Redactor) (*Reporter, error)

NewReporter constructs a Viper-backed config reporter.

func (*Reporter) Build

func (reporter *Reporter) Build(mode preflight.RedactionMode) (json.RawMessage, error)

Build loads config via Viper, applies env bindings, and redacts the payload.

Jump to

Keyboard shortcuts

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