Documentation ¶
Index ¶
- func CloneMap(kv map[string]interface{}) map[string]interface{}
- func CreateObject(object Object, kv map[string]interface{}, mapping map[string][]string) error
- func Deserialize(r io.Reader, dser Deserializer) error
- func JoinTable(dir string, fromtable string, frompath string, totable string, topath string, ...) (map[string]map[string]interface{}, error)
- func ReadFile(f string, out interface{}) error
- func RegisterAction(name string, action Action)
- func StreamToMap(fp string, keypath string, results map[string]map[string]interface{}, ...) error
- func Stringify(v interface{}, opts ...interface{}) string
- type Action
- type Deserializer
- type Object
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateObject ¶
CreateObject will create a new model object from kv
func Deserialize ¶
func Deserialize(r io.Reader, dser Deserializer) error
Deserialize will return a function which will Deserialize in a flexible way the JSON in reader
func JoinTable ¶
func JoinTable(dir string, fromtable string, frompath string, totable string, topath string, kv map[string]interface{}) (map[string]map[string]interface{}, error)
JoinTable will join 2 tables from dir into a map of joined maps
func RegisterAction ¶
RegisterAction will register a new action
Types ¶
type Action ¶
type Action func(args ...interface{}) (interface{}, error)
Action is the signature for handling registered actions
type Deserializer ¶
type Deserializer func(line json.RawMessage) error
Deserializer is a callback which will take a json RawMessage for processing
Click to show internal directories.
Click to hide internal directories.