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.

storageStats.go 826 B

10 months ago
123456789101112131415161718192021222324252627282930
  1. package models
  2. //
  3. //func ProcessStorageInfo(data stgmod.StorageInfo) {
  4. // repo := NewStorageRepository(DB)
  5. //
  6. // storage, err := repo.GetStorageByID(data.Body.StorageID)
  7. // if err != nil {
  8. // if errors.Is(err, gorm.ErrRecordNotFound) {
  9. // // 插入新记录
  10. // newStorage := &Storage{
  11. // StorageID: cdssdk.StorageID(data.Body.StorageID),
  12. // DataCount: data.Body.DataCount,
  13. // NewDataCount: 0,
  14. // }
  15. // repo.CreateStorage(newStorage)
  16. // } else {
  17. // log.Printf("Error querying storage: %v", err)
  18. // }
  19. // } else {
  20. // // 更新记录
  21. // newDataCount := data.Body.DataCount - storage.DataCount
  22. // storage.DataCount = data.Body.DataCount
  23. // storage.NewDataCount = newDataCount
  24. // err := repo.UpdateStorage(storage)
  25. // if err != nil {
  26. // log.Printf("Error update storage: %v", err)
  27. // }
  28. // }
  29. //}

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