INITIALIZATION: implements UserFunction. Used for both JS and N1QL.
| 60 | |
| 61 | // implements UserFunction. Used for both JS and N1QL. |
| 62 | type functionImpl struct { |
| 63 | *FunctionConfig // Inherits from FunctionConfig |
| 64 | name string // Name of function |
| 65 | typeName string // "function" or "resolver" |
| 66 | checkArgs bool // If true, args must be checked against Args |
| 67 | allowByDefault bool // If true, a missing Allow means allow, not forbid |
| 68 | compiled *sgbucket.JSServer // Compiled form of the function; nil for N1QL |
| 69 | } |
| 70 | |
| 71 | // Compiles the functions in a UserFunctionConfigMap, returning UserFunctions. |
| 72 | func CompileFunctions(ctx context.Context, config FunctionsConfig) (*db.UserFunctions, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected