Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ServiceName contains a service name prefix which used in ENV variables ServiceName = "BackFriend" APIVersion = "v1alpha" // StubDriver defines driver name for testing StubDriver = "stub" // MockDriver defines driver name for testing MockDriver = "mock" // JSONDriver defines driver name for JSON files DB JSONDriver = "json" // PGDriver defines driver name for PostgreSQL DB PGDriver = "postgresql" )
Default values: host, port, etc
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Local service host LocalHost string `split_words:"true"` // Local service port LocalPort int `split_words:"true"` // Logging level in logger.Level notation LogLevel logger.Level `split_words:"true"` // Database type DbType string `split_words:"true"` // Database files location DbLocation string `split_words:"true"` // Database host DbHost string `split_words:"true"` // Database port DbPort int `split_words:"true"` // Database name DbName string `split_words:"true"` // Database username DbUsername string `split_words:"true"` // Database password DbPassword string `split_words:"true"` }
Config - Service configuration
func (*Config) LoadFromEnv ¶
LoadFromEnv load configuration parameters from environment
Click to show internal directories.
Click to hide internal directories.