forked from pivotal-cf/brokerapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
catalog.go
60 lines (51 loc) · 2.09 KB
/
catalog.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
48
49
50
51
52
53
54
55
56
57
58
59
60
package brokerapi
type Service struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Bindable bool `json:"bindable"`
Tags []string `json:"tags,omitempty"`
PlanUpdatable bool `json:"plan_updateable"`
Plans []ServicePlan `json:"plans"`
Requires []RequiredPermission `json:"requires,omitempty"`
Metadata *ServiceMetadata `json:"metadata,omitempty"`
DashboardClient *ServiceDashboardClient `json:"dashboard_client,omitempty"`
}
type ServiceDashboardClient struct {
ID string `json:"id"`
Secret string `json:"secret"`
RedirectURI string `json:"redirect_uri"`
}
type ServicePlan struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Free *bool `json:"free,omitempty"`
Metadata *ServicePlanMetadata `json:"metadata,omitempty"`
}
type ServicePlanMetadata struct {
DisplayName string `json:"displayName,omitempty"`
Bullets []string `json:"bullets,omitempty"`
Costs []ServicePlanCost `json:"costs,omitempty"`
}
type ServicePlanCost struct {
Amount map[string]float64 `json:"amount"`
Unit string `json:"unit"`
}
type ServiceMetadata struct {
DisplayName string `json:"displayName,omitempty"`
ImageUrl string `json:"imageUrl,omitempty"`
LongDescription string `json:"longDescription,omitempty"`
ProviderDisplayName string `json:"providerDisplayName,omitempty"`
DocumentationUrl string `json:"documentationUrl,omitempty"`
SupportUrl string `json:"supportUrl,omitempty"`
}
func FreeValue(v bool) *bool {
return &v
}
type RequiredPermission string
const (
PermissionRouteForwarding = RequiredPermission("route_forwarding")
PermissionSyslogDrain = RequiredPermission("syslog_drain")
PermissionVolumeMount = RequiredPermission("volume_mount")
)