config

package
v0.0.0-...-8495beb Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "unknown"

Version is set at compile time with ldflags.

Functions

func Build

func Build() fx.Option

Types

type Config

type Config struct {
	Production bool          `envconfig:"PRODUCTION" default:"false"`
	LogLevel   zapcore.Level `envconfig:"LOG_LEVEL"  default:"info"`

	DatabaseURL            string `envconfig:"DATABASE_URL"           required:"true"`
	MailTemplatesDirectory string `envconfig:"MAIL_TEMPLATES_DIRECTORY" default:"email"`
	ListenAddr             string `envconfig:"LISTEN_ADDR"            default:"0.0.0.0:8000"`
	CookieDomain           string `envconfig:"COOKIE_DOMAIN"          default:"localhost"`
	PublicWebAddress       string `envconfig:"PUBLIC_WEB_ADDRESS"     default:"localhost:3000"`
	PublicApiAddress       string `envconfig:"PUBLIC_API_ADDRESS"     default:"localhost:8000"`
	AmqpAddress            string `envconfig:"AMQP_ADDRESS"           default:"amqp://rabbit:5672"`
	HashKey                []byte `envconfig:"HASH_KEY"               required:"true"`
	BlockKey               []byte `envconfig:"BLOCK_KEY"              required:"true"`
}

Config represents environment variable configuration parameters

Jump to

Keyboard shortcuts

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