config

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Server   ServerConfiguration
	Database DatabaseConfiguration
	Email    EmailConfiguration
}

Configuration ...

func SetupConfigDefaults

func SetupConfigDefaults() (*Configuration, error)

SetupConfigDefaults ...

type DatabaseConfiguration

type DatabaseConfiguration struct {
	Name     string `default:"passwall"`
	Username string `default:"user"`
	Password string `default:"password"`
	Host     string `default:"localhost"`
	Port     string `default:"5432"`
	LogMode  bool   `default:"false"`
}

DatabaseConfiguration is the required paramters to set up a DB instance

type EmailConfiguration

type EmailConfiguration struct {
	Host     string `default:"smtp.passwall.io"`
	Port     string `default:"25"`
	Username string `default:"hello@passwall.io"`
	Password string `default:"password"`
	From     string `default:"hello@passwall.io"`
	Admin    string `default:"hello@passwall.io"`
}

EmailConfiguration is the required paramters to send emails

type ServerConfiguration

type ServerConfiguration struct {
	Port       string `default:"3625"`
	Passphrase string `default:"passphrase-for-encrypting-passwords-do-not-forget"`
	Secret     string `default:"secret-key-for-JWT-TOKEN"`
	Timeout    int    `default:"24"`
}

ServerConfiguration is the required paramters to set up a server

Jump to

Keyboard shortcuts

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