configx

package
v2.2.0-rc2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: AGPL-3.0 Imports: 9 Imported by: 311

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatPath

func FormatPath(ii ...interface{}) string

func StringToKeys

func StringToKeys(s ...string) []string

Types

type Entrypoint

type Entrypoint interface {
	KVStore
	Val(path ...string) Values
}

Entrypoint

type KVStore

type KVStore interface {
	Get() Value
	Set(value interface{}) error
	Del() error
}

KVStore

type Key

type Key interface{}

type Option

type Option func(*Options)

func WithJSON

func WithJSON() Option

type Options

type Options struct {
	Unmarshaler
}

type Receiver

type Receiver interface {
	Next() (Values, error)
	Stop()
}

type Ref

type Ref interface {
	Get() string
}

func Reference

func Reference(s string) Ref

type Scanner

type Scanner interface {
	Scan(interface{}) error
}

type Source

type Source interface {
	Entrypoint
	Watcher
}

type Unmarshaler

type Unmarshaler interface {
	Unmarshal([]byte, interface{}) error
}

type Value

type Value interface {
	Default(interface{}) Value

	Bool() bool
	Bytes() []byte
	Int() int
	Int64() int64
	Duration() time.Duration
	String() string
	StringMap() map[string]string
	StringArray() []string
	Slice() []interface{}
	Map() map[string]interface{}

	Scanner
}

type Values

type Values interface {
	Entrypoint
	Value
}

func New

func New(opts ...Option) Values

func NewFrom

func NewFrom(i interface{}) Values

type Watcher

type Watcher interface {
	Watch(path ...string) (Receiver, error)
}

Jump to

Keyboard shortcuts

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