Documentation ¶
Index ¶
- Variables
- func Load(sources Source) error
- func OnChange(fn ChangeFunc)
- func Set(path string, data interface{}) error
- func UnWatch()
- func Watch()
- type ChangeFunc
- type Config
- type DataSet
- type JSONValue
- func (j *JSONValue) Bool(def bool) bool
- func (j *JSONValue) Bytes() []byte
- func (j *JSONValue) Duration(def time.Duration) time.Duration
- func (j *JSONValue) Exists() bool
- func (j *JSONValue) Float64(def float64) float64
- func (j *JSONValue) Int(def int) int
- func (j *JSONValue) Scan(v interface{}) error
- func (j *JSONValue) String(def string) string
- func (j *JSONValue) StringMap(def map[string]string) map[string]string
- func (j *JSONValue) StringSlice(def []string) []string
- type JSONValues
- func (j *JSONValues) Bytes() []byte
- func (j *JSONValues) Delete(path string)
- func (j *JSONValues) Get(path string) Value
- func (j *JSONValues) Map() map[string]interface{}
- func (j *JSONValues) Scan(v interface{}) error
- func (j *JSONValues) Set(path string, val interface{})
- func (j *JSONValues) String() string
- type Source
- type Unmarshal
- type Value
- type Values
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = NewConfig()
Functions ¶
Types ¶
type ChangeFunc ¶
type ChangeFunc func(v Values)
type Config ¶
type JSONValues ¶
type JSONValues struct {
// contains filtered or unexported fields
}
func NewJSONValues ¶
func NewJSONValues(data []byte) *JSONValues
func (*JSONValues) Bytes ¶
func (j *JSONValues) Bytes() []byte
func (*JSONValues) Delete ¶
func (j *JSONValues) Delete(path string)
func (*JSONValues) Get ¶
func (j *JSONValues) Get(path string) Value
func (*JSONValues) Map ¶
func (j *JSONValues) Map() map[string]interface{}
func (*JSONValues) Scan ¶
func (j *JSONValues) Scan(v interface{}) error
func (*JSONValues) Set ¶
func (j *JSONValues) Set(path string, val interface{})
func (*JSONValues) String ¶
func (j *JSONValues) String() string
type Value ¶
type Value interface { Exists() 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 }
Click to show internal directories.
Click to hide internal directories.