Documentation ¶
Overview ¶
Package cfg implements a simple config parser from YML config file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { APP_PORT string `yaml:"app_port"` DB_USERNAME string `yaml:"db_username"` DB_PASSWORD string `yaml:"db_password"` DB_NAME string `yaml:"db_name"` DB_ADDRESS string `yaml:"db_address"` DB_SSLMODE string `yaml:"db_ssh_mode"` DB_PORT string `yaml:"db_port"` RELEASE_MODE bool `yaml:"release_mode"` SECRET_KEY string `yaml:"secret_key"` TOKEN_LIFETIME int64 `yaml:"token_lifetime"` DB_LOG bool `yaml:"db_log"` }
Structure for yaml config parameters:
APP_PORT - application port DB_USERNAME - username for DB connection DB_PASSWORD - paassword for DB connection DB_NAME - Database Name for DB connection DB_ADDRESS - IP address for DB connection DB_SSLMODE - enable/disable SSH mode in DB connection DB_PORT - port for DB connection SECRET_KEY - path to secret kry TOKEN_LIFETIME - time in sedonds for vailid token. ACCESS_CONTROL_ALLOW_ORIGIN - this option for CORS requests see https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
Click to show internal directories.
Click to hide internal directories.