config

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get[ParameterType supportedParameterValueType](cfg Config, parameter Parameter[ParameterType]) (ParameterType, i18n.Error)

Types

type Config

type Config interface {
	Get(key string, expectedType any) (any, i18n.Error)
}

type Parameter

type Parameter[ValueType supportedParameterValueType] struct {
	ID           string
	FlagName     string
	HiddenFlag   bool
	EnvVarName   string
	Description  string
	DefaultValue ValueType

	RecordToLog bool
}

func (Parameter[ValueType]) GetActive

func (p Parameter[ValueType]) GetActive() bool

func (Parameter[ValueType]) GetDefaultValue

func (p Parameter[ValueType]) GetDefaultValue() any

func (Parameter[ValueType]) GetDescription

func (p Parameter[ValueType]) GetDescription() string

func (Parameter[ValueType]) GetEnvVarName

func (p Parameter[ValueType]) GetEnvVarName() string

func (Parameter[ValueType]) GetFlagName

func (p Parameter[ValueType]) GetFlagName() string

func (Parameter[ValueType]) GetHiddenFlag

func (p Parameter[ValueType]) GetHiddenFlag() bool

func (Parameter[ValueType]) GetID

func (p Parameter[ValueType]) GetID() string

func (Parameter[ValueType]) GetRecordToLog

func (p Parameter[ValueType]) GetRecordToLog() bool

Jump to

Keyboard shortcuts

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