configuration

package
v0.0.0-...-ef4fc8a Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	DefaultCache    *configurationtypes.DefaultCache  `yaml:"default_cache"`
	CacheKeys       configurationtypes.CacheKeys      `yaml:"cache_keys"`
	API             configurationtypes.API            `yaml:"api"`
	ReverseProxyURL string                            `yaml:"reverse_proxy_url"`
	SSLProviders    []string                          `yaml:"ssl_providers"`
	URLs            map[string]configurationtypes.URL `yaml:"urls"`
	LogLevel        string                            `yaml:"log_level"`

	Ykeys         map[string]configurationtypes.SurrogateKeys `yaml:"ykeys"`
	SurrogateKeys map[string]configurationtypes.SurrogateKeys `yaml:"surrogate_keys"`
	// contains filtered or unexported fields
}

Configuration holder

func GetConfiguration

func GetConfiguration() *Configuration

GetConfiguration allow to retrieve Souin configuration through yaml file

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) GetReverseProxyURL

func (c *Configuration) GetReverseProxyURL() string

GetReverseProxyURL get the reverse proxy url

func (*Configuration) GetSSLProviders

func (c *Configuration) GetSSLProviders() []string

GetSSLProviders get the ssl providers

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) Parse

func (c *Configuration) Parse(data []byte) error

Parse configuration

func (*Configuration) SetLogger

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

SetLogger set the logger

Jump to

Keyboard shortcuts

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