gitea源码

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2019 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. import (
  5. "time"
  6. )
  7. // StopWatch represent a running stopwatch
  8. type StopWatch struct {
  9. // swagger:strfmt date-time
  10. // Created is the time when the stopwatch was started
  11. Created time.Time `json:"created"`
  12. // Seconds is the total elapsed time in seconds
  13. Seconds int64 `json:"seconds"`
  14. // Duration is a human-readable duration string
  15. Duration string `json:"duration"`
  16. // IssueIndex is the index number of the associated issue
  17. IssueIndex int64 `json:"issue_index"`
  18. // IssueTitle is the title of the associated issue
  19. IssueTitle string `json:"issue_title"`
  20. // RepoOwnerName is the name of the repository owner
  21. RepoOwnerName string `json:"repo_owner_name"`
  22. // RepoName is the name of the repository
  23. RepoName string `json:"repo_name"`
  24. }
  25. // StopWatches represent a list of stopwatches
  26. type StopWatches []StopWatch