From 3c7d0df18344453d3e00f0a8b98b84975fb59356 Mon Sep 17 00:00:00 2001 From: Yohann Bacha Date: Wed, 15 Mar 2023 16:09:53 +0100 Subject: [PATCH 1/2] fix(one-off): renamed oneoffdata to startoneoffdata --- operations.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/operations.go b/operations.go index 50947a83..de03cddb 100644 --- a/operations.go +++ b/operations.go @@ -36,20 +36,20 @@ type OperationResponse struct { Op Operation `json:"operation"` } -type OperationRunOneOffData struct { +type OperationStartOneOffData struct { AttachURL string `json:"attach_url"` ContainerID map[string]string `json:"container_id"` } type Operation struct { - ID string `json:"id"` - AppID string `json:"app_id"` - CreatedAt time.Time `json:"created_at"` - FinishedAt time.Time `json:"finished_at"` - Status OperationStatus `json:"status"` - Type OperationType `json:"type"` - Error string `json:"error"` - OneOffData OperationRunOneOffData `json:"one_off_data"` + ID string `json:"id"` + AppID string `json:"app_id"` + CreatedAt time.Time `json:"created_at"` + FinishedAt time.Time `json:"finished_at"` + Status OperationStatus `json:"status"` + Type OperationType `json:"type"` + Error string `json:"error"` + StartOneOffData OperationStartOneOffData `json:"start_one_off_data"` } func (op *Operation) ElapsedDuration() float64 { From 8581881bc0558a0599e2fbd558c3b6bd0d3e41f2 Mon Sep 17 00:00:00 2001 From: Mederic Bazart Date: Wed, 15 Mar 2023 17:25:21 +0100 Subject: [PATCH 2/2] fix(one-off): use string rather than map[string]string for container_id --- operations.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operations.go b/operations.go index de03cddb..e9141f89 100644 --- a/operations.go +++ b/operations.go @@ -37,8 +37,8 @@ type OperationResponse struct { } type OperationStartOneOffData struct { - AttachURL string `json:"attach_url"` - ContainerID map[string]string `json:"container_id"` + AttachURL string `json:"attach_url"` + ContainerID string `json:"container_id"` } type Operation struct {