config

package
v0.0.0-...-5d19dc8 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Get(key ...string) Value
	Load(path ...string) error
}

Config uration

func NewConfig

func NewConfig() Config

NewConfig returns empty configuration

type Value

type Value interface {
	Int32(def int32) int32
	Uint32(def uint32) uint32
	Int64(def int64) int64
	Duration(def time.Duration) time.Duration
	Map() map[string]Value
	Array(def []interface{}) []Value
	AsString(def string) string
	Bool(def bool) bool
	Get(key ...string) Value

	IsValid() bool
	IsArray() bool
	IsMap() bool
	Raw() interface{}
	// contains filtered or unexported methods
}

Value represents any underlying value

func ValFrom

func ValFrom(this interface{}) Value

ValFrom wrapes provided value inside Value

Jump to

Keyboard shortcuts

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