@@ -9,12 +9,12 @@ import (
9
9
)
10
10
11
11
type DBConfig struct {
12
- host string
13
- port string
14
- user string
15
- password string
16
- address string
17
- name string
12
+ Host string
13
+ Port string
14
+ User string
15
+ Password string
16
+ Address string
17
+ Name string
18
18
JWTSecret string
19
19
JWTExpirationInSeconds int64
20
20
}
@@ -25,12 +25,12 @@ func initializeConfig() DBConfig {
25
25
godotenv .Load ()
26
26
27
27
return DBConfig {
28
- host : getEnv ("PUBLIC_HOST" , "http://localhost" ),
29
- port : getEnv ("PORT" , "4001" ),
30
- user : getEnv ("DB_USER" , "root" ),
31
- password : getEnv ("DB_PASSWORD" , "password" ),
32
- address : fmt .Sprintf ("%s:%s" , getEnv ("DB_HOST" , "127.0.0.1" ), getEnv ("DB_PORT" , "3306" )),
33
- name : getEnv ("DB_NAME" , "gostore-api" ),
28
+ Host : getEnv ("PUBLIC_HOST" , "http://localhost" ),
29
+ Port : getEnv ("PORT" , "4001" ),
30
+ User : getEnv ("DB_USER" , "root" ),
31
+ Password : getEnv ("DB_PASSWORD" , "password" ),
32
+ Address : fmt .Sprintf ("%s:%s" , getEnv ("DB_HOST" , "127.0.0.1" ), getEnv ("DB_PORT" , "3306" )),
33
+ Name : getEnv ("DB_NAME" , "gostore-api" ),
34
34
JWTSecret : getEnv ("JWT_SECRET" , "not_a_secret_but_it_should" ),
35
35
JWTExpirationInSeconds : getEnvAsInt ("JWT_EXPIRATION_IN_SECONDS" , 3600 * 24 * 7 ),
36
36
}
0 commit comments