Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientErrorMiddleware
deprecated
ClientErrorMiddleware checks returned errors of the subsequent endpoint. Errors matching the client error criteria get wrapped in an endpoint.Failer response. An error is considered to be a client error if it implements the following interface:
type clientError interface { ClientError() bool }
and `ClientError` returns true.
Deprecated: use ServiceErrorMiddleware instead.
func LoggingMiddleware ¶
func LoggingMiddleware(logger Logger) endpoint.Middleware
LoggingMiddleware logs trace information about every request (beginning of the request, processing time).
The logger might extract additional information from the context (correlation ID, operation name, etc).
func ServiceErrorMiddleware ¶ added in v0.6.0
ServiceErrorMiddleware checks returned errors of the subsequent endpoint. Errors matching the client error criteria get wrapped in an endpoint.Failer response. An error is considered to be a client error if it implements the following interface:
type serviceError interface { ServiceError() bool }
and `ServiceError` returns true.