You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

system.go 699 B

1234567891011121314151617181920212223242526272829303132
  1. package http
  2. import (
  3. "net/http"
  4. "github.com/gin-gonic/gin"
  5. "gitlink.org.cn/cloudream/jcs-pub/client/internal/http/types"
  6. cliapi "gitlink.org.cn/cloudream/jcs-pub/client/sdk/api/v1"
  7. "gitlink.org.cn/cloudream/jcs-pub/common/ecode"
  8. )
  9. type SystemService struct {
  10. *Server
  11. }
  12. func (s *Server) System() *SystemService {
  13. return &SystemService{
  14. Server: s,
  15. }
  16. }
  17. func (s *SystemService) Status(ctx *gin.Context) {
  18. var req cliapi.SystemStatus
  19. if err := ctx.ShouldBindQuery(&req); err != nil {
  20. ctx.JSON(http.StatusBadRequest, types.Failed(ecode.BadArgument, "%v", err))
  21. return
  22. }
  23. ctx.JSON(http.StatusOK, types.OK(cliapi.SystemStatusResp{
  24. SpeedStats: s.svc.SpeedStats.DumpStatus(),
  25. }))
  26. }

本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。