mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 02:16:16 +08:00
solve error
This commit is contained in:
parent
ebd1de919d
commit
b74e6b52f3
@ -1,13 +1,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"OpenIM/internal/task"
|
|
||||||
"OpenIM/internal/tools"
|
"OpenIM/internal/tools"
|
||||||
"OpenIM/pkg/common/config"
|
"OpenIM/pkg/common/config"
|
||||||
"context"
|
"context"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"OpenIM/internal/task"
|
|
||||||
"OpenIM/internal/tools"
|
"OpenIM/internal/tools"
|
||||||
"OpenIM/pkg/common/config"
|
"OpenIM/pkg/common/config"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
@ -1 +1,16 @@
|
|||||||
package third
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"OpenIM/internal/rpc/third"
|
||||||
|
"OpenIM/internal/startrpc"
|
||||||
|
"OpenIM/pkg/common/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
if err := config.InitConfig(); err != nil {
|
||||||
|
panic(err.Error())
|
||||||
|
}
|
||||||
|
if err := startrpc.Start(config.Config.RpcPort.OpenImUserPort[0], config.Config.RpcRegisterName.OpenImUserName, config.Config.Prometheus.UserPrometheusPort[0], third.Start); err != nil {
|
||||||
|
panic(err.Error())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
73
go.mod
73
go.mod
@ -42,20 +42,89 @@ require (
|
|||||||
gorm.io/gorm v1.23.8
|
gorm.io/gorm v1.23.8
|
||||||
)
|
)
|
||||||
|
|
||||||
require github.com/minio/minio-go v6.0.14+incompatible
|
require (
|
||||||
|
github.com/google/uuid v1.3.0
|
||||||
|
github.com/minio/minio-go v6.0.14+incompatible
|
||||||
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
cloud.google.com/go v0.105.0 // indirect
|
||||||
|
cloud.google.com/go/compute v1.13.0 // indirect
|
||||||
|
cloud.google.com/go/compute/metadata v0.2.1 // indirect
|
||||||
|
cloud.google.com/go/firestore v1.9.0 // indirect
|
||||||
|
cloud.google.com/go/iam v0.8.0 // indirect
|
||||||
|
cloud.google.com/go/longrunning v0.3.0 // indirect
|
||||||
|
cloud.google.com/go/storage v1.27.0 // indirect
|
||||||
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
|
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||||
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||||
|
github.com/dustin/go-humanize v1.0.0 // indirect
|
||||||
|
github.com/eapache/go-resiliency v1.2.0 // indirect
|
||||||
|
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
|
||||||
|
github.com/eapache/queue v1.1.0 // indirect
|
||||||
|
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||||
github.com/go-ini/ini v1.67.0 // indirect
|
github.com/go-ini/ini v1.67.0 // indirect
|
||||||
github.com/go-playground/locales v0.14.1 // indirect
|
github.com/go-playground/locales v0.14.1 // indirect
|
||||||
|
github.com/go-playground/universal-translator v0.18.0 // indirect
|
||||||
|
github.com/go-sql-driver/mysql v1.6.0 // indirect
|
||||||
|
github.com/go-stack/stack v1.8.0 // indirect
|
||||||
|
github.com/go-zookeeper/zk v1.0.3 // indirect
|
||||||
github.com/goccy/go-json v0.10.0 // indirect
|
github.com/goccy/go-json v0.10.0 // indirect
|
||||||
github.com/google/uuid v1.3.0
|
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
|
||||||
|
github.com/golang/snappy v0.0.3 // indirect
|
||||||
|
github.com/google/go-cmp v0.5.9 // indirect
|
||||||
|
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
|
||||||
|
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
|
||||||
|
github.com/hashicorp/go-uuid v1.0.2 // indirect
|
||||||
|
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
|
||||||
|
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
|
||||||
|
github.com/jcmturner/gofork v1.0.0 // indirect
|
||||||
|
github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect
|
||||||
|
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
|
||||||
|
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||||
|
github.com/jinzhu/now v1.1.5 // indirect
|
||||||
github.com/jonboulle/clockwork v0.3.0 // indirect
|
github.com/jonboulle/clockwork v0.3.0 // indirect
|
||||||
|
github.com/josharian/intern v1.0.0 // indirect
|
||||||
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
|
github.com/klauspost/compress v1.13.6 // indirect
|
||||||
|
github.com/klauspost/cpuid v1.3.1 // indirect
|
||||||
|
github.com/leodido/go-urn v1.2.1 // indirect
|
||||||
github.com/lestrrat-go/strftime v1.0.6 // indirect
|
github.com/lestrrat-go/strftime v1.0.6 // indirect
|
||||||
|
github.com/lithammer/shortuuid v3.0.0+incompatible // indirect
|
||||||
|
github.com/mailru/easyjson v0.7.7 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||||
|
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||||
|
github.com/minio/md5-simd v1.1.0 // indirect
|
||||||
|
github.com/minio/sha256-simd v0.1.1 // indirect
|
||||||
|
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
|
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
|
||||||
|
github.com/pierrec/lz4 v2.6.0+incompatible // indirect
|
||||||
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
|
github.com/prometheus/client_model v0.2.0 // indirect
|
||||||
|
github.com/prometheus/common v0.37.0 // indirect
|
||||||
|
github.com/prometheus/procfs v0.8.0 // indirect
|
||||||
|
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
|
||||||
|
github.com/rs/xid v1.2.1 // indirect
|
||||||
github.com/ugorji/go/codec v1.2.8 // indirect
|
github.com/ugorji/go/codec v1.2.8 // indirect
|
||||||
|
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
|
||||||
|
github.com/xdg-go/scram v1.0.2 // indirect
|
||||||
|
github.com/xdg-go/stringprep v1.0.2 // indirect
|
||||||
|
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
|
||||||
|
go.opencensus.io v0.24.0 // indirect
|
||||||
golang.org/x/crypto v0.5.0 // indirect
|
golang.org/x/crypto v0.5.0 // indirect
|
||||||
|
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
|
||||||
|
golang.org/x/sync v0.1.0 // indirect
|
||||||
|
golang.org/x/sys v0.4.0 // indirect
|
||||||
|
golang.org/x/text v0.6.0 // indirect
|
||||||
|
golang.org/x/time v0.1.0 // indirect
|
||||||
|
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
||||||
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
|
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
|
||||||
gopkg.in/ini.v1 v1.66.2 // indirect
|
gopkg.in/ini.v1 v1.66.2 // indirect
|
||||||
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
replace github.com/Shopify/sarama => github.com/Shopify/sarama v1.29.0
|
replace github.com/Shopify/sarama => github.com/Shopify/sarama v1.29.0
|
||||||
|
@ -28,7 +28,7 @@ func (o *Auth) client() (auth.AuthClient, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *Auth) UserRegister(c *gin.Context) {
|
func (o *Auth) UserRegister(c *gin.Context) {
|
||||||
a2r.Call(auth.AuthClient.UserRegister, o.client, c)
|
//a2r.Call(auth.AuthClient.UserRegister, o.client, c) // todo
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Auth) UserToken(c *gin.Context) {
|
func (o *Auth) UserToken(c *gin.Context) {
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
package manage
|
package manage
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"OpenIM/internal/apiresp"
|
||||||
api "OpenIM/pkg/apistruct"
|
api "OpenIM/pkg/apistruct"
|
||||||
"OpenIM/pkg/common/config"
|
"OpenIM/pkg/common/config"
|
||||||
"OpenIM/pkg/common/constant"
|
"OpenIM/pkg/common/constant"
|
||||||
@ -16,6 +17,7 @@ import (
|
|||||||
sdkws "OpenIM/pkg/proto/sdkws"
|
sdkws "OpenIM/pkg/proto/sdkws"
|
||||||
"OpenIM/pkg/utils"
|
"OpenIM/pkg/utils"
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -122,6 +124,10 @@ func init() {
|
|||||||
// @Failure 400 {object} api.ManagementSendMsgResp "errCode为400 一般为参数输入错误, token未带上等"
|
// @Failure 400 {object} api.ManagementSendMsgResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
// @Router /msg/manage_send_msg [post]
|
// @Router /msg/manage_send_msg [post]
|
||||||
func ManagementSendMsg(c *gin.Context) {
|
func ManagementSendMsg(c *gin.Context) {
|
||||||
|
|
||||||
|
apiresp.GinError(c, errors.New("todo"))
|
||||||
|
apiresp.GinSuccess(c, nil)
|
||||||
|
|
||||||
var data interface{}
|
var data interface{}
|
||||||
params := api.ManagementSendMsgReq{}
|
params := api.ManagementSendMsgReq{}
|
||||||
if err := c.BindJSON(¶ms); err != nil {
|
if err := c.BindJSON(¶ms); err != nil {
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
package apiresp
|
package apiresp
|
||||||
|
|
||||||
type ApiResponse struct {
|
type apiResponse struct {
|
||||||
ErrCode int `json:"errCode"`
|
ErrCode int `json:"errCode"`
|
||||||
ErrMsg string `json:"errMsg"`
|
ErrMsg string `json:"errMsg"`
|
||||||
ErrDlt string `json:"errDlt"`
|
ErrDlt string `json:"errDlt"`
|
||||||
Data any `json:"data"`
|
Data any `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func apiSuccess(data any) *ApiResponse {
|
func apiSuccess(data any) *apiResponse {
|
||||||
return &ApiResponse{
|
return &apiResponse{
|
||||||
Data: data,
|
Data: data,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func apiError(err error) *ApiResponse {
|
func apiError(err error) *apiResponse {
|
||||||
return &ApiResponse{ErrCode: 10000, ErrMsg: err.Error()}
|
return &apiResponse{ErrCode: 10000, ErrMsg: err.Error()}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ import (
|
|||||||
pbfriend "OpenIM/pkg/proto/friend"
|
pbfriend "OpenIM/pkg/proto/friend"
|
||||||
"OpenIM/pkg/utils"
|
"OpenIM/pkg/utils"
|
||||||
"context"
|
"context"
|
||||||
"github.com/OpenIMSDK/openKeeper"
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ import (
|
|||||||
"OpenIM/pkg/common/db/controller"
|
"OpenIM/pkg/common/db/controller"
|
||||||
"OpenIM/pkg/common/db/relation"
|
"OpenIM/pkg/common/db/relation"
|
||||||
relationTb "OpenIM/pkg/common/db/table/relation"
|
relationTb "OpenIM/pkg/common/db/table/relation"
|
||||||
"OpenIM/pkg/common/db/tx"
|
|
||||||
"OpenIM/pkg/common/db/unrelation"
|
"OpenIM/pkg/common/db/unrelation"
|
||||||
"OpenIM/pkg/common/tokenverify"
|
"OpenIM/pkg/common/tokenverify"
|
||||||
"OpenIM/pkg/common/tracelog"
|
"OpenIM/pkg/common/tracelog"
|
||||||
@ -19,7 +18,6 @@ import (
|
|||||||
"OpenIM/pkg/utils"
|
"OpenIM/pkg/utils"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/dtm-labs/rockscache"
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
@ -3,8 +3,6 @@ package controller
|
|||||||
import (
|
import (
|
||||||
"OpenIM/pkg/common/constant"
|
"OpenIM/pkg/common/constant"
|
||||||
"OpenIM/pkg/common/db/cache"
|
"OpenIM/pkg/common/db/cache"
|
||||||
"OpenIM/pkg/common/db/relation"
|
|
||||||
relationTb "OpenIM/pkg/common/db/table/relation"
|
|
||||||
unRelationTb "OpenIM/pkg/common/db/table/unrelation"
|
unRelationTb "OpenIM/pkg/common/db/table/unrelation"
|
||||||
"OpenIM/pkg/common/db/unrelation"
|
"OpenIM/pkg/common/db/unrelation"
|
||||||
"OpenIM/pkg/common/log"
|
"OpenIM/pkg/common/log"
|
||||||
@ -12,7 +10,6 @@ import (
|
|||||||
"OpenIM/pkg/common/tracelog"
|
"OpenIM/pkg/common/tracelog"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/gogo/protobuf/sortkeys"
|
"github.com/gogo/protobuf/sortkeys"
|
||||||
"gorm.io/gorm"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ func NewMinioInterface() (Interface, error) {
|
|||||||
// Creds: credentials.NewStaticV4("minioadmin", "minioadmin", ""),
|
// Creds: credentials.NewStaticV4("minioadmin", "minioadmin", ""),
|
||||||
// Secure: false,
|
// Secure: false,
|
||||||
//})
|
//})
|
||||||
|
// todo 初始化连接和桶
|
||||||
return &minioImpl{}, nil
|
return &minioImpl{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user