You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

status.go 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright 2017 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package structs
  5. import (
  6. "time"
  7. )
  8. // CommitStatus holds a single status of a single Commit
  9. type CommitStatus struct {
  10. ID int64 `json:"id"`
  11. State CommitStatusState `json:"status"`
  12. TargetURL string `json:"target_url"`
  13. Description string `json:"description"`
  14. URL string `json:"url"`
  15. Context string `json:"context"`
  16. Creator *User `json:"creator"`
  17. // swagger:strfmt date-time
  18. Created time.Time `json:"created_at"`
  19. // swagger:strfmt date-time
  20. Updated time.Time `json:"updated_at"`
  21. }
  22. // CombinedStatus holds the combined state of several statuses for a single commit
  23. type CombinedStatus struct {
  24. State CommitStatusState `json:"state"`
  25. SHA string `json:"sha"`
  26. TotalCount int `json:"total_count"`
  27. Statuses []*CommitStatus `json:"statuses"`
  28. Repository *Repository `json:"repository"`
  29. CommitURL string `json:"commit_url"`
  30. URL string `json:"url"`
  31. }
  32. // CreateStatusOption holds the information needed to create a new CommitStatus for a Commit
  33. type CreateStatusOption struct {
  34. State CommitStatusState `json:"state"`
  35. TargetURL string `json:"target_url"`
  36. Description string `json:"description"`
  37. Context string `json:"context"`
  38. }