confmap

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 confmap implements a koanf.Provider that takes nested and flat map[string]interface{} config maps and provides them to koanf.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Confmap

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

Confmap implements a raw map[string]interface{} provider.

func Provider

func Provider(mp map[string]interface{}, delim string) *Confmap

Provider returns a confmap Provider that takes a flat or nested map[string]interface{}. If a delim is provided, it indicates that the keys are flat and the map needs to be unflatted by delim.

func (*Confmap) Read

func (e *Confmap) Read() (map[string]interface{}, error)

Read returns the loaded map[string]interface{}.

func (*Confmap) ReadBytes

func (e *Confmap) ReadBytes() ([]byte, error)

ReadBytes is not supported by the env provider.

func (*Confmap) Watch

func (e *Confmap) Watch(cb func(event interface{}, err error)) error

Watch is not supported.

Jump to

Keyboard shortcuts

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