Versions in this module Expand all Collapse all v0 v0.0.5 Nov 25, 2024 v0.0.4 Mar 1, 2024 v0.0.3 Sep 2, 2023 v0.0.2 Sep 1, 2023 v0.0.1 Aug 22, 2023 Changes in this version + var Codecs = map[string]Codec + var Gob = Codec + var JSON = Codec + var YAML = Codec + func CloseQuietly(value any) + func SpecifyType(source any) any + type Codec struct + MarshalFn func(value any, writer io.Writer) error + UnmarshalFn func(reader io.Reader, value any) error + func (c Codec) Marshal(value any, writer io.Writer) error + func (c Codec) Unmarshal(reader io.Reader, value any) error + type DefaultSourceProvider struct + Args []string + Env []string + EnvPrefix string + Stdin io.Reader + func (p *DefaultSourceProvider) GetSources(ctx context.Context) ([]Source, error) + type File string + func (f File) Path() string + func (f File) Reader() (io.Reader, error) + type Format string + func (f Format) SchemaEnum() any + type Input interface + Reader func() (io.Reader, error) + type InputSource struct + Format string + Input Input + func (s InputSource) GetValues(ctx context.Context) (map[string]any, error) + type Property struct + Path []string + Value string + func (p Property) Key() string + type PropertySource []Property + func (s PropertySource) GetValues(ctx context.Context) (map[string]any, error) + type Reader struct + R io.Reader + func (r Reader) Reader() (io.Reader, error) + type Schema struct + AdditionalProperties any + Default any + Description string + Enum any + Examples any + ExclusiveMaximum any + ExclusiveMinimum any + Format string + Items *Schema + MaxItems *uint64 + MaxLength *uint64 + MaxProperties *uint64 + Maximum any + MinItems uint64 + MinLength uint64 + MinProperties uint64 + Minimum any + MultipleOf any + Pattern string + Properties map[string]Schema + Required []string + Type string + UniqueItems bool + func FromProvider(ctx context.Context, provider SourceProvider) (*T, *Schema, error) + func GenerateSchema(value any) (*Schema, error) + func Get(ctx context.Context, appName string) (*T, *Schema, error) + func (s *Schema) ApplyDefaults(source any) error + type Source interface + GetValues func(ctx context.Context) (map[string]any, error) + type SourceProvider interface + GetSources func(ctx context.Context) ([]Source, error)