plugins

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package plugins describes the xconfig provider interface. it exists to enable xconfig.Classic without circular deps.

Index

Constants

This section is empty.

Variables

View Source
var ErrUsage = errors.New("xconfig: usage request")

ErrUsage is returned when user has request usage message via some plugin, mostly flags.

Functions

func RegisterTag

func RegisterTag(name string)

RegisterTag allows providers to ensure their tag is unique. they must call this function from an init.

Types

type Plugin

type Plugin interface {
	Parse() error
}

Plugin is the common interface for all xconfig providers.

type Visitor

type Visitor interface {
	Plugin

	Visit(fields flat.Fields) error
}

Visitor is the interface for providers that require a flat view of the config, like flags, env vars.

type Walker

type Walker interface {
	Plugin

	Walk(config any) error
}

Walker is the interface for providers that take the whole config, like file loaders.

Directories

Path Synopsis
Package defaults provides default values for xconfig
Package defaults provides default values for xconfig
Package defaults provides default values for xconfig
Package defaults provides default values for xconfig
Package env provides environment variables support for xconfig
Package env provides environment variables support for xconfig
Package flag provides flags support for xconfig
Package flag provides flags support for xconfig
Package file provides config loader support for xconfig
Package file provides config loader support for xconfig
Package secret enable xconfig to integrate with secret plugins.
Package secret enable xconfig to integrate with secret plugins.

Jump to

Keyboard shortcuts

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