Triplex v1.0.0 Triplex.PlugConfig View Source

This is a struct that holds basic configuration for triplex plugs.

Here are the config keys we have:

For all plugs

  • tenant_handler: function to handle te test param. The return of it will be used as the tenant.
  • assign: the name of the assign where we must save the tenant.

For Triplex.EnsurePlug

  • callback: function that might be called when the plug succeeded. It must return a connection.
  • failure_callback: function that might be called when the plug failed. It must return a connection.

For Triplex.ParamPlug

  • param: the param name to load the tenant from.

For Triplex.SessionPlug

  • session: the session param name to load the tenant from.

For Triplex.SubdomainPlug

  • endpoint: the Phoenix.Endpoint to get the host name to dicover the subdomain.

Link to this section Summary

Link to this section Functions