rawbytes

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: 1 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 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

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