forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
quota.go
21 lines (19 loc) · 816 Bytes
/
quota.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package models
func NewQuotaFields(name string, memory int64, InstanceMemoryLimit int64, routes int, services int, nonbasicservices bool) (q QuotaFields) {
q.Name = name
q.MemoryLimit = memory
q.InstanceMemoryLimit = InstanceMemoryLimit
q.RoutesLimit = routes
q.ServicesLimit = services
q.NonBasicServicesAllowed = nonbasicservices
return
}
type QuotaFields struct {
Guid string `json:"guid,omitempty"`
Name string `json:"name"`
MemoryLimit int64 `json:"memory_limit"` // in Megabytes
InstanceMemoryLimit int64 `json:"instance_memory_limit"` // in Megabytes
RoutesLimit int `json:"total_routes"`
ServicesLimit int `json:"total_services"`
NonBasicServicesAllowed bool `json:"non_basic_services_allowed"`
}