-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdomains.go
More file actions
24 lines (20 loc) · 774 Bytes
/
domains.go
File metadata and controls
24 lines (20 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package api
// Domain is the structure of the domain object.
type Domain struct {
App string `json:"app"`
Created string `json:"created"`
Domain string `json:"domain"`
Owner string `json:"owner"`
ProcfileType string `json:"procfile_type"`
Updated string `json:"updated"`
}
// Domains defines a collection of domain objects.
type Domains []Domain
func (d Domains) Len() int { return len(d) }
func (d Domains) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
func (d Domains) Less(i, j int) bool { return d[i].Domain < d[j].Domain }
// DomainCreateRequest is the structure of POST /v2/app/<app id>/domains/.
type DomainCreateRequest struct {
Domain string `json:"domain"`
ProcfileType string `json:"procfile_type"`
}