This commit is contained in:
wangchuxiao
2022-03-25 18:46:27 +08:00
parent e7b95892ff
commit 6d20eddd43
20 changed files with 1936 additions and 3 deletions
+17
View File
@@ -7,6 +7,7 @@ import (
"Open_IM/internal/api/friend"
"Open_IM/internal/api/group"
"Open_IM/internal/api/manage"
"Open_IM/internal/api/office"
apiThird "Open_IM/internal/api/third"
"Open_IM/internal/api/user"
"Open_IM/pkg/common/log"
@@ -106,7 +107,23 @@ func main() {
conversationGroup.POST("/set_conversation", conversation.SetConversation)
conversationGroup.POST("/batch_set_conversation", conversation.BatchSetConversations)
conversationGroup.POST("/set_recv_msg_opt", conversation.SetRecvMsgOpt)
// Deprecated
conversationGroup.POST("/set_receive_message_opt", conversation.SetReceiveMessageOpt) //1
conversationGroup.POST("/get_receive_message_opt", conversation.GetReceiveMessageOpt) //1
conversationGroup.POST("/get_all_conversation_message_opt", conversation.GetAllConversationMessageOpt) //1
}
// office
officeGroup := r.Group("/office")
{
officeGroup.POST("/get_user_tags", office.GetUserTags)
officeGroup.POST("/create_tag", office.CreateTag)
officeGroup.POST("/delete_tag", office.DeleteTag)
officeGroup.POST("/set_tag", office.SetTag)
officeGroup.POST("/send_msg_to_tag", office.SendMsg2Tag)
officeGroup.POST("/get_send_tag_log", office.GetSendTagLogs)
}
apiThird.MinioInit()
log.NewPrivateLog("api")
ginPort := flag.Int("port", 10000, "get ginServerPort from cmd,default 10000 as port")
+1 -1
View File
@@ -1,6 +1,6 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_admin_cms
BINARY_NAME=open_im_office
BIN_DIR=../../../bin/
all: gotool build
+23
View File
@@ -0,0 +1,23 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=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
+13
View File
@@ -0,0 +1,13 @@
package main
import (
rpc "Open_IM/internal/rpc/office"
"flag"
)
func main() {
rpcPort := flag.Int("port", 11100, "rpc listening port")
flag.Parse()
rpcServer := rpc.NewOfficeServer(*rpcPort)
rpcServer.Run()
}