Documentation ¶
Overview ¶
Copyright 2013 Artur Grabowski. All rights reserved. Use of this source code is governed by a ISC-style license that can be found in the LICENSE file.
Copyright 2014 Thordur Bjornsson. All rights reserved. Use of this source code is governed by a ISC-style license that can be found in the LICENSE file.
Copyright 2013 Artur Grabowski. All rights reserved. Use of this source code is governed by a ISC-style license that can be found in the LICENSE file.
Copyright 2013 Artur Grabowski. All rights reserved. Use of this source code is governed by a ISC-style license that can be found in the LICENSE file.
Copyright 2013 Artur Grabowski. All rights reserved. Use of this source code is governed by a ISC-style license that can be found in the LICENSE file.
Copyright 2013 Artur Grabowski. All rights reserved. Use of this source code is governed by a ISC-style license that can be found in the LICENSE file.
Index ¶
- type Bconf
- func (bc Bconf) AddValue(k []string, v string)
- func (bc Bconf) ForeachNode(f func(name string, bc Bconf))
- func (bc Bconf) ForeachSortedNode(f func(name string, bc Bconf))
- func (bc Bconf) ForeachSortedVal(f func(k, v string))
- func (bc Bconf) ForeachVal(f func(k, v string))
- func (bc Bconf) GetNode(k ...string) Bconf
- func (bc Bconf) GetString(k ...string) string
- func (bc *Bconf) LoadConfData(f io.Reader) error
- func (bc *Bconf) LoadConfFile(fname string) error
- func (bc *Bconf) LoadHTTP(bconfurl, host, appl string) error
- func (bc *Bconf) LoadJSONReader(r io.Reader) error
- func (bc *Bconf) LoadJson(js []byte) error
- func (dst Bconf) Merge(src Bconf)
- func (bc Bconf) Unmarshal(v interface{}) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bconf ¶
type Bconf map[string]interface{}
func (Bconf) ForeachNode ¶
Call the callback function for every node under a Bconf node. The nodes are unsorted. When the walk has to be sorted, use ForeachSortedNode instead which is slower.
func (Bconf) ForeachSortedNode ¶
Call the callback function for every node under a Bconf node. The nodes are sorted on their name. When the walk doesn't need to be sorted, used ForeachNode instead which is faster.
func (Bconf) ForeachSortedVal ¶
Call the callback function for every value (not node) in a Bconf node. The values are sorted on their key. When the walk doesn't need to be sorted, use ForeachVal instead which is faster.
func (Bconf) ForeachVal ¶
Call the callback function for every value (not node) in a Bconf node. The values are unsorted. When the walk has to be sorted, use ForeachSortedVal instead which is slower.
func (Bconf) GetString ¶
Return a string from bconf under a key, returns empty string if key not found.
func (*Bconf) LoadConfData ¶
Populate a Bconf with data from the bconf-formatted io.Reader.
func (*Bconf) LoadConfFile ¶
Populate a Bconf with data from the bconf-formatted file provided here as a name.
func (*Bconf) LoadJson ¶
Populate a Bconf with data from a byte array that contains json. Returns json parsing errors.