traefik

package module
v0.0.0-...-d399288 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(_ context.Context, next http.Handler, config *TestConfiguration, name string) (http.Handler, error)

New create Souin instance.

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"`
	Logger        *zap.Logger
	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

GetDefaultCache get the default cache

func (*Configuration) GetLogLevel

func (c *Configuration) GetLogLevel() string

GetLogLevel get the log level

func (*Configuration) GetLogger

func (c *Configuration) GetLogger() *zap.Logger

GetLogger get the logger

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

GetYkeys get the ykeys list

func (*Configuration) SetLogger

func (c *Configuration) SetLogger(l *zap.Logger)

SetLogger set the logger

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.

Directories

Path Synopsis
override
api
rfc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL