Documentation
¶
Overview ¶
Package config provides explicit, typed environment config helpers for modkit modules.
Index ¶
- func NewModule(opts ...Option) module.Module
- func ParseBool(raw string) (bool, error)
- func ParseCSV(raw string) ([]string, error)
- func ParseDuration(raw string) (time.Duration, error)
- func ParseFloat64(raw string) (float64, error)
- func ParseInt(raw string) (int, error)
- func ParseString(raw string) (string, error)
- type InvalidSpecError
- type MissingRequiredError
- type Option
- type ParseError
- type Source
- type ValueSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseDuration ¶
ParseDuration parses a time.Duration value.
func ParseFloat64 ¶
ParseFloat64 parses a float64 value.
Types ¶
type InvalidSpecError ¶
InvalidSpecError reports an invalid value specification.
func (*InvalidSpecError) Error ¶
func (e *InvalidSpecError) Error() string
type MissingRequiredError ¶
MissingRequiredError reports a required key that was unset.
func (*MissingRequiredError) Error ¶
func (e *MissingRequiredError) Error() string
type Option ¶
type Option func(*builder)
Option configures the config module builder.
func WithModuleName ¶
WithModuleName sets an explicit module name.
type ParseError ¶
ParseError reports a value parse failure.
func (*ParseError) Error ¶
func (e *ParseError) Error() string
func (*ParseError) Unwrap ¶
func (e *ParseError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.