Documentation ¶
Overview ¶
Package middleware implements different go-kit middlewares
Package middleware implements different go-kit middlewares
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MiddlewareProviderContract ¶
type MiddlewareProviderContract interface { // CreateLoggingMiddleware creates the logging middleware. // endpointName: Mandatory. The name of the endpoint // Returns the new endpoint with logging middleware added CreateLoggingMiddleware(endpointName string) endpoint.Middleware }
MiddlewareProviderContract declares the methods to be implemented by the middleware provider service that is used to create different instances of go-kit middlewares
func NewMiddlewareProviderService ¶
func NewMiddlewareProviderService( logger *zap.Logger, logMessageDetails bool, dateTimeFormat string) (MiddlewareProviderContract, error)
NewMiddlewareProviderService creates new instance of the middlewareProviderService, setting up all dependencies and returns the instance logger: Mandatory. Reference to the logger service logger: Indicates whether the request and response message details sholuld be logged dateTimeFormat: Optional. If provided, will be used to format the date time object Returns the new service or error if something goes wrong