mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 20:34:18 +08:00
refactor: unified naming for module startup functions.
This commit is contained in:
parent
8ad2913811
commit
d3bc9aec87
2
go.mod
2
go.mod
@ -16,7 +16,7 @@ require (
|
|||||||
github.com/mitchellh/mapstructure v1.5.0
|
github.com/mitchellh/mapstructure v1.5.0
|
||||||
github.com/openimsdk/localcache v0.0.1
|
github.com/openimsdk/localcache v0.0.1
|
||||||
github.com/openimsdk/protocol v0.0.58-google
|
github.com/openimsdk/protocol v0.0.58-google
|
||||||
github.com/openimsdk/tools v0.0.46-alpha.9
|
github.com/openimsdk/tools v0.0.46-alpha.10
|
||||||
github.com/pkg/errors v0.9.1 // indirect
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
github.com/prometheus/client_golang v1.18.0
|
github.com/prometheus/client_golang v1.18.0
|
||||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||||
|
|||||||
4
go.sum
4
go.sum
@ -270,8 +270,8 @@ github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
|||||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||||
github.com/openimsdk/protocol v0.0.58-google h1:cGNUVaXO9LqcFgIb4NvrtEOrv0spGecoQKyN8YWhyZs=
|
github.com/openimsdk/protocol v0.0.58-google h1:cGNUVaXO9LqcFgIb4NvrtEOrv0spGecoQKyN8YWhyZs=
|
||||||
github.com/openimsdk/protocol v0.0.58-google/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8=
|
github.com/openimsdk/protocol v0.0.58-google/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8=
|
||||||
github.com/openimsdk/tools v0.0.46-alpha.9 h1:bVGn5I0Gx7fKiVdiODQ2yjgIevzfaN5LffO/aiMNxcQ=
|
github.com/openimsdk/tools v0.0.46-alpha.10 h1:JRt/Qcca6z1HPXZdKKyS8reYp2PMHczS2XqNc3bXSic=
|
||||||
github.com/openimsdk/tools v0.0.46-alpha.9/go.mod h1:NAHPJyNUJm0n0WaZfIRC5s6Np+timv+xKIn5I8SKYaM=
|
github.com/openimsdk/tools v0.0.46-alpha.10/go.mod h1:NAHPJyNUJm0n0WaZfIRC5s6Np+timv+xKIn5I8SKYaM=
|
||||||
github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=
|
github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=
|
||||||
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
|
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
|
||||||
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
|
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
|
||||||
|
|||||||
@ -87,7 +87,6 @@ func (s *authServer) GetUserToken(ctx context.Context, req *pbauth.GetUserTokenR
|
|||||||
if authverify.IsManagerUserID(req.UserID, &s.config.Manager, &s.config.IMAdmin) {
|
if authverify.IsManagerUserID(req.UserID, &s.config.Manager, &s.config.IMAdmin) {
|
||||||
return nil, errs.ErrNoPermission.WrapMsg("don't get Admin token")
|
return nil, errs.ErrNoPermission.WrapMsg("don't get Admin token")
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err := s.userRpcClient.GetUserInfo(ctx, req.UserID); err != nil {
|
if _, err := s.userRpcClient.GetUserInfo(ctx, req.UserID); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,11 +116,12 @@ func (rc *RootCmd) initializeLogger(cmdOpts *CmdOpts) error {
|
|||||||
logConfig.StorageLocation,
|
logConfig.StorageLocation,
|
||||||
logConfig.RemainRotationCount,
|
logConfig.RemainRotationCount,
|
||||||
logConfig.RotationTime,
|
logConfig.RotationTime,
|
||||||
|
config2.Version,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errs.Wrap(err)
|
return errs.Wrap(err)
|
||||||
}
|
}
|
||||||
return errs.Wrap(log.InitConsoleLogger(rc.processName, logConfig.RemainLogLevel, logConfig.IsJson))
|
return errs.Wrap(log.InitConsoleLogger(rc.processName, logConfig.RemainLogLevel, logConfig.IsJson, config2.Version))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -205,7 +205,7 @@ func Test_Revoke(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Test_FindBySeq(t *testing.T) {
|
func Test_FindBySeq(t *testing.T) {
|
||||||
if err := log.InitFromConfig("", "", 6, true, false, "", 2, 1); err != nil {
|
if err := log.InitFromConfig("", "", 6, true, false, "", 2, 1, "1,0"); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
db := GetDB()
|
db := GetDB()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user