-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathresource.go
More file actions
59 lines (52 loc) · 2.06 KB
/
resource.go
File metadata and controls
59 lines (52 loc) · 2.06 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
49
50
51
52
53
54
55
56
57
58
59
package api
// ResourcePlan is the structure of an app's resource plan.
type ResourcePlan struct {
// ID is a unique string for resource plan.
ID string `json:"id,omitempty"`
// Name is a unique string for resource plan.
Name string `json:"name,omitempty"`
// Description is a detailed description of the resource plan
Description string `json:"description,omitempty"`
}
type ResourcePlans []ResourcePlan
// ResourceService is the structure of an app's resource service.
type ResourceService struct {
// ID is a unique string for resource service.
ID string `json:"id,omitempty"`
// Name is a unique string for resource service.
Name string `json:"name,omitempty"`
// Updatable is the plans of the current resource can be upgraded
Updateable bool `json:"updateable,omitempty"`
}
type ResourceServices []ResourceService
// Resource is the structure of an app's resource.
type Resource struct {
// Owner is the app owner.
Owner string `json:"owner,omitempty"`
// App is the app the tls settings apply to and cannot be updated.
App string `json:"app,omitempty"`
// Created is the time that the resource was created and cannot be updated.
Created string `json:"created,omitempty"`
// Updated is the last time the TLS settings was changed and cannot be updated.
Updated string `json:"updated,omitempty"`
// UUID is a unique string reflecting the resource in its current state.
// It changes every time the resource is changed and cannot be updated.
UUID string `json:"uuid,omitempty"`
// Resource's name
Name string `json:"name,omitempty"`
// Resource's Plan
Plan string `json:"plan,omitempty"`
// Resource connet info
Data map[string]interface{} `json:"data,omitempty"`
// Resource's status
Status string `json:"status,omitempty"`
// Resource's binding status
Binding string `json:"binding,omitempty"`
// Resource Options
Options map[string]interface{} `json:"options,omitempty"`
}
type Resources []Resource
// Binding is the definition of PATCH /v2/apps/<app_id>/resources/<name>/binding/.
type ResourceBinding struct {
BindAction string `json:"bind_action,omitempty"`
}