config

package
v0.0.0-...-706d53e Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoader

func NewLoader() *configLoader

Types

type Config

type Config struct {
	Address                    string        `mapstructure:"address"`
	Domain                     *url.URL      `mapstructure:"-"`
	Token                      string        `mapstructure:"token"`
	LogLevel                   logrus.Level  `mapstructure:"-"`
	DBURL                      *url.URL      `mapstructure:"-"`
	RedisAddress               string        `mapstructure:"redis_address"`
	TwitterUserCacheTimeout    time.Duration `mapstructure:"-"`
	TwitterTweetCacheTimeout   time.Duration `mapstructure:"-"`
	DisableHTTPSignatureVerify bool          `mapstructure:"disable_http_signature_verify"`
	DisableEmbedWorker         bool          `mapstructure:"disable_embed_worker"`
	AllowedUsers               []string      `mapstructure:"allowed_users"`
	TwitterAllowedUsers        []string      `mapstructure:"twitter_allowed_users"`
	RunMigrations              bool          `mapstructure:"run_migrations"`
	SentryDSN                  string        `mapstructure:"sentry_dsn"`
	SentryTraceSampleRate      float64       `mapstructure:"sentry_trace_sample_rate"`
}

type Loader

type Loader interface {
	Load() error
	Get() Config
}

Jump to

Keyboard shortcuts

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