2018-07-07 20:10:56 +00:00
|
|
|
package middleware
|
|
|
|
|
|
|
|
import (
|
2018-10-01 17:27:38 +00:00
|
|
|
"git.xdrm.io/go/aicra/driver"
|
2018-07-07 20:10:56 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Scope represents a list of scope processed by middlewares
|
|
|
|
// and used by the router to block/allow some uris
|
|
|
|
// it is also passed to controllers
|
2018-09-28 08:54:13 +00:00
|
|
|
//
|
|
|
|
// DISCLAIMER: it is used to help developers but for compatibility
|
|
|
|
// purposes, the type is always used as its definition ([]string)
|
2018-07-07 20:10:56 +00:00
|
|
|
type Scope []string
|
|
|
|
|
2018-07-08 23:34:21 +00:00
|
|
|
// Registry represents a registry containing all registered
|
2018-07-07 20:10:56 +00:00
|
|
|
// middlewares to be processed before routing any request
|
2018-10-01 17:27:38 +00:00
|
|
|
// The map is <name> => <middleware>
|
|
|
|
type Registry map[string]driver.Middleware
|