A middleware consists of a function that accepts and returns a endpoint or a transport specific handler.
Endpoint Middlewares Endpoint middlewares operate at the endpoint level and are transport agnostic. They consist of functions that accept and return a Goa endpoint. Here is an example of an endpoint middleware that logs errors:
// ErrorLogger is an endpoint middleware that logs errors using the given // logger. All log entries start with the given prefix.
↧