Documentation ¶
Index ¶
Constants ¶
const KeyMethod = "Method"
KeyMethod stores the key used to store
const KeyRequestID = "RequestID"
KeyRequestID key in echo context
Variables ¶
This section is empty.
Functions ¶
func BasicAuth ¶
func BasicAuth() echo.MiddlewareFunc
BasicAuth Method middleware for setting method TODO: this is mock, use db(or usermanagement layer) for auth
func FileLogger ¶
func FileLogger() echo.MiddlewareFunc
FileLogger logs access logs to a file named `/var/log/{processname}/access.log` if failed to get access log file it logs to standard out
func GetLogFile ¶
GetLogFile returns an io.Writer for log if already created returns the same otherwise creates a new buffered Writer and returns
func Method ¶
func Method(next echo.HandlerFunc) echo.HandlerFunc
Method middleware for setting method why? Some routers do not allow DELETE,PATCH etc requests in that scenarios POST request with the http method `x` set as _method query parameter would interpreted as having `x` http method
func RequestID ¶
func RequestID(next echo.HandlerFunc) echo.HandlerFunc
RequestID middleware for setting request id
Types ¶
This section is empty.