Commit 2b25422f by zhengcheng.wang

Initial commit

parents
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GoORMHelperCache">
<option name="schemaMapping">
<map>
<entry key="Connection">
<value>
<set>
<option value="file://$PROJECT_DIR$/server/serverHandler.go" />
</set>
</value>
</entry>
<entry key="DMDataConnBase">
<value>
<set>
<option value="file://$PROJECT_DIR$/../../../../../raisound/DM-database/main.go" />
</set>
</value>
</entry>
<entry key="Engine">
<value>
<set>
<option value="file://$PROJECT_DIR$/engineServer/handler.go" />
</set>
</value>
</entry>
<entry key="PostReq">
<value>
<set>
<option value="file://$PROJECT_DIR$/funcHandler/handler.go" />
</set>
</value>
</entry>
<entry key="PostResp">
<value>
<set>
<option value="file://$PROJECT_DIR$/funcHandler/handler.go" />
</set>
</value>
</entry>
<entry key="RdbStruct">
<value>
<set>
<option value="file://$PROJECT_DIR$/funcHandler/rdbHandler.go" />
</set>
</value>
</entry>
<entry key="WavStruct">
<value>
<set>
<option value="file://$PROJECT_DIR$/funcHandler/saveWave.go" />
</set>
</value>
</entry>
<entry key="mysqlConnInit">
<value>
<set>
<option value="file://$PROJECT_DIR$/funcHandler/mysqlHandler.go" />
</set>
</value>
</entry>
<entry key="reqBody">
<value>
<set>
<option value="file://$PROJECT_DIR$/server/serverBase.go" />
</set>
</value>
</entry>
</map>
</option>
<option name="scannedPathMapping">
<map>
<entry key="file://$PROJECT_DIR$/engineServer/handler.go">
<value>
<ScannedPath>
<option name="lastModified" value="1690250107028" />
<option name="schema">
<list>
<option value="Engine" />
</list>
</option>
</ScannedPath>
</value>
</entry>
<entry key="file://$PROJECT_DIR$/funcHandler/handler.go">
<value>
<ScannedPath>
<option name="lastModified" value="1691648945736" />
<option name="schema">
<list>
<option value="PostReq" />
<option value="PostResp" />
</list>
</option>
</ScannedPath>
</value>
</entry>
<entry key="file://$PROJECT_DIR$/funcHandler/mysqlHandler.go">
<value>
<ScannedPath>
<option name="lastModified" value="1700116412812" />
<option name="schema">
<list>
<option value="mysqlConnInit" />
</list>
</option>
</ScannedPath>
</value>
</entry>
<entry key="file://$PROJECT_DIR$/funcHandler/rdbHandler.go">
<value>
<ScannedPath>
<option name="lastModified" value="1700098101357" />
<option name="schema">
<list>
<option value="RdbStruct" />
</list>
</option>
</ScannedPath>
</value>
</entry>
<entry key="file://$PROJECT_DIR$/funcHandler/saveWave.go">
<value>
<ScannedPath>
<option name="lastModified" value="1670232707169" />
<option name="schema">
<list>
<option value="WavStruct" />
</list>
</option>
</ScannedPath>
</value>
</entry>
<entry key="file://$PROJECT_DIR$/initServer/getConfig.go">
<value>
<ScannedPath>
<option name="lastModified" value="1700116413084" />
</ScannedPath>
</value>
</entry>
<entry key="file://$PROJECT_DIR$/main.go">
<value>
<ScannedPath>
<option name="lastModified" value="1691650195041" />
</ScannedPath>
</value>
</entry>
<entry key="file://$PROJECT_DIR$/server/serverBase.go">
<value>
<ScannedPath>
<option name="lastModified" value="1700099490553" />
<option name="schema">
<list>
<option value="reqBody" />
</list>
</option>
</ScannedPath>
</value>
</entry>
<entry key="file://$PROJECT_DIR$/server/serverHandler.go">
<value>
<ScannedPath>
<option name="lastModified" value="1700098100771" />
<option name="schema">
<list>
<option value="Connection" />
</list>
</option>
</ScannedPath>
</value>
</entry>
<entry key="file://$PROJECT_DIR$/../../../../../raisound/DM-database/main.go">
<value>
<ScannedPath>
<option name="lastModified" value="1702368880274" />
<option name="schema">
<list>
<option value="DMDataConnBase" />
</list>
</option>
</ScannedPath>
</value>
</entry>
</map>
</option>
<option name="tableStructMapping">
<map>
<entry key="connection" value="Connection" />
<entry key="dm_data_conn_base" value="DMDataConnBase" />
<entry key="engine" value="Engine" />
<entry key="mysql_conn_init" value="mysqlConnInit" />
<entry key="post_req" value="PostReq" />
<entry key="post_resp" value="PostResp" />
<entry key="rdb_struct" value="RdbStruct" />
<entry key="req_body" value="reqBody" />
<entry key="wav_struct" value="WavStruct" />
</map>
</option>
<option name="lastTimeChecked" value="1702365922257" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/RaisoundWebSocketBase2C.iml" filepath="$PROJECT_DIR$/.idea/RaisoundWebSocketBase2C.iml" />
</modules>
</component>
</project>
\ No newline at end of file
[websocketCommon]
port = 19090
language = ALL #ZH-CN为简体中文,EN为英文,ALL为两个识别语种都启动,ZH-HK为粤语
redisChannel = send audio info
redisURL = huisheng_redis:6379
redisPasswd =
logPath = /opt/huisheng/websocket-golang-c/data/log #日志地址
pcmPath = /opt/huisheng/websocket-golang-c/data/audio #音频地址
hotWordURL = http://192.168.0.61/huisheng_api_gm/hotwords/new/personal/model/get
tokenVerityURL = http://192.168.0.61/huisheng_api_gm/token/verify
hotWordTextDir = /opt/huisheng/websocket-golang-c/hotWord
postURL = http://172.16.5.177:8124/encode
enPostURL =
[websocketZH-CN]
websocketArr = ws://huisheng_offline:20086/ #websocket数组,以“,”隔开
defaultHotWordFile = /opt/huisheng/data/hotword/a.txt #默认热词完整地址名称
[websocketZH-HK]
websocketArr = ws://huisheng_offline_cantonese:20086/ #websocket数组,以“,”隔开
defaultHotWordFile = /opt/huisheng/data/hotword/b.txt #默认热词完整地址名称
[websocketEN]
websocketArr = ws://huisheng_offline_english:20076/ #websocket数组,以“,”隔开
defaultHotWordFile = /opt/huisheng/data/hotword/c.txt #默认热词完整地址名称
package funcHandler
import (
"RaisoundWebSocketBase2C/initServer"
"database/sql"
"errors"
"fmt"
_ "github.com/go-sql-driver/mysql"
"log"
"time"
)
type mysqlConnInit struct {
connAddr string
db *sql.DB
table string
}
func conn(connAddr string) (conn *sql.DB, err error) {
if conn, err = sql.Open("mysql", connAddr); err != nil {
return
}
conn.SetMaxOpenConns(20)
conn.SetMaxIdleConns(2)
conn.SetConnMaxLifetime(60 * 24 * 365 * time.Hour)
conn.SetConnMaxIdleTime(60 * 24 * 365 * time.Hour)
if err = conn.Ping(); err != nil {
return
}
return
}
func InitMysqlConn(mysqlMap map[string]interface{}) (mysqlConn *mysqlConnInit, err error) {
var (
mysqlDB *sql.DB
)
connPath := fmt.Sprintf("%s:%s@(%s)/%s?charset=utf8", mysqlMap["user"].(string), mysqlMap["passwd"].(string), mysqlMap["address"].(string), mysqlMap["dbName"].(string))
if mysqlDB, err = conn(connPath); err != nil {
log.Println(err.Error())
}
mysqlConn = &mysqlConnInit{
connAddr: connPath,
db: mysqlDB,
table: mysqlMap["tableName"].(string),
}
go func() {
var e error
for {
if mysqlConn.db != nil {
if e = mysqlConn.db.Ping(); e != nil {
if mysqlDB, err = conn(connPath); err != nil {
log.Println(err.Error())
time.Sleep(5 * time.Second)
continue
}
mysqlConn.db = mysqlDB
}
} else {
if mysqlDB, err = conn(connPath); err != nil {
log.Println(err.Error())
time.Sleep(5 * time.Second)
continue
}
mysqlConn.db = mysqlDB
}
time.Sleep(30 * time.Second)
}
}()
return
}
func (mysqlConn *mysqlConnInit) selectApiKey(secretId string) (getKey string, err error) {
var (
getRow *sql.Rows
key string
)
if err = mysqlConn.db.Ping(); err != nil {
return
} else {
tableName := mysqlConn.table
selectStr := fmt.Sprintf("SELECT `key` FROM %v WHERE `is_active`=1 AND `secret`='%v'", tableName, secretId)
//log.Println(selectStr)
if getRow, err = mysqlConn.db.Query(selectStr); err != nil {
err = errors.New("check error")
return
} else {
if getRow != nil {
//if !getRow.Next() {
// err = errors.New("secretId is invalid or wrong")
// return
//}
for getRow.Next() {
_ = getRow.Scan(&key)
}
getKey = key
if getKey == "" {
err = errors.New("secretId is invalid or wrong")
}
} else {
}
defer func() {
if getRow != nil {
_ = getRow.Close()
}
}()
}
}
return
}
var (
MysqlConn *mysqlConnInit
err error
)
func init() {
go func() {
select {
case <-initServer.StartSignal:
}
for {
if initServer.MysqlMap != nil {
if MysqlConn, err = InitMysqlConn(initServer.MysqlMap); err != nil {
log.Println(err)
}
break
} else {
time.Sleep(1 * time.Second)
}
}
}()
}
package funcHandler
import (
"fmt"
"github.com/garyburd/redigo/redis"
)
type RdbStruct struct {
rDbConn redis.Conn
channel string
server string
}
func InitRdb(channel, server, passwd string, ) (Db *RdbStruct, err error) {
var (
pool *redis.Pool
)
pool = &redis.Pool{ //实例化一个连接池
MaxIdle: 10, //最初的连接数量
// MaxActive:1000000, //最大连接数量
MaxActive: 0, //连接池最大连接数量,不确定可以用0(0表示自动定义),按需分配
IdleTimeout: 300, //连接关闭时间 300秒 (300秒不使用自动关闭)
Dial: func() (conn redis.Conn, e error) {
//此处对应redis ip及端口号
if conn, e = redis.Dial("tcp", server); e != nil {
return
}
//此处1234对应redis密码
if _, e = conn.Do("AUTH", passwd); err != nil {
_ = conn.Close()
return nil, err
}
return conn, err
},
}
Db = &RdbStruct{
rDbConn: pool.Get(),
channel: channel,
server: server,
}
return
}
func (rdb *RdbStruct) PubMsg(msg string) (err error) {
if _, err = rdb.rDbConn.Do("Publish", rdb.channel, msg); err != nil {
var (
rDb redis.Conn
)
if rDb, err = redis.Dial("tcp", rdb.server); err != nil {
return
}
if _, err = rDb.Do("Publish", rdb.channel, msg); err != nil {
return
}
rdb.rDbConn = rDb
}
return
}
func (rdb *RdbStruct) LeftPubMsg(msg string) (err error) {
if _, err = rdb.rDbConn.Do("lpush", "audioQueue", msg); err != nil {
fmt.Println(err)
var (
rDb redis.Conn
)
if rDb, err = redis.Dial("tcp", rdb.server); err != nil {
return
}
if _, err = rdb.rDbConn.Do("lpush", "audioQueue", msg); err != nil {
return
}
rdb.rDbConn = rDb
}
fmt.Println(msg)
return
}
func (rdb *RdbStruct) RedisClose() {
var err error
if err = rdb.rDbConn.Close(); err != nil {
fmt.Println("HHHHHHHHHH", err)
}
}
package funcHandler
import (
"RaisoundWebSocketBase2C/initServer"
"fmt"
"io/ioutil"
"os"
)
type WavStruct struct {
file *os.File
meetingId string
EFile string
audioLength int
isClose bool
}
//InitSaveWave TODO:初始化wave文件
func InitSaveWave(meetingId string)(wav *WavStruct, err error){
var (
file *os.File
audioLength int
)
// 创建文件夹
pcmPath := initServer.ConfigMap["pcmPath"].(string)
// 确定文件格式
fileDir := fmt.Sprintf("%v/%v", pcmPath, meetingId)
eName := fmt.Sprintf("%v/%vf.wav",fileDir,meetingId)
if exist, _ := ExistsFile(eName); exist {
content,_:=ioutil.ReadFile(eName)
audioLength = len(content)
}
_, err = os.Stat(fileDir)
if os.IsNotExist(err) {
if err = os.MkdirAll(fileDir, os.ModePerm); err != nil {
return
}
}
// 将数据存入总文件
if file, err = os.OpenFile(eName, os.O_RDONLY|os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0766); err != nil {
return
}
wav = &WavStruct{
file:file,
meetingId: meetingId,
EFile: eName,
audioLength: audioLength,
}
return
}
func (w *WavStruct) SaveData(data []byte) (filePath string,err error){
if _ , err = w.file.Write(data); err != nil{
if w.file, err = os.OpenFile(w.EFile, os.O_RDONLY|os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0766); err != nil {
return
}
if _ , err = w.file.Write(data); err != nil{
return
}
}
filePath = w.EFile
w.audioLength = w.audioLength+len(data)
return
}
func (w *WavStruct) CloseWav()(err error){
//_ ,_ = w.file.Seek(44,0)
//w.file.WriteAt()
if !w.isClose{
w.isClose = true
if err = w.file.Close(); err != nil{
}
file1, _ := os.OpenFile(w.EFile, os.O_RDWR, os.ModePerm)
l,_:= file1.Seek(0,0)
waveHeader := pcmToWavHeader(1, 16000, 16, w.audioLength)
_,_=file1.WriteAt(waveHeader,l)
_ = file1.Close()
}
return
}
/**
dst:二进制字符串
numChannel:1=单声道,2=多声道
sampleRate:采样率 8000/16000
*/
func pcmToWavHeader(numChannel, sampleRate, bitsPerSample, audioLen int) (wavHeader []byte) {
longSampleRate := sampleRate
byteRate := bitsPerSample * sampleRate * numChannel / 8
totalAudioLen := audioLen
totalDataLen := totalAudioLen + 36
var header = make([]byte, 44)
// RIFF/WAVE header
header[0] = 'R'
header[1] = 'I'
header[2] = 'F'
header[3] = 'F'
header[4] = byte(totalDataLen & 0xff)
header[5] = byte((totalDataLen >> 8) & 0xff)
header[6] = byte((totalDataLen >> 16) & 0xff)
header[7] = byte((totalDataLen >> 24) & 0xff)
//WAVE
header[8] = 'W'
header[9] = 'A'
header[10] = 'V'
header[11] = 'E'
// 'fmt ' chunk
header[12] = 'f'
header[13] = 'm'
header[14] = 't'
header[15] = ' '
// 4 bytes: size of 'fmt ' chunk
header[16] = 16
header[17] = 0
header[18] = 0
header[19] = 0
// format = 1
header[20] = 1
header[21] = 0
header[22] = byte(numChannel)
header[23] = 0
header[24] = byte(longSampleRate & 0xff)
header[25] = byte((longSampleRate >> 8) & 0xff)
header[26] = byte((longSampleRate >> 16) & 0xff)
header[27] = byte((longSampleRate >> 24) & 0xff)
header[28] = byte(byteRate & 0xff)
header[29] = byte((byteRate >> 8) & 0xff)
header[30] = byte((byteRate >> 16) & 0xff)
header[31] = byte((byteRate >> 24) & 0xff)
// block align
header[32] = byte(numChannel * bitsPerSample / 8)
header[33] = 0
// bits per sample
header[34] = byte(bitsPerSample)
header[35] = 0
//data
header[36] = 'd'
header[37] = 'a'
header[38] = 't'
header[39] = 'a'
header[40] = byte(totalAudioLen & 0xff)
header[41] = byte((totalAudioLen >> 8) & 0xff)
header[42] = byte((totalAudioLen >> 16) & 0xff)
header[43] = byte((totalAudioLen >> 24) & 0xff)
wavHeader = header
return
}
address: huisheng_mysql:3306
user: root
passwd: Huisheng@12345
dbName: auth
tableName: auth_info
\ No newline at end of file
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAzkgl6RVRIUcbS+ICwqQo30aDUlegMopOdSqcfmitRFjcDJKg
QVF89acnnhJcHbpFZvv8oil88ezeKiPEAa8KsfZZHPg2H6wqjL5c7kojINbQPgBV
pjHpOwKc4Sbc+A7lO9fFTPJ9XgRZp9NCPejt6UAqjY7sfgwW3p5OPfcfmOfgP+Hq
NR+sVVvSWBx7yigoQFHWinOSdYR3R8OohvinItob7Q0rtUEXqRgO0mgJGvEK0596
G6+YUwZIqYOwallbBrUVQEl1g7Jb7TgwNsCFw1mC7Gw/kJBMxEmlPkESfRozRbwm
pf4ZSMBTQBcf1lrk7ZYvKznXznsWkDLJl7WdtQIDAQABAoIBADsJIvBmDWX8t68r
66ZQ3PGpeIPkWBCezH1zyH3U72GUHMXsYLjQ3XZgdFIk5wALAznJ/C9cuEl0hNCC
k+H3epQb8Lz9vF+sIjFNecMorI0FbWuRJPH/bsRYpxU4zhygBrLtuaWf8IkrrYz+
RQL62rvahVMmCEC6rQDhRXsucniLwGLhSWMPVS4FXB9QsgkAVf6qSpaD9RVv/k1H
Q8MQ9fSdtz/fegvtJeGFXJufy//ZlhObw3PRXb0+9mGSKft65o+XLqkt7+3qyynF
0hYPtNiJMgsmWQs5VM2ZCWg2SassEmkDLJACscNH7QxFI/T9wjsN1/PNThcaq0lJ
zpLu2DECgYEA7X0QrizFuQzfZ91TU5Bx6Hn4grr9zWkyNy3pMJyw/VoGx5nj7/z5
Gkr0aSLGvL8kUPicgOeE9RK+RJvzTdVMLnEc6VTG1qABtq7NIWGnXnCdtaikoWGZ
dwB1dJ9CIdMEd20hbG/9qSkYheInMT9jJVU8/mtDTswAKx7omXT+nYcCgYEA3lxf
ZgMZsA6iYqnIGfPn8e9Ku7H/hULZDRdSEuGI5C426gFI32gJSfvghRQwrBHo7P7b
IZxFCnTK/xPVyFOUN2o4tQ9RJETjWazoI5SYmGNNiZ2jovdoZOAVm/58+ez+5B+A
t9/cDY0Y3aJC6iNrZKCXY4BlcrqfI4NYmmx0WeMCgYAh1McjiM1B50uMCENujA0u
CPIV7X1qXaoBolCt1CSCcui0Vn/aGDeEP1lCAOo+yRvrTP8+fby7DMh+DZlDZTdN
BmAP/Tu2J2UXGR+vubGWCoTs8/E/7B9ojHAvBODu4JiqSqmQQQPprSkJKYZbxaPi
FZpyw+T6vKTpf6Wy9q+u0QKBgQCpeqBfoVdP4CeWqa9RUJzlwqwkWSvXRzcmCjNN
Hsd2m17Rhn8jgCksUaUz6Uqbq97r2+frOy9II/Kg7l5QHJvojLaCEhWXXkYmkGoy
zExuQanUjOkvCgFweXce+Z4J47/24af6/c28KmHcc5Mq4Co3fUtF1JP+GQ24RKEg
ui8IXwKBgEpw4uG0f4+fLlO6v/J8fvhzjsqpP3LL1qee5ULb2uHd6aSpcqmxgGeJ
0iOu/QkBqTzPglVrFZ1saQJWG8vLhrTlfRMK6BJVvdtHQyfe1m4+QcXfb2r9mmEl
Wv3ABuiExTz6XGSZ6vOsV7ICSrjUA/PBhTYbSOT8uYfRtirUtOvY
-----END RSA PRIVATE KEY-----
\ No newline at end of file
package main
import (
"RaisoundWebSocketBase2C/initServer"
"RaisoundWebSocketBase2C/server"
"fmt"
"github.com/gin-gonic/gin"
"log"
"net/http"
_ "net/http/pprof"
"runtime"
)
func traceMemStats() {
var ms runtime.MemStats
runtime.ReadMemStats(&ms)
log.Printf("Alloc:%d(bytes) HeapIdle:%d(bytes) HeapReleased:%d(bytes)", ms.Alloc, ms.HeapIdle, ms.HeapReleased)
}
func main() {
if initServer.Version {
log.Println("This websocket is for regular users and was developed on November 28, 2022.")
}
if !initServer.Version {
///
traceMemStats()
if initServer.ConfigMap["language"].(string) == "ALL" || initServer.ConfigMap["language"].(string) == "all" {
r := gin.Default()
r.GET("/chinese/recognize", server.ChineseServerRecognize)
r.GET("/english/recognize", server.EnglishServerRecognize)
r.GET("/cantonese/recognize", server.CantoneseServerRecognize)
//r.POST("/loadFile", server.LoadFile)
r.GET("/getEnd/:meeting_id", server.GetEnd)
r.GET("/getAudioFile", server.GetAudioFile)
r.POST("/removeMeetingId", server.RemoveFile)
r.GET("/getAudioPath/:token/:aid/:bid", server.LoadFile)
r.GET("/loadAudioPath/:aid/:bid", server.LoadFile1)
r.GET("/download", server.DownLoadAudioFile)
err := http.ListenAndServe(fmt.Sprintf(":%v", initServer.ConfigMap["port"].(string)), r)
//err := r.Run(fmt.Sprintf(":%v", initServer.ConfigMap["port"].(string)))
//println(string(debug.Stack()))
if err != nil {
return
}
}
if initServer.ConfigMap["language"].(string) == "EN" || initServer.ConfigMap["language"].(string) == "en" {
r := gin.Default()
r.GET("/english/recognize", server.EnglishServerRecognize)
//r.POST("/loadFile", server.LoadFile)
r.GET("/getEnd/:meeting_id", server.GetEnd)
r.GET("/getAudioFile", server.GetAudioFile)
r.POST("/removeMeetingId", server.RemoveFile)
r.GET("/getAudioPath/:token/:aid/:bid", server.LoadFile)
r.GET("/loadAudioPath/:aid/:bid", server.LoadFile1)
r.GET("/download", server.DownLoadAudioFile)
err := r.Run(fmt.Sprintf(":%v", initServer.ConfigMap["port"].(string)))
//println(string(debug.Stack()))
if err != nil {
return
}
}
if initServer.ConfigMap["language"].(string) == "ZH-CN" || initServer.ConfigMap["language"].(string) == "zh-cn" {
r := gin.Default()
r.GET("/chinese/recognize", server.ChineseServerRecognize)
//r.POST("/loadFile", server.LoadFile)
r.GET("/getEnd/:meeting_id", server.GetEnd)
r.GET("/getAudioFile", server.GetAudioFile)
r.POST("/removeMeetingId", server.RemoveFile)
r.GET("/getAudioPath/:token/:aid/:bid", server.LoadFile)
r.GET("/loadAudioPath/:aid/:bid", server.LoadFile1)
r.GET("/download", server.DownLoadAudioFile)
err := r.Run(fmt.Sprintf(":%v", initServer.ConfigMap["port"].(string)))
//println(string(debug.Stack()))
if err != nil {
return
}
}
if initServer.ConfigMap["language"].(string) == "ZH-HK" || initServer.ConfigMap["language"].(string) == "zh-hk" {
r := gin.Default()
r.GET("/cantonese/recognize", server.CantoneseServerRecognize)
//r.POST("/loadFile", server.LoadFile)
r.GET("/getEnd/:meeting_id", server.GetEnd)
r.GET("/getAudioFile", server.GetAudioFile)
r.POST("/removeMeetingId", server.RemoveFile)
r.GET("/getAudioPath/:token/:aid/:bid", server.LoadFile)
r.GET("/loadAudioPath/:aid/:bid", server.LoadFile1)
r.GET("/download", server.DownLoadAudioFile)
err := r.Run(fmt.Sprintf(":%v", initServer.ConfigMap["port"].(string)))
//println(string(debug.Stack()))
if err != nil {
return
}
}
///
traceMemStats()
}
}
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 to comment