plugins

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 4 Imported by: 9

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var ErrUsage = errors.New("uconfig: 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 uConfig providers.

type Visitor

type Visitor interface {
	Plugin

	Visit(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(interface{}) error
}

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

Directories

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

Jump to

Keyboard shortcuts

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