Diffo.Provider.Party.Extension

Copy Markdown View Source

DSL Extension customising a Party.

Provides compile-time declaration blocks for domain-specific Party kinds built on Diffo.Provider.BaseParty. All declarations are introspectable via Diffo.Provider.Party.Extension.Info.

See the DSL cheat sheet for the full DSL reference.

instances

Declares the roles this Party kind plays with respect to Instances

Nested DSLs

Examples

instances do
  role :facilitates, MyApp.AccessService
end

instances.role

role role, party_type

Declares a role this Party kind plays

Arguments

NameTypeDefaultDocs
roleatomThe role name, an atom
party_typeanyThe module of the related resource

Introspection

Target: Diffo.Provider.Party.Extension.InstanceRole

parties

Declares the roles this Party kind plays with respect to other Parties

Nested DSLs

Examples

parties do
  role :managed_by, MyApp.Person
end

parties.role

role role, party_type

Declares a role this Party kind plays with respect to other Parties

Arguments

NameTypeDefaultDocs
roleatomThe role name, an atom
party_typeanyThe module of the related Party kind

Introspection

Target: Diffo.Provider.Party.Extension.PartyRole

places

Declares the roles this Party kind plays with respect to Places

Nested DSLs

Examples

places do
  role :headquartered_at, MyApp.GeographicSite
end

places.role

role role, place_type

Declares a role this Party kind plays with respect to Places

Arguments

NameTypeDefaultDocs
roleatomThe role name, an atom
place_typeanyThe module of the related Place resource

Introspection

Target: Diffo.Provider.Party.Extension.PlaceRole