Add dynamic handler management #13
Loading…
Reference in New Issue
No description provided.
Delete Branch "feature/dynamic-handler-signature"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
handlers are now managed by the
dynamic
package :func(inputStruct) (outputStruct, api.Error)
inputStruct
contains input fields using the name from the fieldname
, optional fields are pointersoutputStruct
contains output fields following the same rules asinputStruct
except optional types are disallowedinputStruct
can be omitted, resulting infunc() (outputStruct, api.Error)
outputStruct
can be omitted, resulting infunc(inputStruct) api.Error
func() api.Error
datatypes interface contains a
Type() reflect.Type
method to tell what type the result will be cast into :inputStruct
fields are checked against datatypes to check ifdatatype.Type()
is convertible toinputStruct.field
config parses the
out
field to check for conflicts and find datatypes.