file.go 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * @Author: LinkLeong link@icewhale.com
  3. * @Date: 2022-05-20 16:27:12
  4. * @LastEditors: LinkLeong
  5. * @LastEditTime: 2022-06-09 18:18:46
  6. * @FilePath: /CasaOS/model/file.go
  7. * @Description:
  8. * @Website: https://www.casaos.io
  9. * Copyright (c) 2022 by icewhale, All Rights Reserved.
  10. */
  11. package model
  12. type FileOperate struct {
  13. Type string `json:"type" binding:"required"`
  14. Item []FileItem `json:"item" binding:"required"`
  15. TotalSize int64 `json:"total_size"`
  16. ProcessedSize int64 `json:"processed_size"`
  17. To string `json:"to" binding:"required"`
  18. Style string `json:"style"`
  19. Finished bool `json:"finished"`
  20. }
  21. type FileItem struct {
  22. From string `json:"from" binding:"required"`
  23. Finished bool `json:"finished"`
  24. Size int64 `json:"size"`
  25. ProcessedSize int64 `json:"processed_size"`
  26. }
  27. type FileUpdate struct {
  28. FilePath string `json:"path" binding:"required"`
  29. FileContent string `json:"content" binding:"required"`
  30. }