add cmd/open_im_api

pull/9/head
xmcy0011 3 years ago
parent c956add8b0
commit 9367ad901d

@ -1,13 +1,13 @@
package main package main
import ( import (
apiAuth "Open_IM/src/api/auth" apiAuth "Open_IM/internal/api/auth"
apiChat "Open_IM/src/api/chat" apiChat "Open_IM/internal/api/chat"
"Open_IM/src/api/friend" "Open_IM/internal/api/friend"
"Open_IM/src/api/group" "Open_IM/internal/api/group"
"Open_IM/src/api/manage" "Open_IM/internal/api/manage"
apiThird "Open_IM/src/api/third" apiThird "Open_IM/internal/api/third"
"Open_IM/src/api/user" "Open_IM/internal/api/user"
"Open_IM/src/utils" "Open_IM/src/utils"
"flag" "flag"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"

@ -5,12 +5,12 @@
#---------------Infrastructure configuration---------------------# #---------------Infrastructure configuration---------------------#
etcd: etcd:
etcdSchema: openIM etcdSchema: openIM
etcdAddr: [ 127.0.0.1:2379 ] etcdAddr: [ 81.68.126.69:2379 ]
mysql: mysql:
dbMysqlAddress: [ 127.0.0.1:3306 ] dbMysqlAddress: [ 81.68.126.69:13306 ]
dbMysqlUserName: root dbMysqlUserName: openIM
dbMysqlPassword: openIM dbMysqlPassword: 12345
dbMysqlDatabaseName: openIM dbMysqlDatabaseName: openIM
dbTableName: eMsg dbTableName: eMsg
dbMsgTableNum: 1 dbMsgTableNum: 1
@ -19,18 +19,18 @@ mysql:
dbMaxLifeTime: 120 dbMaxLifeTime: 120
mongo: mongo:
dbAddress: [ 127.0.0.1:27017 ] dbAddress: [ 81.68.126.69:27017 ]
dbDirect: false dbDirect: false
dbTimeout: 10 dbTimeout: 10
dbDatabase: openIM dbDatabase: openIM
dbSource: admin dbSource: openIM
dbUserName: dbUserName: openIM
dbPassword: dbPassword: 12345
dbMaxPoolSize: 20 dbMaxPoolSize: 20
dbRetainChatRecords: 7 dbRetainChatRecords: 7
redis: redis:
dbAddress: 127.0.0.1:6379 dbAddress: 81.68.126.69:16379
dbMaxIdle: 128 dbMaxIdle: 128
dbMaxActive: 0 dbMaxActive: 0
dbIdleTimeout: 120 dbIdleTimeout: 120
@ -38,10 +38,10 @@ redis:
kafka: kafka:
ws2mschat: ws2mschat:
addr: [ 127.0.0.1:9092 ] addr: [ 81.68.126.69:9092 ]
topic: "ws2ms_chat" topic: "ws2ms_chat"
ms2pschat: ms2pschat:
addr: [ 127.0.0.1:9092 ] addr: [ 81.68.126.69:9092 ]
topic: "ms2ps_chat" topic: "ms2ps_chat"
consumergroupid: consumergroupid:
msgToMongo: mongo msgToMongo: mongo

@ -146,7 +146,7 @@ type config struct {
} }
func init() { func init() {
bytes, err := ioutil.ReadFile("../config/config.yaml") bytes, err := ioutil.ReadFile("config/config.yaml")
if err != nil { if err != nil {
panic(err) panic(err)
return return

@ -1,7 +1,7 @@
package rpcChat package rpcChat
import ( import (
"Open_IM/src/api/group" "Open_IM/internal/api/group"
"Open_IM/src/common/config" "Open_IM/src/common/config"
"Open_IM/src/common/constant" "Open_IM/src/common/constant"
http2 "Open_IM/src/common/http" http2 "Open_IM/src/common/http"

Loading…
Cancel
Save