traefik

package module
v0.0.0-...-97c7255 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 9 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"`
	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) 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

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.

Directories

Path Synopsis
override
api
rfc

Jump to

Keyboard shortcuts

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