View Source API Reference lenra_common v2.8.0-beta.1
Modules
LenraCommon keeps the contexts that define your domain and business logic.
LenraCommon.Errors.BusinessError creates all error functions based on the @errors
list.
For each error in the list, this module creates two function,
one that creates and returns a BusinessError struct,
the second that creates a BusinessError struct and returns it into a tuple.
LenraCommon.Errors.DevError Define the DevError structure. This is the error to raise when we are facing an impossible case (a case that should never happen). This error should be caught into sentry.
LenraCommon.Errors.ErrorGenerator allows to generate two functions following a list of errors.
The first function returns the error structure and the second returns the {:error, _error_struct}
tuple.
LenraCommon.Errors.ErrorStruct defines a basic error struct for Lenra server.
LenraCommon.Errors.TechnicalError creates all error functions based on the @errors
list.
For each error in the list, this module creates two function,
one that creates and returns a TechnicalError struct,
the second that creates a TechnicalError struct and returns it into an tuple.
JsonHelper gives some function that can help with json maps
The entrypoint for defining your web interface, such as controllers, views, channels and so on.
ApplicationRunner.ControllerHelpers give some helper functions to assign error/data to the conn and send the response to the view.
Conveniences for translating and building error messages.