Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UnoTV-Public
go_utv_utils
Commits
f1525643
Commit
f1525643
authored
May 06, 2021
by
Fernando Avilés
Browse files
Initial commit
parent
d799ff2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
pkg/config/config.go
View file @
f1525643
...
...
@@ -51,7 +51,7 @@ type Config struct {
func
Get
()
*
Config
{
conf
:=
&
Config
{}
flag
.
StringVar
(
&
conf
.
Ambiente
,
"Ambiente"
,
os
.
Getenv
(
"
OLI_
AMBIENTE"
),
"Ambiente"
)
flag
.
StringVar
(
&
conf
.
Ambiente
,
"Ambiente"
,
os
.
Getenv
(
"AMBIENTE"
),
"Ambiente"
)
flag
.
StringVar
(
&
conf
.
PathfilesWeb01
,
"PathfilesWeb01"
,
os
.
Getenv
(
"PATH_FILES_WEB01"
),
"Ruta de los html en el Web01"
)
flag
.
StringVar
(
&
conf
.
PathfilesUnotv
,
"PathfilesUnotv"
,
os
.
Getenv
(
"PATH_FILES_UTV"
),
"Ruta de los html de unotv"
)
flag
.
StringVar
(
&
conf
.
PathfilesPruebas
,
"PathfilesPruebas"
,
os
.
Getenv
(
"PATH_FILES_PRUEBAS"
),
"Ruta de los html de unotv para pruebas"
)
...
...
@@ -59,7 +59,7 @@ func Get() *Config {
flag
.
StringVar
(
&
conf
.
DominioWP
,
"DominioWP"
,
os
.
Getenv
(
"DOMINIO_WP"
),
"Dominio Wordpress"
)
flag
.
StringVar
(
&
conf
.
DominioIMG
,
"DominioIMG"
,
os
.
Getenv
(
"DOMINIO_IMG"
),
"Dominio Images"
)
flag
.
StringVar
(
&
conf
.
DominioPruebas
,
"DominioPruebas"
,
os
.
Getenv
(
"DOMINIO_PRUEBAS"
),
"Dominio de pruebas"
)
flag
.
StringVar
(
&
conf
.
UrlApiWP
,
"UrlApiWP"
,
os
.
Getenv
(
"
OLI_
URL_API"
),
"Url APi WP"
)
flag
.
StringVar
(
&
conf
.
UrlApiWP
,
"UrlApiWP"
,
os
.
Getenv
(
"URL_API"
),
"Url APi WP"
)
flag
.
StringVar
(
&
conf
.
ApiGoMongoDB
,
"ApiGoMongoDB"
,
os
.
Getenv
(
"GO_UTV_APP_MONOGDB"
),
"Api Mongo en GO"
)
flag
.
StringVar
(
&
conf
.
ApiGoElastic
,
"ApiGoElastic"
,
os
.
Getenv
(
"GO_UTV_APP_ELASTIC"
),
"Api Elastic en GO"
)
flag
.
StringVar
(
&
conf
.
ApiGoAkamai
,
"ApiGoAkamai"
,
os
.
Getenv
(
"GO_UTV_APP_AKAMAI"
),
"Api Akamai en GO"
)
...
...
@@ -67,10 +67,10 @@ func Get() *Config {
flag
.
StringVar
(
&
conf
.
ApiGoGoogleAPi
,
"ApiGoGoogleAPi"
,
os
.
Getenv
(
"GO_UTV_APP_GOOGLEAPI"
),
"Url Elastic Search"
)
flag
.
StringVar
(
&
conf
.
ElasticUrl
,
"ElasticUrl"
,
os
.
Getenv
(
"ELASTIC_URL"
),
"Url Elastic Search"
)
flag
.
StringVar
(
&
conf
.
ElasticIndex
,
"ElasticIndex"
,
os
.
Getenv
(
"ELASTIC_INDEX"
),
"Index UnoTV Elastic Search"
)
flag
.
StringVar
(
&
conf
.
AkaHost
,
"AkaHost"
,
os
.
Getenv
(
"
OLI_
AKA_HOST"
),
"AkaHost"
)
flag
.
StringVar
(
&
conf
.
AkaAccesToken
,
"AkaAccesToken"
,
os
.
Getenv
(
"
OLI_
AKA_ACCESS_TOKEN"
),
"AkaAccesToken"
)
flag
.
StringVar
(
&
conf
.
AkaClientToken
,
"AkaClientToken"
,
os
.
Getenv
(
"
OLI
_CLIENT_TOKEN"
),
"AkaClientToken"
)
flag
.
StringVar
(
&
conf
.
AkaClientSecret
,
"AkaClientSecret"
,
os
.
Getenv
(
"
OLI
_CLIENT_SECRET"
),
"AkaClientSecret"
)
flag
.
StringVar
(
&
conf
.
AkaHost
,
"AkaHost"
,
os
.
Getenv
(
"AKA_HOST"
),
"AkaHost"
)
flag
.
StringVar
(
&
conf
.
AkaAccesToken
,
"AkaAccesToken"
,
os
.
Getenv
(
"AKA_ACCESS_TOKEN"
),
"AkaAccesToken"
)
flag
.
StringVar
(
&
conf
.
AkaClientToken
,
"AkaClientToken"
,
os
.
Getenv
(
"
AKA
_CLIENT_TOKEN"
),
"AkaClientToken"
)
flag
.
StringVar
(
&
conf
.
AkaClientSecret
,
"AkaClientSecret"
,
os
.
Getenv
(
"
AKA
_CLIENT_SECRET"
),
"AkaClientSecret"
)
flag
.
StringVar
(
&
conf
.
AkaCcuV3Uri
,
"AkaCcuV3Uri"
,
os
.
Getenv
(
"CCU_V3_URI"
),
"AkaCcuV3Uri"
)
flag
.
StringVar
(
&
conf
.
AkaCcuProtocol
,
"AkaCcuProtocol"
,
os
.
Getenv
(
"CCU_PROTOCOL"
),
"AkaCcuProtocol"
)
flag
.
StringVar
(
&
conf
.
MongoPassword
,
"MongoPassword"
,
os
.
Getenv
(
"MONGO_PASSWORD"
),
"MongoPassword"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment