forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
service_instance.go
47 lines (41 loc) · 1.28 KB
/
service_instance.go
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
package models
type LastOperationFields struct {
Type string
State string
Description string
CreatedAt string
UpdatedAt string
}
type ServiceInstanceCreateRequest struct {
Name string `json:"name"`
SpaceGUID string `json:"space_guid"`
PlanGUID string `json:"service_plan_guid,omitempty"`
Params map[string]interface{} `json:"parameters,omitempty"`
Tags []string `json:"tags,omitempty"`
}
type ServiceInstanceUpdateRequest struct {
PlanGUID string `json:"service_plan_guid,omitempty"`
Params map[string]interface{} `json:"parameters,omitempty"`
Tags []string `json:"tags"`
}
type ServiceInstanceFields struct {
GUID string
Name string
LastOperation LastOperationFields
SysLogDrainURL string
RouteServiceURL string
ApplicationNames []string
Params map[string]interface{}
DashboardURL string
Tags []string
}
type ServiceInstance struct {
ServiceInstanceFields
ServiceBindings []ServiceBindingFields
ServiceKeys []ServiceKeyFields
ServicePlan ServicePlanFields
ServiceOffering ServiceOfferingFields
}
func (inst ServiceInstance) IsUserProvided() bool {
return inst.ServicePlan.GUID == ""
}