github.com/wtfutil/wtf@v0.43.0/modules/pivotal/structs.go (about) 1 package pivotal 2 3 import ( 4 "time" 5 ) 6 7 type User struct { 8 ID int `json:"id"` 9 } 10 11 type Story struct { 12 Kind string `json:"kind"` 13 ID int `json:"id"` 14 CreatedAt time.Time `json:"created_at"` 15 UpdatedAt time.Time `json:"updated_at"` 16 AcceptedAt time.Time `json:"accepted_at"` 17 // CreatedAt int64 `json:"created_at"` 18 // UpdatedAt int64 `json:"updated_at"` 19 // AcceptedAt int64 `json:"accepted_at"` 20 Estimate int `json:"estimate"` 21 StoryType string `json:"story_type"` 22 StoryPriority string `json:"story_priority"` 23 Name string `json:"name"` 24 Description string `json:"description"` 25 CurrentState string `json:"current_state"` 26 RequestedByID int `json:"requested_by_id"` 27 URL string `json:"url"` 28 ProjectID int `json:"project_id"` 29 OwnerIDs []int `json:"owner_ids"` 30 OwnedByID int `json:"owned_by_id"` 31 Labels []Label `json:"labels"` 32 Tasks []interface{} `json:"tasks"` 33 PullRequests []StoryPullRequest `json:"pull_requests"` 34 CicdEvents []interface{} `json:"cicd_events"` 35 Branches []StoryBranch `json:"branches"` 36 Blockers []interface{} `json:"blockers"` 37 FollowerIDs []int `json:"follower_ids"` 38 Comments []StoryComment `json:"comments"` 39 BlockedStoryIDs []int `json:"blocked_story_ids"` 40 Reviews []StoryReview `json:"reviews"` 41 Project StoryProject `json:"project"` 42 } 43 44 type PivotalTrackerResponse struct { 45 Stories *StoryResponse `json:"stories"` 46 Epics *EpicResponse `json:"epics"` 47 Query string `json:"query"` 48 } 49 50 type StoryResponse struct { 51 Stories []Story `json:"stories"` 52 TotalPoints int `json:"total_points"` 53 TotalPointsCompleted int `json:"total_points_completed"` 54 TotalHits int `json:"total_hits"` 55 TotalHitsWithDone int `json:"total_hits_with_done"` 56 } 57 58 type EpicResponse struct { 59 Epics []Epic `json:"epics"` 60 TotalHits int `json:"total_hits"` 61 TotalHitsWithDone int `json:"total_hits_with_done"` 62 } 63 64 type Epic struct { 65 ID int `json:"id"` 66 Kind string `json:"kind"` 67 CreatedAt time.Time `json:"created_at"` 68 UpdatedAt time.Time `json:"updated_at"` 69 // CreatedAt int64 `json:"created_at"` 70 // UpdatedAt int64 `json:"updated_at"` 71 ProjectID int `json:"project_id"` 72 Name string `json:"name"` 73 URL string `json:"url"` 74 Label Label `json:"label"` 75 } 76 77 type Label struct { 78 ID int `json:"id"` 79 ProjectID int `json:"project_id"` 80 Kind string `json:"kind"` 81 Name string `json:"name"` 82 CreatedAt time.Time `json:"created_at"` 83 UpdatedAt time.Time `json:"updated_at"` 84 // CreatedAt int64 `json:"created_at"` 85 // UpdatedAt int64 `json:"updated_at"` 86 } 87 88 type StoryLabel struct { 89 ID int `json:"id"` 90 ProjectID int `json:"project_id"` 91 Kind string `json:"kind"` 92 Name string `json:"name"` 93 CreatedAt int64 `json:"created_at"` 94 UpdatedAt int64 `json:"updated_at"` 95 } 96 97 type StoryPullRequest struct { 98 ID int `json:"id"` 99 Kind string `json:"kind"` 100 StoryID int `json:"story_id"` 101 Owner string `json:"owner"` 102 Repo string `json:"repo"` 103 HostURL string `json:"host_url"` 104 Status string `json:"status"` 105 Number int `json:"number"` 106 CreatedAt time.Time `json:"created_at"` 107 UpdatedAt time.Time `json:"updated_at"` 108 // CreatedAt int64 `json:"created_at"` 109 // UpdatedAt int64 `json:"updated_at"` 110 } 111 112 type StoryTask struct { 113 ID int `json:"id"` 114 Kind string `json:"kind"` 115 Description string `json:"description"` 116 Complete bool `json:"complete"` 117 Position int `json:"position"` 118 CreatedAt int64 `json:"created_at"` 119 UpdatedAt int64 `json:"updated_at"` 120 StoryID int `json:"story_id"` 121 } 122 123 type StoryBranch struct { 124 ID int `json:"id,omitempty"` 125 Name string `json:"name,omitempty"` 126 CommitHash string `json:"commit_hash,omitempty"` 127 CommitMessage string `json:"commit_message,omitempty"` 128 AuthorName string `json:"author_name,omitempty"` 129 AuthorEmail string `json:"author_email,omitempty"` 130 CreatedAt string `json:"created_at,omitempty"` 131 } 132 133 type StoryComment struct { 134 Kind string `json:"kind"` 135 ID int64 `json:"id"` 136 Text string `json:"text"` 137 PersonID int64 `json:"person_id"` 138 CreatedAt int64 `json:"created_at"` 139 UpdatedAt int64 `json:"updated_at"` 140 StoryID int64 `json:"story_id"` 141 Attachments []interface{} `json:"attachments"` 142 Reactions []interface{} `json:"reactions"` 143 } 144 145 type StoryReview struct { 146 ID int `json:"id"` 147 ReviewerID int `json:"reviewer_id"` 148 Kind string `json:"kind"` 149 StoryID int `json:"story_id"` 150 ReviewTypeID int `json:"review_type_id"` 151 Status string `json:"status"` 152 CreatedAt int `json:"created_at"` 153 UpdatedAt int `json:"updated_at"` 154 } 155 156 type StoryProject struct { 157 ID int `json:"id"` 158 Kind string `json:"kind"` 159 Name string `json:"name"` 160 Version int `json:"version"` 161 IterationLength int `json:"iteration_length"` 162 WeekStartDay string `json:"week_start_day"` 163 PointScale string `json:"point_scale"` 164 PointScaleIsCustom bool `json:"point_scale_is_custom"` 165 BugsAndChoresAreEstimatable bool `json:"bugs_and_chores_are_estimatable"` 166 AutomaticPlanning bool `json:"automatic_planning"` 167 EnableTasks bool `json:"enable_tasks"` 168 TimeZone struct { 169 Kind string `json:"kind"` 170 OlsonName string `json:"olson_name"` 171 Offset string `json:"offset"` 172 } `json:"time_zone"` 173 VelocityAveragedOver int `json:"velocity_averaged_over"` 174 NumberOfDoneIterationsToShow int `json:"number_of_done_iterations_to_show"` 175 HasGoogleDomain bool `json:"has_google_domain"` 176 EnableIncomingEmails bool `json:"enable_incoming_emails"` 177 InitialVelocity int `json:"initial_velocity"` 178 Public bool `json:"public"` 179 AtomEnabled bool `json:"atom_enabled"` 180 ProjectType string `json:"project_type"` 181 HasCICDIntegration bool `json:"has_cicd_integration"` 182 Capabilities struct { 183 PrioritySupport bool `json:"priority_support"` 184 LabelsPanel bool `json:"labels_panel"` 185 LabelsPanelBulkActions bool `json:"labels_panel_bulk_actions"` 186 DigitalRiverIntegration bool `json:"digital_river_integration"` 187 DigitalRiverDebug bool `json:"digital_river_debug"` 188 StartSendingDRNotices bool `json:"start_sending_dr_notices"` 189 EnableEAPEvents bool `json:"enable_eap_events"` 190 } `json:"capabilities"` 191 StartDate string `json:"start_date"` 192 StartTime int64 `json:"start_time"` 193 ShownIterationsStartTime int64 `json:"shown_iterations_start_time"` 194 CreatedAt int64 `json:"created_at"` 195 UpdatedAt int64 `json:"updated_at"` 196 ShowStoryPriority bool `json:"show_story_priority"` 197 ShowPriorityIcon bool `json:"show_priority_icon"` 198 ShowPriorityIconInAllPanels bool `json:"show_priority_icon_in_all_panels"` 199 Epics []struct { 200 ID int `json:"id"` 201 Name string `json:"name"` 202 LabelID int `json:"label_id"` 203 } `json:"epics"` 204 }