Documentation
¶
Index ¶
- func New(_ context.Context, next http.Handler, config *TestConfiguration, name string) (http.Handler, error)
- type Configuration
- func (c *Configuration) GetAPI() configurationtypes.API
- func (c *Configuration) GetCacheKeys() configurationtypes.CacheKeys
- func (c *Configuration) GetDefaultCache() configurationtypes.DefaultCacheInterface
- func (c *Configuration) GetLogLevel() string
- func (c *Configuration) GetPluginName() string
- func (c *Configuration) GetSurrogateKeys() map[string]configurationtypes.SurrogateKeys
- func (c *Configuration) GetUrls() map[string]configurationtypes.URL
- func (c *Configuration) GetYkeys() map[string]configurationtypes.SurrogateKeys
- type SouinTraefikMiddleware
- type TestConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { DefaultCache *configurationtypes.DefaultCache `json:"default_cache" yaml:"default_cache"` API configurationtypes.API `json:"api" yaml:"api"` CacheKeys configurationtypes.CacheKeys `yaml:"cache_keys"` URLs map[string]configurationtypes.URL `json:"urls" yaml:"urls"` LogLevel string `json:"log_level" yaml:"log_level"` Ykeys map[string]configurationtypes.SurrogateKeys `json:"ykeys" yaml:"ykeys"` SurrogateKeys map[string]configurationtypes.SurrogateKeys `json:"surrogate_keys" yaml:"surrogate_keys"` }
Configuration holder
func (*Configuration) GetAPI ¶
func (c *Configuration) GetAPI() configurationtypes.API
GetAPI get the default cache
func (*Configuration) GetCacheKeys ¶
func (c *Configuration) GetCacheKeys() configurationtypes.CacheKeys
GetCacheKeys get the cache keys rules to override
func (*Configuration) GetDefaultCache ¶
func (c *Configuration) GetDefaultCache() configurationtypes.DefaultCacheInterface
GetDefaultCache get the default cache
func (*Configuration) GetLogLevel ¶
func (c *Configuration) GetLogLevel() string
GetLogLevel get the log level
func (*Configuration) GetPluginName ¶
func (c *Configuration) GetPluginName() string
GetPluginName get the plugin name
func (*Configuration) GetSurrogateKeys ¶
func (c *Configuration) GetSurrogateKeys() map[string]configurationtypes.SurrogateKeys
GetSurrogateKeys get the surrogate keys list
func (*Configuration) GetUrls ¶
func (c *Configuration) GetUrls() map[string]configurationtypes.URL
GetUrls get the urls list in the configuration
func (*Configuration) GetYkeys ¶
func (c *Configuration) GetYkeys() map[string]configurationtypes.SurrogateKeys
GetYkeys get the ykeys list
type SouinTraefikMiddleware ¶
type SouinTraefikMiddleware struct { *middleware.SouinBaseHandler // contains filtered or unexported fields }
SouinTraefikMiddleware declaration.
func (*SouinTraefikMiddleware) ServeHTTP ¶
func (s *SouinTraefikMiddleware) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type TestConfiguration ¶
type TestConfiguration map[string]interface{}
TestConfiguration is the temporary configuration for Træfik
func CreateConfig ¶
func CreateConfig() *TestConfiguration
CreateConfig creates the default plugin configuration.
Click to show internal directories.
Click to hide internal directories.