Documentation
¶
Index ¶
- func FnCall(ctx context.Context, fn interface{}, jsonArgs []byte) (interface{}, error)
- func FnDecodeArgs(ctx context.Context, fn interface{}, jsonArgs string) (interface{}, error)
- func FnDescription(fn interface{}) (string, error)
- func FnName(fn interface{}) (string, error)
- func FnSchema(fn interface{}) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FnCall ¶
FnCall decodes `jsonArgs` into T, then calls `fn`, returning (interface{}, error). fn can be:
func(T) (R, error) func(context.Context, T) (R, error)
func FnDecodeArgs ¶
FnDecodeArgs decodes the JSON into the function's expected argument type T but does not call the function. It returns (decodedValue, error).
func FnDescription ¶
FnDescription returns the doc comment from above the function in its .go file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.