Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { WebBind string `env:"WEB_ADDRESS" json:"web_address" default:":8443"` // GRPCBind string `env:"GRPC_ADDRESS" json:"grpc_address" default:":3200"` DSN string `env:"DSN_ADDRESS" json:"postgre_dsn" default:"postgresql://gophkeeper:gophkeeper@127.0.0.1:5432/gophkeeper"` LogLevel uint8 `json:"LogLevel,omitempty" default:"-"` // contains filtered or unexported fields }
Config - struct for handling configuration
func (*Config) SetByEnv ¶
SetByEnv - set configuration values from evironment
WEB_ADDRESS - evironment for web api instance binding. Default is ":8443" GRPC_ADDRESS - evironment for grpc instance binding. Default is ":3200" DSN_ADDRESS - evironment for postgres connection string. Default is "postgresql://gophkeeper:gophkeeper@127.0.0.1:5432/gophkeeper"
func (*Config) SetByFlags ¶
SetByFlags - set configuration values from cli flags
-debug -http -grpc -LogLevel -version -dsn
func (*Config) SetDefaults ¶
SetDefaults - set configuration values to default state
Click to show internal directories.
Click to hide internal directories.