What a resource package needs from the proxy at run time, as a behaviour.
A package compiles before the proxy and cannot name its modules, so the
policy checks (Alternera.Resource.Checks.*), the version mixin and
the cache change ask the host. The proxy's implementation is
Alternera.Resources.Host, set with
config :alternera_resource_sdk, :host, …; a package's own tests run
against Alternera.Resource.Test.Host.
Summary
Callbacks
The id a version row records for the actor; nil for the system.
Whether the host serves resources now. While it does not, every policy
but destroy refuses (Alternera.Resource.Checks.Available).
A record of resource name ("<package id>.<resource id>") was written in
the tenant: drop what is cached for key (a lookup key value, the record's
primary key when the resource has no lookup key, or :all).
Whether the actor may read (:read) or change (:write) records of the tenant.
Whether the actor is the system or a super admin: every check passes.
Types
Callbacks
The id a version row records for the actor; nil for the system.
@callback available?() :: boolean()
Whether the host serves resources now. While it does not, every policy
but destroy refuses (Alternera.Resource.Checks.Available).
A record of resource name ("<package id>.<resource id>") was written in
the tenant: drop what is cached for key (a lookup key value, the record's
primary key when the resource has no lookup key, or :all).
Whether the actor may read (:read) or change (:write) records of the tenant.
Whether the actor is the system or a super admin: every check passes.
Functions
@spec impl() :: module()
The configured host module.