From 5a1fcf2e57c516bfa5e31cd427d6fac30e2fa5a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorben=20G=C3=BCnther?= Date: Tue, 1 Jun 2021 02:12:51 +0200 Subject: [PATCH] todo: Add api structs for events and comments --- api/todo.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/api/todo.go b/api/todo.go index e81f327..7970e89 100644 --- a/api/todo.go +++ b/api/todo.go @@ -59,6 +59,30 @@ type ticketPagerStruct struct { ResultsPerPage int `json:"results_per_page"` } +type commentStruct struct { + ID int `json:"id"` + Created string `json:"created"` + Submitter userStruct `json:"submitter"` + Text string `json:"text"` + Ticket ticketStruct `json:"ticket"` +} + +type eventStruct struct { + ID int `json:"id"` + Created string `json:"created"` + EventType []string `json:"event_type"` + OldStatus *string `json:"old_status"` + OldResoltion *string `json:"old_resolution"` + NewStatus *string `json:"new_status"` + NewResolution *string `json:"new_resolution"` + User *userStruct `json:"user"` + Ticket *ticketStruct `json:"ticket"` + Comment *commentStruct `json:"comment"` + Label *[]string `json:"label"` + ByUser *userStruct `json:"by_user"` + FromTicket *ticketStruct `json:"from_ticket"` +} + // PrintTickets prints out tickets of a user func PrintTickets(args []string) error { var tickets ticketPagerStruct -- 2.44.0