config

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerAddress            = ":8080"
	ServerCorsEnabled        = true
	ServerCorsAllowedOrigins = "*"
	ServerCorsAllowedHeaders = "Content-Type,Authorization,X-Api-Key,X-Sdk-Client,X-Sdk-Version,X-Pop"
	LoggerLevel              = "warning"
	LoggerFormat             = "text"

	CDNLoaderPollingInterval = time.Minute * 1

	RedisAddr = "localhost:6379"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	*viper.Viper
}

func NewFromFilename

func NewFromFilename(name string) (*Config, error)

func (*Config) GetDurationDefault

func (c *Config) GetDurationDefault(key string, def time.Duration) time.Duration

func (*Config) GetIntDefault

func (c *Config) GetIntDefault(key string, def int) int

func (*Config) GetStringDefault

func (c *Config) GetStringDefault(key, def string) string

Jump to

Keyboard shortcuts

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