From b1a684c3c5ac6d927bed8a20125c19463e1c22a2 Mon Sep 17 00:00:00 2001 From: Mb175 Date: Wed, 28 Sep 2022 12:01:22 +0200 Subject: [PATCH 1/2] feat: add destinations array --- v3routes.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/v3routes.go b/v3routes.go index 04ca9b93..4b88d1c1 100644 --- a/v3routes.go +++ b/v3routes.go @@ -18,6 +18,7 @@ type V3Route struct { CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Metadata Metadata `json:"metadata"` + Destinations []Destination `json:"destinations"` Relationships map[string]V3ToOneRelationship `json:"relationships"` Links map[string]Link `json:"links"` } @@ -27,6 +28,19 @@ type listV3RouteResponse struct { Resources []V3Route `json:"resources,omitempty"` } +type Destination struct { + Guid string `json:"guid"` + App struct { + Guid string `json:"guid"` + Process struct { + Type string `json:"type"` + } `json:"process"` + } `json:"app"` + Weight interface{} `json:"weight"` + Port int `json:"port"` + Protocol string `json:"protocol"` +} + func (c *Client) ListV3Routes() ([]V3Route, error) { return c.ListV3RoutesByQuery(nil) } From d6db2e5a3f2017afa5083e924297ba7838464837 Mon Sep 17 00:00:00 2001 From: "Moritz.M" <57674787+MB175@users.noreply.github.com> Date: Thu, 29 Sep 2022 15:46:20 +0200 Subject: [PATCH 2/2] Guid -> GUID --- v3routes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v3routes.go b/v3routes.go index 4b88d1c1..fe16f22e 100644 --- a/v3routes.go +++ b/v3routes.go @@ -29,9 +29,9 @@ type listV3RouteResponse struct { } type Destination struct { - Guid string `json:"guid"` + GUID string `json:"guid"` App struct { - Guid string `json:"guid"` + GUID string `json:"guid"` Process struct { Type string `json:"type"` } `json:"process"`