rawbytes

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 1 Imported by: 111

Documentation

Overview

Package rawbytes implements a koanf.Provider that takes a []byte slice and provides it to koanf to be parsed by a koanf.Parser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RawBytes

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

RawBytes implements a raw bytes provider.

func Provider

func Provider(b []byte) *RawBytes

Provider returns a provider that takes a raw []byte slice to be parsed by a koanf.Parser parser. This should be a nested conf map, like the contents of a raw JSON config file.

func (*RawBytes) Read

func (r *RawBytes) Read() (map[string]interface{}, error)

Read returns the raw bytes for parsing.

func (*RawBytes) ReadBytes

func (r *RawBytes) ReadBytes() ([]byte, error)

ReadBytes is not supported by the env provider.

func (*RawBytes) Watch added in v0.5.0

func (r *RawBytes) 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
JackTT - Gopher 🇻🇳