Documentation ¶
Overview ¶
Package jsonconfig defines a helper type for JSON objects to be used for configuration.
Index ¶
- func HighlightBytePosition(f io.Reader, pos int64) (line int, col int, highlight string)
- type Obj
- func (jc Obj) OptionalBool(key string, def bool) bool
- func (jc Obj) OptionalInt(key string, def int) int
- func (jc Obj) OptionalList(key string) []string
- func (jc Obj) OptionalObject(key string) Obj
- func (jc Obj) OptionalString(key, def string) string
- func (jc Obj) OptionalStringOrObject(key string) interface{}
- func (jc Obj) RequiredBool(key string) bool
- func (jc Obj) RequiredInt(key string) int
- func (jc Obj) RequiredList(key string) []string
- func (jc Obj) RequiredObject(key string) Obj
- func (jc Obj) RequiredString(key string) string
- func (jc Obj) RequiredStringOrObject(key string) interface{}
- func (jc Obj) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Obj ¶
type Obj map[string]interface{}
Obj is a JSON configuration map.
func (Obj) OptionalList ¶
func (Obj) OptionalObject ¶
func (Obj) OptionalString ¶
func (Obj) OptionalStringOrObject ¶
func (Obj) RequiredBool ¶
func (Obj) RequiredInt ¶
func (Obj) RequiredList ¶
func (Obj) RequiredObject ¶
func (Obj) RequiredString ¶
func (Obj) RequiredStringOrObject ¶
Click to show internal directories.
Click to hide internal directories.