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.4KB

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