user.go (348B)
1 package icinga 2 3 // User represents a User object. 4 // Note that this is different from an ApiUser. 5 type User struct { 6 Name string `json:"-"` 7 Email string `json:"email,omitempty"` 8 Groups []string `json:"groups,omitempty"` 9 } 10 11 func (u User) name() string { 12 return u.Name 13 } 14 15 func (u User) path() string { 16 return "/objects/users/" + u.Name 17 }