config

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: MIT Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchConfig

func FetchConfig[T any]() (*T, error)

Types

type Config

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

func NewConfig

func NewConfig(sourceInterface SourceConfig) *Config

func (*Config) AvailableTypes

func (cfg *Config) AvailableTypes() []string

type ConfigurationNotInitializedError

type ConfigurationNotInitializedError struct {
}

MARK: - ConfigNotInitializedError

func (ConfigurationNotInitializedError) Error

func (ConfigurationNotInitializedError) TroubleshootingTip added in v0.2.16

func (e ConfigurationNotInitializedError) TroubleshootingTip() string

type MissingConfigValueError

type MissingConfigValueError struct {
	Key string
}

MARK: - MissingConfigValueError

func (MissingConfigValueError) Error

func (e MissingConfigValueError) Error() string

type Secret

type Secret struct {
	Value string
}

func NewSecret

func NewSecret(value string) Secret

func (Secret) String

func (s Secret) String() string

type SourceConfig

type SourceConfig interface {
	ReadString(key string) (string, error)
}

type UnsupportedConfigTypeError

type UnsupportedConfigTypeError struct {
	Type string

	Variable       string
	AvailableTypes []string
}

MARK: - UnsupportedConfigTypeError

func (UnsupportedConfigTypeError) Error

func (UnsupportedConfigTypeError) TroubleshootingTip added in v0.2.16

func (e UnsupportedConfigTypeError) TroubleshootingTip() string

type UnsupportedValueForConversionError

type UnsupportedValueForConversionError struct {
	Value string

	FromType string
	ToType   string
}

MARK: - UnsupportedValueForConversionError

func (UnsupportedValueForConversionError) Error

Directories

Path Synopsis
source

Jump to

Keyboard shortcuts

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