commit - 26fb88e9ebc4192da36411de66032158b424369d
commit + 6c70362050af3bf13a06cde4ed47aa49064b1813
blob - a11f3493120c3b4c35c45f48922a3837c1ebf953
blob + 93f2a07ce5cb4265c4dacdb0536536b16b754141
--- crud.go
+++ crud.go
}
// Services returns a slice of Service matching the filter expression filter.
-// If no hosts match, error wraps ErrNoMatch.
+// If no services match, error wraps ErrNoMatch.
// To fetch all service, set filter to the empty string ("").
func (c *Client) Services(filter string) ([]Service, error) {
objects, err := c.filterObjects("/objects/services", filter)
}
// Users returns a slice of User matching the filter expression filter.
-// If no hosts match, error wraps ErrNoMatch.
+// If no users match, error wraps ErrNoMatch.
// To fetch all user, set filter to the empty string ("").
func (c *Client) Users(filter string) ([]User, error) {
objects, err := c.filterObjects("/objects/users", filter)
}
return nil
}
-
blob - cf986a305b5ea0e52dc58d6de5e4a6469b80f18a
blob + 422a47b223a6e1bcd865ee64d48cc324a1e12465
--- crud.skel
+++ crud.skel
// TYPEs returns a slice of TYPE matching the filter expression filter.
-// If no hosts match, error wraps ErrNoMatch.
+// If no PLURAL match, error wraps ErrNoMatch.
// To fetch all LOWER, set filter to the empty string ("").
func (c *Client) TYPEs(filter string) ([]TYPE, error) {
objects, err := c.filterObjects("/objects/PLURAL", filter)
blob - c1f083d5684fb65b0b47c15e9cd22f27e66ae76c
blob + 9c097b2fca4ad21d3d698825365fcc4e4799791f
--- http.go
+++ http.go
if filter != "" {
v := url.Values{}
v.Set("filter", filter)
- u.RawQuery = v.Encode()
+ u.RawQuery = v.Encode()
}
req, err := NewRequest(http.MethodGet, u.String(), c.username, c.password, nil)
if err != nil {
blob - 72cb8f1953b6a3cdff843006531f78c4a0895fa8
blob + 84d80a2fc8ad39e46cf16a616c121be1f303fe78
--- object.go
+++ object.go
-
package icinga
import (
defer resp.Body.Close()
if expr != "" && resp.StatusCode == http.StatusNotFound {
return nil, ErrNoMatch
-
+
}
iresp, err := parseResponse(resp.Body)
if err != nil {