mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
d4be5ad2a1
* add upgrade tests * fix lint issues go.mod * remove req.cnf * revert unrelated changes * make version configurable in test * fix golangci-lint ruleguard issue Related to https://github.com/go-critic/go-critic/issues/1152 Need to have github.com/quasilyte/go-ruleguard/dsl * fix lint issues * fix * clean up docker-compose.yml * fix http request * add readme * fix lint issues * address feedback * fix * add platform * address feedback * run go fmt
17 lines
450 B
Go
17 lines
450 B
Go
package service
|
|
|
|
import (
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
)
|
|
|
|
// ListSoftware retrieves the software running across hosts.
|
|
func (c *Client) ListSoftware(query string) ([]fleet.Software, error) {
|
|
verb, path := "GET", "/api/latest/fleet/software"
|
|
var responseBody listSoftwareResponse
|
|
err := c.authenticatedRequestWithQuery(nil, verb, path, &responseBody, query)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return responseBody.Software, nil
|
|
}
|