You've already forked tribes-plugin-trust
40310b26ea
CI / Test (push) Failing after 20s
Introduce the Trust plugin as the federation provider for tribe identity and hello handshakes, with synced Ash resources for remote tribes and tribe relationships plus an admin LiveView for trust management.
24 lines
702 B
Elixir
24 lines
702 B
Elixir
defmodule TribeOne.TribesPlugin.Trust.Domain do
|
|
@moduledoc false
|
|
|
|
use Ash.Domain,
|
|
otp_app: :tribe_one_trust
|
|
|
|
alias TribeOne.TribesPlugin.Trust.RemoteTribe
|
|
alias TribeOne.TribesPlugin.Trust.TribeRelationship
|
|
|
|
resources do
|
|
resource RemoteTribe do
|
|
define(:list_remote_tribes, action: :read)
|
|
define(:get_remote_tribe, action: :by_pubkey, args: [:pubkey])
|
|
define(:upsert_remote_tribe, action: :upsert)
|
|
end
|
|
|
|
resource TribeRelationship do
|
|
define(:list_tribe_relationships, action: :read)
|
|
define(:get_tribe_relationship, action: :by_remote_pubkey, args: [:remote_tribe_pubkey])
|
|
define(:upsert_tribe_relationship, action: :upsert)
|
|
end
|
|
end
|
|
end
|