config

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

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

	// ReadStorageExpirationInMinutes time the token is valid
	ReadStorageExpirationInMinutes = 5
	// WriteStorageExpirationInMinutes time the token is valid
	WriteStorageExpirationInMinutes = 5

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

	// EnvLogLevel environment variable for the log level
	EnvLogLevel = "LOGLEVEL"
	// EnvLogFormat type of log format
	EnvLogFormat = "LOGFORMAT"

	// EnvStorageURL the external name of the service
	EnvStorageURL = "STORAGE_URL"

	// EnvLogFile log file to use
	EnvLogFile = "RM_LOGFILE"
)

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
	LogFile           string
	HWRApplicationKey string
	HWRHmac           string
	HTTPSCookie       bool
	TrustProxy        bool
}

Config config

func FromEnv

func FromEnv() *Config

FromEnv config from environment values

func (*Config) Verify added in v0.0.4

func (cfg *Config) Verify()

Verify verify

Jump to

Keyboard shortcuts

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