remove office

This commit is contained in:
withchao
2023-05-31 17:54:05 +08:00
parent 54b651765b
commit 1d4b5960d2
11 changed files with 0 additions and 247 deletions
-25
View File
@@ -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
}
-6
View File
@@ -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("/set_conversations", c.SetConversations)
}
office := r.Group("/office")
{
o := NewOffice(discov)
_, _ = office, o
}
return r
}