Documentation ¶
Index ¶
- type Agent
- type Client
- func (ac *Client) Discovered(agentID string) ([]DiscoveredDevice, error)
- func (ac *Client) GetAll() ([]Agent, error)
- func (ac *Client) GetAllInFolder(id string) ([]Agent, error)
- func (ac *Client) Remove(agentID string) error
- func (ac *Client) SetDefaultCredentials(agentID, username, password string) error
- type DiscoveredDevice
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
Agent represent an agent resource
func NewExampleAgent ¶
func NewExampleAgent() Agent
NewExampleAgent returns a dummy agent, i.e. fake ID, serial number, etc.
func (Agent) ToResponse ¶
ToResponse converts a folder to a corresponding Response model
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides an API client to agent service
func NewClient ¶
func NewClient(client *rest.HTTPClient) (*Client, error)
NewClient creates a new Client and returns a tuple of a pointer to it along with an error indicating if anything went wrong. The baseURL parameter should be the target API and sessionID a valid session for the target user.
func (*Client) Discovered ¶
func (ac *Client) Discovered(agentID string) ([]DiscoveredDevice, error)
Discovered returns all the discovered devices of an agent
func (*Client) GetAllInFolder ¶
GetAllInFolder returns all agents of the user
func (*Client) SetDefaultCredentials ¶
SetDefaultCredentials sets the default credentials of the agent
type DiscoveredDevice ¶
type DiscoveredDevice struct { SerialNumber string `json:"serialNumber"` FriendlyName string `json:"friendlyName"` ModelName string `json:"modelName"` Onboarded bool `json:"onboarded"` Agent string }
DiscoveredDevice represent a device discovered by an agent
func (DiscoveredDevice) String ¶
func (d DiscoveredDevice) String() string