compare.go 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. package model
  2. // CompareRes the result of comparing aso account between local and cloud.
  3. type CompareRes struct {
  4. Flags uint8 `json:"flag"`
  5. FlagsDesc string `json:"flags_desc"`
  6. Seq int64 `json:"seq"`
  7. Local *OriginAsoAccount `json:"local"`
  8. LocalEncrypted *AsoAccount `json:"local_encrypted"`
  9. Cloud *AsoAccount `json:"cloud"`
  10. }
  11. // DiffParseResp diff parse resp.
  12. type DiffParseResp struct {
  13. Total int `json:"total"`
  14. SeqAndPercents []*SeqCountAndPercent `json:"seq_and_percents"`
  15. CountAndPercents []*CountAndPercent `json:"count_and_percents"`
  16. CompareResList []*CompareRes `json:"compare_res_list"`
  17. }
  18. // CountAndPercent count and percent.
  19. type CountAndPercent struct {
  20. DiffType string `json:"diff_type"`
  21. Count int `json:"count"`
  22. Percent string `json:"percent"`
  23. }
  24. // SeqCountAndPercent process goroutine seq count and percent.
  25. type SeqCountAndPercent struct {
  26. Seq int64 `json:"seq"`
  27. Count int `json:"count"`
  28. Percent string `json:"percent"`
  29. }