client

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents an HTTP client for the Agent Fleet API

func New

func New(baseURL, token string) *Client

New creates a new API client

func (*Client) CreateAgent

func (c *Client) CreateAgent(req models.CreateAgentRequest) (*models.Agent, error)

func (*Client) CreateEvent

func (c *Client) CreateEvent(agentID string, req models.CreateEventRequest) (*models.Event, error)

func (*Client) CreateTodo

func (c *Client) CreateTodo(agentID string, req models.CreateTodoRequest) (*models.TodoItem, error)

func (*Client) DeleteAgent

func (c *Client) DeleteAgent(agentID string) error

func (*Client) DeleteTodo

func (c *Client) DeleteTodo(agentID, todoID string) error

func (*Client) GetAgent

func (c *Client) GetAgent(agentID string) (*models.Agent, error)

func (*Client) GetFleetStatus

func (c *Client) GetFleetStatus() (*models.FleetStatus, error)

func (*Client) GetTask

func (c *Client) GetTask(taskID string) (*models.Task, error)

func (*Client) ListCommands

func (c *Client) ListCommands(agentID string, status string, limit int) ([]models.Command, error)

func (*Client) ListEvents

func (c *Client) ListEvents(agentID string, eventType string, limit, offset int) ([]models.Event, error)

func (*Client) ListTasks

func (c *Client) ListTasks(status, priority string, limit, offset int) ([]models.Task, error)

func (*Client) ListTodos

func (c *Client) ListTodos(agentID string) ([]models.TodoItem, error)

func (*Client) UpdateAgent

func (c *Client) UpdateAgent(agentID string, req models.UpdateAgentRequest) (*models.Agent, error)

func (*Client) UpdateCommand

func (c *Client) UpdateCommand(agentID, commandID string, req models.UpdateCommandRequest) (*models.Command, error)

func (*Client) UpdateTask

func (c *Client) UpdateTask(taskID string, req models.UpdateTaskRequest) (*models.Task, error)

func (*Client) UpdateTodo

func (c *Client) UpdateTodo(agentID, todoID string, req models.UpdateTodoRequest) (*models.TodoItem, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL