github.com/chasestarr/deis@v1.13.5-0.20170519182049-1d9e59fbdbfc/client/controller/api/users.go (about) 1 package api 2 3 // User is the definition of the user object. 4 type User struct { 5 ID int `json:"id"` 6 LastLogin string `json:"last_login"` 7 IsSuperuser bool `json:"is_superuser"` 8 Username string `json:"username"` 9 FirstName string `json:"first_name"` 10 LastName string `json:"last_name"` 11 Email string `json:"email"` 12 IsStaff bool `json:"is_staff"` 13 IsActive bool `json:"is_active"` 14 DateJoined string `json:"date_joined"` 15 } 16 17 type Users []User 18 19 func (u Users) Len() int { return len(u) } 20 func (u Users) Swap(i, j int) { u[i], u[j] = u[j], u[i] } 21 func (u Users) Less(i, j int) bool { return u[i].Username < u[j].Username }