mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-21 07:08:45 +05:00
StorDb defaults to MYSQL
This commit is contained in:
@@ -39,12 +39,12 @@ var (
|
||||
data_db_user = flag.String("datadb_user", cgrConfig.DataDBUser, "The dataDb user to sign in as.")
|
||||
data_db_pass = flag.String("datadb_passwd", cgrConfig.DataDBPass, "The dataDb user's password.")
|
||||
|
||||
stor_db_type = flag.String("logdb_type", cgrConfig.StorDBType, "The type of the storDb database (redis|mongo|postgres|mysql)")
|
||||
stor_db_host = flag.String("logdb_host", cgrConfig.StorDBHost, "The storDb host to connect to.")
|
||||
stor_db_port = flag.String("logdb_port", cgrConfig.StorDBPort, "The storDb port to bind to.")
|
||||
stor_db_name = flag.String("logdb_name", cgrConfig.StorDBName, "The name/number of the storDb to connect to.")
|
||||
stor_db_user = flag.String("logdb_user", cgrConfig.StorDBUser, "The storDb user to sign in as.")
|
||||
stor_db_pass = flag.String("logdb_passwd", cgrConfig.StorDBPass, "The storDb user's password.")
|
||||
stor_db_type = flag.String("stordb_type", cgrConfig.StorDBType, "The type of the storDb database (redis|mongo|postgres|mysql)")
|
||||
stor_db_host = flag.String("stordb_host", cgrConfig.StorDBHost, "The storDb host to connect to.")
|
||||
stor_db_port = flag.String("stordb_port", cgrConfig.StorDBPort, "The storDb port to bind to.")
|
||||
stor_db_name = flag.String("stordb_name", cgrConfig.StorDBName, "The name/number of the storDb to connect to.")
|
||||
stor_db_user = flag.String("stordb_user", cgrConfig.StorDBUser, "The storDb user to sign in as.")
|
||||
stor_db_pass = flag.String("stordb_passwd", cgrConfig.StorDBPass, "The storDb user's password.")
|
||||
|
||||
flush = flag.Bool("flush", false, "Flush the database before importing")
|
||||
tpid = flag.String("tpid", "", "The tariff plan id from the database")
|
||||
|
||||
@@ -106,13 +106,13 @@ func ( self *CGRConfig ) setDefaults() error {
|
||||
self.DataDBName = "10"
|
||||
self.DataDBUser = ""
|
||||
self.DataDBPass = ""
|
||||
self.StorDBType = MONGO
|
||||
self.StorDBType = utils.MYSQL
|
||||
self.StorDBHost = "localhost"
|
||||
self.StorDBPort = "27017"
|
||||
self.StorDBPort = "3306"
|
||||
self.StorDBName = "cgrates"
|
||||
self.StorDBUser = ""
|
||||
self.StorDBPass = ""
|
||||
self.RPCEncoding = GOB
|
||||
self.StorDBUser = "cgrates"
|
||||
self.StorDBPass = "CGRateS.org"
|
||||
self.RPCEncoding = JSON
|
||||
self.DefaultReqType = "rated"
|
||||
self.DefaultTOR = "0"
|
||||
self.DefaultTenant = "0"
|
||||
|
||||
@@ -40,13 +40,13 @@ func TestDefaults(t *testing.T) {
|
||||
eCfg.DataDBName = "10"
|
||||
eCfg.DataDBUser = ""
|
||||
eCfg.DataDBPass = ""
|
||||
eCfg.StorDBType = MONGO
|
||||
eCfg.StorDBType = utils.MYSQL
|
||||
eCfg.StorDBHost = "localhost"
|
||||
eCfg.StorDBPort = "27017"
|
||||
eCfg.StorDBPort = "3306"
|
||||
eCfg.StorDBName = "cgrates"
|
||||
eCfg.StorDBUser = ""
|
||||
eCfg.StorDBPass = ""
|
||||
eCfg.RPCEncoding = GOB
|
||||
eCfg.StorDBUser = "cgrates"
|
||||
eCfg.StorDBPass = "CGRateS.org"
|
||||
eCfg.RPCEncoding = JSON
|
||||
eCfg.DefaultReqType = RATED
|
||||
eCfg.DefaultTOR = "0"
|
||||
eCfg.DefaultTenant = "0"
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
# datadb_name = 10 # The name of the database to connect to.
|
||||
# datadb_user = # Username to use when connecting to database.
|
||||
# datadb_passwd = # Password to use when connecting to database.
|
||||
# stordb_type = mongo # Log/stored database type to use: <same|postgres|mongo|redis>
|
||||
# stordb_type = mysql # Log/stored database type to use: <same|postgres|mongo|redis|mysql>
|
||||
# stordb_host = 127.0.0.1 # The host to connect to. Values that start with / are for UNIX domain sockets.
|
||||
# stordb_port = 27017 # The port to reach the logdb.
|
||||
# stordb_port = 3306 # The port to reach the logdb.
|
||||
# stordb_name = cgrates # The name of the log database to connect to.
|
||||
# stordb_user = # Username to use when connecting to logdb.
|
||||
# stordb_passwd = # Password to use when connecting to logdb.
|
||||
# rpc_encoding = gob # RPC encoding used on APIs: <gob|json>.
|
||||
# stordb_user = cgrates # Username to use when connecting to stordb.
|
||||
# stordb_passwd = CGRateS.org # Password to use when connecting to stordb.
|
||||
# rpc_encoding = json # RPC encoding used on APIs: <gob|json>.
|
||||
# default_reqtype = rated # Default request type to consider when missing from requests: <""|prepaid|postpaid|pseudoprepaid|rated>.
|
||||
# default_tor = 0 # Default Type of Record to consider when missing from requests.
|
||||
# default_tenant = 0 # Default Tenant to consider when missing from requests.
|
||||
|
||||
Reference in New Issue
Block a user