structs

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package structs implements a koanf.Provider that takes a struct and tag and returns a nested config map (using fatih/structs) to provide it to koanf.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Structs

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

Structs implements a structs provider.

func Provider

func Provider(s interface{}, tag string) *Structs

Provider returns a provider that takes a takes a struct and a struct tag and uses structs to parse and provide it to koanf.

func (*Structs) Read

func (s *Structs) Read() (map[string]interface{}, error)

Read reads the struct and returns a nested config map.

func (*Structs) ReadBytes

func (s *Structs) ReadBytes() ([]byte, error)

ReadBytes is not supported by the structs provider.

func (*Structs) Watch

func (s *Structs) Watch(cb func(event interface{}, err error)) error

Watch is not supported by the structs provider.

Jump to

Keyboard shortcuts

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