Documentation
¶
Overview ¶
Package tenant provides multi-tenant scoping middleware.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorHandler ¶
type ErrorHandler func(w http.ResponseWriter, r *http.Request, err error)
ErrorHandler handles authorization errors from the tenant middleware.
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware enforces tenant scoping and stores the tenant in context.
type Options ¶
type Options struct {
Optional bool
HeaderName string
URLParam string
URLParamExtractor ports.URLParamExtractor
TenantFromContext TenantFromContext
ErrorHandler ErrorHandler
}
Options configures tenant scoping.
Click to show internal directories.
Click to hide internal directories.