Commit 82d7e9c2 by mushishixian

修改忽略文件

parent 3a982cd6
...@@ -13,7 +13,6 @@ Homestead.json ...@@ -13,7 +13,6 @@ Homestead.json
/storage/debugbar /storage/debugbar
.DS_Store? .DS_Store?
.DS_Store .DS_Store
/configs
cmd/cmd.exe cmd/cmd.exe
cmd/move/logs/ cmd/move/logs/
/cmd/dong/logs/*.log /cmd/dong/logs/*.log
......
package configs
import (
"fmt"
"gopkg.in/ini.v1"
"os"
)
var Cfg *ini.File
func init() {
var err error
Cfg, err = ini.Load("conf/config.ini")
if err != nil {
fmt.Printf("Fail to read file: %v", err)
os.Exit(1)
}
}
func GetConfig(section, name string) string {
return Cfg.Section(section).Key(name).String()
}
package configs
////基础物料服务的地址
//const BasicApiUrl = "http://192.168.2.113:40001"
//
////出库服务的地址
//const OutStoreApiUrl = "http://192.168.2.179:40003"
//
////出库服务的地址
//const InStoreApiUrl = "http://192.168.2.239:40004"
//
//
////金蝶同步状态接口
//const ErpSyncBaseDataStatusApi = "http://192.168.2.253:6888/ormrpc/services/WSInventoryManagementFacade?wsdl"
//
//const ErpSyncBillStatusApi = "http://192.168.2.253:6888/ormrpc/services/WSInventoryManagementFacade?wsdl"
//
//const ErpLoginStatusApi = "http://192.168.2.253:6888/ormrpc/services/EASLogin?wsdl"
//基础物料服务的地址
var BasicApiUrl string
//出库服务的地址
var OutStoreApiUrl string
//出库服务的地址
var InStoreApiUrl string
//金蝶同步状态接口
var ErpSyncBaseDataStatusApi string
var ErpSyncBillStatusApi string
var ErpLoginStatusApi string
func init() {
BasicApiUrl = GetConfig("api", "base")
OutStoreApiUrl = GetConfig("api", "out_store")
InStoreApiUrl = GetConfig("api", "in_store")
ErpSyncBaseDataStatusApi = GetConfig("api", "erp_sync_base_data_status")
ErpSyncBillStatusApi = GetConfig("api", "erp_sync_bill_status")
ErpLoginStatusApi = GetConfig("api", "erp_login_status")
}
package configs
type DbInfo struct {
Engine string
User string
Pass string
Ip string
Port string
Table string
}
//func GetDBOne() DbInfo {
// return DbInfo{
// "mysql",
// "root",
// "root",
// "192.168.2.250",
// "3306",
// "lie_scm_sync",
// }
//}
func GetDBOne() DbInfo {
return DbInfo{
"mysql",
GetConfig("mysql","username"),
GetConfig("mysql","password"),
GetConfig("mysql","host"),
"3306",
GetConfig("mysql","database"),
}
}
func GetDBCms() DbInfo {
return DbInfo{
"mysql",
"ichuntcms",
"ichuntcms#zsyM",
"192.168.2.232",
"3306",
"ichuntcms",
}
}
func GetDBLiexin() DbInfo {
return DbInfo{
"mysql",
"liexin",
"liexin#zsyM",
"192.168.2.232",
"3306",
"liexin",
}
}
\ No newline at end of file
package configs
//const RABBITMQDSN = "amqp://huntadmin:jy2y2900@192.168.1.237:5672/"
var RABBITMQDSN string
func init() {
RABBITMQDSN = GetConfig("rabbitmq", "url")
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment