confmap

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: MIT Imports: 2 Imported by: 117

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 added in v0.5.0

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