Files
open-im-server/internal/api/statistics.go
T

20 lines
556 B
Go
Raw Normal View History

2023-06-20 17:03:20 +08:00
package api
import (
"github.com/OpenIMSDK/Open-IM-Server/pkg/a2r"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user"
2023-06-20 22:12:01 +08:00
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient"
2023-06-20 17:03:20 +08:00
"github.com/gin-gonic/gin"
)
2023-06-20 22:12:01 +08:00
type StatisticsApi rpcclient.User
2023-06-20 17:03:20 +08:00
2023-06-20 22:12:01 +08:00
func NewStatisticsApi(discov discoveryregistry.SvcDiscoveryRegistry) StatisticsApi {
return StatisticsApi(*rpcclient.NewUser(discov))
2023-06-20 17:03:20 +08:00
}
2023-06-20 22:12:01 +08:00
func (s *StatisticsApi) UserRegister(c *gin.Context) {
2023-06-20 21:15:23 +08:00
a2r.Call(user.UserClient.UserRegisterCount, s.Client, c)
2023-06-20 17:03:20 +08:00
}