Documentation ¶
Index ¶
- Constants
- func GetConfig(r *http.Request) config.Config
- func GetWritableConfig(r *http.Request) config.WritableConfig
- func WrapMiddleware(key string, t reflect.Type) middleware.Middleware
- type ChainedNamespaceNegotiator
- type ConfigMiddleware
- type HostMapNamespaceNegotiator
- type HostNamespaceNegotiator
- type NamespaceNegotiator
Constants ¶
View Source
const ( MiddlewareDependencyConfig = "*configmw.ConfigMiddleware" CategoryConfigNotFound = "config not found" )
Variables ¶
This section is empty.
Functions ¶
func GetWritableConfig ¶
func GetWritableConfig(r *http.Request) config.WritableConfig
func WrapMiddleware ¶
func WrapMiddleware(key string, t reflect.Type) middleware.Middleware
Types ¶
type ChainedNamespaceNegotiator ¶
type ChainedNamespaceNegotiator struct {
// contains filtered or unexported fields
}
func NewChainedNamespaceNegotiator ¶
func NewChainedNamespaceNegotiator(negotiators ...NamespaceNegotiator) *ChainedNamespaceNegotiator
func (*ChainedNamespaceNegotiator) AddNegotiator ¶
func (n *ChainedNamespaceNegotiator) AddNegotiator(negotiator NamespaceNegotiator)
func (*ChainedNamespaceNegotiator) NegotiateNamespace ¶
func (n *ChainedNamespaceNegotiator) NegotiateNamespace(r *http.Request) (string, error)
type ConfigMiddleware ¶
type ConfigMiddleware struct { middleware.NoDependencies // contains filtered or unexported fields }
func NewConfigMiddleware ¶
func NewConfigMiddleware(store *config.Store, negotiator NamespaceNegotiator) *ConfigMiddleware
type HostMapNamespaceNegotiator ¶
type HostMapNamespaceNegotiator struct {
// contains filtered or unexported fields
}
func NewHostMapNamespaceNegotiator ¶
func NewHostMapNamespaceNegotiator() *HostMapNamespaceNegotiator
func (*HostMapNamespaceNegotiator) Add ¶
func (h *HostMapNamespaceNegotiator) Add(host, namespace string)
func (*HostMapNamespaceNegotiator) NegotiateNamespace ¶
func (h *HostMapNamespaceNegotiator) NegotiateNamespace(r *http.Request) (string, error)
func (*HostMapNamespaceNegotiator) Remove ¶
func (h *HostMapNamespaceNegotiator) Remove(host string)
type HostNamespaceNegotiator ¶
type HostNamespaceNegotiator struct {
SkipPort bool
}
func NewHostNamespaceNegotiator ¶
func NewHostNamespaceNegotiator() *HostNamespaceNegotiator
func (*HostNamespaceNegotiator) NegotiateNamespace ¶
func (h *HostNamespaceNegotiator) NegotiateNamespace(r *http.Request) (string, error)
Click to show internal directories.
Click to hide internal directories.