config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 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"

	// 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
	LogFile          string
}

Config config

func FromEnv

func FromEnv() *Config

FromEnv config from environment values

func (*Config) IsHTTPS added in v0.0.5

func (cfg *Config) IsHTTPS() bool

IsHTTPS is it https

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