Skip to content

Commit

Permalink
Merge pull request #318 from MB175/feature/add_destionation_array
Browse files Browse the repository at this point in the history
Add destinations to V3 Routes Struct
  • Loading branch information
sneal authored Sep 30, 2022
2 parents 5e81c20 + d6db2e5 commit 9c4e6c5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions v3routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand All @@ -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)
}
Expand Down

0 comments on commit 9c4e6c5

Please sign in to comment.