Merge remote-tracking branch 'origin/tuoyun' into tuoyun

This commit is contained in:
skiffer-git
2022-04-26 09:09:44 +08:00
52 changed files with 2877 additions and 741 deletions
+2 -1
View File
@@ -130,6 +130,7 @@ func main() {
conversationGroup.POST("/set_conversation", conversation.SetConversation)
conversationGroup.POST("/batch_set_conversation", conversation.BatchSetConversations)
conversationGroup.POST("/set_recv_msg_opt", conversation.SetRecvMsgOpt)
conversationGroup.POST("/modify_conversation_field", conversation.ModifyConversationField)
}
// office
officeGroup := r.Group("/office")
@@ -174,7 +175,7 @@ func main() {
}
go apiThird.MinioInit()
ginPort := flag.Int("port", 10000, "get ginServerPort from cmd,default 10000 as port")
ginPort := flag.Int("port", 10002, "get ginServerPort from cmd,default 10000 as port")
flag.Parse()
fmt.Println("start api server, port: ", *ginPort)
err := r.Run(":" + strconv.Itoa(*ginPort))
+6 -2
View File
@@ -3,7 +3,9 @@ package main
import (
"Open_IM/internal/cms_api"
"Open_IM/pkg/utils"
"flag"
"fmt"
"strconv"
"github.com/gin-gonic/gin"
)
@@ -12,6 +14,8 @@ func main() {
gin.SetMode(gin.ReleaseMode)
router := cms_api.NewGinRouter()
router.Use(utils.CorsHandler())
fmt.Println("start cms api server, port: ", 8000)
router.Run(":" + "8000")
ginPort := flag.Int("port", 10006, "get ginServerPort from cmd,default 8000 as port")
flag.Parse()
fmt.Println("start cms api server, port: ", ginPort)
router.Run(":" + strconv.Itoa(*ginPort))
}
+1 -1
View File
@@ -23,7 +23,7 @@ func main() {
r := gin.Default()
r.Use(utils.CorsHandler())
authRouterGroup := r.Group("/auth")
authRouterGroup := r.Group("/demo")
{
authRouterGroup.POST("/code", register.SendVerificationCode)
authRouterGroup.POST("/verify", register.Verify)
+24
View File
@@ -0,0 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_conversation
BIN_DIR=../../../bin/
all: gotool build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
run:
@go run ./
gotool:
go fmt ./
go vet ./
install:
make build
mv ${BINARY_NAME} ${BIN_DIR}
clean:
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
+16
View File
@@ -0,0 +1,16 @@
package main
import (
rpcConversation "Open_IM/internal/rpc/conversation"
"flag"
"fmt"
)
func main() {
rpcPort := flag.Int("port", 11400, "RpcConversation default listen port 11300")
flag.Parse()
fmt.Println("start conversation rpc server, port: ", *rpcPort)
rpcServer := rpcConversation.NewRpcConversationServer(*rpcPort)
rpcServer.Run()
}
+23
View File
@@ -0,0 +1,23 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_office
BIN_DIR=../../../bin/
all: gotool build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
run:
@go run ./
gotool:
go fmt ./
go vet ./
install:
make build
mv ${BINARY_NAME} ${BIN_DIR}
clean:
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
+15
View File
@@ -0,0 +1,15 @@
package main
import (
rpc "Open_IM/internal/rpc/cache"
"flag"
"fmt"
)
func main() {
rpcPort := flag.Int("port", 11500, "rpc listening port")
flag.Parse()
fmt.Println("start office rpc server, port: ", *rpcPort)
rpcServer := rpc.NewOfficeServer(*rpcPort)
rpcServer.Run()
}