Documentation
¶
Index ¶
- type DB
- func (db *DB) CreateAgent(req models.CreateAgentRequest) (*models.Agent, error)
- func (db *DB) CreateCommand(agentID string, req models.CreateCommandRequest) (*models.Command, error)
- func (db *DB) CreateEvent(agentID string, req models.CreateEventRequest) (*models.Event, error)
- func (db *DB) CreateTask(req models.CreateTaskRequest) (*models.Task, error)
- func (db *DB) CreateTodo(agentID string, req models.CreateTodoRequest) (*models.TodoItem, error)
- func (db *DB) DeleteAgent(id string) error
- func (db *DB) DeleteTask(id string) error
- func (db *DB) DeleteTodo(agentID, todoID string) error
- func (db *DB) GetAgent(id string) (*models.Agent, error)
- func (db *DB) GetCommand(agentID, commandID string) (*models.Command, error)
- func (db *DB) GetFleetStatus() (*models.FleetStatus, error)
- func (db *DB) GetRecentUpdates(limit int, since *time.Time) ([]models.Event, error)
- func (db *DB) GetTask(id string) (*models.Task, error)
- func (db *DB) GetTodo(agentID, todoID string) (*models.TodoItem, error)
- func (db *DB) ListAgents(status string, limit, offset int) ([]models.Agent, int, error)
- func (db *DB) ListCommands(agentID, status string, limit int) ([]models.Command, error)
- func (db *DB) ListEvents(agentID, eventType string, since *time.Time, limit, offset int) ([]models.Event, int, error)
- func (db *DB) ListTasks(status, assignedAgentID, priority string, limit, offset int) ([]models.Task, int, error)
- func (db *DB) ListTodos(agentID string) ([]models.TodoItem, error)
- func (db *DB) UpdateAgent(id string, req models.UpdateAgentRequest) (*models.Agent, error)
- func (db *DB) UpdateCommand(agentID, commandID string, req models.UpdateCommandRequest) (*models.Command, error)
- func (db *DB) UpdateTask(id string, req models.UpdateTaskRequest) (*models.Task, error)
- func (db *DB) UpdateTodo(agentID, todoID string, req models.UpdateTodoRequest) (*models.TodoItem, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func Initialize ¶
Initialize creates a new database connection and runs migrations
func (*DB) CreateAgent ¶
func (*DB) CreateCommand ¶
func (*DB) CreateEvent ¶
func (*DB) CreateTask ¶
func (*DB) CreateTodo ¶
func (*DB) DeleteAgent ¶
func (*DB) DeleteTask ¶
func (*DB) DeleteTodo ¶
func (*DB) GetCommand ¶
func (*DB) GetFleetStatus ¶
func (db *DB) GetFleetStatus() (*models.FleetStatus, error)
func (*DB) GetRecentUpdates ¶
func (*DB) ListAgents ¶
func (*DB) ListCommands ¶
func (*DB) ListEvents ¶
func (*DB) UpdateAgent ¶
func (*DB) UpdateCommand ¶
func (*DB) UpdateTask ¶
func (*DB) UpdateTodo ¶
Click to show internal directories.
Click to hide internal directories.