Documentation ¶
Index ¶
- func GetEnv(key string, defaultValue string) string
- func GetEnvBool(key string, defaultValue bool) bool
- func GetEnvFloat[T constraints.Float](key string, defaultValue T) T
- func GetEnvInt[T constraints.Integer](key string, defaultValue T) T
- func GetEnvSet[T comparable](key string, defaultValue map[T]bool) map[T]bool
- func GetEnvSlice[T comparable](key string, defaultValue []T) []T
- type CORS
- type Cache
- type Config
- type ConfigFile
- type DenyList
- type DenyRoutes
- type GC
- type GZIP
- type Logger
- type Metrics
- type RateLimit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvBool ¶
func GetEnvFloat ¶
func GetEnvFloat[T constraints.Float](key string, defaultValue T) T
func GetEnvInt ¶
func GetEnvInt[T constraints.Integer](key string, defaultValue T) T
func GetEnvSlice ¶
func GetEnvSlice[T comparable](key string, defaultValue []T) []T
Types ¶
type Config ¶
type Config struct { ConfigFile *ConfigFile DenyListTable map[string]bool Rate *limiter.Rate CacheDisabledRoutesRegex []*regexp.Regexp BlockRoutesRegex []*regexp.Regexp CacheStorage *freecache.Cache CacheTTL time.Duration RequestLoggerConfig *middleware.RequestLoggerConfig ProxyConfig *middleware.ProxyConfig }
type ConfigFile ¶
type ConfigFile struct { Logger Logger `mapstructure:"logger"` RateLimit RateLimit `mapstructure:"rate_limit"` Cache Cache `mapstructure:"cache"` DenyList DenyList `mapstructure:"deny_list"` DenyRoutes DenyRoutes `mapstructure:"deny_routes"` Metrics Metrics `mapstructure:"metrics"` GC GC `mapstructure:"gc"` CORS CORS `mapstructure:"cors"` GZIP GZIP `mapstructure:"gzip"` Host string `mapstructure:"host"` TezosHost string `mapstructure:"tezos_host"` }
type DenyRoutes ¶
Click to show internal directories.
Click to hide internal directories.