github.com/chasestarr/deis@v1.13.5-0.20170519182049-1d9e59fbdbfc/client/controller/api/ps.go (about) 1 package api 2 3 // Process defines the structure of a process. 4 type Process struct { 5 Owner string `json:"owner"` 6 App string `json:"app"` 7 Release string `json:"release"` 8 Created string `json:"created"` 9 Updated string `json:"updated"` 10 UUID string `json:"uuid"` 11 Type string `json:"type"` 12 Num int `json:"num"` 13 State string `json:"state"` 14 } 15 16 type Processes []Process 17 18 func (p Processes) Len() int { return len(p) } 19 func (p Processes) Swap(i, j int) { p[i], p[j] = p[j], p[i] } 20 func (p Processes) Less(i, j int) bool { return p[i].Num < p[j].Num } 21 22 type ProcessType struct { 23 Type string 24 Processes Processes 25 } 26 27 type ProcessTypes []ProcessType 28 29 func (p ProcessTypes) Len() int { return len(p) } 30 func (p ProcessTypes) Swap(i, j int) { p[i], p[j] = p[j], p[i] } 31 func (p ProcessTypes) Less(i, j int) bool { return p[i].Type < p[j].Type }