From bef9f16ef1c630a80d9752f0773c4c32804a5a0c Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Thu, 4 Mar 2021 15:21:28 +0100 Subject: [PATCH 1/3] add incident impact and end --- incident/result.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/incident/result.go b/incident/result.go index b8d35e7..40699af 100644 --- a/incident/result.go +++ b/incident/result.go @@ -1,8 +1,9 @@ package incident import ( - "github.com/opsgenie/opsgenie-go-sdk-v2/client" "time" + + "github.com/opsgenie/opsgenie-go-sdk-v2/client" ) type Incident struct { @@ -14,6 +15,8 @@ type Incident struct { Tags []string `json:"tags"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` + ImpactStartDate time.Time `json:"impactStartDate"` + ImpactEndDate time.Time `json:"impactEndDate"` Priority Priority `json:"priority"` OwnerTeam string `json:"ownerTeam"` Responders []Responder `json:"responders"` From c0931b687755dbb4e0177495b7c76e194d396bce Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Thu, 4 Mar 2021 15:22:30 +0100 Subject: [PATCH 2/3] go fmt --- og/entity.go | 2 +- policy/request.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/og/entity.go b/og/entity.go index 2215d9a..51556ec 100644 --- a/og/entity.go +++ b/og/entity.go @@ -81,7 +81,7 @@ func validateParticipants(rotation *Rotation) error { } if participant.Type == Escalation && participant.Name == "" && participant.Id == "" { return errors.New("For participant type escalation either escalation name or id must be provided.") - } + } } return nil } diff --git a/policy/request.go b/policy/request.go index e062136..51f719d 100644 --- a/policy/request.go +++ b/policy/request.go @@ -257,9 +257,9 @@ func (r *UpdateAlertPolicyRequest) ResourcePath() string { } func (r *UpdateAlertPolicyRequest) RequestParams() map[string]string { - params := make(map[string]string) - params["teamId"] = r.TeamId - return params + params := make(map[string]string) + params["teamId"] = r.TeamId + return params } func (r *UpdateAlertPolicyRequest) Method() string { From ab326fbcd71f15bac97f57d32d682b40f9acb071 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Fri, 5 Mar 2021 13:29:10 +0100 Subject: [PATCH 3/3] offset is actually an int --- incident/result.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/incident/result.go b/incident/result.go index 40699af..2940aec 100644 --- a/incident/result.go +++ b/incident/result.go @@ -68,7 +68,7 @@ type NoteResult struct { Note string `json:"note"` Owner string `json:"owner"` CreatedAt time.Time `json:"createdAt"` - Offset string `json:"offset"` + Offset int `json:"offset"` } type ListNotesResult struct {