mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 18:36:19 +08:00
remove office
This commit is contained in:
parent
54b651765b
commit
1d4b5960d2
@ -1,39 +0,0 @@
|
|||||||
.PHONY: all build run gotool install clean help
|
|
||||||
|
|
||||||
NAME=open_im_office
|
|
||||||
BIN_DIR=../../../bin/
|
|
||||||
|
|
||||||
OS:= $(or $(os),linux)
|
|
||||||
ARCH:=$(or $(arch),amd64)
|
|
||||||
all: gotool build
|
|
||||||
|
|
||||||
ifeq ($(OS),windows)
|
|
||||||
|
|
||||||
BINARY_NAME=${NAME}.exe
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
BINARY_NAME=${NAME}
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
build:
|
|
||||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
|
||||||
|
|
||||||
run:
|
|
||||||
@go run ./
|
|
||||||
|
|
||||||
gotool:
|
|
||||||
go fmt ./
|
|
||||||
go vet ./
|
|
||||||
|
|
||||||
install:build
|
|
||||||
mv ${BINARY_NAME} ${BIN_DIR}
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
package office
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/internal/rpc/office"
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
rpcCmd := cmd.NewRpcCmd("office")
|
|
||||||
rpcCmd.AddPortFlag()
|
|
||||||
rpcCmd.AddPrometheusPortFlag()
|
|
||||||
if err := rpcCmd.Exec(); err != nil {
|
|
||||||
panic(err.Error())
|
|
||||||
}
|
|
||||||
if err := rpcCmd.StartSvr(config.Config.RpcRegisterName.OpenImOfficeName, office.Start); err != nil {
|
|
||||||
panic(err.Error())
|
|
||||||
}
|
|
||||||
}
|
|
@ -142,7 +142,6 @@ rpcport: #rpc服务端口 默认即可
|
|||||||
openImConversationPort: [ 10180 ]
|
openImConversationPort: [ 10180 ]
|
||||||
openImRtcPort: [ 10190 ]
|
openImRtcPort: [ 10190 ]
|
||||||
openImThirdPort: [ 10200 ]
|
openImThirdPort: [ 10200 ]
|
||||||
openImOfficePort: [ 10210 ]
|
|
||||||
|
|
||||||
rpcregistername: #rpc注册服务名,默认即可
|
rpcregistername: #rpc注册服务名,默认即可
|
||||||
openImUserName: User
|
openImUserName: User
|
||||||
@ -155,7 +154,6 @@ rpcregistername: #rpc注册服务名,默认即可
|
|||||||
openImConversationName: Conversation
|
openImConversationName: Conversation
|
||||||
openImRtcName: Rtc
|
openImRtcName: Rtc
|
||||||
openImThirdName: Third
|
openImThirdName: Third
|
||||||
openImOfficeName: Office
|
|
||||||
|
|
||||||
log:
|
log:
|
||||||
storageLocation: ../logs/
|
storageLocation: ../logs/
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/office"
|
|
||||||
"google.golang.org/grpc"
|
|
||||||
)
|
|
||||||
|
|
||||||
func NewOffice(c discoveryregistry.SvcDiscoveryRegistry) *Office {
|
|
||||||
conn, err := c.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImOfficeName)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
return &Office{conn: conn}
|
|
||||||
}
|
|
||||||
|
|
||||||
type Office struct {
|
|
||||||
conn *grpc.ClientConn
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *Office) client(ctx context.Context) (office.OfficeClient, error) {
|
|
||||||
return office.NewOfficeClient(o.conn), nil
|
|
||||||
}
|
|
@ -170,11 +170,5 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive
|
|||||||
conversationGroup.POST("/get_conversations_has_read_and_max_seq", c.GetConversationsHasReadAndMaxSeq)
|
conversationGroup.POST("/get_conversations_has_read_and_max_seq", c.GetConversationsHasReadAndMaxSeq)
|
||||||
conversationGroup.POST("/set_conversations", c.SetConversations)
|
conversationGroup.POST("/set_conversations", c.SetConversations)
|
||||||
}
|
}
|
||||||
|
|
||||||
office := r.Group("/office")
|
|
||||||
{
|
|
||||||
o := NewOffice(discov)
|
|
||||||
_, _ = office, o
|
|
||||||
}
|
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
@ -1,119 +0,0 @@
|
|||||||
package office
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller"
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation"
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/office"
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient"
|
|
||||||
"google.golang.org/grpc"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error {
|
|
||||||
mongo, err := unrelation.NewMongo()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
//rdb, err := cache.NewRedis()
|
|
||||||
//if err != nil {
|
|
||||||
// return err
|
|
||||||
//}
|
|
||||||
office.RegisterOfficeServer(server, &officeServer{
|
|
||||||
officeDatabase: controller.NewOfficeDatabase(mongo),
|
|
||||||
msgRpcClient: rpcclient.NewMsgClient(client),
|
|
||||||
user: rpcclient.NewUserClient(client),
|
|
||||||
})
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type officeServer struct {
|
|
||||||
officeDatabase controller.OfficeDatabase
|
|
||||||
user *rpcclient.UserClient
|
|
||||||
msgRpcClient *rpcclient.MsgClient
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) GetUserTags(ctx context.Context, req *office.GetUserTagsReq) (*office.GetUserTagsResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) CreateTag(ctx context.Context, req *office.CreateTagReq) (*office.CreateTagResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) DeleteTag(ctx context.Context, req *office.DeleteTagReq) (*office.DeleteTagResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) SetTag(ctx context.Context, req *office.SetTagReq) (*office.SetTagResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) SendMsg2Tag(ctx context.Context, req *office.SendMsg2TagReq) (*office.SendMsg2TagResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) GetTagSendLogs(ctx context.Context, req *office.GetTagSendLogsReq) (*office.GetTagSendLogsResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) GetUserTagByID(ctx context.Context, req *office.GetUserTagByIDReq) (*office.GetUserTagByIDResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) CreateOneWorkMoment(ctx context.Context, req *office.CreateOneWorkMomentReq) (*office.CreateOneWorkMomentResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) DeleteOneWorkMoment(ctx context.Context, req *office.DeleteOneWorkMomentReq) (*office.DeleteOneWorkMomentResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) LikeOneWorkMoment(ctx context.Context, req *office.LikeOneWorkMomentReq) (*office.LikeOneWorkMomentResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) CommentOneWorkMoment(ctx context.Context, req *office.CommentOneWorkMomentReq) (*office.CommentOneWorkMomentResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) DeleteComment(ctx context.Context, req *office.DeleteCommentReq) (*office.DeleteCommentResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) GetWorkMomentByID(ctx context.Context, req *office.GetWorkMomentByIDReq) (*office.GetWorkMomentByIDResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) ChangeWorkMomentPermission(ctx context.Context, req *office.ChangeWorkMomentPermissionReq) (*office.ChangeWorkMomentPermissionResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) GetUserWorkMoments(ctx context.Context, req *office.GetUserWorkMomentsReq) (*office.GetUserWorkMomentsResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) GetUserFriendWorkMoments(ctx context.Context, req *office.GetUserFriendWorkMomentsReq) (*office.GetUserFriendWorkMomentsResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *officeServer) SetUserWorkMomentsLevel(ctx context.Context, req *office.SetUserWorkMomentsLevelReq) (*office.SetUserWorkMomentsLevelResp, error) {
|
|
||||||
//TODO implement me
|
|
||||||
panic("implement me")
|
|
||||||
}
|
|
@ -161,7 +161,6 @@ type config struct {
|
|||||||
OpenImCachePort []int `yaml:"openImCachePort"`
|
OpenImCachePort []int `yaml:"openImCachePort"`
|
||||||
OpenImRtcPort []int `yaml:"openImRtcPort"`
|
OpenImRtcPort []int `yaml:"openImRtcPort"`
|
||||||
OpenImThirdPort []int `yaml:"openImThirdPort"`
|
OpenImThirdPort []int `yaml:"openImThirdPort"`
|
||||||
OpenImOfficePort []int `yaml:"openImOfficePort"`
|
|
||||||
}
|
}
|
||||||
RpcRegisterName struct {
|
RpcRegisterName struct {
|
||||||
OpenImUserName string `yaml:"openImUserName"`
|
OpenImUserName string `yaml:"openImUserName"`
|
||||||
@ -174,7 +173,6 @@ type config struct {
|
|||||||
OpenImConversationName string `yaml:"openImConversationName"`
|
OpenImConversationName string `yaml:"openImConversationName"`
|
||||||
OpenImRtcName string `yaml:"openImRtcName"`
|
OpenImRtcName string `yaml:"openImRtcName"`
|
||||||
OpenImThirdName string `yaml:"openImThirdName"`
|
OpenImThirdName string `yaml:"openImThirdName"`
|
||||||
OpenImOfficeName string `yaml:"openImOfficeName"`
|
|
||||||
}
|
}
|
||||||
Zookeeper struct {
|
Zookeeper struct {
|
||||||
Schema string `yaml:"schema"`
|
Schema string `yaml:"schema"`
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
package controller
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation"
|
|
||||||
)
|
|
||||||
|
|
||||||
func NewOfficeDatabase(mgo *unrelation.Mongo) OfficeDatabase {
|
|
||||||
return &officeDatabase{mgo: mgo}
|
|
||||||
}
|
|
||||||
|
|
||||||
type OfficeDatabase interface {
|
|
||||||
// table.unrelation.office.go
|
|
||||||
// unrelation.office.go
|
|
||||||
}
|
|
||||||
|
|
||||||
type officeDatabase struct {
|
|
||||||
mgo *unrelation.Mongo
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
package unrelation
|
|
@ -1 +0,0 @@
|
|||||||
package unrelation
|
|
@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
all_proto=(
|
|
||||||
wrapperspb/wrapperspb.proto
|
|
||||||
auth/auth.proto
|
|
||||||
friend/friend.proto
|
|
||||||
group/group.proto
|
|
||||||
user/user.proto
|
|
||||||
rtc/rtc.proto
|
|
||||||
msg/msg.proto
|
|
||||||
push/push.proto
|
|
||||||
msggateway/msg_gateway.proto
|
|
||||||
sdkws/ws.proto
|
|
||||||
conversation/conversation.proto
|
|
||||||
third/third.proto
|
|
||||||
)
|
|
Loading…
x
Reference in New Issue
Block a user