package
Version:
v0.0.0-...-97b5a5e
Opens a new window with list of versions in this module.
Published: May 17, 2021
License: MIT
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Config struct {
Address string `envconfig:"ADDRESS" default:":8089" required:"true"`
ReadTimeout time.Duration `envconfig:"READ_TIMEOUT" default:"5s"`
WriteTimeout time.Duration `envconfig:"WRITE_TIMEOUT" default:"10s"`
Debug bool `envconfig:"DEBUG" default:"true"`
}
Config application configuration
FromEnv load configuration from env vars
type DB struct {
DbPath string `envconfig:"DB_PATH" required:"true"`
DbConfigPath string `envconfig:"DB_CONFIG_PATH" required:"true"`
}
DB represents the application server database (json file)
NewDatabase load configuration from env vars
Start starts and initializes the file database
Source Files
¶
Click to show internal directories.
Click to hide internal directories.