-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgateways.go
More file actions
48 lines (42 loc) · 1.81 KB
/
gateways.go
File metadata and controls
48 lines (42 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package api
// Gateway is the structure of an app's gateways.
type Gateway struct {
// Owner is the app owner. It cannot be updated with AppSettings.Set(). See app.Transfer().
Owner string `json:"owner,omitempty"`
// App is the app name. It cannot be updated at all right now.
App string `json:"app,omitempty"`
// Created is the time that the application settings was created and cannot be updated.
Created string `json:"created,omitempty"`
// Updated is the last time the application settings was changed and cannot be updated.
Updated string `json:"updated,omitempty"`
// UUID is a unique string reflecting the application settings in its current state.
// It changes every time the application settings is changed and cannot be updated.
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
Listeners []Listener `json:"listeners,omitempty"`
Addresses []Address `json:"addresses,omitempty"`
}
type Listener struct {
Name string `json:"name,omitempty"`
Port int `json:"port,omitempty"`
Protocol string `json:"protocol,omitempty"`
AllowedRoutes interface{} `json:"allowedRoutes,omitempty"`
}
type Address struct {
Type string `json:"type,omitempty"`
Value string `json:"value,omitempty"`
}
// Gateways defines a collection of gateway objects.
type Gateways []Gateway
// GatewayCreateRequest is the structure of POST /v2/app/<app id>/gateways/.
type GatewayCreateRequest struct {
Name string `json:"name,omitempty"`
Port int `json:"port,omitempty"`
Protocol string `json:"protocol,omitempty"`
}
// GatewayRemoteRequest is the structure of Delete /v2/app/<app id>/gateways/.
type GatewayRemoveRequest struct {
Name string `json:"name,omitempty"`
Port int `json:"port,omitempty"`
Protocol string `json:"protocol,omitempty"`
}