func (c *Client) GetUsers() ([]services.User, error) {
	out, err := c.Get(c.Endpoint("users"), url.Values{})
	if err != nil {
		return nil, trace.Wrap(err)
	}
	var items []json.RawMessage
	if err := json.Unmarshal(out.Bytes(), &items); err != nil {
		return nil, trace.Wrap(err)
	}
	users := make([]services.User, len(items))
	for i, userBytes := range items {
		user, err := services.GetUserUnmarshaler()(userBytes)
		if err != nil {
			return nil, trace.Wrap(err)
		}
		users[i] = user
	}
	return users, nil
}
// GetUsers returns a list of usernames registered in the system
GetUsers returns a list of usernames registered in the system
// GetUsers returns a list of usernames registered in the system
func (c *Client) GetUsers() ([]services.User, error) {
	out, err := c.Get(c.Endpoint("users"), url.Values{})
	if err != nil {
		return nil, trace.Wrap(err)
	}
	var items []json.RawMessage
	if err := json.Unmarshal(out.Bytes(), &items); err != nil {
		return nil, trace.Wrap(err)
	}
	users := make([]services.User, len(items))
	for i, userBytes := range items {
		user, err := services.GetUserUnmarshaler()(userBytes)
		if err != nil {
			return nil, trace.Wrap(err)
		}
		users[i] = user
	}
	return users, nil
}
func ( c * Client ) GetUsers ( ) ( [ ] services . User , error ) { out , err := c . Get ( c . Endpoint ( " " ) , url . Values { } ) if err != nil { return nil , trace . Wrap ( err ) } var items [ ] json . RawMessage if err := json . Unmarshal ( out . Bytes ( ) , & items ) ; err != nil { return nil , trace . Wrap ( err ) } users := make ( [ ] services . User , len ( items ) ) for i , userBytes := range items { user , err := services . GetUserUnmarshaler ( ) ( userBytes ) if err != nil { return nil , trace . Wrap ( err ) } users [ i ] = user } return users , nil }
GetUsers returns a list of usernames registered in the system
GetUsers returns a list of usernames registered in the system