Wardrik.Runner (wardrik v0.1.0-rc.1)

Copy Markdown

Runs operations the same way for every surface:

  1. Finds the operation in the catalog.
  2. Validates the input against its schema.
  3. Asks the authorizer.
  4. For an owner's operation, checks the org is known. See Wardrik.Orgs.
  5. Calls the handler.

Summary

Functions

Runs the operation id in scope, with its handler (:handlers) or stream (:streams).

Functions

run(scope, id, input, kind)

@spec run(Wardrik.Scope.t(), String.t(), map(), :handlers | :streams) ::
  {:ok, term()} | {:error, Wardrik.Error.t()}

Runs the operation id in scope, with its handler (:handlers) or stream (:streams).