gitlab.go 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. package model
  2. // User def
  3. type User struct {
  4. Name string `json:"name"`
  5. UserName string `json:"username"`
  6. AvatarURL string `json:"avatar_url"`
  7. }
  8. // Project def
  9. type Project struct {
  10. ID int `json:"id"`
  11. Name string `json:"name"`
  12. Description string `json:"description"`
  13. WebURL string `json:"web_url"`
  14. AvatarURL string `json:"avatar_url"`
  15. GitSSHURL string `json:"git_ssh_url"`
  16. GitHTTPURL string `json:"git_http_url"`
  17. Namespace string `json:"namespace"`
  18. VisibilityLevel int64 `json:"visibility_level"`
  19. PathWithNamespace string `json:"path_with_namespace"`
  20. DefaultBranch string `json:"default_branch"`
  21. Homepage string `json:"homepage"`
  22. URL string `json:"url"`
  23. SSHURL string `json:"ssh_url"`
  24. HTTPURL string `json:"http_url"`
  25. }
  26. // Repository def
  27. type Repository struct {
  28. Name string `json:"name"`
  29. URL string `json:"url"`
  30. Description string `json:"description"`
  31. Homepage string `json:"homepage"`
  32. GitHTTPURL string `json:"git_http_url"`
  33. GitSSHURL string `json:"git_ssh_url"`
  34. VisibilityLevel int64 `json:"visibility_level"`
  35. }
  36. // Commit def
  37. type Commit struct {
  38. ID string `json:"id"`
  39. Message string `json:"message"`
  40. Timestamp string `json:"timestamp"`
  41. URL string `json:"url"`
  42. Author *Author `json:"author"`
  43. Added []string `json:"added"`
  44. Modified []string `json:"modified"`
  45. Removed []string `json:"removed"`
  46. }
  47. // Author def
  48. type Author struct {
  49. Name string `json:"name"`
  50. Email string `json:"email"`
  51. }
  52. // WebHook def
  53. type WebHook struct {
  54. URL string `json:"url,omitempty"`
  55. PushEvents bool `json:"push_events,omitempty"`
  56. IssuesEvents bool `json:"issues_events,omitempty"`
  57. ConfidentialIssuesEvents bool `json:"confidential_issues_events,omitempty"`
  58. MergeRequestsEvents bool `json:"merge_requests_events,omitempty"`
  59. TagPushEvents bool `json:"tag_push_events,omitempty"`
  60. NoteEvents bool `json:"note_events,omitempty"`
  61. JobEvents bool `json:"job_events,omitempty"`
  62. PipelineEvents bool `json:"pipeline_events,omitempty"`
  63. WikiPageEvents bool `json:"wiki_page_events,omitempty"`
  64. }
  65. // RepoInfo ...
  66. type RepoInfo struct {
  67. Group string `json:"group"`
  68. Name string `json:"name"`
  69. Branch string `json:"branch"`
  70. }