feat: Optimizing RPC call (#2993)

* pb

* fix: Modifying other fields while setting IsPrivateChat does not take effect

* fix: quote message error revoke

* refactoring scheduled tasks

* refactoring scheduled tasks

* refactoring scheduled tasks

* refactoring scheduled tasks

* refactoring scheduled tasks

* refactoring scheduled tasks

* rpc client

* rpc client

* rpc client

* rpc client

* rpc client

* rpc client

* rpc client

* rpc client
This commit is contained in:
chao
2024-12-24 10:51:38 +08:00
committed by GitHub
parent e9895062cb
commit e3f609b3ae
67 changed files with 1287 additions and 1092 deletions
+9 -7
View File
@@ -20,24 +20,26 @@ import (
"github.com/openimsdk/tools/a2r"
)
type AuthApi struct{}
type AuthApi struct {
Client auth.AuthClient
}
func NewAuthApi() AuthApi {
return AuthApi{}
func NewAuthApi(client auth.AuthClient) AuthApi {
return AuthApi{client}
}
func (o *AuthApi) GetAdminToken(c *gin.Context) {
a2r.CallV2(c, auth.GetAdminTokenCaller.Invoke)
a2r.Call(c, auth.AuthClient.GetAdminToken, o.Client)
}
func (o *AuthApi) GetUserToken(c *gin.Context) {
a2r.CallV2(c, auth.GetUserTokenCaller.Invoke)
a2r.Call(c, auth.AuthClient.GetUserToken, o.Client)
}
func (o *AuthApi) ParseToken(c *gin.Context) {
a2r.CallV2(c, auth.ParseTokenCaller.Invoke)
a2r.Call(c, auth.AuthClient.ParseToken, o.Client)
}
func (o *AuthApi) ForceLogout(c *gin.Context) {
a2r.CallV2(c, auth.ForceLogoutCaller.Invoke)
a2r.Call(c, auth.AuthClient.ForceLogout, o.Client)
}