package api // Middleware for the api for middle ware management (authentication, storing data) type Middleware interface { Handle(ctx *Context) *Context } // MiddlewareFunc proxies to a Middleware type MiddlewareFunc func(ctx *Context) *Context // Handle implements the Middleware interface func (mwf MiddlewareFunc) Handle(ctx *Context) *Context { return mwf(ctx) }