config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 29, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultPort the default port
	DefaultPort = "3000"
	// DefaultDataDir default folder for storage
	DefaultDataDir = "data"

	ReadStorageExpirationInMinutes  = 5
	WriteStorageExpirationInMinutes = 5

	// DefaultHost fake url
	DefaultHost = "local.appspot.com"

	// EnvLogLevel environment variable for the log level
	EnvLogLevel = "LOGLEVEL"

	EnvTLSCert = "TLS_CERT"
	EnvTLSKey  = "TLS_KEY"

	// EnvSMTPServer the mail server
	EnvSMTPServer = "RM_SMTP_SERVER"
	// EnvSMTPUsername the username for the mail server
	EnvSMTPUsername = "RM_SMTP_USERNAME"
	// EnvSMTPPassword pass
	EnvSMTPPassword = "RM_SMTP_PASSWORD"
	// EnvSMTPHelo custom helo
	EnvSMTPHelo = "RM_SMTP_HELO"
	// EnvSMTPInsecureTLS dont check cert (bad)
	EnvSMTPInsecureTLS = "RM_SMTP_INSECURE_TLS"
	// EnvSMTPFrom custom from address
	EnvSMTPFrom = "RM_SMTP_FROM"

	// EnvHwrApplicationKey the myScript application key
	EnvHwrApplicationKey = "RMAPI_HWR_APPLICATIONKEY"
	// EnvHwrHmac myScript hmac key
	EnvHwrHmac = "RMAPI_HWR_HMAC"
)

Variables

This section is empty.

Functions

func EnvVars added in v0.0.4

func EnvVars() string

EnvVars env vars usage

Types

type Config

type Config struct {
	Port             string
	StorageURL       string
	DataDir          string
	RegistrationOpen bool
	CreateFirstUser  bool
	JWTSecretKey     []byte
	JWTRandom        bool
	Certificate      tls.Certificate
	SmtpConfig       *email.SmtpConfig
}

Config config

func FromEnv

func FromEnv() *Config

FromEnv config from environment values

func (*Config) Verify added in v0.0.4

func (cfg *Config) Verify()

Jump to

Keyboard shortcuts

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