What an adopter gives Mediate.Conformance.RepoCase so the case can
hold a repo to the five guarantees the change and access events make:
- a row of one audited schema
- a change to one of its fact fields
- the mediation those writes carry
- the way this deployment writes the same row without the seam
- a row of one protected schema, with a decision that admits a read of it
The schema's table has to exist, because the case writes to it. A repo swept without a database leaves the option out and proves the refusals alone.
Summary
Callbacks
Change a fact field of the written row without the seam, as a patch applied by hand does.
A change of a written row that sets at least one fact field to a value the row does not hold.
A decision from Mediate.authorize/4 that admits a read of the written row of protected/0.
The mediate: option those writes carry: a decision that admits the schema, or a declared exemption.
An unwritten row of a protected schema, one that declares an object type, for the access guarantee.
An unwritten row of an audited schema. Each call answers one the case can write beside the ones before it.
Whatever a test needs in place first: the connection, the configuration, and the rows the audited schema refers to. The tags are the test's. An adopter that needs none of it defines this not at all.
Callbacks
@callback around(struct()) :: :ok
Change a fact field of the written row without the seam, as a patch applied by hand does.
@callback change(struct()) :: Ecto.Changeset.t()
A change of a written row that sets at least one fact field to a value the row does not hold.
@callback decision(struct()) :: Mediate.Decision.t()
A decision from Mediate.authorize/4 that admits a read of the written row of protected/0.
@callback mediation() :: term()
The mediate: option those writes carry: a decision that admits the schema, or a declared exemption.
@callback protected() :: struct()
An unwritten row of a protected schema, one that declares an object type, for the access guarantee.
@callback row() :: struct()
An unwritten row of an audited schema. Each call answers one the case can write beside the ones before it.
@callback setup(tags :: map()) :: :ok
Whatever a test needs in place first: the connection, the configuration, and the rows the audited schema refers to. The tags are the test's. An adopter that needs none of it defines this not at all.