Documentation ¶
Overview ¶
FIXME: golangci-lint nolint:errcheck,gocritic,gosimple,govet,revive
Index ¶
- Constants
- type Client
- func (c *Client) BuildURL(parameters *Params) string
- func (c *Client) ReturnDeviceListByID(deviceIDs []string) (Response, error)
- func (c *Client) ReturnDevices(parameters *Params) (Response, error)
- func (c *Client) ReturnDevicesByID(deviceID string) (Response, error)
- func (c *Client) ReturnDevicesByTag(tag string) (Response, error)
- type ClientInterface
- type Device
- type Group
- type OSTree
- type Params
- type Response
- type SystemProfile
Constants ¶
const ( // Fields represents field we get from inventory Fields = "host_type,operating_system,greenboot_status,greenboot_fallback_detected,rpm_ostree_deployments,rhc_client_id,rhc_config_state" // FilterParams represents params to retrieve data from inventory FilterParams = "" /* 188-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the implementation of an ClientInterface
func (*Client) ReturnDeviceListByID ¶
ReturnDeviceListByID will return the list of devices by uuid
func (*Client) ReturnDevices ¶
ReturnDevices will return the list of devices without filter by tag or uuid
func (*Client) ReturnDevicesByID ¶
ReturnDevicesByID will return the list of devices by uuid
type ClientInterface ¶
type ClientInterface interface { ReturnDevices(parameters *Params) (Response, error) ReturnDevicesByID(deviceID string) (Response, error) ReturnDeviceListByID(deviceIDs []string) (Response, error) ReturnDevicesByTag(tag string) (Response, error) BuildURL(parameters *Params) string }
ClientInterface is an Interface to make request to InventoryAPI
func InitClient ¶
func InitClient(ctx context.Context, log log.FieldLogger) ClientInterface
InitClient initializes the client for Image Builder
type Device ¶
type Device struct { ID string `json:"id"` DisplayName string `json:"display_name"` LastSeen string `json:"updated"` UpdateAvailable bool `json:"update_available"` Ostree SystemProfile `json:"system_profile"` Account string `json:"account"` OrgID string `json:"org_id"` Groups []Group `json:"groups"` }
Device represents the struct of a Device on Inventory API
type Params ¶
type Params struct { PerPage string Page string OrderBy string OrderHow string HostnameOrID string DeviceStatus string }
Params represents the struct of params to be sent
type Response ¶
type Response struct { Total int `json:"total"` Count int `json:"count"` Result []Device `json:"results"` }
Response lists devices returned by InventoryAPI
type SystemProfile ¶
type SystemProfile struct { RHCClientID string `json:"rhc_client_id"` RpmOstreeDeployments []OSTree `json:"rpm_ostree_deployments"` HostType string `json:"host_type"` }
SystemProfile represents the struct of a SystemProfile on Inventory API
Directories ¶
Path | Synopsis |
---|---|
Package mock_inventory is a generated GoMock package.
|
Package mock_inventory is a generated GoMock package. |