reader

package
v0.4.22 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(o *Options)

func WithEncoder

func WithEncoder(e encoder.Encoder) Option

type Options

type Options struct {
	Encoding map[string]encoder.Encoder
}

func NewOptions

func NewOptions(opts ...Option) Options

type Reader

type Reader interface {
	Merge(...*source.ChangeSet) (*source.ChangeSet, error)
	Values(*source.ChangeSet) (Values, error)
	String() string
}

Reader is an interface for merging changesets

type Value

type Value interface {
	IsNil() bool
	Bool(def bool) bool
	Int(def int) int
	String(def string) string
	Float64(def float64) float64
	Duration(def time.Duration) time.Duration
	StringSlice(def []string) []string
	StringMap(def map[string]string) map[string]string
	Scan(val interface{}) error
	Bytes() []byte
	Get(key string) Value
}

Value represents a value of any type

type Values

type Values interface {
	Bytes() []byte
	Get(path ...string) Value
	Map() map[string]interface{}
	Scan(v interface{}) error //will unmarshall to readable struct
}

Values is returned by the reader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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