Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsHandlerFunc ¶
func AsHandlerFunc(a Action) http.HandlerFunc
AsHandlerFunc is a helper wrapper to make implementing actions easier
Types ¶
type DatabaseMiddleware ¶
type DatabaseMiddleware struct {
// contains filtered or unexported fields
}
DatabaseMiddleware middleware
func NewDatabaseMiddleware ¶
func NewDatabaseMiddleware(name, url string) (*DatabaseMiddleware, error)
NewDatabaseMiddleware creates a new database middleware
func (*DatabaseMiddleware) Database ¶
func (d *DatabaseMiddleware) Database() *mongo.Database
Database return database as configured in the middleware
func (*DatabaseMiddleware) Middleware ¶
func (d *DatabaseMiddleware) Middleware(next http.Handler) http.Handler
Middleware is the middleware function
Click to show internal directories.
Click to hide internal directories.