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.

mount.go 825 B

123456789101112131415161718192021222324252627282930313233343536
  1. package http
  2. import (
  3. "net/http"
  4. "github.com/gin-gonic/gin"
  5. "gitlink.org.cn/cloudream/common/consts/errorcode"
  6. "gitlink.org.cn/cloudream/common/pkgs/logger"
  7. cliapi "gitlink.org.cn/cloudream/jcs-pub/client/sdk/api"
  8. )
  9. type MountService struct {
  10. *Server
  11. }
  12. func (s *Server) Mount() *MountService {
  13. return &MountService{
  14. Server: s,
  15. }
  16. }
  17. func (m *MountService) DumpStatus(ctx *gin.Context) {
  18. log := logger.WithField("HTTP", "Object.ListByPath")
  19. var req cliapi.MountDumpStatus
  20. if err := ctx.ShouldBindQuery(&req); err != nil {
  21. log.Warnf("binding body: %s", err.Error())
  22. ctx.JSON(http.StatusBadRequest, Failed(errorcode.BadArgument, "missing argument or invalid argument"))
  23. return
  24. }
  25. dumpStatus := m.svc.Mount.Dump()
  26. ctx.JSON(http.StatusOK, cliapi.MountDumpStatusPathResp{
  27. MountStatus: dumpStatus,
  28. })
  29. }

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