AshGleam.Domain (ash_gleam v0.3.1)

Copy Markdown

Domain extension for Gleam FFI exports and code interface generation.

Usage

defmodule MyApp.MyDomain do
  use Ash.Domain,
    otp_app: :my_app,
    extensions: [AshGleam.Domain]

  gleam do
    ffi do
      resource MyApp.Todo do
        action :list_todos, :read
        action :create_todo, :create
      end
    end

    code_interface do
      resource MyApp.Todo do
        define_gleam_update :mark_completed, action: :update
      end
    end
  end
end

Summary

Functions

gleam(body)

(macro)